Commit Graph

2249 Commits

Author SHA1 Message Date
Alexey Edelev
f73249b94d Put arguments in correct order in syncqt parseVersion
Amends 4d4e74e1bcad47476b947b6e3781b046f9505f83

Pick-to: 6.6
Change-Id: Ie3a0147b414303c528b78c20f6502b83c5102344
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-07-19 14:16:55 +02:00
Alexey Edelev
4bc0a08bea Add the 'version' argument to 'qt_deprecates' pragma
syncqt uses qt_deprecates pragma to generate deprecated header files
that might live forever in Qt packages. This adds the version argument
to the pragma, that allows specifying the version when the respective
header file should be removed. The new pragma format is the following:
  pragma qt_deprecates(<header>[,<major.minor>])

If deprecation version of the deprecated header file is lower than
the current Qt version, syncqt will display the respective warning in
the log and skip generating the deprectated header file.

Also the user warning message now displays the exact version when the
header file will be removed.

Task-number: QTBUG-115029
Pick-to: 6.6
Change-Id: Ifd7464b8539b8be93b95690fd1ca70ef0b14e436
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-07-12 21:58:26 +02:00
Alexandru Croitor
3ba3f322b6 moc: Print sterror(errno) when moc can't write the output file
Also prepend a "Error:" label to all strrerror handling locations,
to make it clear where the error starts.

Pick-to: 6.2 6.5 6.6
Task-number: QTBUG-101926
Change-Id: I1a781b4c5716636eff4d47a6c8554dcbd51d2697
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-07-12 17:48:48 +02:00
Alexandru Croitor
dd1b7b5539 moc: Store errno after fopen call
To avoid QFile::encodeName() potentially overriding the value.

Pick-to: 6.2 6.5 6.6
Task-number: QTBUG-101926
Change-Id: Ie751df877d6624238ded344474b5eccc324ec541
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-07-12 17:48:48 +02:00
Timothée Keller
87bfd33082 Windeployqt: also add internal modules to module list
Not adding internal modules to the windeployqt module list makes it
give off nonsensical warnings, and can force the deployment of debug
libraries despite a --release tag. Add them in to prevent this, and
shave off the "Private" part of the module name if it exists to maintain
compatibility.

Fixes: QTBUG-114854
Pick-to: 6.6 6.5
Change-Id: I884fdc495f340ad20ba6257587da170d6c1a1415
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-07-12 11:24:30 +02:00
Alexey Edelev
d4e3d008fe Make sure that exception flags are not overridden in syncqt tool
qt_internal_add_tool has the implicit logic that disregards the
previously installed flags and adds new flags that overrides the
exceptions behavior. Add the tool-specific option to make sure
that this won't happen.

Ammends 0f5fbe369b

Pick-to: 6.6 6.5
Change-Id: Id149d8d8002390581813475124ba37dd39d56b9b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-07-10 14:53:34 +02:00
Ievgenii Meshcheriakov
b48a588e13 qdbusxml2cpp: Improve error reporting
Use this format when reporting diagnostics relating to a source file:

   <file name>:<line>:<column>: {error|warning|note}: <message>

This makes it easier to find the source elements that caused
a diagnostics report.

Fixes: QTBUG-2597
Change-Id: I8d8d13f7d71d1ce0c5050a0d08dddd33f9997f27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-07-06 21:51:25 +02:00
Ievgenii Meshcheriakov
2f82ba66e2 qdbusxml2cpp: Move shared state to a class
For better OOP code structure and to get overview
over functions that need this shared state.

Task-number: QTBUG-2597
Change-Id: Ib3a26a1116362c3c798052b6bce8db2062451bdb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-07-06 21:51:21 +02:00
Ievgenii Meshcheriakov
2e8a48c1cd QDBusIntrospection: Add Annotation struct
Add a structure for annotation data containing
name, value and location information. This is done
to be able to emit diagnostics related to annotations
that include source location.

