The label pixmap may be a high-dpi pixmap. Set the ControlLabel
fixed size to be the pixmap device independent size.
Fixes: QTBUG-87871
Pick-to: 5.15
Pick-to: 6.0
Pick-to: 6.1
Change-Id: Ib836e322d25599cb5e79011ea597e32ee1f8d093
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
That qWarning cannot be in the child process (we don't know if a user
logger is fork-no-exec-safe) and the failure to chdir() should be
reported as a failure in QProcess::startDetached() instead.
Change-Id: Ic90d8429a0eb4837971dfffd1664e7577c81610b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: David Llewellyn-Jones <david.llewellyn-jones@jolla.com>
That only created an opportunity for qWarning(), which should never be
in the child process in the first place.
Change-Id: Ic90d8429a0eb4837971dfffd1664e57a2291ea78
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: David Llewellyn-Jones <david.llewellyn-jones@jolla.com>
We were setting IsUp for both the ifinfomsg::ifi_flags field and
IFLA_OPER_STATE message. Turns out the second matches the "RUNNING"
state that ifconfig used to return (IFF_RUNNING from SIOCIFFLAGS).
Example:
$ ip link show vboxnet0
4: vboxnet0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
$ ifconfig vboxnet0
vboxnet0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 0a:00:27:00:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
In this example, ifconfig is not showing "RUNNING", so its "UP" matches
iproute2's in the <> section (that's the interface's ifi_flags). In an
interface that ifconfig shows RUNNING, iproute2 will show "state UP",
which is the IFLA_OPER_STATE.
Exception: looks like the loopback has IF_OPER_UNKNOWN.
Change-Id: Ic90d8429a0eb4837971dfffd1664bfc3f4b4e030
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
To enable QSslCertificate to use TLS plugins. All backend-specific
code is to be moved from QSslCertificate(Private) making them
backend-neutral.
Task-number: QTBUG-90954
Task-number: QTBUG-65922
Change-Id: Ic9d5abf91e42ce81fe56239f95ae97b64035e950
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 405337ee7276be4b76e86745c0694c51283b6b07)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Potential issue caught by the Mårten static analyzer.
In case another thread somehow ended up creating and returning
an instance while another was waiting to relock it would deallocate
the previous instance, which could lead to some bad situations.
Pick-to: 6.1
Change-Id: I6e1843f8a483b2c3e0540e998c383e41f59c8655
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Don't print stacktrace when setService is not found but only print a
debug message, QtServiceDelegate will continue to look for setContext
which might actually be a problem if not implemented.
950e628fd8
did this change for QtActivityDelegate.
Fixes: QTBUG-86733
Pick-to: 5.15 6.0 6.1
Change-Id: I8f2c6494da9133a3e9dedaabbe5fc931732d0d72
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
We had two workarounds:
* script that adds Gui to tests
* create a symbolic link for the qt install dir to fake_prefix which
androiddelployqt was expecting them to be under
Both issues are fixed, thus removing the workarounds.
Pick-to: 6.1 6.0
Change-Id: Ic022bece15afe92c693d573893d260b13b4227ed
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
QMake used to allow retrieving the Android features list for a modules.
The dependencies are written to *-android-dependencies.xml files and are
read by androiddeployqt. This option was missed at some point along the
way of writing CMake port for Qt 6.
Pick-to: 6.1 6.0
Change-Id: Ic0b82f024567e640968f97aeff2db1888f2b53a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This will be used to access host tools that are installed in
${prefix}/libexec instead of ${prefix}/bin.
Pick-to: 6.1
Change-Id: I36c4b5736330f8229d267a117c65d55cd5e12758
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
msvc produces warning there and it is treated as error
Pick-to: 6.0 5.15
Change-Id: Ic386df615df591fa1563b147342d670bbec771d2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
I get a warning about the variable t_var being set but not used.
This patch fixes the warning.
Change-Id: Ib2df5ed2dddd283eb87f71a8b85951d1f67f04f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Prompted by a PVS-studio article.
The count <= 0 check made a later !count check redundant.
Change-Id: I6c00ad6137b14db13c9c31c61833b4546f663072
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It happens after the same socket check has lead to an early return.
Prompted by a PVS-studio article.
Change-Id: I63b42abed9102df73d29e6ff8a89a475751d4b91
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It was comparing time->second() to MSECS_PER_DAY - 1, but
time->second() is the second within its minute, so is at most 59.
It should be comparing seconds into the day to SECS_PER_DAY - 1.
Prompted by a PVS-studio article.
Pick-to: 6.1 6.0 5.15
Change-Id: I1802c49fa18818f4b4fe74f187da5f799df7d1de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Registration by ID allows for detection of duplicate instantiation of
built-in back-ends, which can be detected and flagged by setting the
ID to ~size_t(0) instead of the enum value for which it sought to be
registered. A new method, calendarId(), is provided to access this;
while the old calendarSystem() becomes non-virtual, as it can be
inferred (when registration was successful) from the ID.
Make registration by name or alias conditional on successful
registration by ID. Previously, failed registration by name precluded
registration by ID, which now becomes the authoritative registration.
This incidentally makes it possible to add a QCalendar constructor
taking the unique ID of a backend, for use in conjunction with custom
calendar implementations.
Change-Id: Ib22925a8ac3ef9439a09ec3855f6231cf9b91c21
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The QTimeZone tests have some helper functions to test details of a
QTZP instance; these use QCOMPARE(), so may return early on failure.
The callers then need to notice the failure and, in their turn, also
return.
Change-Id: I0a188e9641ced70c9ffedd95e91f39681fad768a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Trivial details picked up during the course of investigating a
time-zone issue.
Change-Id: I4d6e7ab1787a2500bd950e7f12ed8618a31f1f8e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
QAndroidTimeZonePrivate overrode the transition-related methods of its
base, but there was no point in doing so, since our Android backend
has no access to transition data, just the same as the base
implementation.
Change-Id: Ie4ff375381b463078b412f50e8ddc925ab1587a3
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Its back-end lacks transition data, so the test can't possibly
succeed. Make the skip conditional on the tested zone having
transitions, so that the test will come back into play if we ever gain
support for transitions on Android.
Fixes: QTBUG-69129
Change-Id: Ie4f96601b8b18cd496efbde7cf2557875cf3c1c9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Fix:
qtbase/src/testlib/qtestelementattribute.cpp:89: (qdoc) warning: Undocumented enum item 'LET_Message' in QTest::LogElementType
qtbase/src/testlib/qtestelementattribute.cpp:89: (qdoc) warning: No such enum item 'LET_Error' in QTest::LogElementType
qtbase/src/testlib/qtestelementattribute.cpp:89: (qdoc) warning: Undocumented enum item 'LET_SystemOutput' in QTest::LogElementType
qtbase/src/network/ssl/qsslsocket.cpp:1666: (qdoc) warning: Unknown command '\cl'
qtbase/src/corelib/kernel/qproperty.cpp:883: (qdoc) warning: Unknown command '\T'
qtbase/src/corelib/kernel/qproperty.cpp:799: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
qtbase/src/corelib/kernel/qjnienvironment.cpp:250: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
Pick-to: 6.1
Change-Id: I116f5d8ace2c29ba7b6b93256d5761591e01296a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Initial replacement of boolean INPUT_ variables to the FEATURE_
variables was wrongly changed to updating of the INPUT_ variable
value to ON/OFF value. This causes potential issues when INPUT_
variable has explicit check for 'yes' or 'no'.
The feature evaluation step enables FEATURE_ variables in case if
the corresponding INPUT_ variable contains a positive CMake value.
So there is no need to process boolean INPUTs at the argument
processing step.
Also no need to keep the special opengl case, since it will be
processed correctly.
Fixes: QTBUG-91158
Pick-to: 6.0
Pick-to: 6.1
Change-Id: I96bb7903a904ae3cf788d7ef7d4e0c019046eb95
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Fix condition when adding qmake_immediate to resources. This condition
was wrongly positive in any non-android case, but also had to check for
BUILD emptiness or build_pass. This cause issue because
qmake_qmake_immediate was added to the RESOURCES variable earlier, than
actually generated.
Fixes: QTBUG-88031
Pick-to: 6.0
Pick-to: 6.1
Pick-to: 5.15
Change-Id: I38dad858a7e81ab709e622ec24baa8f9b80970fa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This inlines the fastpath of QMetaType::id and splits the slowpath into
its own function. With that change, we can also use id in operator==,
simplifying the code there.
Change-Id: I286fe173b43a495dbda8faa151a93895b4fd22e4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixes error: explicit specialization of class "QTypeInfo<QRingChunk>"
must precede its first use
Change-Id: Ib60f8fc1feb97953f5b0eeed63734e81f067d9b3
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
That class was only really meant for the QML compiler, and it is dubious
if event that one needs it. The current implementation is also broken.
Pick-to: 6.1 6.0
Change-Id: Ie40d282707f3fabc8079bee9e98f082aeb9d30b3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
QQmlProperyBinding needs the ability to suspend binding evaluation, and
needs access to the propertyDataPtr.
Change-Id: If82079ffdf28fb277c6e5083714c28478f6e1729
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
This adds a public function to check whether the QPropertyBindingPrivate
is a normal binding, or a QQmlPropertyBinding. In addition, this check
is used so that the source location function doesn't return garbage, but
instead indicates that the binding was set up from QML.
A function to retrieve the binding location from C++ can be added to
declarative at a later point.
Change-Id: Ica0f70780735fe9c60d01c2b21057d59714079e0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Add the INSTALL_DIR argument to qt_internal_add_tool to allow
installation of tools in other locations than INSTALL_BINDIR.
Pick-to: 6.1
Task-number: QTBUG-88791
Change-Id: I88ede81a4c13c82f6d209156d3801ce130f8fc10
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Looks like the corelib_add_mimetypes_resources call is redundant and
deprecated. It duplicates the mime-type database in the Core library.
This also fixes the static build of the qmimedatabase tests, since
avoids propagation of the resource symbols by the Core library.
Fixes: QTBUG-89952
Pick-to: 6.0
Pick-to: 6.1
Change-Id: I5c0dbd761b7726589fdf6970cd546af89d2ff837
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The ui_XXX.h include did not match the location of the XXX.ui file, and
AUTOUIC failed with
"SRC:/addtorrentdialog.h"
includes the uic file "ui_addtorrentform.h",
but the user interface file "addtorrentform.ui"
could not be found in the following directories
"SRC:"
While this could be fixed by adjusting the include paths properly, this
would complicate the CMake project file, and we're dealing with an
example where needless complexity would cloud comprehensibility.
Move the .ui file next to corresponding source files instead.
This removes the need for any special cases in CMakeLists.txt, and we
can remove .prev_CMakeLists.txt.
Fixes: QTBUG-87457
Pick-to: 6.1
Change-Id: Ic2dec5ded7100e22d5afc571efc4b009bc62e41c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Applications on macOS are automatically activated (put into the foreground),
when launched from the Finder, or via 'open' on the command line. But when
launched from the terminal, e.g. foo.app/Contents/MacOS/foo, the application
will launch in the background (inactive).
In Qt we override this behavior, activating the app even when launched from
the terminal, as a convenience, as long as the application is a GUI application.
Unfortunately this means that when tst_qapplication launches a subprocess that
is a GUI app, it will steal activation from tst_qapplication, which in turn
will break tests that later try to activate a window and check that the window
is then active. The window will not be active until the application is active.
We can work around it by preventing Qt from activating the application, but
ideally we'd find a better solution to this, as we don't want to sprinkle
overrides all over our tests.
Fixes: QTBUG-90699
Pick-to: 6.1 6.0 5.15
Change-Id: If53a86548002b739df0c0a7153d6244924a4a205
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The headers are already somewhat tested with C++17 in the regular
build. So let's try in the headers_clean check with C++20 instead.
Using C++20 with MSVC 19.28 doesn't work yet though:
corelib/tools/qalgorithms.h(247): error C2039: 'popcount': is not a member of 'std'
corelib/tools/qhashfunctions.h(311): note: see declaration of 'std'
corelib/tools/qalgorithms.h(247): error C3861: 'popcount': identifier not found
...
Task-number: QTQAINFRA-4242
Change-Id: I1b48bcb9656fe1587fe03d3a17e3484c693aa295
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
A recent change ( a7ca8b1a28 )
led to failure of binding removal in setInterval().
This was fixed by introducing setterScope.
This patch add unit tests for this regression.
Change-Id: Ic8da1f2d82ad6c8ccd81c9b1eff72d42cf75f28a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>