Commit Graph

2391 Commits (4656fabd8a6ff46f786cb48c220511ebe43ea300)

Author SHA1 Message Date
Assam Boudjelthia 841bbbe8ec Android: bump min supported SDK to 28 (Android 9)
Bump the minimum supported Android API from 23 to 28 i.e.
Android Oreo 9. This is done to focus more and more on
recent versions.

Fixes: QTBUG-125023
Task-number: QTBUG-124890
Change-Id: I4d510b771f413e5711dd44de454211e019c63db6
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2024-05-23 10:26:20 +03:00
Alexey Edelev 41e6742790 syncqt: Fix the symbol detection regex
Add the support for multiple prescending macros like
QT_TECH_PREVIEW_API, Q_<MODULENAME>_EXPORT.

This also fixes couple issues caused by previous regex version.

Task-number: QTBUG-125395
Change-Id: I8781b52cb57dd14b427df226deb281619e7fc5d2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-05-22 17:30:28 +02:00
Lucie Gérard 0f7a64a3ad Add copyright and licensing to build system files missing it
Task-number: QTBUG-124453
Change-Id: Ibb6a0ab839a16ceef3c68861bac2f508ddb3d1ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-21 17:23:21 +02:00
Assam Boudjelthia fbb35cdb0b Android:CMake: Add QT_ANDROID_PACKAGE_NAME property
Allow setting the package name directly from CMake properties.
If the package name is not set manually under AndroidManifest.xml
nor build.gradle, then the value set by this property is used.
The value is passed to build.gradle as "namespace" which is the
way to set the package name after AGP 7.4 instead of
AndroidManifest.xml "package" attribute.

Task-number: QTBUG-106907
Change-Id: I94bd73c294d751eabfd96c0a10a6b3ff270d8137
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-16 16:40:55 +03:00
Kai Köhne 5e699c2a8b Replace 'Qt Designer' and 'Qt Widgets Designer' in code
Use new term in examples, code comments, error messages and and mime types.

Task-number: QTBUG-122253
Change-Id: I355452d6eb02a7a0ffbb20acf82ddb8ebbfa4837
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-16 13:04:41 +01:00
Marc Mutz 785a5e6eb4 moc: port to RAII handling of fopen()ed FILE*s
Similar to what we did for androiddeployqt, port moc's output file
handling from raw FILE* to unique_ptr<FILE> with an fclose() "deleter".

Introduce a openFileForWrite() helper function to abstract away the
difference between Unixoid and Windows FILE handling.

Keep the actual type of the unique_ptr instantiation local to
openFileForWrite() function so that creation and destruction are
defined close together, notwithstanding the occasional need to spell
out the type of the return value in callers.

NB: The moc copy in qtscxml does not contain this code.

Pick-to: 6.7 6.5
Change-Id: I0c9bca0bf3e29c137c02cc563098c5f2e2708cf3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-15 19:23:16 +00:00
Soheil Armin 28b3848989 Android: Refactor packagePath() in androiddeployqt
Make the method handle all the different possible
paths in a more clean way.

Task-number: QTBUG-116955
Task-number: QTBUG-65567
Change-Id: If0ed1b529011b942c0fb67d0ad7a940896e03c85
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-05-15 12:34:08 +03:00
Soheil Armin 79f3fe7040 Android: Add facilities to build AAR packages
This adds new aar target, as we do with apk targets, and an option
to androiddeployqt, --build-aar, which builds an AAR instead of APK.

AndroidManifest.xml of an AAR does not include application or activity
nodes, so we add an AAR specific manifest. Also the plugin type in
build.gradle will be com.android.library when choosing to build an
AAR.

Task-number: QTBUG-116955
Task-number: QTBUG-65567
Change-Id: Id33ac236f44038a8411ebfecdcc4e404c976e277
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-05-15 12:34:08 +03:00
Tinja Paavoseppä e59f310061 androiddeployqt: Add a placeholder for plugin type in build.gradle
This allows to later change the plugin type based on the options
provided for the androiddeployqt, such as when building an AAR.

