Commit Graph

2067 Commits

Author SHA1 Message Date
Alexey Edelev
720d5cc1a4 Add flag that skips Qml import scanning to android deployment settings
If Qml module is not found it doesn't make sense to run any
functionality that is related to Qml inside androiddeployqt. Add the
deployment setting option that indicates this explicitly and set it
to true when Qml module is not found by CMake or by qmake.

Task-number: QTBUG-106939
Pick-to: 6.4 6.2
Change-Id: I1e6cffbdd230007feffe7448617097c10238a6c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-10-31 15:39:14 +02:00
Timothée Keller
61a4880cb3 Windeployqt command line module expansion
Added command line option for passing core5compat module in windeployqt

Task-number: QTBUG-104845
Pick-to: 6.2 6.4
Change-Id: I6a0e13532edac4580e03d83be79f7db4ac54e3bf
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-10-27 19:34:58 +02:00
Joerg Bornemann
f263211484 Mark *deployqt tools as user-facing and install versioned links
All *deployqt tools are user-facing and should have a versioned link in
the installation prefix.

Change-Id: I26dde529657da0a68401e4fd721926d9978eb879
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-25 15:38:46 +02:00
Alexey Edelev
54c959643e Add Qt plugins to the dependency list with their dependencies
In androiddeployqt we try to add all plugins that belong to the Qt
modules that Android application links. This works in case if all the
plugin dependencies are linked to the Android application explicitly
or implicitly using a build system linking mechanism. But plugins may
have dependencies that should be resolved implicitly by
androiddeployqt. The following situation is handled by this change:

 App1 links QtLib1.so
 QtLib1.so promotes its plugin plugin1.so to be included to an apk
 plugin1.so links QtLib2.so

In the described example App1 expects that plugin1.so with all the
dependencies is deployed to an apk without the need of linking
QtLib2.so explicitly.

There is a negative side effect of this change. plugin1.so is added to
apk unconditionally so there could be a situation when the plugin is
unused. So QtLib2.so with its dependencies will be included to an apk
without necessity and will increase the size of the apk significantly.

Cleanup forward declarations in androiddeployqt's main.cpp by moving
them to the top of the file.

TODO: Need to add the API which allows to exclude such plugins from apk
or to specify the list of essential plugins that are used in the
Android application. See QTBUG-107634 for details.

[ChangeLog][Android] All plugins that belong to the Qt modules that are
linked to the Android application are now deployed with their
dependencies. androiddeployqt tries to find and resolve plugin
dependencies implicitly instead of skipping plugins with dependencies
that are not resolved explicitly in the user project.

Fixes: QTBUG-107589
Fixes: QTBUG-106035
Change-Id: Ib6d9abd74ae5e21e856d7ccd02789a7a65602f40
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-10-25 13:54:21 +02:00
Kai Köhne
603ff45228 syncqt: Do not needlessly rewrite header files on Windows
SyncScanner::writeIfDifferent compares the size in the buffer with
the size of the existing file on disk to see whether the file should
be rewritten. However, on Windows the sizes hardly ever matched, because
the implicit \n to \r\n conversion only happened when writing the file
in text mode using ofstream. Take this into account.

Change-Id: Ic689390396fcc3a640640378743bd058f48a1779
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-10-21 19:47:00 +02:00
Luca Di Sera
e2fef733be Replace usages of Q_CLANG_QDOC with Q_QDOC
To allow the user to customize the C++ code that QDoc sees, so as to be
able to work-around some limitations on QDoc itself, QDoc defines two
symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an
entire execution of QDoc.

At a certain point in time, QDoc allowed the user the choice between a
custom C++ parser and a Clang based one.

The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol
would be defined only when the Clang based parser was chosen.

In more recent times, QDoc always uses a Clang based parser, such that
both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent.

To avoid using different symbols, and the possible confusion and
fragmentation that derives from it, all usages of Q_CLANG_QDOC are now
replaced by the equivalent usages of Q_QDOC.

Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-10-21 09:48:36 +02:00
Assam Boudjelthia
466a03e724 Android: fix Gradle warning about using enableUncompressedNativeLibs
The warning is as follows:

 WARNING:The option setting
'android.bundle.enableUncompressedNativeLibs=false' is deprecated.
 The current default is 'true'.
 It will be removed in version 8.0 of the Android Gradle plugin.
 You can add the following to your build.gradle instead:
 android {
     packagingOptions {
         jniLibs {
             useLegacyPackaging = true
         }
     }
 }