Task-number: QTBUG-2597
Change-Id: Ie990bcd0a16752b5f44f4314f8d730dd1b1a30b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-07-06 21:51:15 +02:00
Alexey Edelev
0f5fbe369b Re-enable exceptions when building syncqt
syncqt uses iostream API that 'excepts'. So enable exceptions flags
when building it.

Amends 49ce711796

Pick-to: 6.6 6.5
Change-Id: Ib0cd581eaec9ae73edc9de423019098304049463
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-07-06 12:49:36 +02:00
Ahmad Samir
5a523981f4 Moc: don't make variables inside an unnamed namespace static
Because an unnamed namespace, and variables inside it, have internal
linkage[1]; and the variable is constexpr in this case so static
redundant.

This fixes a clang-tidy warning:
readability-static-definition-in-anonymous-namespace

[1] https://eel.is/c++draft/basic.link#4

Change-Id: I95600214cd51b03872ee22995d93d1b5658d5a18
Task-number: QTBUG-112870
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-07-06 06:28:22 +03:00
Alexey Edelev
97268742e4 Install the missing deprecated header files
Deprecated Qt header files generated by syncqt were missing in
installation package of Qt, after migration to cpp based syncqt.
Restore them.

Note: we didn't receive bugs since 6.5 release so far. I would check
the existing files and remove them completely in 6.7. See QTBUG-115029.

Pick-to: 6.5 6.6
Fixes: QTBUG-112956
Change-Id: I2e5375ee0dbd87a76135594cd489bb67f6d3456d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-07-04 16:53:16 +02:00
Alexey Edelev
afc8260359 Remove redundant qt_no_master_include from deprecated headers
qt_no_master_include is not used  in the deprecated headers since
are generated by syncqt, are never scanned and master include logic
is controlled by syncqt.

Pick-to: 6.5 6.6
Change-Id: If6f737938abe67349c8f88387ccb5efdb95afabd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-07-03 23:01:58 +02:00
Alexey Edelev
49ce711796 Fix syncqt compiler and linker flags handling
We want syncqt to be built optimized by default. The current approach
set the default build type for the external projects and optimized
flags for the non-configure-time syncqt build. The problem is that
syncqt still have compiler flags littered by either the Qt configuration
type or the system defaults that are applicable for RelWithDebugInfo
configuration(the default one we chose for syncqt).

This patch makes sure that we cleanup all compiler flags from any
optimizations and apply optimized flags for all configurations. Also
we discard '/RTC1' flag if it's set. Configure time executables now
respect the language related flags that are set in the project and
adjust the flags passed to try_compile.

For linker flags we should use those that are applicable for the
preferred build type. Since syncqt is built in RelWithDebugInfo
by default we should replace linker flags in all configs with
those are used for RelWithDebugInfo configuration.

Fixes: QTBUG-114925
Pick-to: 6.5 6.6
Change-Id: I782f81a36f5ef7ee4d342ce8ac6c217cb2552f3b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-29 18:49:45 +02:00
Alexey Edelev
a3ec70a929 Pass CMAKE_OSX_SYSROOT to syncqt CMAKE_FLAGS
Fixes: QTBUG-114803
Pick-to: 6.5 6.6
Change-Id: I2eed5d6a7255eb61eff09d0c9a102e0652e63c0c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-28 22:09:20 +02:00
Alexey Edelev
a8cf976ce6 Introduce QT_SYNC_HEADERS_AT_CONFIGURE_TIME flag
The syncqt tool was originally designed to run at build time, as a
part of dependency chain of Qt modules. This works well unless we need
the code model of the Qt project in IDE, since Qt source code actively
uses header aliases, and creating them at build time breaks the code
model until the initial build is done. So we made syncqt the configure
time tool to not break the developer experience.

It's more likely that developers build Qt using command line or don't
need the code model before the first build. So running the tool at
configure time should be optional.