Task-number: QTBUG-116955
Task-number: QTBUG-65567
Change-Id: I6314c8ab9edccbf953ae48543d5a002a9f807581
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-05-15 12:34:08 +03:00
Assam Boudjelthia b740cd1f38 Android: account for namespace in build.gradle instead of manifest
AGP version 7.4 deprecated the use of "package" attribute in the
manifest to specify the unique package name, it's instead been
moved to build.gradle file and set using "namespace" property.
This patch adds support of that to androiddeployqt.

Removing the "package" attribute from the default manifest would
break Qt Creator 13 and below because Qt Creator would fail to
deploy apps without such attribute in the manifest. For that reason
we'll defer removing it until a later version, for example Qt 6.10,
to allow some buffer for a Qt Creator that can handle that to be
adopted by users to reduce breakage.

[ChangeLog][Android] Add support for namespace in build.gradle instead
of the package attribute in the manifest.

Pick-to: 6.7
Task-number: QTBUG-106907
Change-Id: Ib0f0d6a6fbb3b38f605aadfdcc497067daf90297
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-15 12:34:08 +03:00
Marc Mutz 0a48730d08 androiddeplyqt: port to RAII handling of popen()ed FILE*s
Coverity found several FILE* leaks (since fixed) in the code, so make
sure that those can't happen anymore, by using unique_ptr to manage
the pclose() of the openProcess() FILE handles.

Keep the actual type of the unique_ptr instantiation local to
openProcess() so that creation and destruction are defined close
together, notwithstanding the occasional explicit pclose() calls to
capture the error code.

As a drive-by, port a naked popen() to openProcess(), make some
variables const and replace 0 with nullptr.

Pick-to: 6.7 6.5
Coverity-Id: 378357
Coverity-Id: 378442
Change-Id: I2b06b99cba1e4eb5b8963a9c5d2cb398eb25a8b3
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-05-15 07:10:46 +02:00
Oliver Wolff 81984807b3 windeployqt: MSVC: Add support for ARM64 hosts
Windeployqt deployed all the non Qt libraries in their x64
versions as it was not aware of the host it was running on. This
check needs to be done before any deployment happens.

Current support is limited for MSVC. mingw/clang might be done in
followup commits.

Pick-to: 6.7
Change-Id: I70fd6ad66c9cacfc6ff5b109f214a142b8b6d5f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-14 19:12:56 +02:00
Lucie Gérard 00a04dddaf Add REUSE ignore comment
For those files, reuse fails to process the copyright and licensing information. The information is written to .reuse/dep5 file and reuse is told to ignore what is in the file.

Task-number: QTBUG-124453
Change-Id: If593c713026d9d349055cb6e8e73500966a05d9b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-08 11:09:28 +00:00
Samuli Piippo 902ad05be7 qdbusxml2cpp: don't track command line
Generate source code without information about original location of the
source file. Useful for reproducible builds.

Task-number: QTBUG-105926
Task-number: QTBUG-105913
Change-Id: I33b24e11773c8ad3489cc84df3c42b43a6116378
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
2024-05-02 23:05:07 +00:00
Mårten Nordheim db7b00c4b7 moc: Update comment above properties
It was not matching up with the data there anymore,
the notifyID and 'p.revision' was not mentioned

Change-Id: I09f63e5137944e9ab96e0a70abb798895d4b7739
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-02 12:31:08 +02:00
Samuli Piippo 4fe3337394 rcc: don't track source file location
Generate source code without information about original location of the
source file. Useful for reproducible builds.

Task-number: QTBUG-105926
Task-number: QTBUG-105913
Change-Id: Ia4ca8d1b22751d0bf110082872b6b4228d01ff9a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-04-29 19:37:29 +00:00
Oliver Wolff ed191b6afa windeployqt: Deploy target dlls for directx and vc runtime
When deploying for a cross compiled target we should deploy the target
versions of directx and compiler runtime dlls. Thus a new platform was
added to utils to be able to reflect this distinction.

