I generated a rc file using VS2019 and I found that it's
using other macros.
According to [1], both of VOS_NT_WINDOWS32 and VOS__WINDOWS32 refers to
"File was designed for 32-bit Windows", although they have different
values, and 0x0L is the value of VFT2_UNKNOWN. So I think it's safe to
update them. VS2019 is using them as the default template for rc files,
after all.
[1] https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource
Change-Id: Ibaf91394668844492f1357da05b881b9d81aa15f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Setting the QMAKE_MANIFEST variable doesn't have
any effect for MSVC. This commit fixes that.
If the developer is setting this variable,
he/she will definitely use CONFIG-=embed_manifest_exe
or CONFIG-=embed_manifest_dll at the same time,
so I think there is no need to check this.
Change-Id: Ie32b7e0cded71efcf14bf4c0eecab5ab1944fa2c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
All it's uses have been replaces with QRegularExpression.
Change-Id: I5bcdfdd8a39dad6d1288f18f1b24d2eea9e028d2
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Use the DotMatchesEverythingOption for all places
where we interpret .pro files, to increase compatibility
with QRegExp.
Change-Id: I347d6b17858069f3c9cedcedd04df58358d83f27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This is required to be able to port qmake over to use
QRegularExpression instead of QRegExp.
Change-Id: I0ad2c19bf3c0a28e52c1e12b4d3daa0300a75ed2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Should improve performance and is going to be required in
the future anyway.
Change-Id: I89d7c50441d2491da1ab0a4d564dcc91f52ade85
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
qmake is not warnings clean, so don't add -Werror.
Change-Id: I7a823241ded56967c1b802203f404ee36ed26429
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Since TARGET at this point contains the path to where the target will
be then it can include ".." as part of it which will cause problems when
building for Android on Windows. Therefore, QMAKE_TARGET should be used
as an identifier here as the path is not needed.
Change-Id: Idb8babd0459c65cbcfd64fe47baeac4303a3fd87
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Android variable are missing from the list of QMake variables...
Task-number: QTBUG-80390
Change-Id: Ic10f96687334eea99c0302d7137685b1bf6e56c6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This is required, so that QHash and QSet can hold more
than 2^32 items on 64 bit platforms.
The actual hashing functions for strings are still 32bit, this will
be changed in a follow-up commit.
Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Conflicts:
examples/opengl/doc/src/cube.qdoc
src/corelib/global/qlibraryinfo.cpp
src/corelib/text/qbytearray_p.h
src/corelib/text/qlocale_data_p.h
src/corelib/time/qhijricalendar_data_p.h
src/corelib/time/qjalalicalendar_data_p.h
src/corelib/time/qromancalendar_data_p.h
src/network/ssl/qsslcertificate.h
src/widgets/doc/src/graphicsview.qdoc
src/widgets/widgets/qcombobox.cpp
src/widgets/widgets/qcombobox.h
tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
tests/manual/diaglib/debugproxystyle.cpp
tests/manual/diaglib/qwidgetdump.cpp
tests/manual/diaglib/qwindowdump.cpp
tests/manual/diaglib/textdump.cpp
util/locale_database/cldr2qlocalexml.py
util/locale_database/qlocalexml.py
util/locale_database/qlocalexml2cpp.py
Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.
Updated CMakeLists.txt in each of
tests/auto/corelib/serialization/qcborstreamreader/
tests/auto/corelib/serialization/qcborvalue/
tests/auto/gui/kernel/
and generated new ones in each of
tests/auto/gui/kernel/qaddpostroutine/
tests/auto/gui/kernel/qhighdpiscaling/
tests/libfuzzer/corelib/text/qregularexpression/optimize/
tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
tests/libfuzzer/gui/text/qtextdocument/sethtml/
tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.
Changed target name in
tests/auto/gui/kernel/qaction/qaction.pro
tests/auto/gui/kernel/qaction/qactiongroup.pro
tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake
Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.
Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
The command is deprecated and has no effect apart from generating
a documentation warning.
Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Files ending with .mm are Objective-C++ files, so we don't need
a separate file for the C++ parts.
Change-Id: I3ef52bc98291fd461b889978a538e81630d17c6e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.
Change-Id: I3f1b836cfb47bba0fdc27f2c3aa7b0576d123dca
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Need to pass additional -Zc:__cplusplus flag when using
MSVC, so that the __cplusplus define has correct values.
Additionally make the option be propagated to consumers of Qt
via the public Platform target, which QtCore links against.
Change-Id: Ie1283c25334b93f993529beb7fb32bdb001627f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Mirror the behavior in unixmake.cpp and do actually install
/uninstall files in target.targets. This fixes the installation of
.debug files on MinGW for a Qt with -force-debug-info
-separate-debug-info.
[ChangeLog][qmake] Install/uninstall rules are now generated for
target.targets on Windows. This mirrors the behavior on Unix.
Fixes: QTBUG-81354
Change-Id: Ie9366f132ebd8e18680f32f2e52cec64dbd87e9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Conflicts:
examples/widgets/graphicsview/boxes/scene.h
src/corelib/Qt5CoreMacros.cmake
src/corelib/Qt6CoreMacros.cmake
src/network/ssl/qsslsocket.cpp
src/network/ssl/qsslsocket.h
src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
src/testlib/CMakeLists.txt
src/testlib/.prev_CMakeLists.txt
tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.
Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
Change b274f656b8 enabled the use of a
response file for application building specifically needed when building
an application for Android on Windows. The same cause can happen when
building a library too with a lot of object files, so the command for
the link step can be too long. So we expand the functionality to be
used for libraries too.
Task-number: QTBUG-71940
Change-Id: Ia6d1943bf33f6decb53f6e71a8dc65310d2f20a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We will want to use C++17 code in our headers soon.
(including the one in the bootstrap libraries)
This patch is quick and dirty, I guess it will be cleaner once we move to cmake
Updated QMAKE_MACOSX_DEPLOYMENT_TARGET because 10.13 runtime does
not support C++17 stdlib features
Change-Id: I75ac171436945dddd1bb953a9c8d323ac20da7ac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
qmake relies heavily on stable references to nodes stored within the
container. QHash in Qt6 doesn't offer that guarantee, so use a QMap
instead, that supports this.
Change-Id: Ifcf3d67098585ea26f4e02f4570d407a56e33c9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We must use Windows line endings in .vcxproj files to separate command
lines of custom build steps.
This amends commit f65cfadd.
Fixes: QTBUG-81553
Change-Id: I8d257f3846af7006df7f8d462b8f44efdce6a1fd
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
We always pass the same value. The builtins are also using exactly this
"cd command" unconditionally.
This deduplicates the code at the call sites of
callExtraCompilerDependCommand a bit.
Change-Id: I5c412c815d50afdac55e1b45021f37f2545ce8f0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Use the central callExtraCompilerDependCommand in the last place where
the code to call an extra compiler's depend_command was duplicated.
Note that this is in the "Bad hack" section. We're making this hack less
bad, but the comment still applies.
Change-Id: Iaa857af20ca46b2d73053d3e264c63124c87a41b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Modifications of the CONFIG variable in the project file wasn't taken
into account in the handling of DEFINES_DEBUG and DEFINES_RELEASE,
because it was happening before the evaluation of the project file.
Moved the handling code into default_post.prf where the other *_DEBUG
and *_RELEASE variables are handled.
In practice that means: to avoid the addition of the NDEBUG define one
has to remove NDEBUG from DEFINES_RELEASE.
This amends commit 1456b809.
[ChangeLog][qmake] To remove the NDEBUG define that is added by
default in MSVC mkspecs, write DEFINES_RELEASE -= NDEBUG in your .pro
file.
Fixes: QTBUG-81569
Change-Id: I2ea5628653275a4e48ad002977d34969c0663815
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Source files that are right next to the project file result in an
empty "object subdirectory" if object_parallel_to_source is set.
We must not attempt to create empty directories.
Fixes: QTBUG-81271
Change-Id: I431f9fbe46f50fbbaa5d6a59966bfb059418036c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The use of the 'ordered' CONFIG option is known to not be efficient for
multi-core builds. This patch updates the documentation with an example
using the .depends modifier as well a discourage the use of 'ordered'.
Change-Id: I3575243a7c4138f0671d171441c932c3ad89a411
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
De-duplicate the code that calls the extra compiler's depend_command by
using the central function callExtraCompilerDependCommand. This one
actually tries to resolve dependencies unlike the removed code that
blindly resolved relative paths to the build directory.
This fixes dependencies reported by uic which need to be resolved
against what is in DEPENDPATH.
Fixes: QTBUG-80579
Change-Id: If482e50ff3eff716fefffee82004acc076b3a547
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
qmake itself does not use the variable, but Qt Creator does.
Fixes: QTBUG-77866
Change-Id: I313d1ebe32dbc1eeac8d2d79b519349c7097a5a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Framework builds are enabled by default on macOS.
They are controlled via the framework feature.
Task-number: QTBUG-75751
Change-Id: I00bc64672f02bbd1672508b2b5010d202984a961
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CMake Build Bot
Conflicts:
src/corelib/tools/qvector.h
Make QVector(DataPointer dd) public to be able to properly merge
5b4b437b30 from 5.15 into dev.
src/widgets/kernel/qapplication.cpp
tests/auto/tools/moc/allmocs_baseline_in.json
Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
Since commit 9ab043b6 we're checking for invalid file paths passed to
Qt's file system engine. When initializing the deployment tool for VS
projects we accidentally passed a file path containing '\0'. Fix that by
using an infix QString, not QChar.
Change-Id: Ieae066d20ac290354febd420abce68f28649b365
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Requires a third definition for the source-compatible but deprecated
version.
Change-Id: I260ae79f4547f99eed701b10e0b25222f81cd5ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Setting the CONFIGURATION_BUILD_DIR variable to tell Xcode where to
place the final application bundle confuses Xcode when archiving
a project, and the archive ends up without the dSYM files.
Unfortunately we can't leave it up to Xcode to place the build
artifacts wherever it wants, as Qt Creator's iOS support expects
to find the artifacts in a well-defined place. Until we've taught
Qt Creator to find the artifacts for deployment where Xcode placed
them we need to keep this logic.
We now avoid setting the CONFIGURATION_BUILD_DIR variable unless we
really need to due to in-source builds. As long as we're dealing with
a shadow-build it's okey to set SYMROOT.
Change-Id: I9661c1c57725dc8ba5a21f8467b8b61834f2e64d
Fixes: QTBUG-74841
Task-number: QTBUG-52474
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reading of Cbor streams is substantially more complicated than writing
as it requires float16 support. When writing Cbor, we can just choose to
always write 32bit floats, even if we could compress the numbers into
16 bits.
We need Cbor writing in the bootstrap library, but we cannot easily add
float16 support.
Furthermore, Cbor reading is required for plugin support, but not Cbor
writing. It might make sense for some users to build a custom Qt with
Cbor writing disabled.
Therefore, provide two features, cborstreamreader and cborstreamwriter,
split up the code in cborstream.{h|cpp} into several files, and enable
Cbor writing in the bootstrap library.
Change-Id: I15450afb0e328a84a22ebca9379cffc4f900a75a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This smells like copy & paste from the boostrap lib.
Change-Id: Ibb0c392df610f02fc3bdcfc72a2d0c925e27a89e
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QTextStream, reading a file with CR+LF newlines from an stdio FILE
handle that was opened without "b", will always return false in atEnd().
Changing the open mode from "r" to "rb" works around the issue.
Task-number: QTBUG-80443
Change-Id: Ib2eafc0c4c6a6d2bcaeea3036474549d2d9e1511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Use O3 causes warnings when combined with O2, so just remove it.
Partially revert commit 11111c5a7d
Change-Id: Ifbf6e024e35933ecc3610d6efc3423589dab9a38
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since commit 059172c6 precompiled headers did not work anymore on
macOS, because the ${QMAKE_PCH_ARCH} string was suddenly appearing in
locations where it was not replaced with the actual architecture, e.g.
the directory where the PCH files are written.
Fix this by replacing the whole file path and not just portions of it.
Fixes: QTBUG-79694
Change-Id: I925d4ee8980a0de3205a0e387a516a5c6f8cfa4b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
When building an application for Android on Windows it is possible that
the command line will be too long when doing the link step. So the code
for generating a response file is moved to MakefileGenerator so it can
be used by the other generators easily. The same variables used by
MinGW can be used elsewhere then.
Fixes: QTBUG-71940
Change-Id: I6c331d12e9541a90a4a95e0154d0ea1c056489bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This is almost 100% source compatible with Qt 5. Exceptions are
* Stability of references for large or non movable types
* taking a PMF for types that are now overloaded with r-value references
in QVector
* The missing prepend optimization in QVector (that is still planned
to come for Qt 6)
Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This can be expensive. We don't expect files to be added to the
directory while qmake is running, and if that happened, the result would
be unpredictable anyway.
Change-Id: I5db93132046c1284130bbe51ce1ecd2a14665206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Precompiled headers were put in a directory which had exactly the same
name as the binary to be generated. This resulted in a failure with any
mkspec that used clang_pch_style. The g++-mkspec avoid this problem by
extending the directory name. This change adopts this technique for
clang mkspecs.
[ChangeLog][qmake] Fixed precompiled headers for the Clang compiler.
Fixes: QTBUG-72404
Change-Id: I471462e2bcb1e33f19d277c21acde0c04b1ffcd6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
In turn, deprecate the QJsonDocument methods that deal with JSON binary
data. You should use CBOR for data serialization these days.
[ChangeLog][Deprecation Notice] The binary JSON representation is
deprecated. The CBOR format should be used instead.
Fixes: QTBUG-47629
Change-Id: Ic8b92ea36de87815b12307a9d8b1095f07166db8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The group parameter is only used when cross-compiling, mark it as unused
otherwise. This is noticeable in the cmake branch because there we build
qmake with cmake and apply the same warning flags, as opposed to the
bootstrapped qmake build when using ... qmake.
The cache file parameter in qmake is unused and the
mustEnsureWritability is only used on Windows.
Change-Id: I08655d5150f5a967c2340ee7678bad3a4d69914f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It was missing a source file for the QByteArrayList_join
symbol.
Change-Id: Ifcfd68d216f1e5370f90d7131bb3f7c9f91f07f3
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
We must check whether outputs or inputVars are non-empty before
accessing them.
This amends commit 68866b1a.
Task-number: QTBUG-79178
Change-Id: Iecf6dc705bac9bef5133ae2e5ceeace5f859f175
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Note that android builds will be broken after this merge and
regeneration, because we don't currently handle the minimum required
changes that were brought in with the Android multi ABI support
that comes from 5.14.
This will have to be addressed in a separate change.
For now the build on Android will fail while compiling due to incorrect
generation of LIB_SUFFIX with QT_ARCH.
Change-Id: Ia4a871f4b7ddd0da11caf5f34e10a599a97bb55d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
The snippet uses the Unix touch command, not qmake's touch function.
Change-Id: I71d1460447249b8941ce4bdbb494bb419e13b119
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QML1 is not supported anymore, remove the leftover hooks for it.
Change-Id: I2900726714c5faea3523b2ebe39bb393364b3bfb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When qmake is run with -prl we don't need to write the glue makefile,
and doing so will end up with MakefileGenerator::writeProjectMakefile
trying to write to an invalid Option::output, resulting in warnings:
QIODevice::write device not open
Change-Id: I196b185570e7329c621c2ccb8530b43f4be51ee6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QLocale::uiLanguages() on the system locale uses whatever the system
locale's query(QSystemLocale::UILanguages,...) returns. On Android,
this is just a list of locales. However, for non-system locales, we
also include some results of removing likely sub-tags from the locale
name, where equivalent. Thus zh-CN would also get zh and zh-Hans-CN
added to it; however, if the system locale is zh-Hans-CN, the shorter
forms are omitted. So post-process the system locale list in the same
way, albeit tweaked to avoid duplicates and rearranged so that we can
insert likely-adjusted entries between what they adjust and what
followed it.
Added QLocalePrivate::rawName() in the process, since it looks likely
to be useful in other contexts (and I needed its value): it just joins
such tags as are non-Any. This, however, uses QByteArrayList, so added
that (it's small) to the bootstrap library and qmake.
This follows up on commit 8796e3016f.
[ChangeLog][QtCore][QLocale] The system locale's UI languages list now
includes, as for that of an ordinary locale, the results of adding
likely sub-tags from each locale name, and of removing some, where
this doesn't change which locale is specified. This gives searches for
translation files a better chance of finding a suitable file.
Fixes: QTBUG-75413
Change-Id: Iaafd79aac6a0fdd5f44aed16e445e84a2267c9da
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][qmake] The syntax 'LIBS += -frameworkFoo', or
'LIBS += "-framework Foo"' is no longer supported. Use the
canonical 'LIBS += -framework Foo' instead.
Change-Id: I50fd02dbfa155a0b95859734486a92bd448e87c2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
People tend to "turn off debug and release builds" by just not building
one of the variants. For example, Qt's own rcc is built in release only,
however it is configured for debug_and_release with the same TARGET for
both.
Let qmake complain about conflicting TARGETs only we're about to build
all of those conflicting targets, i.e. if build_all is set.
Change-Id: I0448bf5cb421e2d801d3cc30e0d80353fba0d999
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Do not resolve -l entries to absolute file paths for libraries in the
default search paths.
This restores behavior from 5.12.0 (commit 2327944d) for Windows
system libraries.
Fixes: QTBUG-78827
Change-Id: Ic2d4626df87308dd635afc1ab5c4b8191d3d2831
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The root of the framework bundle shouldn't contain random files,
and doing so will prevent the bundle from being signable.
We still look up prl files in the root, to keep backwards
compatibility.
Change-Id: Ifd0bc3c6e7924e89eec54d3ef9368dfc95ed402c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Remove info about Windows Phone, which is no longer supported.
Task-number: QTBUG-61884
Change-Id: Ic330f0f19a4e7314dd175f6c492fa25133185517
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Commit 80dea664 broke .ui files with global includes that are not part
of the project, because we blindly added every file path that falls
out of 'uic -d' as dependency.
Introduce the extra compiler CONFIG flag dep_existing_only to bring
back the old behavior that ignores non-existent dependencies and set
it for uic.
Change-Id: I6eaa82817c932a98ebac6d08115a9815d4b9dd21
Fixes: QTBUG-78144
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
For nmake and VS projects we added the NDEBUG define for the release
configuration unconditionally within the qmake generators. To undefine
it, users had to use a nasty work-around.
Now, define NDEBUG within the MSVC mkspecs. In order to do that we
introduce the DEFINES_RELEASE and DEFINES_DEBUG variables that are
merged into DEFINES in default_pre.prf.
Users can unset NDEBUG by writing
DEFINES -= NDEBUG
in their .pro file.
Note that DEFINES_RELEASE and DEFINES_DEBUG are merged in
default_pre.prf in order to give extra compilers (like moc) the chance
to see the fully resolved DEFINES variable. This is different from the
QMAKE_CFLAGS_(DEBUG|RELEASE) variables that get merged in default_post.prf.
Fixes: QTBUG-78071
Change-Id: I381770a1d2f974fbae9b09a2254e3f2fc7842b68
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Some modules define their own manually-maintained lists, and we can rely
on the headers generated by each module to include in the pch as well
e.g. QtCore/QtCore.
There's also e.g. QtWidgetDepends for QtWidgets, but this only
works for modules, not for tools, examples or other applications.
For now we'll use the Qt<Module>/Qt<Module> headers for the
modules we depend on.
Building with PCH can be disabled with -DBUILD_WITH_PCH=NO, and it only
works for versions of CMake newer than 3.15.20190829.
Change-Id: Iae52bd69acfdfd58f4cd20d3cfa3c7f42775f732
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
[ChangeLog][QtCore] Qt installations on the host system can now be
relocated, i.e. moved to other directories.
Add a new feature 'relocatable' that's by default enabled for
non-static builds
- on platforms where libdl is available,
- on macOS when configured with -framework,
- on Windows.
If the feature is enabled, the directory where plugins, translations
and other assets are loaded from is determined by the location of
libQt5Core.so and the lib dir (bin dir on Windows) relative to the
prefix.
For static builds, the feature 'relocatable' is off by default. It can
be turned on manually by passing -feature-relocatable to configure. In
that case, QLibraryInfo::location(QLibraryInfo::TranslationsPaths) and
friends will return paths rooted in the user application's directory.
The installed and relocated qmake determines properties like
QT_INSTALL_PREFIX and QT_HOST_PREFIX from the location of the qmake
executable and the host bin dir relative to the host prefix. This is
now always done, independent of the 'relocatable' feature.
Note that qmake is currently only relocatable within an environment
that has the same layout as the original build machine due to absolute
paths to the original prefix in .prl, .pc and .la files.
This will be addressed in a separate patch.
Task-number: QTBUG-15234
Change-Id: I7319e2856d8fe17f277082d71216442f52580633
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.
Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
(cherry picked from commit 97465b1540)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In xcode projects we replace the _debug part of referenced libraries with the
variable $(QT_LIBRARY_SUFFIX). This only worked for libraries passed with -l.
Make the library suffix replacement work for libraries passed as absolute paths
too.
Fixes: QTBUG-77804
Change-Id: Iac2dbd2f67c3fa0f415ac43cbab5a906657164e5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The c'tor that takes a QString detects whether the string's first and
*last but one* characters are double quotes. In that case it removes
the first and *last* characters, resulting in a conversion from
"\"C:\\foo\"\\" to "C:\\foo\"". It's highly unlikely that this code path
was ever triggered, because its erroneous result would have been
noticed. Remove it.
Change-Id: I653e6a4667ae3620c35e509420eb22a71bb986a9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This was introduced by accident in 4da47d0f.
Fixes: QTBUG-77429
Change-Id: Ic3d9052e1fc83dab5ed3b8725629588208b0d7bb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 2a4cf923f4)
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.
Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The description of the project mode looked like this:
-project Put qmake into project file generation mode
In this mode qmake interprets files as files to
be built,
defaults to *; *; *; *.ts; *.xlf; *.qrc
The list of wildcards is incomplete. Unfortunately the file extensions
are defined in QMAKE_EXT_* variables in mkspecs, and the help display
code has no access to that data. This went unnoticed for quite some
time, and fixing this is too involved considering the gain.
Replace the text above with the static text below:
-project Put qmake into project file generation mode
In this mode qmake interprets [files] as files to
be added to the .pro file. By default, all files with
known source extensions are added.
Change-Id: I815a50957c05dccc45e1cd6657f568599d1911f6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The conditions were wrong, they must compare against zero.
Also, use qstricmp to avoid the platform #ifdef.
Change-Id: I7e5ef1b9ae8e2e1d3d9ce90a645ee568b370ab57
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The commands are separated by "if errorlevel 1 goto VCEnd" lines to
make sure we abort on the first failure. However, we also insert magic
comments starting with "Rem" for IncrediBuild. These do not need
error checking. Also, the last command does not need error checking.
The XML line ending entities are also unneeded. By using proper line
endings we ensure that commands appear on separate lines in Visual
Studio's property editor.
Change-Id: Ifbf7525281e892c820034fafc64b555fff3dc756
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
The VS project generator never calls the Win32MakefileGenerator code
that sets up DEST_TARGET which is used for checking for conflicting
DESTDIR/TARGET combinations on Windows. Replicate the setup in
VcprojGenerator::initProject().
This amends commit e75aed1a.
Change-Id: I4238eb2f57615095c372cee9ada9fc961cc36133
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Sub-projects in VS solutions must have unique project names. If there
are multiple projects with the same TARGET then QMAKE_PROJECT_NAME must
be set to different values.
The .sln generation code did not use QMAKE_PROJECT_NAME and produced
.sln files with equally named sub-projects.
Replace the 'orig_target' member of VcsolutionDepend with a
'projectName' member and use it when writing the .sln file and for the
misnamed "GUID map" that's supposed to have unique keys.
This commit amends 9e750d34 (qt/qt.git).
Fixes: QTBUG-77639
Change-Id: I81c64f8bc6baeb6d99e9d5808fb73dfd7aaaeeb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Since its introduction in commit
65bb1a25419210e6097cad973fb847aa3719c09b (old internal history, 2005)
with the commit message "optimizations I've been sitting on here"
we're dragging along this dead code. It is time for removal.
Change-Id: Ic7902ebb8c402734974ad6651a1371d1e5bf93c5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add QCalendarBackend as a base class for calendar implementations and
QCalendar as a facade via which to access it.
QDate's implicit implementation of the Gregorian calendar becomes
QGregorianCalendar and QDate methods now support choice of calendar.
Convert QLocale's CLDR data for month names to a locale-data component
of each supported calendar and relevant QLocale methods now support
choice of calendar. Adapt Python scripts for locale data generation to
extract month name data from CLDR (keeping on version v35.1) into the
new calendar-locale files. The locale data for the Gregorian calendar
is held in a Roman calendar base, for sharing with other calendars.
Add tests for basic uses of the new API.
[ChangeLog][QtCore][QCalendar] Added QCalendar to support diverse
calendars, supported by implementing QCalendarBackend.
[ChangeLog][QtCore][QDate] Allow choice of calendar in various
operations, with Gregorian remaining the default.
Done-with: Lars Knoll <lars.knoll@qt.io>
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Fixes: QTBUG-17110
Fixes: QTBUG-950
Change-Id: I9d6278f394269a183aee8156e990cec4d5198ab8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This was introduced by accident in 4da47d0f.
Fixes: QTBUG-77429
Change-Id: Ic3d9052e1fc83dab5ed3b8725629588208b0d7bb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Windows resource files support a subset of C preprocessor directives.
Among others they can have #include directives.
Use QMake's own scanner to retrieve the files that are included by a
Windows resource file and add them to its dependencies.
For the test case the TestCompiler class had to be extended:
runCommand is now public, and commandOutput is less peculiar.
Fixes: QTBUG-3859
Change-Id: I138703352c37c98297c0574a9a440510c1c494b8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Having those characters in QMAKE_EXTRA_COMPILERS broke the generated
VS project file. They must be replaced by XML entities.
Fixes: QTBUG-1935
Change-Id: Iff1edbeabec4cedef777071682412970b7769f19
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
QMakeLocalFileName is not suitable for QList. Use QVector instead.
Change-Id: I5a3c4c8da14c0a920b5a57cba148ad68ac0f85a2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
RC_FILE is not an internal variable that "rarely needs to be
modified". Mention that it's about Windows resources and link to the
corresponding section.
RES_FILE: Add link to RC_FILE and the more general section. Also
rephrase "compiled Windows resource file" to "Windows resource
compiler's output file" which is more precise.
Fixes: QTBUG-8709
Change-Id: I19c61e6a9505d45fc13fefbcd0ba9441191aa42e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com>
If a project has DESTDIR and TARGET set to fixed values, then the
target paths conflict when doing debug_and_release builds.
With this change we're detecting this situation and yield a warning.
Fixes: QTBUG-2736
Change-Id: Ib163db3463322792ab9fa5b997285ac9fc9819ab
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Libtool cannot cope with absolute paths in the dependency_libs entry.
We split absolute paths into -L and -l here.
Change-Id: I30bf11e490d1993d2a4d88c114e07bbae12def6d
Fixes: QTBUG-76625
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
In MakefileGenerator::initOutPaths() we ensure that directory
variables end with a directory separator, except for DLLDESTDIR.
There doesn't seem to be a valid reason for this exception.
Remove it for the sake of simplifying the code base.
Change-Id: I60eb01b410161e6e1d147d76f044f5140a7573bd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This undocumented option was introduced in
69c22301806b56d56cbe5f5076b889ba98e41a2b (old internal history, 2006) to
prepare some unspecified change to configure that was never done.
Change-Id: I60de731ac9bc6f6424c57574e59e9f6b4f6c5eb3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Re-generation of the Makefile depends on a correctly set up
QMAKE_INTERNAL_INCLUDED_FILES variable. In debug_and_release builds
this variable is set up for Makefile.Debug and Makefile.Release, but
not for the meta Makefile. However, that's where the Makefile
re-generation target is located.
We now collect the contents of QMAKE_INTERNAL_INCLUDED_FILES for
Makefile.Debug/Release and use that for the meta Makefile.
Fixes: QTBUG-13334
Change-Id: I6124a91447d5c54d51680e23570c4e97f44e6a73
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
...because
- it calls the properly camel-cased member function buildArgs(bool),
which is slightly confusing
- it returns buildArgs(true) plus input and output
We also let it return only the arguments, excluding the qmake
executable. This is consistent with the function's name and saves us a
string replacement stunt at one call site.
Change-Id: I8bea65900bd51962962e4cfd425ffbc26e3a52fe
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Remove usage of the 'if (0 && ...)' pattern that was presumably used
to temporarily disable code paths. The disabling of the two code paths
was introduced in 356a677b386648710efc4db9a8a1b4a975f95c48 (old
internal history, 2004) and
0326e3511928d90329152b9b0493da76e9caa442 (old internal history, 2006).
It can be deduced that it's pretty safe to remove both.
Change-Id: I88aee65b1286701241b5b80fbac0c65cd99ecd5e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Without treating -force_load as an option with an argument, we end up
leaving stray -force_loads in the linker line, resulting in build
failures when the following option is a random library then treated
as a file path.
Task-number: QTBUG-66091
Change-Id: I352c50ab67e32ef6b2b5c6a4f90455b20034e207
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
The linker doesn't support -framworkFoo, so neither should we. The correct
syntax is -framework Foo.
Change-Id: I3f39ffc067871ce058542bf0068274b35f7b51f6
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This change allows using custom flags for ar. For instance, it is
now possible to create a thin archive by setting QMAKE_LIB += -T.
This uses and extends commit d92c25b1b4
which served a similar purpose for the linker.
Change-Id: Ie1d6a0b957dc4809957726de00911c8d91647fab
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
It conflicts with 'requires' keyword.
Fixes: QTBUG-77093
Change-Id: I85e8f530dd1e2bf9a31906dd6c5123b947235b01
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
ProFunctionDef is move-enabled, meaning its `m_pro` field can
become nullptr. Its usage in the assignment operator and the dtor
must therefore be protected with a check.
Amends 9c63ad562b.
Change-Id: I0c77b07dc83969565480bbb9d9fc80751d4246b1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Not visible in QMake, because of too old C++ standard used to compile it,
but in the qttools copy. Fix here, as the authorative source, first.
Change-Id: I2552eccfaab2cef0863686dcd888f2a5f25ca29f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QChar currently is convertible from nearly every integral type. This
is bad code hygiene and should be fixed come Qt 6.
The present patch is the result of compile fixes from marking these
constructors explicit.
Amends 60ca2f5f7c.
Change-Id: I06887104d42f8327eb6196afcde5f942a74a6a78
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Conflicts:
configure.pri
Also required s/solid\.color/solidColor/ in a couple of places in:
src/gui/painting/qpaintengine_raster.cpp
Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
The absolute paths of certain static dependencies can have spaces in
them. The _qt5_$${CMAKE_MODULE_NAME}_process_prl_file fails to handle
this, and simply replaces all spaces with semicolons, which obviously
breaks the list of dependencies, and a consuming application fails to
link with a message like:
LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj'
This change partially restores the functionality that was added in
102e1822ff specifically the part
that changes qmake to export an additional variable
QMAKE_PRL_LIBS_FOR_CMAKE. This variable has the same content as
QMAKE_PRL_LIBS except it uses a semicolon as a separator, so that
CMake can correctly parse the separate lib entries.
This is much cleaner than trying to parse the original QMAKE_PRL_LIBS
variable with a complicated regular expression.
Amends eda28621f6.
Task-number: QTBUG-38913
Change-Id: I1d18fb779606505bc92320d8ce13232c7022e212
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This reverts commit 224a60989e.
Turns out that we cannot just untangle the determination of
source root and build root, because this breaks the assumption
that every .qmake.conf results in a separate .qmake.cache in the
build tree. QTBUG-76140 must be fixed differently.
Fixes: QTBUG-76907
Change-Id: I5c0a3719d5e00a0f1cacad51651b47c1f284d22d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Since commit 20e9422e we don't ignore exit codes when installing files
anymore. This patch does the same for meta file installation. We
really should be notified properly if something goes wrong here.
Task-number: QTBUG-18870
Change-Id: Ib6a20293380f400379b10ec767bf38dc74d5beeb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
A recurring problem with the Q_NAMESPACE macro is that it declares
an object (staticMetaObject) in the surrounding namespace. That
object lacks any export/import qualification to make it usable
with shared libraries.
Introduce therefore another macro to work around this issue, allowing
the user to prefix the object with an exporting macro, f.i. like this:
Q_NAMESPACE_EXPORT(Q_CORE_EXPORT)
The old macro can simply then be rewritten in terms of this new one,
supplying an empty export macro.
Note that NOT passing an argument to a macro expecting one is well
defined behavior in C99 -- the macro will expand an empty token.
Of course, MSVC doesn't like this and emits warnings. As a
workaround, use a variadic macro.
[ChangeLog][QtCore] Added the new Q_NAMESPACE_EXPORT macro. It
can be used just like Q_NAMESPACE to add meta-object information
to a namespace; however it also supports exporting of such
information from shared libraries.
[ChangeLog][Potentially Source-Incompatible Changes] Prefixing
Q_NAMESPACE with an export macro may no longer work. Use the new
Q_NAMESPACE_EXPORT macro for that use case.
Fixes: QTBUG-68014
Change-Id: Ib044a555ace1f77ae8e0244d824ec473550f3d8e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>