We already define that property in build.gradle, but we also need to
account for cases where an old build.gradle file that doesn't have that
property is used. So androiddeployqt checks if useLegacyPackaging is set
(and not commented out) whether it's true or false, if it's set to true,
then that's what Qt wants to set, and if it's set to false, then we
assume the user setting it to false is explicit and we don't want to
change that.

Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-106713
Change-Id: I566232207c458daa4484623beee670c6c6679313
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-10-21 05:33:30 +03:00
Alexey Edelev
f037e85dc2 syncqt: Use "ERROR:" preamble for warnings that are treated as errors
Use the "ERROR:" preamble for all syncqt warnings if warningsAreErrors
flag is set.

Amends 658c166f96

Task-number: QTBUG-107088
Change-Id: Idc4a0e9196dce9788fd5a25bdac6783779c1bc85
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-10-19 15:39:09 +02:00
Friedemann Kleint
ec6b22f67d windeployqt: Deploy Qt Designer plugins for QtUiTools
Make QtUiTools a known module with command line options and
plugin dependencies.

Note: There is no automated dependency checking for those
plugins as this can lead to undesired libraries being pulled.

Pick-to: 6.4
Fixes: QTBUG-104831
Change-Id: I31a0c3620460d6558edcf8245f43502f2bca7748
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-10-18 00:01:38 +02:00
Marc Mutz
fc76767692 Long live Q_UNREACHABLE_RETURN()!
This is a combination of Q_UNREACHABLE() with a return statement.

ATM, the return statement is unconditionally included. If we notice
that some compilers warn about return after __builtin_unreachable(),
then we can map Q_UNREACHABLE_RETURN(...) to Q_UNREACHABLE() without
having to touch all the code that uses explicit Q_UNREACHABLE() +
return.

The fact that Boost has BOOST_UNREACHABLE_RETURN() indicates that
there are compilers that complain about a lack of return after
Q_UNREACHABLE (we know that MSVC, ICC, and GHS are among them), as
well as compilers that complained about a return being present
(Coverity). Take this opportunity to properly adapt to Coverity, by
leaving out the return statement on this compiler.

Apply the macro around the code base, using a clang-tidy transformer
rule:

    const std::string unr = "unr", val = "val", ret = "ret";
    auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(",
                                    ifBound(val, cat(node(val)), cat("")),
                                    ")");
    auto ignoringSwitchCases = [](auto stmt) {
        return anyOf(stmt, switchCase(subStmt(stmt)));
    };

    makeRule(
       stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)),
            nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))),
       {changeTo(node(unr), cat(makeUnreachableReturn,
                                ";")),  // TODO: why is the ; lost w/o this?
        changeTo(node(ret), cat(""))},
       cat("use ", makeUnreachableReturn))
    );

where nextStmt() is copied from some upstream clang-tidy check's
private implementation and subStmt() is a private matcher that gives
access to SwitchCase's SubStmt.

A.k.a. qt-use-unreachable-return.

There were some false positives, suppressed them with NOLINTNEXTLINE.