Fixes: QTBUG-124719
Pick-to: 6.7
Change-Id: I4dd797804fa871d76d56f8775b188d4306b51e5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-04-26 12:55:34 +02:00
Friedemann Kleint b0325c7992 uic: Write fully qualified enumerations for cursors/icon pixmaps
Fixes: PYSIDE-2492
Pick-to: 6.7
Change-Id: Ic2505628b0550654c109cf239b4f2390f03df623
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
2024-04-23 12:33:54 +02:00
Friedemann Kleint bd231cc051 uic/Python: Recognize more C++ suffixes when determining the custom widget module
Also check for .H, .hh, .hpp.

Pick-to: 6.7
Task-number: PYSIDE-2648
Change-Id: I993647e2b55e3b76d714a9d3a4b539c2d5874f04
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2024-04-22 16:48:50 +02:00
Marc Mutz db240d99cf androiddeplyqt: fix more missing pclose() on early returns
Found by Coverity.

This code predates the move of androiddeployqt to qtbase.

Pick-to: 6.7 6.6 6.5 6.2 5.15
Coverity-Id: 378442
Change-Id: Icc24918159132c55a3817eaf19c96ea212dfa6dc
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2024-04-18 10:31:01 +01:00
Marc Mutz c64b30129d androiddeplyqt: fix missing pclose() on early return
Found by Coverity.

Amends 5bb178c479.

Pick-to: 6.7 6.6 6.5 6.2 5.15
Coverity-Id: 378357
Change-Id: I8839280ce15d8e7d9e1f4024ca796c2d8b4ed930
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2024-04-18 10:31:01 +01:00
Giuseppe D'Angelo 7466831509 Long live [[nodiscard]] QFile::open
Having already caught some bugs in real code because of unchecked calls
to QFile::open, this commit marks QFile::open (and open() in other
file-I/O classes) as [[nodiscard]].

Since it's going to raise warnings, the plan is to keep the existing
behavior up to and including the next LTS. Then the warnings will switch
on by default. All of this is protected by system of macros to opt-in or
opt-out the behavioral change at any time.

A possible counter-argument for doing this is that QFile::open is also
used for opening files in the the resource system, and that opening
"cannot fail". It clearly can, if the resource is moved away or renamed;
code should at a minimum use a Q_ASSERT in debug builds. Another
counter-argument is the opening of file handles or descriptors; but
again, that opening may fail in case the handle has been closed or if
the flags are incompatible.

---

Why not marking *every* open() override? Because some are not meant to
be called directly -- for instance sockets are supposed to be open via
calls to `connectToHost` or similar.

One notable exception is QIODevice::open() itself. Although rarely
called directly by user code (which just calls open() on a specific
subclass, which likely has an override), it may be called:

1) By code that just takes a `QIODevice *` and does something with it.
   That code is arguably more rare than code using QFile directly.
   Still, being "generic" code, they have an extra responsibility when
   making sure to handle a possible opening failure.

2) By QIODevice subclasses, which are even more rare. However, they
   usually ignore the return from QIODevice::open() as it's
   unconditionally true. (QIODevice::open() doesn't use the protected
   virtual pattern.)

I'll try and tackle QIODevice in a future commit.

[ChangeLog][QtCore][QFileDevice] The open() functions of file-related
I/O classes (such as QFile, QSaveFile, QTemporaryFile) can now be marked
with the "nodiscard" attribute, in order to prevent a category of bugs
where the return value of open() is not checked and the file is then
used. In order to avoid warnings in existing code, the marking can be
opted in or out, by defining QT_USE_NODISCARD_FILE_OPEN or the
QT_NO_USE_NODISCARD_FILE_OPEN macros. By default, Qt will automatically
enable nodiscard on these functions starting from Qt 6.10.

Change-Id: Ied940e1c0a37344f5200b2c51b05cd1afcb2557d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:07:47 +02:00
Fabian Kosmale 62d02c1d50 moc: Treat number + characters as Identifier, not Number
While <DIGIT>+<Character> is not a valid identifier by itself in the C++
language, it might become one when using it with the token pasting
operator.

This risks confusing some number literals with suffix as Identifiers,
but those are currently not supported anyway, so this shouldn't break
anything that is currently working.