QT_SYNC_HEADERS_AT_CONFIGURE_TIME switches the "mode" of the syncqt
tool from build time tool to the configure time tool. Without the
option enabled build procedure runs all the syncing targets at build
time only. The exception are the developer builds, if the
'-developer-build' option is enabled, QT_SYNC_HEADERS_AT_CONFIGURE_TIME
is set to TRUE by default. This gives better development experience for
the developers that don't use the code model in their IDE or don't
require it before the first build is finished. Also this build time
mode is preferred for the CI or similar build procedures where code
model is not required at all.

By default, the option initialized from the
QT_INTERNAL_CONFIGURE_FROM_IDE CMake variable.

TODO: The option is forced to TRUE for the static Ninja Multi-Config
builds. See QTBUG-113974 for details.

[ChangeLog][Build System] When building Qt from sources, syncqt and Qt
header files are now created at build time, not configure time. This
should speed up the configuration step. You can set the CMake variable
QT_CONFIGURE_TIME_SYNC_HEADERS to ON to use the previous behavior,
though. The old behavior is also preserved if cmake/configure is run
from inside an IDE - Qt Creator, Visual Studio Code, and CLion are
currently detected.

Task-number: QTBUG-111163
Task-number: QTBUG-109792
Pick-to: 6.6
Change-Id: Ib61bda9546e58492be874a8591c37e100313d02c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-27 17:27:28 +00:00
Laszlo Agocs
7fee97cb2e Update windeployqt with dxc
Basically an adjusted version of findD3dCompiler() that looks for two, not one, DLLs. The logic is the same, with added support for ARM64, though this has not been verified in practice.

Fixes: QTBUG-114789
Change-Id: I1fec51fc98a5146e2770e13cf2f3b160ac4282d6
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2023-06-27 13:58:55 +02:00
Ahmad Samir
8bc1049ad7 Moc: simplify code
The concatenated byte array is already the "size" we want.

Drive-by change: use QByteArray::sliced()

Change-Id: Id0afb45ae1daf08bd125230eef0734770c645e1a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-22 02:20:30 +03:00
Ahmad Samir
475d5266e4 Moc: prevent potential unnecessary detach
Change Generator::generateSignal() to take by const FunctionDef*, so
that it can be called with the return of QList::at().

Change-Id: I5ffb0726a5ded6561e0000a2bea1973ada675152
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-22 02:20:30 +03:00
Ahmad Samir
17df4bf528 Moc: use a std::initializer_list<QList *> instead of copying
No need to copy the 3 QLists to iterate over them.

Change-Id: Id0fc7d39012bdaa78e51b1153565df77c7fb889a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-22 02:20:29 +03:00
Ahmad Samir
cfc098253a Moc: simplify the logic of a for-loop
By handling the special case before entering the loop, then it can
become a range-for, which fixes a narrowing conversion warning, and it
becomes more readable.

Change-Id: I6ce0181c95eae01a4f2bb7cd12fb5cbeba378586
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-22 02:20:29 +03:00
Ahmad Samir
0344332c76 MOC: use methods from QtMiscUtils
Change-Id: I20600357841aff36f68bcc9a81bfb3e96bf6e264
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-22 02:20:29 +03:00
Ahmad Samir
8726b6a35a Moc: use QList::removeIf
Yes, the code now uses two loops, but it's slightly better than
erasing-during-iteration; the alternative is using e.g. a while loop and
advancing an iterator manually with operator++() (in two separate
locations, since there would be a `continue` statement) or with the
return value of QList::erase (in one location).

Change-Id: I119d0e61bc06396f2158ecf9f4ae84a76d9bce7b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-22 02:20:29 +03:00
Ahmad Samir
a993510c9e Moc: simplify showing a warning
Instead of changing the "index" member then restoring it, add a
symbolAt() method to get the Symbol in question, and pass it to
new warning() overload.