They're not really false positiives, it's just that Clang sees the
world in one way and if conditonal compilation (#if) differs for other
compilers, Clang doesn't know better. This is an artifact of matching
two consecutive statements.

I haven't figured out how to remove the empty line left by the
deletion of the return statement, if it, indeed, was on a separate
line, so post-processed the patch to remove all the lines matching
^\+ *$ from the diff:

  git commit -am meep
  git reset --hard HEAD^
  git diff HEAD..HEAD@{1} | sed '/^\+ *$/d' | recountdiff - | patch -p1

[ChangeLog][QtCore][QtAssert] Added Q_UNREACHABLE_RETURN() macro.

Change-Id: I9782939f16091c964f25b7826e1c0dbd13a71305
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-15 22:11:47 +02:00
Marc Mutz
aa37e67ef7 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace, with manual
unstaging of the actual definition and documentation in dist/,
src/corelib/doc/ and src/corelib/global/.

Task-number: QTBUG-99313
Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 23:17:18 +02:00
Tor Arne Vestbø
b93fabddd4 syncqt: Mention full path and line number when emitting warning
Makes it easier to navigate to the offending file.

Change-Id: Ie2de5d6a0735952e72444b0ac8710fc44311eace
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-10-06 14:41:20 +02:00
Tor Arne Vestbø
affb87741e syncqt: Don't mention module name when printing errors/warnings
The module name is already clear from the build rule, e.g:

[17/451] Running syncqt.cpp for module: QtCore
WARNING: qtconfigmacros.h includes qconfig-bootstrapped.h when it should include QtCore/qconfig-bootstrapped.h

Change-Id: I9f306768e4f415dbdc20e58a93898cb7bdd83298
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-10-06 14:41:18 +02:00
Friedemann Kleint
f4192dfcf5 windeployqt: Add new multimedia plugins
Reintroduced by qtmultimedia/ccdc369cb82180bc12c3a6b00d33afad2848ba02.

Pick-to: 6.4
Fixes: QTBUG-105984
Change-Id: Iaca5ac6ad360c78542f20922803bac3375cbe58a
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2022-10-06 11:54:39 +02:00
Friedemann Kleint
369d4f4b5e uic/Python: Do not generate QByteArray for dynamic C-String properties
Fixes: PYSIDE-2069
Pick-to: 6.4
Change-Id: I8f37023a6d697ee257f283d08347349f89e7f0a9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-10-05 09:27:08 +02:00
Marc Mutz
df9d882d41 Port from container.count()/length() to size()
This is semantic patch using ClangTidyTransformator:

  auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'.

<classes> are:

    // sequential:
    "QByteArray",
    "QList",
    "QQueue",
    "QStack",
    "QString",
    "QVarLengthArray",
    "QVector",
    // associative:
    "QHash",
    "QMultiHash",
    "QMap",
    "QMultiMap",
    "QSet",
    // Qt has no QMultiSet

Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-04 07:40:08 +02:00
Thiago Macieira
e418a9b9bf syncqt: remove newline before endl
Causes newlines between lines in the output:
QtBluetooth: WARNING: adapter1_bluez5_p.h does not have the "We mean
it." warning

QtBluetooth: WARNING: battery1_p.h does not have the "We mean it."
warning

QtBluetooth: WARNING: device1_bluez5_p.h does not have the "We mean it."
warning

Change-Id: I810d70e579eb4e2c8e45fffd1719b415dd74ee43
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-10-02 16:46:56 -07:00
Alexey Edelev
658c166f96 Add 'warnings are errors' functionality to syncqt.cpp
Add the -warningsAreErrors command line argument to syncqt.cpp that
causes a fail at build step if any of header files doesn't fit the
syncqt standards. The argument reflects the WARNIGS_ARE_ERRORS CMake
variable state.

Output the syncqt.cpp warnings at configure time.

Fix the faulty positive IncludeChecks failure flag.

Task-number: QTBUG-107088
Change-Id: Id30af4c7b78fd44c1c99c7e9306965d03a0f992d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-01 16:24:01 +02:00
Kai Köhne
24d5290133 syncqt: Fix -help option
Skip sanity checks if a -help option is detected.
Otherwise, syncqt bails out with e.g.

   You need to specify either -headers or -all option.

Change-Id: I49eee48cd1825244cb6d04152734cb0dfa03fc5f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-09-30 19:01:40 +02:00
Sona Kurazyan
fce36ac866 Rename the header qenvironmentvariables.h -> qtenvironmentvariables.h
Change-Id: I8153c856c2cd93ec6932cd7dd5e9d7273d5712dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-09-30 14:19:17 +02:00
Edward Welbourne
fdd1d54bc4 Add missing include to syncqt/main.cpp
I got build-time errors for memcpy() not being declared, that
helpfully told me to #include <cstring> to get it.

Change-Id: I6ae9e881e5accf496e9c3694ca43701972d64722
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-09-28 21:47:14 +02:00
Mate Barany
6a581bc89e rcc: Drop extra QString()
Addressing a comment from the review of QTBUG-98434.
Drop the exta QString() call, it is unnecessary.

Task-number: QTBUG-103100
Change-Id: I5a13deb5d3c52166919302bc4bb45bd0b6b5c770
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-28 16:13:51 +02:00
Mate Barany
18ecd62aaa windeployqt: Use default constructor of QString and then append
Addressing a comment from the review of QTBUG-98434.

Instead of assigning an initial value to the QString, create an empty
QString first and then append to the QString.

Task-number: QTBUG-103100
Change-Id: I8f2569ac2a2203e6459bbc7df789c9ef34f598d0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-28 16:13:51 +02:00
Mate Barany
3d9013c5f9 windeployqt: Fix mismatches between string types and literals
Addressing some comments from the review of QTBUG-98434.

Fix the mismatches between string types and string literals.

Task-number: QTBUG-103100
Change-Id: Id619d7b99b9133c983f31ec5a5c2d9cc9d927416
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-28 16:13:51 +02:00
Joerg Bornemann
fad4bcad5e windeployqt: Prepend Qt's bin dir to PATH instead of appending
The fix for QTBUG-39177 was to append Qt's bin dir to PATH.  But if we
have a Qt bin dir in PATH that is different from the one windeployqt
belongs to, then we end up calling qtpaths from the former Qt.

Change-Id: I373a3270d1ec950479049b4cdaf0ff13dd8813c7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-09-28 09:51:47 +02:00
Joerg Bornemann
38ca72ab5e windeployqt: Fix PATH manipulation code for non-Windows platforms
Use QDir::listSeparator() for additional entries in PATH instead of the
hard-coded semicolon.  This is a preparation for running windeployqt on
non-Windows platforms.

Change-Id: I84f1da130508da7a0f3190d811acf35477564bf7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-09-28 09:51:43 +02:00
Alexey Edelev
b89d63515b Replace the syncqt.pl script with syncqt tool
syncqt.pl adds an extra dependency on perl when building Qt. Modern C++
provides the convenient cross-platform way to access a filesystem and
to use regular expressions, so we may replace the perl script with C++
application. The syncqt executable is built at configure time and
installed as QtCore tool. It's running at configure time to deliver the
required header files for IDE to build a consistent code model and at
the build time to keep tracking changes in header files and generate
the missing aliases without reconfiguring. 'syncqt' only parses header
files from a CMake build tree, so the resulting Qt installation only
contains interfacing headers that belong to the platform that Qt is
built for. 'sync.profile' files are not used as the 'source of truth'
for sync qt procedure anymore, all the necessary information is taken
from either CMake files at configure time or from the module header
files while parsing them.

syncqt.pl is still in place since it's required as fallback solution
for a smooth transition to the new syncqt implementation for all qt
repositories.

This patchset only enables the C++ based syncqt for 'qtbase'
repository.

From the performance perspective C++ version works faster then perl
script, also the configure time is reduced significally on subsequent
reconfigurations - up x2 times faster when re-configuring repository,
but it also takes time to compile the tool itself the first time.
Numbers for qtbase:
           syncqt.pl  syncqt.cpp
 initial:  0m16,035s  0m20,413s
 reconfig: 0m6,819s   0m3,725s

The syncing procedure can be run separately for each module using
<ModuleName>_sync_headers targets. The 'sync_headers' target can be
used to sync all the modules at once.

Task-number: QTBUG-87480
Task-number: QTBUG-103196
Change-Id: I8c938bcaf88a8713b39bbfd66d9e7ef12b2c3523
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-27 13:12:11 +02:00
Alexey Edelev
24f68a0deb Fix condition that runs the scanning of the Qml imports
Scanning of the Qml imports should be run if either Qml root paths or
.qrc files are specified for androiddeployqt.

Task-number: QTBUG-106939
Pick-to: 6.2 6.4
Change-Id: I3229ec6d3f2ac17ef751b4a6ed74e8e98db7465e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-09-27 02:50:24 +02:00
Fabian Kosmale
5222df2be7 moc: Add basic support for nested inline namespaces
This improves moc's support for nested inline namespaces, so that code
containing them will not break compilation.
For simplicity, we allow nested inline namespaces even in C++17 mode
(the actual C++ compiler will reject the code anyway, and probably with
a better error message than moc could output).
moc still has no real awareness how inline namespaces work, but that is
a preexisting issue.

Pick-to: 6.4 6.2
Fixes: QTBUG-106920
Change-Id: I7b415a99133575f101bc81d01d4670a5f752917f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-26 21:14:39 +02:00
Mate Barany
84ae970c6d qdbusxml2cpp: Modify return values
Addressing a comment from the review of QTBUG-98434. Instead of
creating a QL1SV from the concatenation, create the QL1SV first and
concatenate after, using QStringBuilder.

Task-number: QTBUG-103100
Change-Id: Ic082da410db15dd9e2c341711c24150d7a0dc0c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-24 16:33:38 +00:00
Mate Barany
65c40615d1 qdbusxml2cpp: Drop extra QString()
This commit addresses a comment from the review of QTBUG-98434.

Drop the extra QString(), .arg can be called on _L1 as well.

Task-number: QTBUG-103100
Change-Id: I4891d42536f6ea413464bea78de4b82aa6363a11
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-24 12:38:32 +02:00
Mate Barany
ac2154c7e9 qdbusxml2cpp: Remove unnecessary lines
Noticed during the review of QTBUG-98434. The variable includeGuard is
a QString, that is converted into a Latin1 string and then converted
back to QString. Remove these unnecessary lines.

Task-number: QTBUG-103100
Change-Id: I335d49ef990cb6de24031be380b5c2c7e12e961e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-24 01:30:48 +02:00
Mate Barany
c2df659c8d qdbusxml2cpp: Fix mismatches between strings and string literals
Addressing some remarks made during the review of QTBUG-98434.

Fix the mismatches between strings and string literals.

Task-number: QTBUG-103100
Change-Id: I3a7d2574f55fcffa81b8c87fb510aba0a8853330
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-23 13:53:27 +02:00
Ulf Hermann
00b9409843 Android: Disable androidtestrunner extra timeout
We already have:

a, a timeout as part of QtTest. By default it lets each test function
   run for 5 minutes. This timeout can be configured using
   QTEST_FUNCTION_TIMEOUT.
b, maxTimeBetweenOutput in the CI. The CI will kill the process if too
   much time passes between individual output lines of a test.
c, maxTimeInSeconds in the CI. This does exactly the same as the
   androidtestrunner timeout.

The CI timeouts can be centrally tuned per platform and Qt module. This
is preferable over a special timeout just for android.

As other people may be using androidtestrunner for unrelated projects,
don't delete the timeout, but simply disable it from CMake by setting
it to -1.

Task-number: QTBUG-106479
Task-number: QTBUG-101596
Task-number: QTBUG-100242
Change-Id: If4ce00948e204182bb12ac4859d3b0dd193de7ad
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-09-21 14:00:37 +02:00
Friedemann Kleint
3696c99a9a uic: Add an option to modify the generated resource import
Historically, resource imports were generated as "import file_rc",
however, pyside6-project generates files by prepending "rc_". Add an
option to flip this.

Pick-to: 6.4
Change-Id: Iee0f161cb2101c8080bd131a6401bbaf4682186d
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2022-09-15 17:57:54 +02:00
Rafael Roquetto
c3b05dfbc3 tracegen: add qint64 support
Change-Id: I4f4c5430ce86e364819ae35f3089bacf1d253484
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-15 16:15:28 +10:00
Mate Barany
a1e7c6421c uic: change the first parameter of pixCall to Q1LSV
While working on QTBUG-98434 some improvements for the pre-existing
code were found during the code review.

The first parameter is the base of the QString created by the
function but it is not needed as an actual QString, it is just
appended to. Change the type from QString to QL1SV.


Task-number: QTBUG-103100
Change-Id: I8042a921628e84d951dcfd2fd12154bf74dd5162
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-09-14 23:04:25 +02:00
Mate Barany
68d041d27d uic: use QString::compare in toBool
As a potential improvement discovered while working on QTBUG-98434,
replace the current comparison in toBool with QString::compare.


Task-number: QTBUG-103100
Change-Id: If5482adeea1537d24a97a4dda2d27ecc3b12b5bf
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-09-14 18:53:39 +02:00
Mate Barany
8d7d210aa5 uic: Change some QLatin1String literals to QString literals
While working on QTBUG-98434 some potential improvements were
found in the pre-existing code.

Some of the QLatin1String literals are used to initialize
QStrings or are converted to QStrings and so it makes sense to
replace them with QString literals.

As a related change, change the type of namespaceDelimitier from
QString to QL1SV, since it is used only for a function call and
that function has an overload to take QL1SV.

Task-number: QTBUG-103100
Change-Id: I56db6ddd84ad2a7133a765bb49ecd8f962ac5c13
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-14 14:25:38 +02:00
Mate Barany
84c494d0f2 uic: Fix mismatches between QString/QLatin1StringView
While working on QTBUG-98434 some potential improvements were found
for pre-existing issues, for example some variables were wrongly
initialized. Fix the mismatches between QString/QLatin1StringView.


Task-number: QTBUG-103100
Change-Id: Ib120452fe8012cda3f9becea8f9837efc38cf199
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-12 20:28:10 +00:00
Friedemann Kleint
d1175e20cf uic: Remove trailing blanks generated into Python icon code
The indentation is only required for C++.

Pick-to: 6.4 6.3 6.2
Change-Id: Ie861b12ba262fd56995c11d883129bafd11eface
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-09-07 19:17:55 +02:00
Friedemann Kleint
2ac733832d uic: Add QPdfView
Generate the correct header and Python import for the class.

Pick-to: 6.4 6.4.0
Change-Id: I3682b1659e73e0ccd35b617632a56a5c14715cde
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-07 15:53:19 +02:00
Rafael Roquetto
42c1e3c334 Revert "Fix build with -trace lttng"
This reverts commit 756c65d367.

"justified_worry" is an incorrect workaround which attempted to silence
tracegen when invalid types were being used. This caused Qt to compile,
but with broken/invalid tracepoints.

The proper solution involves fixing the tracepoints in question.

Change-Id: I96de254944f0367808527d215e87a5d66bb442f4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-07 22:39:25 +10:00
Mate Barany
aa99bf532d qdbusxml2cpp: modify the behavior of -m/--moc option
qdbusxml2cpp has a -m/--moc option. Change and modify the behavior
such that
-p foo -m includes moc_foo.cpp in the generated .cpp
-p :foo.cpp includes moc_foo.cpp in the generated .cpp
-p foo.h:foo.cpp includes moc_foo.cpp in the generated .cpp

Change the Qt6DbusMacros.cmake file accordingly.

[ChangeLog][qdbusxml2cpp] The -m/--moc option now generates
idiomatic moc file names (moc_base.cpp for headers, base.moc
for implementation files)(was: always base.moc). Build systems
using workarounds for the non-idiomatic naming of moc files
used by qdbusxml2cpp in the past can now drop these workarounds
for Qt versions >= 6.5.

Fixes: QTBUG-103313
Change-Id: I754b1b276f130cb8645166470e1b457a676590f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-06 11:44:22 +02:00
Rafael Roquetto
5d58aee53a tracegen: add support for QSize
Change-Id: I7228f5ebbcbd577a66a7a368fb4d64c4c7e55a25
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-03 16:03:29 +10:00
Michael Brüning
aed7b5f370 Reland macdeployqt: Don't copy .prl files into the Resources folder
QRegularExpression::isValid returns true on default constructed objects,
so the filter was always matching even though it was not meant to be
applied at all.

Fix this by checking that there is a non-empty pattern string set and
applying the filter only then.

Fixes: QTBUG-87764
Pick-to: 6.4
Change-Id: If37f8abaecacba3dc6f0b14da681a6e025367c10
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-02 12:04:23 +02:00
Michael Brüning
60b069471d Correct typo in destination path variable names
A couple of variables contained "Destianation" instead of "Destination"

Change-Id: I98a15652347d1b0dad640bc49925ec296830147b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-02 12:04:18 +02:00
Jonas Kvinge
2e8c84cda2 macdeployqt: Fix deploying libraries with reexport
Fixes deploying libgcc, currently it fails to change the rpaths with the
following error:

ERROR: Could not parse otool output line:
"\t/usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib
(compatibility version 1.0.0, current version 1.1.0, reexport)"

Pick-to: 6.3 6.4
Change-Id: I5c866a375f88e3b222cbdbebc167b04174f753b2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-01 19:03:00 +02:00
Thiago Macieira
f123212880 RCC: fix zlib compression when --no-zstd was specified
Since we had code to default to zstd as the default algorithm instead of
"Best", we ended up not compressing anything.

[ChangeLog][rcc] Fixed a bug that caused rcc not to compress files with
any compression algorithm if the --no-zstd option was present.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-106012
Change-Id: Ic6547f8247454b47baa8fffd170fddae429f82d2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-08-31 16:55:00 -03:00
Ivan Solovev
35a50491e7 QtBase tools: port away from deprecated qSetGlobalQHashSeed(0)
Use QHashSeed::setDeterministicGlobalSeed() instead

Task-number: QTBUG-105102
Change-Id: Ib7d4b6e7bca89870913a140d68bbdd6018e8f8ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-08-30 22:46:34 +02:00