All our tests were find() == end() or !=, which depends on the
evaluation order of the arguments to operator==(). If end() is called
first, then the detach happens before find() and all is well. But if
find() is called first, it may return end() before end() detaches.
[ChangeLog][QCborMap] Fixed a bug that could cause the iterator returned
from a failing key search with find() not to match end(). Now, every
call to find() will detach in shared QCborMaps; to avoid this, use
constFind() and constEnd().
Fixes: QTBUG-84583
Pick-to: 5.15 5.12
Change-Id: I552d244076a447ab92d7fffd161793496a8d03a8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The next_in pointer in z_stream is defined as "z_const Bytef *" but
z_const is actually an empty macro in most builds. Since our data is
read-only constexpr, we need this const_cast to compile.
Fixes: QTBUG-84457
Pick-to: 5.15
Change-Id: Ied637aece2a7427b8a2dfffd1612a01ae46f7c1a
Reviewed-by: David Faure <david.faure@kdab.com>
Strawberry Perl has been found to ship a libfontconfig.
Change the exclusion to win32.
Fixes: QTBUG-85184
Change-Id: Ic953ba3226c275a204720ff83161fba138eae0cb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
A QVLA is copyable, so it should be movable, too.
Added a helper function a la P1144's uninitialized_relocate_n to deal
with the QTypeInfoQuery stuff. This way, the code is re-usable
everywhere it's needed. The same cannot be said for QArrayDataOps,
which only a parent can love...
[ChangeLog][QtCore][QVarLengthArray] Added missing move constructor
and move-assignment operator.
Task-number: QTBUG-39111
Change-Id: If0dc2aa78eb29062d73dcd3dc4647ba345ae39e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Needed for using native textures in WebEngine.
Task-number: QTBUG-78682
Change-Id: I8458b17767bb992357064d85f159781ea24e61dc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Freetype's fake emboldening does not give good results for large font
sizes.
Pick-to: 5.15
Fixes: QTBUG-84570
Change-Id: I1a7722c1482e3450e5a549c31c9766d930fcd13a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The comment says we don't need synthetic italic for oblique, but
synthetic italic actually *is* oblique, since there is no way to
synthesize italic. So just remove the comment as it is unclear
what its purpose is.
Change-Id: I72f727b958e817e376d73f6c001d410a5f55a152
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is a commit in preparation for an upcoming change in QtQuick.
We want to store the resolved functions for managing VAOs somewhere;
the "least worst" choice is next to the all other function resolvers,
which are in QOpenGLContext(Private).
To avoid moving the VAO resolvers themselves, leave a hook in
QOGLCPrivate, similar to e.g. the texture function resolvers. The hook
gets populated when the VAO resolvers for a given context are
requested.
This removes memory management burden from the users of those functions
(again, just like other function resolvers), and makes the
initialization of the functions automatic.
Change-Id: I0eba30a85bf8ad82946a5d68e91009d8b4bd91cf
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Requires moving construction and destruction of the IConnectionPoint
(contained in QNetworkListManagerEvents contained in
QNetworkStatusMonitorPrivate) and the calls to CoInitialize and
CoUninitialize to start()/stop() so it can be taken down
and brought up in a reasonable way.
Partial squashed cherry pick of bde6b27882
and the following fixup patch 84be436ef0.
Task-number: QTBUG-84031
Change-Id: I9d644261c6c730ea511e28d75da91bd34504bd03
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit bde6b27882)
(cherry picked from commit 84be436ef0)
They were deprecated with replacements in QSslConfiguration proposed (and
some without alternative, which we'll provide if there is any demand
in such an API). Special thanks to M.N. for a nice hint on how to
amend the test without introducing a new API.
Change-Id: I7841a5b3f30469d8204b61cb65921c34275e0650
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The idea was to keep nagging us to update all the platform plugins to
do device registration. But besides being annoying, it would cause
test failures if we start adding QTest::ignoreMessage() all over,
and then some platforms start doing device registration properly.
Change-Id: Ia0fbb64cf86f33532be032ec9eebe6e4ad607f20
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This enables the order of boundValues to be consistent as with a QMap
it could have been reordered which can be a problem for positional
bindings.
[ChangeLog][QtSQL] Changed signature of QSqlQuery::boundValues() to
return a QVariantList
Fixes: QTBUG-51609
Change-Id: I1c80fa8522fa7352723420b6fc9ec466406315fb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This code was introduced in 2011 as an experimental feature
and have been untested/unmaintained ever since. It's time to
remove it for the following reasons:
- It has never been documented in QGuiApplication under
"Supported Command Line Options". The intended command
line was: ./app -platform xcb:address:display
- I am not aware of other toolkits that would provide this
functionality - connecting to several X displays simultaneously.
- XCB plugin respects the "-display" command line and DISPLAY
envvar which should be sufficient. So the "workaround" to get
your window on 2 X displays is:
./app -display :0
./app -display :1
- There are no JIRA bugs where users would complain that this
feature does not work. AFAICT it has not worked for years.
Almost all functions care only about the "default" connection,
and don't attempt to support multi-connection.
- This will stop confusing people who want to contribute to
the XCB plugin.
[ChangeLog][Platform Specific Changes][X11] Connecting to multiple
X servers simultaneously within the same application is no longer
supported.
Task-number: QTBUG-52408
Change-Id: I61ce23480702bb89b02c6028fa0986fe63481978
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Even it was not marked as deprecated the replacement function initFrom()
is available since Qt4 times (and init() is deprecated since then)
Change-Id: I09a4ebbf66b01fbe7aec67691dc68d2e42d1cd78
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Android platform event of activating accessibility might be received,
before the platform plugin is initialized, thus disregarding the activation
step.
This change saves the activation event state and defers setting it in
platform integration.
Fixes: QTBUG-77320
Pick-to: 5.15 5.12
Change-Id: I06aab76159d1de0e72c0c535dbe80c2858f8e79b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Has minimal configuration in order to achieve fastest build times.
CCache is on, and PCH is off as it significantly reduces the Ccache hit ratio.
This Github Workflow has been measured to take around
+ 30min without any Ccache hits and 8min for a rebuild, on Linux
+ 20min without any Ccache hits and 4min for a rebuild, on macOS
+ 1h without any Ccache hits and 20min for a rebuild, on Windows
The goal is to use such Cloud building and testing systems as "smoke runs",
providing quick feedback, much sooner than the canonical approval from
Coin. Additionally having many independent systems helps verify "flakiness"
issues. Another big advantage of such systems is their hackability, allowing
someone to tweak the build parameters by just editing a couple of YAML lines.
Change-Id: I7eca22f513516b9e61f333fb1fe89ab11ed2d1d1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
lgtm.com is already picking up qtbase's mirror repo on github, trying to
analyze it. Because it lacks build instructions, lgtm.com fails to analyze the
C++ code, and only presents flaws in the little python and javascript code
that is in the repo. With the file in this commit, it should be able to
analyze the C++ code too.
Change-Id: If558d26800e76c1b8590ed1aaf28adb6c0d6e188
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
And name the main class QList. That's also the one we document.
This gives less porting pain for our users, and a lot less churn
in our API, as we use QList in Qt 5 in 95% of our API.
In addition, it gives more consistent naming with QStringList and
QByteArrayList and disambiguates QList vs QVector(2|3|4)D.
Fixes: QTBUG-84468
Change-Id: I3cba9d1d3179969d8bf9320b31be2230d021d1a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Remote URLs were converted to local file urls and converted to relative
paths, which led to bugs when copying URLs from e.g. the web
sites and pasting them into the command line.
Original patch by Allan Sandfeld Jensen.
Task-number: QTBUG-80243
Change-Id: I2cd41635b34b2ead424441719795705ef19d37f2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
They were deprecated since Qt5.0 so it's time to go away.
Change-Id: Ib0192f9048ff15c9d47fb1a23046ccfe0ee7d807
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It does not return anything and was already deprecated in Qt4.8 (and
already returned an empty QList back then)
Change-Id: I3a2f1b79081d3289d13ba9fdee346aa730d16114
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Assume UTF-8 on all Unix like systems
* Export some functions to be able to compile QTextCodec once
moved to Qt5Compat.
Task-number: QTBUG-75665
Change-Id: I52ec47a848bc0ba72e9c7689668b1bcc5d736c29
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
There is no reason for keep using our macro now that we have C++17.
The macro itself is left in for the moment being, as well as its
detection logic, because it's needed for C code (not everything
supports C11 yet). A few more cleanups will arrive in the next few
patches.
Note that this is a mere search/replace; some places were using
double braces to work around the presence of commas in a macro, no
attempt has been done to fix those.
tst_qglobal had just some minor changes to keep testing the macro.
Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QStringView doesn't need to convert qsizetype parameters to int.
Change-Id: Iba8b5259ab3ed7a24a57bb6748446fd3e45bb182
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
In case drainOutputPipes() makes a recursion, setting 'dying' to true
should protect the code from reentering. But, the next call to
QProcessPrivate::cleanup() resets this variable, which allows a
secondary pass. So, we should postpone setting 'dying' to false until
a new process session is started.
Fixes: QTBUG-33731
Change-Id: I269ad3b8defa32aa714ea13f8803a07259f475dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is useful information for people that want to use Qt in their
project with CMake.
Unfortunately there is no good way to actually set
CMAKE_OSX_DEPLOYMENT_TARGET automatically with the Qt provided value,
because it needs to be set before the first project() call in a
CMake project.
This means it can be set either on the command line, or manually by the
application developer in CMakeLists.txt before the first project()
call or via a CMake toolchain.
In Qt 6 we provide a CMake toolchain file with the deployment target
already set, so if the application developer uses the Qt generated
toolchain, they will get the value automatically.
In Qt 5 the value can only be read for informational purposes only,
from the QT_DARWIN_MIN_DEPLOYMENT_TARGET property on the
Qt5::Core target. The same property is set in Qt 6 for compatibility
resons.
Task-number: QTBUG-76167
Task-number: QTCREATORBUG-22466
Pick-to: 5.15
Change-Id: Id61d70dc9a1b7a0e7cdb90b1e679171ea178126b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We must filter out expressions of the form $<TARGET_PROPERTY:name>, because
1. They cannot be used in file(GENERATE) content.
2. They refer to the consuming target we have no access to here.
The CMake error
Error evaluating generator expression:
$<TARGET_PROPERTY:QT_PLUGIN_CLASS_NAME>
was triggered when building the UiPlugin module of qttools.
Change-Id: Idf639be50120b94d68a70965604e6f1ef72edc9b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It is architecture defined whether .align means .palign or .balign. Use
.balign to make that explicit.
Change-Id: I8c7e3760b37edfb207b7088319a338a1f583255b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The addition of CMakeLists.txt in other directories made the reference
ambiguous. Also fix the Qt version.
Change-Id: I679d86a302ae6c41b84ded66e3f21c5320e4b325
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This was causing some bogus failures in Qt Quick autotests.
Existing APIs like QQuickWindow::mouseGrabberItem() are not really
compatible with the idea of a mouse-less system; but perhaps we can
revisit this later.
Task-number: QTBUG-85114
Change-Id: Id1c2e5894e5cf13a79998aaea28d5f42fad920cf
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
And not +. Guess what, this was "accidentally" working around
a number of bugs, most importantly QTBUG-75172 (which is caused by
QTBUG-74639 and probably others).
Change-Id: If13810d9408f2be7b87f0d259737bff8cacc6f7b
Pick-to: 5.15
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
Amends 6589f2ed0c to match the comment.
If the master device we found is a keyboard, then its own ID is the
keyboard ID, and the attachment is a pointer; but if the master device
we found is a pointer, then its attachment is the master keyboard.
In practice, this gives all devices the same seatId on normal
single-user sessions.
Change-Id: Ibe7d7cdee7b3fe642efacd0349c109271059cb36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Embedding the initial CMAKE_CXX_COMPILER into qt.toolchain.cmake
breaks Boot2Qt builds, because the CXX environment variable is not
used anymore when building qtsvg or other projects.
Disable automatic embedding when cross-compiling, while keeping it
enabled for non-cross-compiling cases (to keep Windows and
and ICC configurations working).
Allow opting in or out of the embedding in case if the default is
wrong, via QT_EMBED_TOOLCHAIN_COMPILER.
Task-number: QTBUG-85067
Change-Id: I1d8f9f580bc379b77c34eefb5728bb49f93cc81a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We want every QInputEvent to carry a valid device pointer. It may be
some time until all QPA plugins are sending it, but it's necessary to
provide the functions for them to start doing that.
We now try to maintain the same order of arguments to all the functions.
handleTouchEvent(window, timestamp, device, the rest) was already there
(except "device" has changed type now), and is used in a lot of platform
plugins; so it seems easiest to let that set the precedent, and modify
the rest to match. We do that by adding new functions; we can deprecate
the older functions after it becomes clear that the new ones work well.
However the handleGestureEvent functions have only ever been used in
the cocoa plugin, so it's easy to change their argument order right now.
Modify tst_qwindow::tabletEvents() to test new tablet event API.
Task-number: QTBUG-46412
Change-Id: I1828b61183cf51f3a08774936156c6a91cfc9a12
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Documented QPromise. Added snippets under auto tests
to ensure they are compiled and run in CI.
Task-number: QTBUG-81586
Change-Id: I20084e38f9d2f6fc8540f95ee03ec3d2827177e8
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Change the meaning of Q_PRIVATE_QPROPERTY to imply that the property is
implemented using a QNotifiedProperty. That requires passing the owner
object instance to the value and binding setters.
Similarly, detect QNotifiedProperty members like QProperty.
Change-Id: If49bbb04c8ccd4a661973888c50d2d556c25034f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>