Fixes: QTBUG-87219
Fixes: QTBUG-124288
Pick-to: 6.7
Change-Id: If73255cc0e6649bc90c52b1d177aac8ff975ae69
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-04-17 04:38:22 +02:00
Giuseppe D'Angelo 4183fa4c0b Tools: handle file opening failure
Most of the cases, a file handle (stdin/out) is opened without checking
for error. That operation may still fail, so check for it.

Change-Id: I30c3e7b40858acd8b1662622129bd6557722dccd
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-14 00:04:26 +02:00
Axel Spoerl 2ec2c54e05 uic: use qOverload for ambiguous slots
qOverload was used only for ambiguous signals and slots with no
arguments. Connections to ambiguous slots made in widget designer's
signal/slot editor, lead to an unresolved ambiguity when compiling
the generated code in ui_xxx.h. One example is QLabel::setNum(), which
can either take a double or an int.

Always using qOverload is not an alternative, because signatures are
normalised. E.g. const QString & / QString can't be distinguished.

Add a map with all ambiguous signals and slots to customwidgetsinfo.cpp.
Hardcode the map, because uic lives in QtCore and can't access meta
objects of gui/widget classes.

Use this map in isAmbiguousSignal() and add isAmbiguousSlot().

Change OverloadUse enum into an enum class in language.cpp. Change
enum values to reflect the new condition for slots to use qOverload.

Rename existing enum values and remove default argument in
language::formatMemberFnPtr() to improve code readability.
Apply const T& syntax for all types starting with Q, except QSize and
QPoint.

Revert 94c16517b3, which was a hack
forcing for QLCDNumber::display() to a string based connection.

Add a new baseline to tst_uic, to test the above.

Fixes: QTBUG-93413
Task-number: QTBUG-124241
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I49ccc1688cfc08970cce3e56adf18e5ac49a77e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-04-12 12:32:16 +00:00
Friedemann Kleint b79cb3dd65 uic: Write QIcon theme enums
Split out some helpers to write the theme code with path fallback
checking for the enum case (identified by a fully qualified icon) or
the old XDG/filename case.

Task-number: QTBUG-121823
Pick-to: 6.7
Change-Id: If2755483ab899f04e372cf95443f7e03970f6e7f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-04-10 21:01:07 +02:00
Michael Weghorn 9f464716b0 qtpaths: Drop obsolete code for Qt < 6
Change-Id: I1da44d57e872df76e6774a7603edd7049461520e
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-09 18:48:43 +02:00
Friedemann Kleint fdac1e2205 Add support for using an inline namespaces for -qtnamespace
Inline namespaces serve the purpose for which the original
-qtnamespace option was added and allow for macro simplification (no
need for any using directives). This makes it possible to use
namespaced builds of Qt also for Qt for Python and similar use cases
which have issues with the additional namespace.

[ChangeLog][QtCore] It is now possible to use an inline namespace for
-qtnamespace (option -qtinlinenamespace).

Task-number: PYSIDE-2590
Change-Id: Ia0cecf041321933a2e02d1fd8ae0e9cda699cd1e
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-03 17:17:11 +02:00
Morten Sørvig 7b018629c3 macdeployqt: wait forever for otool
The QProcess default wait time of 30s may be too short
in e.g. CI environments where processes may be blocked
for a longer time waiting for CPU or IO.

Task-number: QTBUG-117598
Change-Id: I27dbe83ddbe811ae4ff28767de67cb0ceaab267e

Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-25 20:00:36 +01:00
Marc Mutz 73d00d0547 syncqt: remove dead code
Either the code in the try {} block

- doesn't throw, then the return within the try {} block exits the
  function, or it
- throws fileystem_error, then we rethrow in the catch, or it
- throws any other exception, then we leave the function by exception

In no case can control reach the trailing 'return {}'.

Found by Coverity.

Amends 7aecb189d5.

