The -d option makes rcc output a dependency file with the specified
file name.
The resulting dependency file is useful for make or ninja based build
systems.
[ChangeLog][Tools][rcc] Added -d option to generate a dependency file.
Fixes: QTBUG-45460
Change-Id: I495ade50f8d9865d4c00dce9373b2b6d1a6c8f2f
Reviewed-by: Jörg Bornemann <joerg.bornemann@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>
Fix remaining nullptr and member initialization issues which
Qt Creator did not catch.
Change-Id: If5492259aea9849c790f00809a27f4c78b446b9b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
The code was actually there, but not connected to the command line
parser.
Task-number: QTBUG-76375
Change-Id: I801cf2bbd2f207a6ce1dabd1ee1dfbd892089bbc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Codebases using QResource::isCompressed() and assuming it is Zlib break
if zstd is enabled. So change the default back to Zlib until Qt 6.0.
[ChangeLog][Important Behavior Changes] RCC's default compression
algorithm was changed back to Zlib, as it was in all previous releases
until 5.13.0. The default will remain Zlib for all Qt 5.x releases but
will change in Qt 6.0. To activate Zstd compression for your resources,
either pass the --compress-algo=zstd option to the rcc tool or add the
XML attribute compression-algorithm="zstd" to the <file> tags in the
.qrc file.
Task-number: QTBUG-76521
Change-Id: Ief874765cd7b43798de3fffd15a9f56fd9ad1ad4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
That's an undocumented Qt 4/3/2 remnant, start remove usages.
Fix incorrect include header in qclass_lib_map.h as a drive-by.
Change-Id: I939be2621bc03e5c75f7e3f152546d3af6d37b91
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's a 38k source file, which makes it MUCH smaller than other generated
files like qlocale_data_p.h (982k) and qunicodetables.cpp (718k). The
constants are platform-independent, since they are defined by IEEE 754,
so they will never change.
The generator tool is moved to util/ and removed from the build. That's
one fewer bootstrapped tool to have to worry about.
The output file is committed as .cpp so it won't get installed.
Fixes: QTBUG-76165
Change-Id: I2b1955a995ad40f3b89afffd15a3ded58dc3e35f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
It doesn't really need Qt. So remove the dependency. I've confirmed that
the output is identical to what used to be generated.
This ought to be replaced by a script. Or just committed to Git, since
the generated output is not really supposed to change, ever.
Change-Id: I46363e5b8944459e8c48fffd158bb5d74fb6184c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
First, we cannot quote the whole command in double quotes, since the
command itself very often have double quotes inside it.
Secondly, we should use the same that the ssh(1) command does:
Instead of adb shell setprop foo 'a b' we should use
adb shell setprop foo "'a b'" as explained here:
[https://developer.android.com/studio/command-line/adb#shellcommands]
Last hunk in isRunning():
The pipe character got eaten by the shell if we used a single quote (so
the stuff after the pipe (grep) was actually run locally).
Switching to ssh-style quoting fixed that.
Change-Id: I3075cdf8595ac2549cec8019f2cba79f77815e0b
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The --no-stringliteral option got introduced by commit d12d2949d1
for 5.10.0, but already deprecated in commit ff18b02f21 for 5.12.0.
[ChangeLog][uic] uic does not accept the --no-stringliteral/-s option
anymore.
Change-Id: I7a0f647ad91b3760bc826884702bf8581f5565f2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Use QDateTime::currentMSecsSinceEpoch() instead of a QTime with funky
wrapping at midnight and potential DST glitches.
Change-Id: I2455db5778635fc00b4ffdef6edee6d6793e50eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We'll be adding calendar code here as well, and tools/ was getting
rather crowded, so it looks like time to move out a reasonably
coherent sub-bundle of it all.
Change-Id: I7e8030f38c31aa307f519dd918a43fc44baa6aa1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This helps debugging import issues, and will produce output like this:
Running qmlimportscanner with the following command: /media/dev2/qt5.13-android-x86-debug/qtbase/bin/qmlimportscanner -rootPath /media/dev2/qt5.13/qtquickcontrols2/tests/auto/customization/ -importPath /media/dev2/qt5.13-android-x86-debug/qtbase/qml /media/dev2/qt5.13/qtquickcontrols2/tests/auto/customization/
Task-number: QTBUG-73572
Change-Id: I3c8fe16cb76f1b11913a3b9cc98470f6071438ab
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
stdcpp-path is needed to set the correct stdc++ library in libs.xml file.
This reverts commit 1366c4f046.
Change-Id: I79b398c5d97c1e98bf503ef7b95b2e9f0f18bc11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This patch fixes compilation with `-trace lttng` or `-trace etw`. We
need to forward declare QEvent, QImageReader etc., otherwise the types
will be unknown while compiling the trace points.
In order to handle this generically, the tracegen utility is extended
to support a 'prefix text' in the `*.tracepoints` input files. Any
text within curly braces will be embedded as-is in the generated file.
This can then be used to add forward declarations for the types we
need, including potential namespaces and such.
Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
androidtestrunner now checks is the apk is build and if it is, it will skip the build phase.
Now we can build the apks in parallel (which takes most of the time) and run them sequentially.
This way running tests on Android is much faster.
Change-Id: I82f34723ac08f7728cc0daab3366e03821335eed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Ant is history for so many years, yet we forgot to remove it from
androiddeployqt.
[ChangeLog][Android] Remove ant support from androiddeployqt
Change-Id: I093295e18e8710c565e9d101e21c49b3c62f6322
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
androidtestrunner is a tool needed to run qt tests on Android.
Now you can run tests as simple as you run them on Linux, macOS,
Windows.
"$ make check" it's all you need to run tests on the default android
device.
ANDROID_DEVICE_SERIAL env variable can be used to use a specific android
serial.
Use cases:
$ make -j1 check
-j1 is needed to make sure we don't run multiple tests in parallel.
$ ANDROID_DEVICE_SERIAL="emulator-5554" make check
Run the test on "emulator-5554"
$ make TESTARGS="-- -xml" check
Switch to xml output. All params after -- are passed to test
application.
$ make TESTARGS="-- -o out.xml,xml -o out.txt,txt -o -,tap -vs" check
Create two files out.xml and out.txt in the current folder and print
"tap" format to stdout and enable logging of every signal emission.
[ChangeLog][Android] Make it easy to run Qt tests on Android.
"$ make check" is all it's needed to run a test on an Android device.
Change-Id: I1a7f64b62608f7367b5a6aabf5d6c6e7e50242e6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
- Use range-based for
- Use isEmpty() instead .size(), streamline code
- Fix warnings about class definitions, use Q_DISABLE_COPY_MOVE
and '= default' for trivial constructors
Change-Id: I76255fd9d80c3faffebda9a438e86e918c16d289
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
strlen on literals gets typically optimized out nowadays.
Adjust callee side to handle the off-by-one between sizeof(literal)
and strlen().
Change-Id: I1551f69a160922681d66024701ba1bd8f6dc03bf
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Since faff43348b the min/maxSectionSize is
respected when setting the current/default section size programatically.
This is not honored when writing out the properties and therefore the
default section size is not correctly set when it's smaller then the
default minimum section size.
Therefore make sure to set min/maxSectionSize property before all other
properties.
Fixes: QTBUG-74352
Change-Id: I8f9ede3e90b7c9c65f8440953b00e1d9d6006d38
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
If QtCore is being compiled to a system with FP16 support, then all
applications are too and, therefore, we don't need the tables. Saves 12k
of read-only data.
Change-Id: I46363e5b8944459e8c48fffd158bb53d906df297
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Users should use range constructors instead to do the conversion.
Keep conversion methods between QList and QVector as these will turn
into a no-op in Qt 6, whereas forcing people to use range constructors
would lead to deep copies of the data.
Change-Id: Id9fc9e4d007044e019826da523e8418857c91283
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The QML language server needs to use QUrl as that is what the language
server protocol uses to specify files.
As we cannot implicitly cast char to QChar in the bootstrap library, we
need to apply a build fix in qipaddress.cpp.
Change-Id: Ifaf8421457b1f734402b5aad965ecdec764a73e8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Property flags such as SCRIPTABLE should not get controlled by
a function. I can't see this feature being used anywhere and it
leads to additional overhead that I'd like to get rid of for Qt 6.
Change-Id: Iaa10b2b3bfb7eec11401f7b6bb887c9467b67183
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
As the non prefixed variants are deprecated
Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
It does not depend on QtGui.
Change-Id: If7b01d1a6d2ce3945562f4480177ce883abfdbf4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
It requires QFontDatabase from QtGui. Add more classes from QtGui.
Fixes: PYSIDE-994
Change-Id: Ib84c86e2305fad60560a3f12997eb1e46deb67cb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
QRegExp includes can be found in several files where there's not even a
use of the class. This patch aims to avoid needless includes as well as
follow the "include only what you use" moto.
This patch removes a QRegExp include from the QStringList header which
means that there is likely going to be code breaking since QStringList
is used in many places and would get QRegExp in.
[ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no
longer includes qregexp.h.
Change-Id: I32847532f16e419d4cb735ddc11a26551127e923
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Unfold the function with returns to reduce nesting and add language
handling.
Task-number: PYSIDE-797
Change-Id: Ie6c47745b118d75c0bb2c9eea7d52c8f0377f1a6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Usually, when you load a plugin, you don't want to load just any plugin
that fulfills a given interface, but rather a specific one. When loading
dynamic plugins you can differentiate the plugins by file name. This
doesn't work in the static case, and file names are also separate from
the plugin metadata shipped inside the plugin files.
To solve this problem, different hacks have been developed in various
places. QML extension plugins add a special property "uri" via the -M
option of moc, QML debug plugins expect you to add a json file with
an array of "Keys", Qt Creator plugins have a "Name" in their json
files, etc.
By allowing the identifier for the plugin to be specified inline with
the metadata declaration we can make many of the above workarounds
obsolete and provide a clean way for users to find their plugins.
Task-number: QTBUG-74775
Change-Id: Ie2af16c49d4c5aa5a77fab0fae1e0a4449bd7a39
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Add a helper for replacing "::" by "." for Python.
Task-number: PYSIDE-797
Change-Id: I017d430b0b8b2ffbbd3300d583603924fee4d479
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Use the language helper for dereferencing pointers and end of line.
Task-number: PYSIDE-797
Change-Id: Icbca9015f2a3e8800ad4a56edf8fef9ee43f4528
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Extend WriteInitialization::findDeclaration() to return the class name
(on this occasion preparing for generating Qt 5 connection syntax) and
add a helper function for formatting the connection.
Task-number: PYSIDE-797
Change-Id: I7507f604c8275c93d347b7a6a5d5b5a2a5f3ffd5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Prepend "self." (this) to the name stored in the class Driver's hashes
as specifying it is mandatory in Python.
Task-number: PYSIDE-797
Change-Id: I1da110b84b2d1131ee6af915f9cc4ba21d7de710
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Refactor the fixString() helper, moving the code into a streamable
class using a helper which can be used for different encodings.
Task-number: PYSIDE-797
Change-Id: I0f82945b6b334da8524882dda2f104327eba79d4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Add a helper routine to look up the dom classes by attribute name and
change Driver::widgetByName() and Driver::actionByName() to use that
as does Driver::actionGroupByName() (all these functions are called
with names from the XML files).
Remove the name normalization in
WriteInitialization::findDeclaration() and refactor
WriteInitialization::acceptActionRef() to call findOrInsert() to
correctly use the unique name.
Task-number: PYSIDE-797
Change-Id: I34058361964719c442182faf798f055f11b40412
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Subjective, but for me its easier to follow code flow if
indentation is not interrupted.
Change-Id: If811ba1b975189c94a671627be8eb3a1fd67aeb9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
After e89fbd8c, QString depends on QStringView.
Fixes: QTBUG-74340
Change-Id: I9cba49db73b74deca05b9a9ddfeec580f30b5e35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
moc now successfully parses enum values, that have been deprecated with
[[deprecated]]. This is valid c++17 and should be handled correctly.
By adding that functionality it is possible to parse Windows headers
which use this deprecation mechanism.
To make sure, that moc works correctly even on compilers that do not
support deprecated enum values yet, the auto test explicitly uses
[[deprecated]] enum values during moc run.
Fixes: QTBUG-74126
Change-Id: I7b9d9a49af6093a97f8fdb800ffbc5af3d54d262
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Mark obsolete functions in QString as deprecated so they can be removed
with Qt6:
- QString::sprintf()
- QString::vsprintf()
Change-Id: I9b7748db95291c34b95ff3ad3e3aabc8215aeaae
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
We can parse the namespaces in order to find the enums in them and
populate the related metaobjects of the current file's classes. The
symbol clashes are avoided by only generating metaobjects for namespaces
defined in the same file.
Fixes: QTBUG-71966
Fixes: QTBUG-72069
Change-Id: Ibdf21c3f9dae48d95b0952b3e220b4c29e30ecb8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Incomplete translation
----------------------
If an application has more than one locale, then all the strings
declared in one language should also be translated in all other languages.
If the string should not be translated, you can add the attribute
translatable="false" on the <string> element, or you can define all
your non-translatable strings in a resource file called donottranslate.xml.
Or, you can ignore the issue with a tools:ignore="MissingTranslation" attribute.
Change-Id: I6f93f34fc36a06de9a0b687a93cf58df941dbbcb
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Conflicts:
tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
Added tests/auto/testlib/selftests/expected_crashes_5.txt to work
round the output of the crashes test (which exercises UB, see
QTBUG-73903) being truncated on one test platform.
Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
For MS Visual Studio we need to use _popen() and _pclose() instead of
the POSIX functions; and the pipe needs to be opened in binary mode.
Change-Id: Ide0fb26a1e5f121b384b0baaf8100f26c614ccc6
Fixes: QTBUG-73810
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".
Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
The evaluation mode of Qt hasn't been used since quite some time. Let's
just remove the remaining logic from the code base.
Change-Id: I61a2c432cbae78bf973f882848b3732e27431351
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This makes it much easier to have the version information set for an
Android APK without having to manually modify the AndroidManifest.xml
each time.
[ChangeLog][Android][qmake] Can now set the version name and code for
Android using ANDROID_VERSION_NAME and ANDROID_VERSION_CODE respectively
in the pro file.
Change-Id: Ie6813bc3a7444f7baa5e772b93bc2695d9b81e57
Done-with: Markus Maier <markus.maier@rosenberger.de>
Reviewed-by: Markus Maier <markus.maier@rosenberger.de>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
In NDKr19 they removed "-strip-all-gnu" argument, now
llvm-strip prints tons of:
.../llvm-strip: error: unknown argument '-strip-all-gnu'.
Change-Id: I11bb2d6abcc5f236730c57b5b93cc932c7ba58c6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Change b86d0b6215 rearranged the
sequence of function calls when generating code adding QTabWidget
and QToolBox pages, not taking into account that the iconCall()
has a side effect (writing out icon definition) Revert that part
and add a comment.
Fixes: QTBUG-72980
Task-number: PYSIDE-797
Change-Id: Ie8fbaa36f21cd4408fb1f491195da5c260708e6c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
With the current distribution, this is 90% of active devices, and
it was released in 2014. Qt 5.12 is LTS and will continue to support
older Android versions for a long time to come.
This is to reduce the testing needed on outdated platforms and
allow ourselves to use some newer APIs unconditionally in Qt.
Android 21 was chosen because it is the minimum version that supports
64 bit builds.
[ChangeLog][Android] Increased the minimum supported Android version
to Android 5.0 (API level 21).
Fixes: QTBUG-70508
Change-Id: Ia7b4345e42ca05a25a292f11ccbb8cbd692cf8f0
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
There are certain use cases for keeping debug information on the
device, for example collecting stack traces when the app crashes.
[ChangeLog][Android] Added the --no-strip command line option to
androiddeployqt.
Change-Id: I96574c2c57d85fb23d5fc65380e471fa892b6543
Fixes: QTBUG-57771
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Add a extendsOneOf() helper that takes a QStringList to be searched
and simplify the code accordingly.
In WriteInitialization::acceptWidget(), move the variable
CustomWidgetsInfo *cwi up and reuse everywhere to shorten code.
Task-number: PYSIDE-797
Change-Id: I331e135b6aa58dbbd413ca151eb67b3eb92f09c6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Also blacklist tst_QRawFont::unsupportedWritingSystem() and
tst_QGlyphRun::mixedScripts() on windows for now.
Conflicts:
qmake/generators/makefile.cpp
src/corelib/itemmodels/qstringlistmodel.cpp
src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
tests/auto/gui/text/qglyphrun/BLACKLIST
tests/auto/gui/text/qrawfont/BLACKLIST
Task-number: QTBUG-72836
Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9