Change-Id: Ie84a6cf4d837f4ed694f617100e9556c2fc2eea3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-22 02:20:29 +03:00
Ahmad Samir
db9e206dee Moc: fix narrowing conversion warnings with range-for loops
Pick-to: 6.6 6.5
Change-Id: I6dee1a6ae82c33bd6523734ee32ab4c83835f9d8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-20 06:53:52 +00:00
Ahmad Samir
c88961bcf4 Moc: fix narrowing conversion warnings by using iterator-based for-loop
The alternative would be to explicitly cast each list.size() to int. I
think using iterators is a cleaner solution.

Drive-by changes:
- Give a std::pair's members better names than first/second, by using a
  structured binding
- Port to qsizetype

Pick-to: 6.6 6.5
Change-Id: Icff3126192f9813fba698d5722b209307011ca48
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-20 06:53:52 +00:00
Ahmad Samir
2271ee6b4b Moc: port to qsizetype
Pick-to: 6.6 6.5
Change-Id: Ibacc9b4bd6c26b890a09f689c730286c2aa0894c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-20 06:35:03 +00:00
Ahmad Samir
7779400ba6 Moc: fix generated code for nested enum class corner case
Fixes an issue with generated code where the name of an enclosing
namespace is identical to an enum class type, when Q_ENUM_NS is used.

Consider:
namespace a {
    Q_NAMESPACE
    namespace b {
        enum class b { Key, Key2 };
        Q_ENUM_NS(b);
    }
}

moc generated code such as:
Q_CONSTINIT const QMetaObject a:🅱️:staticMetaObject = { {
    ...
    qt_incomplete_metaTypeArray<qt_meta_stringdata_CLASSaSCOPEbENDCLASS_t,
        // enum 'TestEnum'
        QtPrivate::TypeAndForceComplete<b::b, std::true_type>,
        // Q_OBJECT / Q_GADGET
        QtPrivate::TypeAndForceComplete<void, std::true_type>
    >,
    nullptr
} };

which confused the compiler:
error: ‘b’ is not a member of ‘a:🅱️:b
   83 |         QtPrivate::TypeAndForceComplete<b::b, std::true_type>,

Fixes: QTBUG-112996
Pick-to: 6.6
Change-Id: I37aee83c32efe96cc9d6c2bd0bdb9ba80bb7b8a7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-18 21:28:58 +03:00
Fabian Kosmale
44b5ad01f0 moc: Handle attributes after meta-method tag
We so far only handled them if they came at the very start of the method
declaration.
This patch ensures that we also handle them after the meta-method tag
(but before the actual type).
Unifying parseFunction and parseMaybeFunction to avoid the need to
munally keep them in sync is left for another day.

Fixes: QTBUG-111330
Pick-to: 6.6 6.5 6.5.2 6.2
Change-Id: Ic94edb69f04b9150aea2c8e6d004a8b9e5cf12ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-16 00:07:01 +02:00
Amir Masoud Abdol
69d74afd43 Add TRY_RUN_FLAGS argument to customize the TRY_RUN command
Some of our tools don't have the `-h`, or `-v` flag, or it could be
that the `-v` flag also prints the entire `--help` as well, e.g.,
`androiddeployqt`. When running in Jenkins, this may lead to a message
box being shown and consequently stopping the build. By customizing the
flag per tool, and limiting the TRY_RUN to tools that support `-v` or
`--version`, we can avoid this.

Also removed TRY_RUN from `macdeployqt` which doesn't need it anyway.

Amend 41b32cd2c4

Pick-to: 6.5.2 6.5 6.6
Fixes: QTBUG-114530
Change-Id: I78e3344d2553c0050c285ae86f2310bd373c6c57
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-15 11:46:00 +00:00
Yuhang Zhao
71c9b9f05b Re-fix QtLibraryInfo compilation issues
After the "CMake: make compile options consistent for Qt created libraries"
revert, this part of the code also get reverted, however, it's not
related to the revert reason: the user project's deprecation behavior
is changed. So restore this code. We need this code to make sure
we use the same parameters when compiling QtLibraryInfo, otherwise
some compilers may complain about it, such as clang-cl.

