This removes extra code and potential memory leaks by using smart
pointers instead of calling Release() directly.
Task-number: QTBUG-38115
Change-Id: If799d6948af8c3df3d0c1617742653b104087e3b
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
As most of the Windows Runtime API is asynchronous, we have used various
methods for blocking in the calling thread waiting for the operation to
complete. This introduces an inline method, QWinRTFunctions::await(),
which performs the wait in a consistent and safe manner.
Task-number: QTBUG-39407
Change-Id: I54cd0e178aa560891ab92bfc5e7a6553e60e01b2
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Almost every native call in WinRT uses COM HRESULTS. Provide some
convenience macros for returning after failure.
Task-number: QTBUG-39407
Change-Id: Ia99b0acd771d53c52732f270e46dd6937538e131
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
It is useful to be able to detect synthesized mouse events
in GraphicsView as well.
[ChangeLog][QtWidgets][QGraphicsSceneMouseEvent] Accessors
for Qt::MouseEventSource and Qt::MouseEventFlags were added to
QGraphicsSceneMouseEvent to enable detection of
synthesized mouse events.
Task-number: QTBUG-39814
Change-Id: Ib5835fef1f484005f9b0fc86518ed32ea79cd80f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Forward canDropMimeData() and dropMimeData() to the source model.
[ChangeLog][QtCore][QAbstractProxyModel] QAbstractProxyModel now
forwards the drop-related API.
Task-number: QTBUG-39549
Change-Id: Ib81fcec862586e4ecfb99b9e0f4eb1a16eace762
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
In order to properly use QHistoryState object in QML we need to know
when these properties are changed.
Change-Id: I28c783436410c84bc64a919ac18c183f7a5eb9ad
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
In order to properly use QState object in QML we need to know when these
properties are changed.
Change-Id: I37f8295e5201686a52d448cc42db331a8f8e792f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Call the standard functions directly in GLES 3.0+ builds.
The catch here, just like with the mapBuffer changes, is that we could,
in theory, dynamically load a GLES3 implementation on the !QT_OPENGL_ES_3
path too. However this is limited to Windows currently and we don't have
a full GLES3 stack there (yet), and even when we do get it, the ANGLE
extensions for blit and multisampling will still work. Therefore this
isn't really an issue for now.
Task-number: QTBUG-38168
Task-number: QTBUG-39187
Change-Id: I343a737218c9fe438ee1603b37e93f0400d952a5
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
The support already in place for ANGLE is now extended for NV.
On ES 2.0 the only way to get multisampled renderbuffers and blitframebuffer
is through vendor-specific extensions. QOpenGLFunctions is updated to resolve
the related functions for both ANGLE and NV, in addition to EXT.
Task-number: QTBUG-39187
Change-Id: I1aab805ced3d06dde3dc547221bbf833ff8e06c2
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
The config test correctly recognizes if GLES 3.0 is
available, however qopengl.h still includes the ES2
headers. This causes issues for the new GLES3 support
patches.
Change-Id: Ia97f556cc207f7d828918f493fe1adab93cf31ec
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
[ChangeLog][QtGui] Keymaps are now changeable at runtime when using eglfs
Task-number: QTBUG-39583
Change-Id: I93480da72c1d1d1db1914298fe624cae02b0b2d0
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Will Wagner <willw@carallon.com>
This allows QQuickApplication to listen to layout direction changes
without installing an expensive event filter on the application object.
Change-Id: I2d7d8906acecbc092657c4bd918bbdc9aad9744c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This version has a few new C99 support added, including snprintf.
Change-Id: I5776456fd94254a64f08791f59bc775cb24c9b7f
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Task-number: QTBUG-39136
Change-Id: I4d2626416fae99339988cd994653ce7ec753f081
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When qtbase has been compiled with PCH and trying to compile the
disassembler in QtDeclarative creating the PCH for "C" is failing
due the C++ includes. Guard the includes with __cplusplus to be
"usable" on C code. This guard is proposed for the "stable.h" in
the qmake precompiledheaders documentation.
Change-Id: I7a8fb9e59c666a2e1535d988fd71c5cd67d0587d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
According to the spec rects get returned with iiii but we were directly
serializing QRect resulting in (iiii) as signature.
This would trip up Orca when trying to use flat review in text edits.
Task-number: QTBUG-39702
Change-Id: I8d6769688586e678d27cc4341de5176a91f057fc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Increase and decrease actions can be generally applied to any value
interface. We therefore make them available regardless of the
existence of any action interface.
Change-Id: I82ba01965dc869439b9d741ce681e0c0687263ca
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
To support increment / decrement of sliders, dials and spin boxes.
(anything with an {in,de}crementAction or a valueInterface.
Other platforms will follow the same pattern in follow-up patches.
Task-number: QTBUG-38832
Change-Id: Ie570acc39b3d9494a8bb9f624b61a398b1d8de89
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Task-number: QTBUG-39215
Change-Id: I727a12fa9696e22d3f31393a0fe2f9392afbfe45
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
There's now a C++ standards Standing Document that defines preprocessor
macros in the same way that we used to. So we no longer need to define
them ourselves. The current macros are kept for compatibility purposes,
for the compilers where they used to be defined.
The list will not be extended with new macros or for new compiler
versions.
[ChangeLog][Deprecation Notice] The Q_COMPILER_xxx macros for C++14
compiler features introduced in Qt 5.3 are deprecated and will not be
updated for new compilers either. User code should be changed to use the
macros from Standing Document 6 instead:
http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations.
This does not affect C++11 feature macros.
Change-Id: I246afb84263f3d7ff72ccc0bc44bf86a6fc7cd96
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change the semantics of QWindowPrivate::screen to contain the screen of
top level window only. Child windows always return the screen of their
toplevel window by recursing up.
The QPA plugins then no longer need to report screen changes for child
windows.
Change setScreen() accordingly, bail out for child windows, and
emit screenChanged() recursively.
Also add a check to setParent() preventing screen changes.
Task-number: QTBUG-36659
Change-Id: I19c8e12217cba1513e947a027f2492abc7b98816
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
ICC 14 (Intel Composer XE 2013) already supported range for and explicit
conversions, but looks like we missed adding them.
ICC 15 (Intel Composer XE 2015) is C++11 language feature complete.
Change-Id: I6eb8a3059f5df3604716666311aa01a6cf01918d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Orca is extremely picky when it comes to key presses and modifiers.
Sending ctrl as modifier for itself for example seems to break things.
Also use the ATSPI modifier constants, weird as they are.
Task-number: QTBUG-39361
Change-Id: Id809e0dd2a7d20a533bd783888ccbdf748becacc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
If -qreal float is passed, fullCpuArchitecture() will now include
"-qreal_float". If something else other than "float" is passed to
-qreal, we'll try to encode it (e.g., -qreal "fixed<int, 7>").
Change-Id: Ie33fd1a643f4376e6f01a7966e01c7c34e6fcffd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The next commit will add something to ARCH_FULL that requires
qconfig.h. That means we can't extract the full info until qconfig.h is
created, which hasn't happened yet at the time that config.tests/arch is
compiled.
Change-Id: Icbbd8c448423a93296a986ede3771e82e4d61e07
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
When using a linear index, all items in a scene are stored in a QList.
While adding new items is a constant operation, removal requires a
traversal through the entire list. This is especially problematic
when the scene contains millions of items and many of them are removed,
which requires a linear search for each item, resulting in a very slow
operation. Moreover, this behavior is actually inconsistent with the
current documentation which states for the linear index:
"Adding, moving and removing items, however, is done in constant time."
Instead of removing items from the list in the index, this patch just
marks the list as invalid. The next time the list is required it will
be rebuilt from scratch by traversing all items from the scene. This
new behavior more accurately matches the documentation.
Testing this change in a scene with over 1 million objects, resulted
in a massive speed up, effectively eliminating the overhead of item
removal.
[ChangeLog][QtWidgets][QGraphicsScene] Speed up the removal of items
when using the linear index.
Change-Id: I95c7b90b9f1fe426018695b6429138530e6d2f3e
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Enable QWindowsMimeConverter to use external mime handlers which it
does not own.
Task-number: QTBUG-39559
Change-Id: Ife6607dffd9571fa4aa12fffdc61b42662182b0a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This makes it possible to retrieve the EGLConfig used by Qt to
create the QOpenGLContext. QtWebEngine needs this to be able to
get rid of EGL_BAD_MATCH errors on certain hardware by using the
exact same EGLConfig in Chromium as used by Qt.
Change-Id: I049c0d8637c44acfe160230e4bb81364d66413ab
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Currently QJsonValue and QJsonValueRef behave differently in
regard to the default values leading to confusion compile errors
depending on which of the two types one is actually using. Before
this change it was possible to write:
QJsonValue value = jsonObject["item"];
QString name = value.toString(QStringLiteral("default"));
but not:
QString name = jsonObject["item"].toString(QStringLiteral("default"));
Change-Id: Id1185acf339aa3a91e97848e85d068f84552df71
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
-"HTML.tocdepth" variable controls depth value.
-setting to "0" disables table of contents.
-sections 3 and 4 usually don't have descriptive titles
to warrant their listing in the table of contents.
-table width and CSS (online and offline) don't support wide entries.
-Config class' getInt() function now returns -1 if a variable is
not set.
-for Qt 5 and projects which use html-config.qdocconf, tocdepth is
set to "2".
-added variable documentation.
Task-number: QTBUG-38967
Change-Id: Ibd612f5b846ecb9c4b575e7ac11605c6efd2b77c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
A disconnectSignal() call with a wrong signal name caused that hook
wasn't found and thus kept in QDBusConnectionPrivate::signalHooks
forever.
Change-Id: Id7cda225be7580529fc835b377636226abb229f9
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This lays the foundation for iOS accessibility.
The approach is slightly different from other a11y bridges in
that we completely flaten the hierarchy of wigets/quick items to
a list. This works well with VoiceOver since there are comparatively
few elements. The cache implementation for OS X is re-used.
With this patch VoiceOver on iOS works on many applications out of the box.
For now it sends the screen changed notfification somewhat overzealous,
that will need revisiting and potentially new API in QAccessible.
Device orientation changes are not yet supported.
[ChangeLog][iOS] Accessibility was added to the iOS platform port.
This enables Qt applications to be read by VoiceOver on iOS devices.
Task-number: QTBUG-39097
Change-Id: I441e844652d528cc2fdcc444f43b54ed6fa04f0c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>