Pick-to: 6.7 6.6 6.5
Coverity-Id: 444466
Change-Id: I1c1bf752453076724c2fa9367ea5309e741d84ac
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-25 16:22:05 +01:00
Oliver Wolff 0cdeecf415 Make deployment of openssl plugin optional
Qt's openssl plugin is dependent on openssl libraries. Users should
make a conscious decision about deployment of the plugin and the
corresponing libraries so deployment of that functionality is now
opt in.

[ChangeLog][Tools][Windeployqt] Deployment of openssl plugins is now
optional. For proper deployment of openssl related functionality pass
in --openssl-root to make sure that openssl libraries are also deployed.

Fixes: QTBUG-117394
Change-Id: Iad43c7666b9af491f7695783b4e23a811256515b
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
2024-03-21 19:55:24 +01:00
Alexey Edelev 7aecb189d5 Add the error output for syncqt normilizedPath function
Task-number: QTBUG-123438
Pick-to: 6.5 6.6 6.7
Change-Id: If718d774daac2fd4a9e27ad4725a74362d1c78f3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-21 16:22:55 +01:00
Lucie Gérard 402e477456 Rename files for header generation
Pick-to: 6.7
Task-number: QTBUG-121039
Change-Id: I45eec26e93e5aa3e4a08ef4b326427338f63e3f2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-20 15:24:07 +01:00
Liang Qi 8a67504754 Fix dangling references - GCC 14
This amends 18def77d27 .

Pick-to: 6.7 6.6 6.5
Change-Id: Icadf46326f1fda1bdbcd40d101170581e510b87a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-18 20:28:36 +01:00
Timothée Keller ad2da2080c Windeployqt: prevent output for --list option
Some outputs weren't guarded with the optVerboseLevel which caused them
to occur even with the --list option. Add a guard to prevent for that.

Fixes: QTBUG-122257
Pick-to: 6.7 6.6
Change-Id: Ide060cda4ac6f9b4470ca608120e2b8aa4819de5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-03-15 11:42:36 +00:00
Timothée Keller c6fff128d7 Revert "Windeployqt: remove unused library list"
This reverts commit a05abede68.

Reason for revert: Causes QTBUG-123325

Change-Id: I251b67798af3d768db6f2836b52ded558c0c8211
Pick-to: 6.7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-03-14 23:55:29 +00:00
Thiago Macieira 6708107873 Bootstrap: remove unused sources
qiterable.cpp is even a comment-only source.

Change-Id: I01ec3c774d9943adb903fffd17b79d567a435594
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-03-13 18:48:21 -08:00
Timothée Keller a88b6bca21 Windeployqt: improve multiple directory warning
The multipleDirs warning was added to avoid surprises related to where
windeployqt would deploy files when using binaries from different paths.
To do this properly, make the warning message more meaningful, and
suppress the warning when the --dir option is specified, i.e. when the
user is already explicitly choosing where to deploy.

Pick-to: 6.7 6.6
Change-Id: Ie2984f4af740776c568610370d49ad4ff85ffff0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-03-14 02:58:02 +01:00
Thiago Macieira 6508902d89 Bootstrap: remove qnumeric.cpp by using qnumeric_p.h
That is, use the inline functions that refer to <numeric_limits> and
<cmath> directly, instead of the out-of-line wrappers. Someone should
verify if the hacks for QNX's <math.h> are still required.

Change-Id: I01ec3c774d9943adb903fffd17b7ee560b4b71b9
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:14 -08:00
Thiago Macieira d637bc0a5a Bootstrap: remove QDirListing/QDirIterator
Bootstrapped tools don't usually need to list directories; they should
operate on file lists passed to it by the build system instead.

This may deserve a QT_FEATURE.

Change-Id: I01ec3c774d9943adb903fffd17b7ecfba2702fc5
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 18:29:13 -07:00
Thiago Macieira b57a9a3cd9 Bootstrap: remove QTemporaryFile
Done by harmonizing the use on the QT_CONFIG(temporaryfile) macro and
fixing one test that was missing. We can't remove the older macro
because it is marked PBULIC) but we don't need to use it ourselves.

