Apparently I failed to notice ValidityMask when I added ValidWhenMask
to simplify some code.
Change-Id: I780f329a6b21b51ba5fe0702c5c86ba07b88d81f
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use QFlags's semantic methods more, eliminate some local status
variables we don't need, shorten some code. Rename one local variable
from status to dst to more accurately reflect its meaning.
Change-Id: Ib08ecacee13e91cff3ea0efd1d753963d7b7fa38
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It simplifies the code.
Also add a comment on why the result is then checked for consistency.
Change-Id: Ic2d408c0ea39bc164e9a725284044b7dbd1f287c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Before, we added the preprocessor define QT_RELOCATABLE if the
relocatable feature was set and checked for the define in the source
code. This indirection is unnecessary.
Also, widen the scope of the feature check to avoid some unnecessary
code.
Change-Id: Ib5f38bf310699d528efdd24edbf14b861bf33935
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
An item delegate might override destroyEditor to merely reparent the
existing editor out of the item view for later reuse, rather than
actually destroying the editor.
As of d0dffdfc01, the code calling
closeEditor() - which calls destroyEditor - might explicitly set focus
back to the item view parent of the editor. This needs to handle that
the parent of the editor might no longer be valid after the closeEditor
call returns, and rather store the old parent widget explicitly.
Add a test case that segfaults with nullptr access without the fix.
Fixes: QTBUG-105231
Pick-to: 6.4 6.3 6.2
Change-Id: I04a355673823c4941865f7a575864e991ceeb5f0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The batch test target name is a useful thing to obtain in various
target-generating scripts.
Change-Id: I9605cf860fe1485e48108eba7e93f9064209d8fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The client does not know its global window position on Wayland,
so testing for this will not work.
Pick-to: 6.4
Fixes: QTBUG-100888
Change-Id: Ibdfc84f1b33d25223dbd740603ce4783c21afc70
Reviewed-by: Inho Lee <inho.lee@qt.io>
Remove keys that are not needed: CFBundleSignature and
LSRequiresIPhoneOS.
Add CFBundleDevelopmentRegion, which is added by default in new Xcode
projects.
Pick-to: 6.4
Task-number: QTBUG-95838
Change-Id: I090c14561bc812ec255f55001b658d2dc60e11f3
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
It should not contain the .storyboard file extension, just
the base name.
Amends 578f4ba00c
Pick-to: 6.4
Task-number: QTBUG-101064
Change-Id: I70ce4581baec7cd62c2dae25c1ed963be28eddfe
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
The key only applies to macOS bundles. Also, qmake doesn't have it.
Pick-to: 6.4
Task-number: QTBUG-95838
Change-Id: I438f0079cc7b74672dfbe956769138a8bb006669
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This matches what we do in qmake.
Pick-to: 6.4
Task-number: QTBUG-95838
Change-Id: I59fab289a2febc38b50aced89c93612ac6a817a3
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
The title bar drawing routines belong in QWasmWindow, not in the
compositor. This provides better encapsulation as many properties
don't have to be leaked from QWasmWindow. Extensibility will also
improve.
Change-Id: If73dd4e87602f62bff0de92e1405f89e7a9f3b43
Pick-to: 6.4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Definitions of qMallocAligned()/qReallocAligned()/qFreeAligned() were
already in qmalloc.cpp, so add qmalloc.h for declarations.
Task-number: QTBUG-99313
Change-Id: I8028402a2c48dede855ad7de35d7b77e9911c761
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For now just includes qfunctions_winrt_p.h
Once submodules have been moved over to qfunctions_win_p.h we can move
non-WinRT specific content from qfunctions_winrt_p.h to _win_p.h.
Change-Id: I467bb4991c67a8769b60b9cf9f26aa553c439b92
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
QRegularExpression::match() is deprecated.
Change-Id: I66c7b3043a3805614fedcdb081c7e704e9925e5e
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
We changed qTryMetaTypeInterfaceForType() so it does record void and
void* (see commit 2d0c31e7d9 and commit
3695b35dfc). By incrementing the revision
number, we make it possible to determine at runtime whether the new
information ought to be present.
We may add even more types (namely, non-const references) before 6.5.0
is out. For pointers, the restriction remains that the metatype is
recorded only if the pointer is a pointer to a complete type.
Change-Id: Ic6547f8247454b47baa8fffd170dad79b1a90f6b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Passing LOAD_LIBRARY_SEARCH_SYSTEM32 to LoadLibraryEx() can also
only load libraries from the system directory, so in this case
we can use it directly instead of doing all the work ourself.
Change-Id: I4971781e55c9f1476861d599d58233114c280bc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QPalette's default for Link is Qt::blue, which is difficult to read
on dark backgrounds.
Use the same blue that is already used for Highlight, as it is
consistent and easy to read.
Task-number: QTBUG-90504
Pick-to: 6.4
Change-Id: Ic7aceafb2bd0e57b65448917c352e3551ad26610
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The value will be propagated from Qt build.
Task-number: QTBUG-104858
Change-Id: Iae2c32c3037438f41b92f9ee28004f30eb4e3210
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Wrap some tests that specifically test deprecated APIs
into #ifdefery
* Refactor some tests to use available methods
Task-number: QTBUG-104858
Change-Id: I03e318004ce1c2718ee574bf11e00df9bc04bcaa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The types essentially do the same job - the one that is more general
should be used, the other - removed, as it is redundant.
Change-Id: Iec09d3311681abce1405fcf8c2cebfb72f3fd51c
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Test TCP sockets usage on the main thread, on secondary threads,
and with asyncify.
Pick-to: 6.4
Change-Id: I466df8c253c6a18a9c12d44fa8f53e76f81a0437
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Test server for in-browser TCP usage.
Pick-to: 6.4
Change-Id: Ia1a29c0e14a6d2ee8075ce202c9f6998a3ccc4c9
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The asyncify support in the event loop currently uses
EM_JS, which Emscripten does not support using from
side modules.
Change-Id: I5f961d9cd12f7b1b6cc1c2382b807a1da2918725
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Full paths were recorded into INTERFACE_LINK_LIBRARIES which could
point to temporary build directories.
Pick-to: 6.4 6.3 6.2
Change-Id: I883fd8f652e4d9ecd7d8e0076d62f5c7f4e14ec9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Not necessarily relevant outside windows, where the socket descriptor
is SOCKET (= unsigned 64-bit). Also follow their recommendation to not
compare to -1, but rather to INVALID_SOCKET.
Pick-to: 6.4 6.3 6.2
Change-Id: I0cfa4dfd9e147469132e2e72de22b30eab01e15c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A driver application has been prepared in js for running batched tests.
There is a convenient public API defined for reading the current test
status & subscribing to changes thereof.
The solution is modular - the module qwasmjsruntime can be used for any
wasm instantiation, e.g. in the next iteration of qtloader.
Change-Id: I00df88188c46a42f86d431285ca96d60d89b3f05
Pick-to: 6.4
Reviewed-by: David Skoland <david.skoland@qt.io>
Having the build directory encoded in installed files impedes
reproducible builds.
QMAKE_PRL_BUILD_DIR is exclusively used by qmake if 'depend_prl' or
'fast_depend_prl' is active. This is useful for tracking the
interdependencies of libraries within a project but not for Qt's installed
libraries. Even the qmake-based Qt build never used this feature.
Fixes: QTBUG-97386
Change-Id: Icd0801edc1ad92a99fff3a1e92b5f660914813b2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
For foreach, we just mention that it is deprecated, and forever is not
actually directly related to Qt containers. Both macros are also
documented in qglobal.cpp, and the section title is not referenced
anywhere so this patch won't break any links.
Pick-to: 6.4
Change-Id: I6c3e11b205237e5b502173f2216606adf5812f55
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The Static Plugins page describes handling of qmake and CMake already
in greater detail. No need to replicate it here.
Pick-to: 6.4
Task-number: QTBUG-88044
Change-Id: I2cae85c0b0d20585b563bab9e263121181adeb8c
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
We don't support compilers without variadic macros anymore; the check
in code was removed already in commit 4628e5cded.
Pick-to: 6.4
Change-Id: Ica4d0b2f7055e3d00ae780e23eb4e5a9d2dcc191
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Qt 6.4 introduced new facilities to reduce the plain strings
with Android methods/signatures.
Fixes: QTBUG-104186
Change-Id: Id01f26aff253b096054f9fd6d062cebce94fdb50
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
After d06a686cad, Q_DECLARE_SHARED_IMPL is
used only in Q_DECLARE_TYPEINFO, so remove the indirection through
Q_DECLARE_TYPEINFO_IMPL.
Change-Id: Ida188053c4ea512e9ebdf04f807f86a6159f8425
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Moved the modal window resolution to
QWasmWindow::requestActivateWindow so that multiple async activation
events are not issued in unpredictable patterns.
- Request activation on added windows and on stack top in case of
window removal
Pick-to: 6.4
Change-Id: I6f02cf1b7e83abb7961caf311ffc83e91c8bf810
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Doing a simple division to get seconds, before using rounding-down
division to get days and positive seconds, saves the need to check for
seconds and millis in opposite directions that might cause a needless
overflow when computing the final result.
Change-Id: Ia4f95bb0510eb4f2c1f9131a34d317bd41bbed2a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
If restoring a QHeaderView state from a data stream with version Qt_5_0,
check alignment and resize mode properites for out-of-bound values.
If out of bounds, try QDataStream version Qt_6_0, which is used by KDE
apps compiled with 5.15.2 or 6.2.3.
QFileDialog stores settings in the same settings file across different
Qt versions, using different QDataStream versions. That makes
QFileDialog vulnerable to the issue (QTBUG-104962). A respective auto
test is added with this patch.
Fixes: QTBUG-104962
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104425
Change-Id: I666207fca7ab837ad27a247e504a40757ee8afab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The Android build used cmake_language(DEFER) and guarded with a check
for CMake's version being >= 3.18. However, cmake_language(DEFER) was
introduced in CMake 3.19. Fix that version check.
Fixes: QTBUG-105841
Pick-to: 6.3 6.4
Change-Id: Ic318c104cf212de4c97c5a89b73536609826fd5b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>