Follow the usual pattern:
Add a config test and automatic include of GLES3/gl32.h if there
is a GLES 3.2 capable header+lib at build time.
Then, regardless of this being enabled, expose all new 3.2 API
functions in QOpenGLExtraFunctions and resolve them dynamically
at run time.
This way 3.2 functions will be available when deployed to a 3.2
capable system (or OpenGL 3/4.x with the functions in question
available) regardless of what was present in the sysroot at build
time.
Change-Id: Ia52551f3178591e1e56ceac8e45d89c6b13f4927
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QT_CONFIG and some other macros are unavailable there.
Change-Id: Ia53158e207a94bf49489fffd14c8d306e2dbd9d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The platform window is now protected by a QPointer, so we don't need
to juggle the NSWindow retain count.
Task-number: QTBUG-37287
Change-Id: Id55ea311f0793370e248aa58cc8e383b574fbb40
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
And their corresponding synthesizations. The compiler will take care
of it for us.
Change-Id: Ifa42e0732059008af6f3f65151bf203a1a19079d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We now track the platform window with a QPointer, so the event callbacks
can (and do) check the validity of the platform window before passing
them on. The window property of the NSView is also nil at the point of
even delivery, if we need another way to check if the event is still
valid.
Task-number: QTBUG-39211
Change-Id: I6179bdb3af9606cd0abf981c0fe6cacb9a2d98ab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: I73c8385d4ef175acad218993be32494eb3a0d6e0
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It breaks sth in QLocalSocket which is used in QtRemoteObject.
This reverts commit 5c6210e345.
Task-number: QTBUG-61668
Change-Id: Ib11890923773496e5d998b7709ef93b0a839a759
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The main app shared library and shared dependencies are not automatically
deployed when the apk is placed in /system/app or /system/priv-app. In
such cases, we need to place these libraries in /system/lib and tell
QtLoader to load them from here. It is possible to specify a custom
library path in AndroidManifest.xml.
[ChangeLog][Android][QtLoader] Enabled loading shared libraries from
/system/lib or a custom path specified with the
android.app.system_libs_prefix metadata variable in AndroidManifest.xml.
This allows deploying Qt apps as Android system apps.
Change-Id: I8388e91a53475b06a027467face45c08f096fbf8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The code was introduced in 28c9c2ea50, but child NSWindows are no longer
supported, so we can simplify the code by removing it.
Change-Id: Ic98b8b0e0a84d5f2adba1840bd8318de2be031b6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Like other QWindow properties we can just store it, and the platform
window should pick it up on creation like other properties.
[ChangeLog][QtGui][QWindow] setMask() no longer requires the window
to be created to have an effect; it can be set at any time.
Change-Id: I55b616363801b770bd61bda5325b443013b99866
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Use the Q_XCB_REPLY() macro and let its unique_ptr<> take care of
free()ing the reply.
Change-Id: I32eb9c56ea0ba5632bf6ab39c77567d10f442995
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Although [0] claims "This request does never generate any errors", it
seems I sometimes get back a NULL pointer from
xcb_randr_get_output_property_reply(), leading to a segfault (in the
qdatetimeedit auto-test). So check reply isn't NULL before
dereferencing it.
[0] https://www.systutorials.com/docs/linux/man/3-xcb_randr_get_output_property_reply/
Change-Id: Iadae835bb3017bf9bb40f180b75b0c391384f99b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Follow the pattern used to guard Private::sort() calls elsewhere in the
class.
Because QAbstractItemModel::sort() is not called in the unit test, the
content is not sorted after resetting.
[ChangeLog][QtCore][QSortFilterProxyModel] QSortFilterProxyModel
now does not emit an unnecessary layoutChanged() following a model
reset.
Change-Id: I0a36c7fbb172bdd06ecddb489c5595debbef6cb9
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
All QWindow implementations must produce a frame before
returning from the expose event.
Change-Id: I5640809c47e948101879c1623c12230fa0a63c44
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Makes the qle_bitfield template more generic and moves it to qendian_p.h
It is also hardened to be more reliable.
Change-Id: I53214ec99cceee4f5e8934ae688c99e555a5fb42
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They have a native maximize/zoom button in their titlebar, so there's no
reason for us to prevent the same action via the API. The only states
that are prevented are minimized and fullscreen.
Change-Id: I84fa48b31b243fa838c90ecdeee92a2f3448ee14
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Ia0eddcb385207ada8c3df59d49ff1de27a2aeb71
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
... as it does not add much value and is not widely used.
and cleanup code:
- where we repeatedly (for no good reason) call DISPLAY_FROM_XCB,
instead of storing display as a (member) variable.
- inconsistency where we (in the same function) alternatingly
use DISPLAY_FROM_XCB and variable holding pointer to Display
(when both refer to the same display).
In other places this patch replaces macros with code they would
translate to (or with minor adjustments to keep sensible line length).
Change-Id: Ieb2a3e055892dcf31f132891f83ed4a665e3fa6e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
[ChangeLog][QtCore][uic] Ignore old images embedded in ui files,
which were imported from Qt 3. uic will now behave consistently
with Qt Designer - both will ignore them.
Change-Id: Ib2dfd0bb28c0532463fdee2d46a8f0979c28c80c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Avoid the dimensions of the rounded QRect being off by more than one
pixel. This ensures the aligned containing rect also contains the
rounded rect.
Task-number: QTBUG-56420
Change-Id: Ib79110e51ab80de2dc83d01ea83fc5fbf3852e75
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QWinEventNotifiers were limited to 62 instances, because of
WaitForMultipleObject's limitation to MAXIMUM_WAIT_OBJECTS - 1 handles.
Use the RegisterWaitForSingleObject API which does not have this
restriction and executes waits in threads managed by the system. A
central manual reset event per event dispatcher is signaled in the
RegisterWaitForSingleObject callback and waited for in the event loop.
[ChangeLog][QtCore][QWinEventNotifier] QWinEventNotifier is not
restricted to 62 instances anymore.
Task-number: QTBUG-8819
Change-Id: I2c749951453a4b699cc50dada0d6017440b67a4a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
qdeadlinetimer.cpp and qelapsedtimer_*.cpp are not part of the bootstrap
library. Instead of adding them there, just remove this entropy source
from bootstrapped builds (instead of just qmake).
To compensate, store all the bits instead of trying to combine them into
just one 32-bit word. We've got a few new sources from the stack and
libc, plus two more ELF auxvec values that the Linux kernel supplies
(inspired by OpenBSD's getentropy_linux.c, which is used in Bionic).
Task-number: QTBUG-61492
Change-Id: I1d5a585d4af842f9a66ffffd14c999ae8c44f46c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This reverts commit e147c3d413. There is
one symbol from QDeadlineTimer that isn't in qdeadlinetimer.cpp for
performance reasons. Anyway, QDeadlineTimer is no longer needed, as the
previous commit removed its need.
Change-Id: I9b79e7f052824a475ba8ab16fe8ad10874794b8c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Currently a file with a .9.png extension will only have its @2x variant
found if it follows this format:
foo.9@2x.png
Since ".9" should be considered part of the file suffix, it should
ideally be able to look like this and still be picked up:
foo@2x.9.png
This patch makes qt_findAtNxFile() account for .9.* extensions.
This is needed for the image-based style support in Qt Quick Controls
2, which uses 9-patch images.
qmlbench benchmark results using
benchmarks\auto\creation\quick.image\delegates_image.qml with
QT_SCALE_FACTOR=2 show no difference in performance after this patch
is applied.
[ChangeLog][QtGui] High DPI variants of 9-patch images can now be
loaded using the following syntax: "foo@2x.9.png"
Change-Id: I6d1384113bef21b4fe85a104ee6b16869c93b077
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
[ChangeLog][QtNetwork][QNetworkProxy] Setting of network proxies is now
supported on UWP.
Task-number: QTBUG-45495
Change-Id: I71fed57910197760334f8e7d2aeac36c4e0d4f51
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The return order of the keys is random, so let's sort both first, then
we can compare the lists. Should get rid of the test flakiness.
Change-Id: I2e89d3cc603da6a4667b3677350baa4d40d59b45
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Revert commit a1d4e4c9: We’re now using QWidgetWindow
API from QWidget code.
Add QWidgetPrivate::windowHandle() which returns
a QWidgetWindow pointer. Use this function to remove
casts where QWidgetWindow API is used.
Change-Id: Ie66a69b5c0461f297996118dc907e1d7b3d78df5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
After d7a9e08f, calling QWindow::setVisible(true)
is a no-op if the widget is already visible.
Use QWidgetWindow::setNativeWindowVisibility() instead
to set visibility for the native window directly.
“Upgrading” widgets to be native widgets now works
again.
Change-Id: Id68dd8241f3afe00670c07e30e2b2ade9c150354
Task-number: QTBUG-61006
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Split into (internal) QTest::qInit(), qRun(), and qCleanup(), that
allow qtquickcontrols2 to initialize the test framework once, repeat
the tests for all built-in styles (Default, Material, Universal), and
finally cleanup things:
$ ./tst_qquickbutton text
********* Start testing of tst_QQuickButton *********
Config: Using QtTest library 5.10.0, Qt 5.10.0 (...)
PASS : tst_QQuickButton::Default::initTestCase()
PASS : tst_QQuickButton::Default::text()
PASS : tst_QQuickButton::Default::cleanupTestCase()
PASS : tst_QQuickButton::Material::initTestCase()
PASS : tst_QQuickButton::Material::text()
PASS : tst_QQuickButton::Material::cleanupTestCase()
PASS : tst_QQuickButton::Universal::initTestCase()
PASS : tst_QQuickButton::Universal::text()
PASS : tst_QQuickButton::Universal::cleanupTestCase()
Totals: 9 passed, 0 failed, 0 skipped, 0 blacklisted, 2215ms
********* Finished testing of tst_QQuickButton *********
Notice that QTest::qExec() cannot be called multiple times, because
it would print the headers/footers/results separately for each round.
Change-Id: Ibb24b694491d4e790db32e40837c3a5c6d9d2840
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The private feature was only used by QToolBar to solve QTBUG-33082, but
the solution doesn't work, and complicates the macOS platform plugin
quite a bit.
A better solution is likely to use Core Animation layers, which is a
direction we're going in anyways. To make it easier to modernize the
macOS platform plugin, including moving to using layers, we remove the
child NSWindows codepaths for now.
Change-Id: I4b19464be3980fd84dd7af8316d4d5e85ba813b1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Fixes build with -no-accessibility.
Change-Id: Ia58c11b22f08a51d5978e4a002480d265aa10fbd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The endian integers have more use than just in QJson, and is already
used separately by QtDeclarative. This patch moves q_littleendian out
of qjson_p.h and matches it with a corresponding q_bigendian, and puts
it to use in simplifying endian handling in the ico image handler.
Change-Id: I975bb701a089256db8ced3cb53b4bd62cdfb02dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This class allows to node definitions from a JSON representation. This
will come in handy to ship preset prototypes for use with
QShaderGraphLoader.
Change-Id: I3f3b5d7852e17d484069b4814ee6e5910997c613
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This class allows to load a shader graph from its JSON representation.
To avoid duplicating the shader snippets inside of the JSON which would
be a maintenance nightmare, we instead allow to register a set of node
prototypes by their name and only refer to said names inside the JSON.
Change-Id: I3e7b39e8b3c25f51f331a0a59dda883ac8e2bc57
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This class is meant to generate code from shader graphs
Change-Id: I1cf22352387f3f9f55e7589aa77a296689836911
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This is our "byte code" representing a flattened graph. It will be used
as input for the code generation.
Change-Id: Ie02a60d07c035f3d16872e79931eb7cde168a8d1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This allows to connect our nodes together via ports. This way user code
can assemble a shader from simpler blocks.
Change-Id: I168dcf4af6aa11ad47b68d91e5a55e96ca922678
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>