The flags go before the library in the final linker line, as opposed
to the dependencies declared in LIBS.
This allows us to declare the flags for the entrypoint
in the project file of the entrypoint, instead of in
a standalone prf.
Change-Id: I35c054fe9fdaa6add7cd0e8ba3f7304f975ff80f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Partial revert of 5866b82e24.
The function is still in the QTest namespace.
Change-Id: I5e25b405baf07e61781ca4a527601ef0bf8ce6a4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
On the qmake-side we had exports, but they were quoted.
Change-Id: I95af4b927079691cab6403fec850f345ba181a00
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
People that insist on qmake builds of Qt can configure with -qmake
Task-number: QTBUG-87049
Change-Id: I5729b654d4c8b9c6b526234ba5563aff8fd750e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It was ported to qsizetype after the cast was introduced
Change-Id: I00caff1d960f403990f93fcec6a7969e62b4cc99
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The arguments -platform, -xplatform and -device determine the mkspec
that's used for the qmake companion files.
If the user specifies a mkspec that indicates usage of clang or icc,
set the respective CMake variables to use one of those compilers.
Fixes: QTBUG-87836
Change-Id: I2b10d819b0eb92a97d7f79672547b1e2d821cf33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's illegal. [macro.names]/2:
"A translation unit shall not #define or #undef names lexically
identical to keywords"
If someone tries to use dynamic_cast in a no-rtti scenario, let's
just have the compiler yell at them for that.
Change-Id: I70a7b55a93d34c433e874d379acae8b256620f80
Pick-to: 5.15
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If the mime data includes text/markdown, display it decoded in the QLabel,
and also display the raw markdown in the table below. QLabel supports
markdown since 51cbd5288c.
Ideally we should add proper support for markdown to QMimeData, but
it's too late to do that for Qt 5.
Pick-to: 5.15
Change-Id: I2a9998e4b239658fe49f39786e7c4fdd0c08b21a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
In commit 68866b1a7b we introduced a bug:
At a point where the first output of an extra compiler is extracted, we
try to evaluate the first output as qmake variable. This is as
nonsensical as it sounds and leads to malformed extra compiler output in
vcxproj files.
Pick-to: 5.15
Task-number: QTBUG-87601
Change-Id: Ib9aaf8a6eed8c69243f364554325c240d0bfc7f4
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
No action taken at Qt 6, suggesting it shall never happen.
Four removed, one converted to Qt 7, others converted to unversioned TODOs.
Filed Jira tasks, and referenced in comments, for those retained.
There remain two "once bootstrap builds are obsolete" comments and
one other on which pending action may yet happen.
Fixes: QTBUG-85700
Change-Id: Ib140a6a21c63370e51e4734cc591f67573a29d9a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Show a deprecation warning if a non shared container is used within
Q_FOREACH, because it would make an expensive copy of the container
Change-Id: I70cfd789b5b8d9f5b1bd6e0a57e5e968e1c6a0ca
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Drive-by, make QLayout constructor explicit, as it should have
always been.
[ChangeLog][QtWidgets][QLayout] The QLayout constructor taking
a QWidget pointer is now explicit.
Change-Id: If6accfb2e7e810fa08adacea9e674c99121f6bc6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Document the source compatibility breaks introduced by the recent
changes (ff0ba7e2d7 and
30a1683f65) in the porting guide.
Task-number: QTBUG-87096
Change-Id: I5b725c863b1077d59074d4bd17a4456e3d87918c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
ANDROID_ABIS should be used instead of ANDROID_TARGET_ARCH.
Fixes: QTBUG-81866
Pick-to: 5.15
Change-Id: I6dc9e0cd2a19bea8864e3ab4174bd609c0aad4dc
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Let the new created embedded QLineEdit use the palette from QCombobox,
when calling [setEditable(true)]
Fixes: QTBUG-81533
Pick-to: 5.15
Change-Id: Ia406dd8122a348e185f0e94d027646b95eeaa76e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
It's per framebuffer and the color target for the default fbo
is never altered. So no need for this call. This is useful because
it avoids having to deal with the controversy around GL_BACK (where
the GL, but not the ES, spec claims some quite nonsensical things
about GL_BACK not being accepted by glDrawBuffers (in the name of
stereo support?), nevermind GL_BACK being the default value...),
and while what we have in place now seems to be ok with many
implementations, it may generate a GL error with others - so
just remove the call in order not have to think about this
legacy nonsense)
Task-number: QTBUG-88070
Change-Id: I051c60a3041865a3434801b57da2b7acb518b8fe
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
At the moment our examples require a minimum of 3.14 due to changes
in upstream CMake's Autogen functionatlity to support Qt 6. Anything
lower would simply not work with Qt 6.
It's not clear yet if we actually want to require 3.14, or something
higher. At the very least there were many significant changes to
support iOS in CMake 3.15.
But for now just bump the version checked by Qt6Config.cmake to be
consistent with what's in our examples.
Task-number: QTBUG-88086
Change-Id: I119c2ad05a18c357fe7c659b30685af87475fc84
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
1. clang-cl doesn't support "-fno-exceptions", it uses msvc's parameter.
2. some parameters supported by msvc are not supported by clang-cl
and they are causing huge warning message flood, don't add them.
3. use correct optimize parameter for clang-cl.
Change-Id: Idbadf139127143c5fa6c49068588cb26f47da7a2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The non-versioned one's do miss some properties. It's therefore best
to not advocate using them.
Change-Id: I53645e65ed4de4e0100e59905c024cdfe40be0c5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When linking static libraries, MSVC's link.exe complains about
the unknown parameter "/INCREMENTAL:NO" and output a lot of warning
messages about this. This doesn't happen when it's linking exes
or dlls.
The situation is a lot more worse when we are using clang-cl.
clang-cl will print some error message like it can't find a
file named "/INCREMENTAL:NO" and just stop compiling. It seems
clang-cl treat unknown parameters as input files.
Fixes: QTBUG-87875
Change-Id: I37ed29de082b0258e81494db54f275417ab42708
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The tst_qtimer::zeroTimer unit test was relying on
QCoreApplication::processEvents processing all pending
events. However, for the glib backend, this is not the case.
For the glib backend, if there is an event of high
priority pending, low priority events are not processed.
This patch changes the test to use the overload with
timeout of processEvents, which does process events
until there are no more events or the timeout is reached.
Fixes: QTBUG-84291
Change-Id: I429141507b8603b57a191efa21f154493d75cc9e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This change allows the user to use -Wextra-semi-stmt without a warning.
A macro should never include a ; by it's own. Macro Q_UNUSED already
adds semicolon.
Fixes: QTBUG-82978
Pick-to: 5.15
Change-Id: I6d8d009cf89f0c8bbb6a9fee986e81302ebd7459
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The compiler can generate better code when the base is known
in integer to string conversion. This patch creates separate branches
for known bases and leaves generic code as a fallback.
Saved about 12ns per conversion of 12345678 in one measurement.
Task-number: QTBUG-87330
Change-Id: I44c9bb467cf211f7e617ed55104476062296bba6
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Adds SIMD acceleration for the blend_pixel, and raw interpolate methods,
and cleans up other SIMD code.
Gives minor speedups in text rendering and various fallbacks.
Change-Id: Ib0ad8b408450e4e73f3c1d50e9caaed0098acb94
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The QT.<module>.DEFINES assignment in pri files needs to take into
account the module name when computing the define name. This is the
MODULE value that qmake specifies.
In CMake that would be the value of CONFIG_MODULE_NAME.
Previously the value of the define was computed in
qt_internal_module_info() without taking into account the module name.
While qt_internal_module_info() ended being used also for plugins and
other target types, the defines computed by it were meant to be used
only for Qt modules.
Thus remove the <result>_define assignment from
qt_internal_module_info and move its computation directly into
qt_internal_add_module, taking into account the value of
CONFIG_MODULE_NAME.
The only other use of module_define was in qt_internal_add_plugin but
that was merely a long overdue copy-paste error, qmake doesn't
propagate QT_FOO_LIB defines for plugins.
As result, a define special case in testlib is not needed anymore,
because the define is now computed properly.
Finally, QT_FOO_LIB should not be used while building the Qt module
itself, so instead of using PUBLIC_DEFINES option of
qt_internal_extend_target, use target_compile_definitions(INTERFACE)
directly.
Change-Id: I4d44f7461bac2f0c09aec3e995d02dfe36e00883
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Since QPA plugins own the input device objects that they create, they
can also subclass to add arbitrary extra data (as was done with
QWinTabPointingDevice in abb5f0d376);
so this pointer seems unnecessary. It's unused so far AFAIK.
Retaining it also brings up the possibility of a memory leak:
~QInputDevice() doesn't delete it, and whatever code stores something
there would need to make sure it gets deleted.
Change-Id: I7ec264c23c74b83db1f37f64f31857caf551fdae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Since the QVariant types are deprecated in Qt6, use QMetaType instead
Change-Id: I7bddea15a3f1a534d3c6f6b9e7ddf9585a8423bf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Makes the diff between Qt 5.15 and 6.0 easier to read, to see what's
missing.
Change-Id: Idf8aa17b3ab8494f6855c172665423a53ca8a024
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The CONFIG_MODULE_NAME option to qt_internal_add_module is used to
specify what the name of a Qt module's pri file should, as well as
some of the key names assigned in that file, as well as what should be
passed to QT += in qmake projects.
When it is not specified, the computed value is the lower case of the
CMake target name. E.g. for qt_internal_add_module(Core), the computed
CONFIG_MODULE_NAME is 'core'.
The qmake variable that determines the above value is the MODULE
variable.
If it is not explicitly assigned, it's computed from the .pro file
name, rather than from the TARGET variable value.
Thus there is an inconsistency in how the value is auto-computed in
CMake compared to qmake.
We had a few special cases in projects that assign a correct
CONFIG_MODULE_NAME when the auto-computed value was wrong.
Teach pro2cmake to detect these inconsistencies and pass a correct
CONFIG_MODULE_NAME value based on the .pro file name. This way
we get rid of the special cases as well.
Aka if there is no explicit MODULE assignment in the .pro file, and the
auto-computed value by CMake is different from the one computed by
qmake, explicitly write out a CONFIG_MODULE_NAME value with what qmake
would have computed.
Task-number: QTBUG-88025
Change-Id: I166b29767e87cd6b0c681fa53238098355a177f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
In preparation for some further regeneration.
Also modify pro2cmake to add forgotten mapping for the
Qt::EglFsKmsGbmSupportPrivate module.
Change-Id: I92425c566c2b275b40eec8c652496290754ac385
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
ScreenPrivate::updatePrimaryOrientation() depends on the geometry
being set which is calculated by updateHighDpi().
Move the call up.
Amends 370289bef6.
Task-number: QTBUG-76902
Change-Id: I8188e04ad4a2ef7d414a2b78ecb3dd6c64528fa6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d10c34b0cc896c711fce8ae5629e3cc3d74b6452)
Many code paths simply expect to have a native interface
available, and won't check if a plugin is returning nullptr
for it. This leads to crashes or local workarounds
(e.g. 3197932e6f). Instead,
have offscreen implement a dummy native interface.
This requires shuffling some code for the X11 integration.
Pick-to: 5.15
Change-Id: I2bdceee379e4ded9b085ebbb4d03d1e074f60726
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Make hidden friends. Also add noexcept.
No documentation to adjust.
Fixes: QTBUG-87978
Change-Id: I6e757b7c37fb8aabdfd395ab057a84696104e640
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
CMake builds are special and need to know the path to the source dir.
This is handled automatically by QTEST_MAIN, but tst_qapplication
doesn't use QTEST_MAIN. Thus we need to call
QTEST_SET_MAIN_SOURCE_PATH manually.
Task-number: QTBUG-87137
Change-Id: Ib2c461f0da0a3d9a2f571f37476b750a606065f7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Make them hidden friends, add a private isEqual helper where needed.
Adjust and add documentation.
Fixes: QTBUG-87976
Change-Id: If7c19eeab5be7452364eb76193981100f5516d6b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Mark routines returning new QImage as [[nodiscard]] and make inlining
consistent.
Change-Id: I76b6045cfef69498d74d86c38dca2331000dd219
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Make them hidden friends, follow up on
72ccb4fa7b which did the same for QVersionNumber.
Also add [[nodiscard]].
The operators are not documented, so nothing to adjust. Adding documentation
should be done in a separate commit.
Task-number: QTBUG-87973
Change-Id: I65e889a2d0a222f3318b77965e84f3220f1542c7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>