Pick-to: 6.6 6.5
Change-Id: Ie50d4f820be3a2e950dd87902d794f1d2681b7a5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-09 14:45:14 +00:00
hjk
fe5d9340b1 rcc: Fix bad data signature recognition
Done-by: Mathias Hasselmann
Fixes: QTBUG-73834
Change-Id: I99c480a2ef50ed110e0d98a9dd56661ea851397a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-09 11:27:10 +02:00
Alexandru Croitor
e3c6754760 Revert "CMake: make compile options consistent for Qt created libraries"
This reverts commit 389507a047.

Reason for revert: The original patch unintentionally changes
the deprecation warning behavior for user projects. Merging
the current change will resurface the original static qt build
bug until a new fix is developed.

Pick-to: 6.6
Change-Id: I29b41b43fdd76b19bc46439470e04443dc2b8ddb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
2023-06-08 11:04:45 +00:00
Amir Masoud Abdol
41b32cd2c4 Add TRY_RUN to host tools
On Windows, we will try to run our host tools after a successful build.
If the build fails because of a missing DLL, we will be able to throw an
error with some direction on what might be the cause, and how to resolve
it.

Pick-to: 6.5 6.6
Fixes: QTBUG-113273
Change-Id: Iba548829bc41fbee95cef288faaf7edca118ee33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-08 05:09:00 +00:00
Friedemann Kleint
79436bd34d uic: Generate QFont::Weight
Check for the new "fontweight" attribute before "bold".

Pick-to: 6.6 6.5
Task-number: QTBUG-113670
Change-Id: Ib34ab5a19872adb3c063861ffbe6b2d3374afcaa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-06-06 14:09:03 +00:00
Ahmad Samir
88de696074 Moc: check sizes of specific member QLists are within INT_MAX range
Parts of the public API, e.g. QMetaMethod::methodIndex and similar
functions return int, and other parts of the code expect int values, at
least for Qt6 this can't be changed, so use qsizetype internally and
assert the values fit in an int.

As pointed out in code review, not many people will build moc in debug
mode, so asserts aren't that useful here. Instead print error messages
and exit, like is already done in other parts of the code.

Change-Id: Id305165caa996c899f30770a757098fe2f9a96f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-06 01:23:01 +03:00
Ahmad Samir
2cca2323d3 Moc: pass a pointer to the parser to the Generator
This way the Generator can use e.g. Parser::error() to print error
messages (which will happen in a later commit).

Change-Id: Id710d7b604a82ce6bb61999addad8c95c53e3226
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-06 01:23:01 +03:00
Ahmad Samir
845b5d63bf Moc: assert size of registered strings list is within INT_MAX range
Assert generator.strings.size() < INT_MAX after all strings have been
registered.

Parts of the public API, e.g. QMetaMethod::methodIndex and similar
functions return int, and other parts of the code expect int values, at
least for Qt6 this can't be changed, so use qsizetype internally and
assert the values fit in an int.

Change-Id: Ib226e9c19a578bbeaeb9bb767d756a9569fe57b3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-06 01:23:01 +03:00
Ahmad Samir
9cb08c4c0d Moc: streamline how diagnostic messages are printed
If we don't have a valid Symbol to get a line number from, or if the
symbol.lineNum is -1, print a shorter message containing only the file
path. Printing: '/path/to/file👎1' isn't useful (and looks wrong).

Change error/defaultErrorMsg/warning/note() to delegate to one central
method, so that they all behave the same; e.g. previously warning() and
note(), guarded against printing "-1" for the line number, whereas
error() didn't.

This also makes it possible to use error() for reporting other issues
(e.g. the size of generator.strings list exceeding INT_MAX, which will
happen in a later commit).