Change-Id: I01ec3c774d9943adb903fffd17b7eb4dd1a4e63f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 09:41:02 -08:00
Thiago Macieira 9e214cbcdd Bootstrap: remove QRandomGenerator
The bootstrapped tools really mustn't produce random output (they must
always be reproducible exactly). Therefore, ensure we don't need this
file.

Change-Id: I01ec3c774d9943adb903fffd17b7eb94dbd4be89
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-03-13 00:00:48 -08:00
Thiago Macieira cdbc76360a Bootstrap: remove QVariant
I added QT_NO_VARIANT to qconfig-bootstrapped.h to be clearer on what
the #ifs are, but there's no testing of that feature outside of
QT_BOOTSTRAPPED.

Change-Id: I01ec3c774d9943adb903fffd17b7e8ac4340fb89
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-13 00:00:48 -08:00
Thiago Macieira 4be7c046b1 Bootstrap: remove QDataStream
It was only used by the cmake_automoc_parser so it would write a 64-bit
in big-endian format. So bypass QDataStream and write it native
endianness.

Change-Id: I01ec3c774d9943adb903fffd17b79c78e56db4cf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-13 00:00:48 -08:00
Michał Policht 5010eda534 Windeployqt: introduce --include-soft-plugins command line option
Some plugins may have dependencies on additional Qt modules. This is
handled by deployPlugin() function. Existing code does not look for plugins
associated with these modules however, because the loop iterates over
plugin directories only once. This change introduces an option that will
make windeployqt take into account all such soft dependencies by making
recursive calls to findQtPlugins().

Pick-to: 6.7
Task-number: QTBUG-121583
Change-Id: Id6535426a47f9b92a3035e864dfdd7577b82c9ad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
2024-03-07 23:42:41 +01:00
Thiago Macieira 907e9a8b29 Move qAbort from qglobal.cpp to qassert.cpp
It makes more sense there, as all the other functions in that file are
about early termination. This allows us to remove qglobal.cpp from the
bootstrap library, because qglobal.cpp now only has the callback tables.

Amends 8f13af5d7b.

Change-Id: I01ec3c774d9943adb903fffd17b7ea92404bdbd3
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-06 02:09:16 -08:00
Ahmad Samir 7cf39bd785 Port to QDirListing
Use QDirListing in the Bootstrap build instead of QDirIterator.

Drive-by changes:
- more const variables
- use emplace_back() instead of append() where appropriate

Change-Id: Ie1f0d03856e557c4bfabfff38a87edc7da86d091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-03 14:02:07 +02:00
Ahmad Samir 56e151663e androiddeployqt: fix QDirIterator::next() usage
The code inside the loop body uses it.next() twice, however hasNext() is
called only once; each call to next() advances the iterator.

Amends 4041610cb2.

Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: Idb96cfbddc56e0d7ed38ab1b0279f40592c75175
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-03-01 23:12:56 +00:00
Volker Hilsheimer 7bde3f4c4c Fix spelling of FFmpeg in (end-)user-visible string of windeployqt
It's two capital "FF", lowercase "mpeg".

Pick-to: 6.7 6.6 6.5
Change-Id: I4eca719fa6ce0133e3ddb6163c81e24493b378e3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
2024-03-01 19:00:33 +01:00
Marc Mutz 1c8884fc27 synqt.cpp: scan for and reject #pragma once
In 2022¹, we gave ourselves the rule to allow #pragma once only in
non-installed headers (examples, tools, snippets, ...), because the
same installed header may reside in different places in the filesystem
and #pragma once would treat these as separate headers, causing
multiple-definition errors.

Recently, the question came up: "What constitutes a public header?"

Non-_p.h headers in e.g. src/plugins/ muddy the waters here a
bit. Since #pragma once is forbidden in installed headers, I had the
idea to use it to indicate non-installed headers. This patch enables
use of #pragma once as a static assertion to that effect, should we so
choose.

¹ https://lists.qt-project.org/pipermail/development/2022-October/043121.html

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-122813
Change-Id: I3b5beef72e154cf5bf1ccd4b6f02df9680609e43
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-02-29 14:56:11 +01:00