Pick-to: 6.6
Change-Id: Iddc96e08315fae415be6a84928f845d7bceb4c5f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-05 22:23:01 +00:00
Ahmad Samir
e22f766bda Moc/Generator: fix 64-to-32 narrowing conversion warnigns
Pick-to: 6.6 6.5
Change-Id: Id1094aaba284c51c3a840a8e107abd837a825593
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-05 22:23:01 +00:00
Ahmad Samir
58329bbd2b Moc: remove STRINGDATA fallback code
If QT_MOC_HAS_STRINGDATA isn't defined, just put an '#error' directive
in the generated code.

Since the proposal of doing ±4 versions of tool compatibility hasn't
been adopted, just remove the fallback string code. Requested by Thiago
in code review.

Drive-by changes:
- Use "STRINGDATA" in comments too
- Remove a now unused static helper

Change-Id: I6dbdf427b7219b8b32076a9e0a41799c0a476ff9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-05 15:23:01 -07:00
Ievgenii Meshcheriakov
1ee7aa741a qdbusxml2cpp: Fail if -c option is used with multiple interfaces
Exit with an error code when -c option is specified by the command
is not processing a single interface. Mention this in the option
description.

Fixes: QTBUG-36405
Change-Id: I7ea217c780d37332278c634f030d20040b7459e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-02 02:11:37 +02:00
Antti Määttä
38c8eb8564 tracepointgen: Fix double comma in enums
Remove commas at the end of the lines.

Pick-to: 6.5
Change-Id: Idf731ac5de64787276c1fdf798eb429b8f73213b
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2023-05-31 08:18:58 +03:00
Antti Määttä
f1257b15cb Fix reading multiple ranges
Fix reading ranges from metadata when there are multiple RANGE
elements in the metadata.

Pick-to: 6.5
Change-Id: I1d176ded539c55ce72664c9c7c3f65d694be898c
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-05-31 08:18:51 +03:00
Antti Määttä
8a45faba36 Tracepointgen: Fix reading enums from multiple files
Don't stop searching enums if the enum partially matches.

Pick-to: 6.5
Change-Id: Idc2b45cee5a32994d55fe90c038938f0ad8b4a59
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-05-31 08:18:45 +03:00
Yuhang Zhao
389507a047 CMake: make compile options consistent for Qt created libraries
Currently some libraries created by Qt are lacking some compile
definitions and compile options, and this issue is causing us
troubles when building Qt statically. This patch tries to reduce
the parameter difference when compiling Qt's own libraries.

Change-Id: I3842943a874fab32ef90980e8aa29f5beb01feeb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-31 01:08:45 +00:00
Ahmad Samir
44cfdfa7c0 Moc: port to qsizetype
Simple s/int/qsizetype/. Fixes some narrowing conversion warnings.

Pick-to: 6.5
Change-Id: Ied82e861298fa9763089cadc7eae6e536f1bb9ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-28 01:18:56 +03:00
Ahmad Samir
c452a43b59 Moc: only call checkSuperClasses() if the class inherits another
I.e. if def.superclassList is empty, calling checkSuperClasses() is
no-op. Spotted by Fabian in code review.

Change-Id: I499baf1d2cf6dd08a26394221a48af991ccea4ad
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-28 01:18:53 +03:00
Ahmad Samir
10510c0405 Moc: fix narrowing conversion warnings with iterators/algorithms
Drive-by change: check a QList isn't empty before using first()

Pick-to: 6.5
Change-Id: I24171d17244ae96ad5779d721c65d33e5489f5f3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-28 01:18:49 +03:00
Alexey Edelev
fec618b723 Ignore carriage return character symbol explicitly
If users prefer non-unix new line style when building Qt in Linux
'\r' leads to an issue. syncqt cannot parse Qt header files using
inputstream. Add the explicit ignorance of the carriage return
character to make sure that it won't break parsing of the Qt headers.

Pick-to: 6.5
Fixes: QTBUG-113771
Change-Id: Iac69e77788517fe160118297051597a656b2f345
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-26 18:48:23 +02:00