Commit Graph

579 Commits

Author SHA1 Message Date
Ulf Hermann
66a30b9a33 moc: Allow writing properties through bindables
BINDABLE should generally behave the same as MEMBER if "WRITE default",
except where it cannot. In particular we cannot know if any NOTIFY
signal should be sent from the synthetic WRITE accessor.

[ChangeLog][QtCore] moc will now synthesize WRITE accessors for
properties with BINDABLE if you specify "WRITE default".

Task-number: QTBUG-97249
Change-Id: I883c40ba0dda7989c840971860addaeaa75a8c83
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-08 09:38:27 +02:00
hjk
6619c94087 rcc: Suppress clang's -Wexit-time-destructors
It's an opt-in warning that some people like to use. It was introduced
to clang 3.0.0 in 2011 by

   98766db785

However, the feature is intentionally used here and the generated code is legit.

Make both sides happy.

Change-Id: I79335cd3a6a6cc128fa65f77d201a12f67424260
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-07 17:53:23 +02:00
Mate Barany
cc70757964 qdbusxml2cpp: allow choosing <> over ""
qdbusxml2cpp's -i option uses "" for the includes.
However, an option to include with <> would be also
desirable, since some compilers may use a different
search strategy for <> than for "".

Add a new command line option -I/--global-include
to include the given argument using <>.

The new option will be used in qtconnectivity.

[ChangeLog][qdbusxml2cpp] Added command line option
-I/--global-include to include header files with <> in
the generated files.

Fixes: QTBUG-103362
Change-Id: If8e7f8b86440bdec53f2517db1ad460912664b20
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-07 07:44:16 +00:00
Thiago Macieira
f5697d2b2a tst_moc: fix build with GCC 12
You can't mismatch the export macros. The QT_MOC_EXPORT_PLUGIN_V2 macro
defines these functions as Q_DECL_EXPORT so they can be found by
QPluginLoader. We must match the macro here, otherwise GCC 12 complains
(tst_moc.cpp is compiled with -fvisibility=hidden):

tst_moc.cpp.o: non-canonical reference to canonical protected function `qt_plugin_instance' in moc_plugin_metadata.cpp.o

Pick-to: 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f99893d5730da5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-06-24 19:05:53 -07:00
Thiago Macieira
dda9c9e2bc moc: fix use of escape sequence of more than one character
We had the code to calculate the length, but were improperly using it
only for the offset, not the length of the string or its containing
array. That resulted in the generated moc output containing:

 QT_MOC_LITERAL(111, 5), // "\xffz"
 QT_MOC_LITERAL(114, 5), // "\0012"
 QT_MOC_LITERAL(117, 23), // "slotWithAReallyLongName"

The two strings are described as occupying 5 bytes (length 4 + null
terminator), which is incorrect. The offset was correct: 114 - 111 = 3
and 117 - 114 = 3. The new output is:

        QT_MOC_LITERAL(111, 2),  // "\xffz"
        QT_MOC_LITERAL(114, 2),  // "\0012"
        QT_MOC_LITERAL(117, 23),  // "slotWithAReallyLongName"

The effect of the array size calculation would only be felt if moc
decided it needed a second string array (for strings over 65535 bytes),
which would cause the offsets in the second array to be all wrong. There
was no such test until now.

Drive-by fixing of the newline, indentation, and the stale comment
referring to QByteArrayData (Qt 5).

Pick-to: 6.2 6.3 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f9cd01b3e0709a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-06-22 13:03:17 -07:00
Ulf Hermann
2c0518eb62 moc: Allow reading property values through bindables
The behavior is similar to MEMBER: If the READ accessor is "default",
synthesize it using the bindable.

[ChangeLog][QtCore] You can now specify "READ default" in a Q_PROPERTY
if you also specify a BINDABLE. moc will synthesize a READ accessor in
that case.

Task-number: QTBUG-97249
Change-Id: I4a275adabaed12df95dac505095f847c4be65dfe
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-06-22 16:05:07 +02:00
Edward Welbourne
cfcbf38f76 Teach qmake about digit-grouping apostrophes in numeric literals
It was previously understanding them as character literal delimiters,
with unfortunate consequences if a numeric literal contained an odd
number of them. Recognize that an apostrophe with a digit on each side
of it isn't the opening quote of a character literal (unless the digit
before it is preceded by a u). Extend the findMocs test to trigger the
bug, prior to the fix; verified it passes with the fix.

Fixes: QTBUG-98845
Change-Id: I5db3ac59aaeade7c2d6c1fb680ba97261ec0e8a9
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-17 00:05:53 +02:00
Volker Hilsheimer
76e441c9ee Make uic generate correct C++ comments
Revert the change to uic of 05fc3aef53.

Task-number: QTBUG-67283
Change-Id: Icfd83bb6d80b91d4e58f1be460f6772ba49a6921
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-18 11:53:26 +02:00
Lucie Gérard
05fc3aef53 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-05-16 16:37:38 +02:00
Marc Mutz
9985cc330a uic: use C string literals for setObjectName()
Because setObjectName() now takes a QAnyStringView, passing C string
literals is much more efficient than using QString::fromUtf8().

This patch only deals with setObjectName() as a known property,
probably from a name attribute. If the objectName property is set by a
<property> element (or so I assume), we still emit a
QString::fromUtf8(). Detecting objectName there would be too much
magic.

Besides, I haven't been able to find why sometimes there's a second
setObjectName call right after the first, when in the XML it seems all
kosher (name attribute and objectName <property> agreeing on the
content).

Change-Id: Icf07bad841ac735a9c744bbd955428ba15758089
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-18 18:35:03 +01:00
Alexey Edelev
8adacba3e6 Add VERBATIM option to add_custom_command calls
Use VERBATIM option to prepare the correct command line for the
add_custom_command. This especially sensitive when using build
directories with names containing special symbols, that cannot be
handled by shell correctly.

Change-Id: I51d7041cb806411135fd59bf6273c04a3c695443
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-17 15:15:06 +01:00
Sona Kurazyan
6585963583 Deprecate {QString, QByteArray}::count()
And remove their uses.

[ChangeLog][QtCore][Deprecation Notice] Deprecated QString::count()
and QByteArray::count() that take no parameters, to avoid confusion
with the algorithm overloads of the same name. They can be replaced
by size() or length() methods.

Change-Id: I6541e3235ab58cf750d89568d66d3b1d9bbd4a04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-12 01:05:45 +01:00
Fabian Kosmale
8079361852 typeNameForCast: use add_pointer instead of string manipulation
Relying on string manipulation leads to -Wredundant-parens warnings in
the best case, and to non-compiling code (when using typedefs) in the
worst case.
We can avoid both issues by simply generating code that uses
add_pointer, which takes care of reference types (even typedef'd ones),
and creates no warnings about parens (as we don't write any anymore).

Fixes: QTBUG-100915
Pick-to: 6.3 6.2
Change-Id: Ic5b1cbfda20d920d11f51beeb62e9479261d5f00
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-02-18 13:44:41 +01:00
Alexey Edelev
ba48e1b809 Add missing implicit dependencies to the tool tests
moc, qmake, rcc, and uic tests execute corresponding tools inside
the test executables. This adds dependencies explicitly, to execute
tests using _check targets, without the need to manually build
dependencies.

Pick-to: 6.3 6.2
Fixes: QTBUG-98576
Change-Id: I8b989276e21199b867591f7b0f6af9204695ac13
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-02-09 15:33:46 +01:00
Alexey Edelev
1ff8877ea7 Exclude tst_qmake if the build of qmake tool is disabled
Pick-to: 6.2 6.3
Change-Id: I5aadf5250c19d8a8b26c4a890350ff3bf79e31c7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-09 15:33:46 +01:00
Alexandru Croitor
8dce9ee119 rcc: Fix missing IGNORE directive for Qt version in tst_rcc
The IGNORE directive was likely removed as an oversight
in the linked change.

This fixes the test to pass when bumping the Qt version.

Amends 9836dbd6ee

Change-Id: I497325d6d8b8b67cce7b0840bfb9bfa70d85fe73
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-01-31 16:20:06 +01:00
Joerg Bornemann
238e3beb6f Remove unused .qrc files
Task-number: QTBUG-94446
Change-Id: I136d8b4ab070a832866aa50b5701fc6bd863df8a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-17 23:17:01 +01:00
Lars Knoll
9836dbd6ee QHash: increase minimum buckets to a full span
Change the minimum amount of buckets to be at least
128, ie. one full Span. This will simplify some assumptions
in the code.

Regeneration of rcc test-data needed because the extra buckets
causes the order of the keys to change.

Task-number: QTBUG-91739
Task-number: QTBUG-98436
Change-Id: Ic0c7da03570cc4c4e6aacc9645e536aec3667a98
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-13 18:58:36 +01:00
Marc Mutz
a0f9aef11b Long live Q_GADGET_EXPORT!
Like Q_NAMESPACE_EXPORT for Q_NAMESPACE, this variant of Q_GADGET
allows passing an export macro. This is useful to avoid exporting the
whole class just to get the staticMetaObject hidden therein exported.

Before anyone asks: No, we don't need Q_OBJECT_EXPORT, because QObject
subclasses, being polymorphic, always need to have a class-level
export macro (to export their vtable), but while that technique also
works for value classes (the Q_GADGET audience), it is not desirable
for them, because it makes inline functions exported in Windows debug
builds, which is not what we want, because it needlessly restricts
what you can to with the inline functions (e.g. remove).

[ChangeLog][QtCore] Added the Q_GADGET_EXPORT macro, which is like
Q_GADGET, but allows passing an export macro (like Q_NAMESPACE_EXPORT
for Q_NAMESPACE).

Fixes: QTBUG-55458
Change-Id: I546297de1e8aa45d83381991bcd3fbca61e1eef0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-27 01:25:10 +01:00
Joerg Bornemann
3f56950862 Move macdeployqt and windeployqt from qttools to qtbase
Having all *deployqt tools in qtbase will allow us to couple deployment
support more tightly with the build system.

Change-Id: I299efdacfa6b66a303bb3996ff3ff84e723210a5
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-11-23 21:11:45 +01:00
Friedemann Kleint
5074679cfc uic: Fix missing Python import when setting tab orders
Add QWidget as default import so that QWidget.setTabOrder() is found.

Pick-to: 6.2
Change-Id: I7593008d1395e3fddacf7124d271a0eaf4c345d9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-10-20 11:34:03 +02:00
Thiago Macieira
cb0ea39895 CMake: remove support for building Qt with the old Intel compiler
This hasn't worked for some time. It's not in our CI and I don't think
it was working at all. When I tried to build it, I ran into several
problems with C++17 and an Internal Compiler Error I did not have any
interest in working around.

After discussing with the Intel compiler team, it was decided that
fixing those issues in the old compiler is not going to happen. Instead,
their recommendation is to adopt the new LLVM-based compiler, which
the last commit added support for.

This commit does not remove qmake support for the old ICC. It's possible
someone is using qmake with a non-Qt6 project and ICC.

Change-Id: Icb2516126f674e7b8bb3fffd16ad6350ddbd49e5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-13 12:49:49 -07:00
Thiago Macieira
8e5fcf02bd QPlugin: add qt_plugin_query_metadata_v2() to dynamic plugins
They return a pointer to the actual header, skipping the magic string.
This is done in preparation for the header located in an ELF note, which
won't have the magic.

Change-Id: I3eb1bd30e0124f89a052fffd16a8229bec2ad588
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-11 18:59:52 -07:00
Thiago Macieira
c89286b26a QPlugin: suppress the "QTMETADATA !" magic in static plugins
The .qtmetadata section is already suppressed for static plugins, but we
carried this unnecessary magic string. For library file formats where we
don't have a scanner (Windows COFF PE), a library that linked multiple
static plugins could end up with multiple metadata found.

We can't suppress the header because the version of moc could be
different to the version of Qt, so we need to read the header version
too. Right now, the version isn't output by moc (all the logic is in
qplugin.h), but this could change again in the future. In any case, 4
extra bytes are not a big deal, so the header stays.

Change-Id: I3eb1bd30e0124f89a052fffd16a82088d8303081
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-11 18:59:45 -07:00
Pasi Petäjäjärvi
5f3e8dde95 Support QNX QCC compiler
tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o: in function `tst_Moc::os9Newline()':
qtbase/tests/auto/tools/moc/tst_moc.cpp:1225: undefined reference to `Os9Newlines::staticMetaObject'
tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o: in function `tst_Moc::winNewline()':
qtbase/tests/auto/tools/moc/tst_moc.cpp:1239: undefined reference to `WinNewlines::staticMetaObject'

Pick-to: 6.2
Change-Id: I629d67c1190e09b26dc09e41cb7170cb0eadf1cb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-09-16 20:54:17 +03:00
Andrei Golubev
d4e62f2c5a moc: Support BINDABLE for private properties
Hopefully we won't need it but let's have it still at least for
consistency

Change-Id: I72289e65e5e5613174ad4d98cf8d614f9caae8e6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-08-06 17:25:50 +02:00
Fabian Kosmale
87973325f1 Handle even more include in enum cases
The solution in d3ed7dac8a was needlessly
complicated, and broke a valid use case.
The issue of no identifier being available to parse after the include
has been processed can instead be solved by moving the test for the
closing brace after the include processing.

Fixes: QTBUG-94790
Pick-to: 6.2 6.1 5.15
Change-Id: Ieec4b89e1d117637f11479e8bddc4060f93da43d
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-08-06 11:54:11 +00:00
Tor Arne Vestbø
bef57b317f testlib: Deprecate QWARN() in favor of qWarning()
The QtTest best practices documentations recommends using output
mechanisms such as qDebug() and qWarning() for diagnostic messages,
and this is also what most of our own tests do.

The QWARN() macro and corresponding internal QTest::qWarn() function
was added when QtTest was first implemented, but was likely meant as
an internal implementation detail, like its cousin QTestLog::info(),
which does not have any corresponding macro.

This theory is backed by our own QtTest self-test (tst_silent)
describing the output from QWARN() as "an internal testlib warning".

The only difference between QWARN() and qWarning(), besides the much
richer feature set of the latter, is that qWarning() will not pass
on file and line number information in release mode, but QWARN() will.
This is an acceptable loss of functionality, considering that the user
can override this behavior by defining QT_MESSAGELOGCONTEXT.

[ChangeLog][QtTest] QWARN() has been deprecated in favor of qWarning()

Pick-to: 6.2
Change-Id: I5a2431ce48c47392244560dd520953b9fc735c85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-08-04 19:31:51 +02:00
Marc Mutz
25fff849e8 QDirIterator: add nextFileInfo()
Before this change, next() was the only way to advance the iterator,
whether the caller was ultimately interested in just the filePath()
(good) or not (bad luck, had to call .fileInfo()).

Add a new function, nextFileInfo(), with returns fileInfo() instead.
Incidentally, the returned object has already been constructed as part
of advance()ing the iterator, so the new function is faster than
next() even if the result is ignored, because we're not calculating a
QString result the caller may not be interested in.

Use the new function around the code.

Fix a couple of cases of next(); fileInfo().filePath() (just use
next()'s return value) as a drive-by.

[ChangeLog][QtCore][QDirIterator] Added nextFileInfo(), which is like
next(), but returns fileInfo() instead of filePath().

Change-Id: I601220575961169b44139fc55b9eae6c3197afb4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-07-28 15:16:42 +02:00
Andrei Golubev
0ac8722d25 Test Q_CLASSINFO("foobar", #__VA_ARGS__) in tst_moc
There's a chance that this would be used in some macro, so why not test
that this thing works in general (especially since it actually works)

Change-Id: Ib9d91fbd17cf16675ae89a99f010dacc5d30967a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-08 08:17:34 +02:00
Andreas Buhr
4b850065b1 Consistent indentation for BINDABLE properties
Triggered by API review in Gerrit patch 355960.

Task-number: QTBUG-94407
Pick-to: 6.2
Change-Id: I7cafc1cc9d4b929040b53c6bf92c91d73c3b39f2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-06-24 19:35:29 +02:00
Edward Welbourne
f6f6d06028 Remove pure-virtual-signals.h include from tst_moc.cpp
The relevant test is conducted by tst_Moc::warnOnVirtualSignal(),
added in 2009, <quote>

    Fix Warning saying that signal cannot be made virtual

    The test for virtual signal did not work.
    But we cannot make an error right now or it might break existing code
    (exemple in task 210879)

</quote> but without removing the #include, so we do still get a
warning about that when building tst_moc.

Pick-to: 6.2 6.1 5.15
Change-Id: I5ea18058f22bbd483d1ff18b0ca7b360f6674ed9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-06-11 17:12:12 +02:00
Andrei Golubev
e6a2892772 moc: Add relative property index to JSON output of PropertyDef
Needed for QML compiler to know property index of C++ type at
compile time without going through QMetaObject::indexOfProperty

Change-Id: I404e71d6071d36812661df17d12b879a8dcbd146
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-06-02 19:03:45 +02:00
Friedemann Kleint
de15836dbf uic: No longer generate star imports in Python
Use class WriteIncludesBase and store classes encountered in a
per-module hash (Qt/custom widgets). Write out only the required
classes.

Add --star-import as a fallback should the change cause issues.

Task-number: PYSIDE-1404
Change-Id: Ic50e26758ddd0f2f8aebbce470d32a36fb09a2c4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-06-01 16:29:15 +02:00
Joerg Bornemann
92185d417d Fix BASE argument of qt_add_resources
The BASE argument of qt_add_resources now denotes the root point of the
alias of the file.  Before, BASE was merely prepended to every file that
got passed to qt_add_resources.

Old behavior:
    qt_add_resources(app "images"
        PREFIX "/"
        BASE "../shared"
        FILES "images/button.png")

Alias is "../shared/images/button.png", and pro2cmake generated
QT_RESOURCE_ALIAS assignments to fix this.

New behavior:
    qt_add_resources(app "images"
        PREFIX "/"
        BASE "../shared"
        FILES "../shared/images/button.png")

The alias is "images/button.png".  No extra QT_RESOURCE_ALIAS assignment
is needed.

The new behavior is in effect for user projects and for Qt repositories
that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE.  Qt repositories will be
ported one by one to this new behavior.  Then the old code path can be
removed.

Pick-to: 6.1
Task-number: QTBUG-86726
Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-18 16:02:52 +02:00
Fabian Kosmale
f8c1d339ec tst_moc: Use qtpaths instead of qmake
We only need to the location of certain paths for the test. For that,
qtpaths is sufficient.

Change-Id: I5af0d56b548629edc48949150ed8fbd408b617a6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-05 23:43:45 +02:00
Mårten Nordheim
48931167fb tst_moc: fix returning-reference-to-local warning
Although the code is never executed compilers still throw a warning
because it's compiled.

Amends 12b8283f89

Pick-to: 5.15 6.1
Change-Id: Ib790d4bcb33c4b9f2a55a784b852275b59debde9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-04 16:21:50 +02:00
Mårten Nordheim
12b8283f89 Moc: parse trailing return type
Pick-to: 5.15 6.1
Fixes: QTBUG-71123
Change-Id: I1c3749f0892fddcc433c9afcb1d6d7c30c97c9d9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-04 01:39:48 +02:00
Friedemann Kleint
ac95326ad4 uic/Python: Add comments for mypy to ignore star imports
Amends 2f975b39a9.

Pick-to: 6.1 5.15
Fixes: PYSIDE-1404
Change-Id: I534d78bdf44eb02bf80831a3d6c1d080a4e08698
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-04-29 21:12:12 +02:00
Volker Hilsheimer
5925daf969 Silence a bunch of gcc warnings for the moc test
We deliberately expose moc to warning-worthy C++, but we don't want the
compiler warnings coming from those.

Change-Id: I09c36d7c8bfbb88f7bde61fa7bcc52a5adde81da
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-29 15:59:48 +02:00
Joerg Bornemann
1f30bcf336 Move build tools to libexec instead of the bin dir
[ChangeLog][Build System] Tools that are called by the build system and
are unlikely to be called by the user are now installed to the libexec
directory.

This is a step towards easier co-installability of different Qt
versions.

Pick-to: 6.1
Task-number: QTBUG-88791
Change-Id: Id19575b5ba27795f7715e4ea6a09391b26dd4942
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-02-23 17:02:30 +01:00
Samuli Piippo
07c248a594 Remove blacklisting for b2qt tests that now pass
With the updated QEMU and toolchain, these tests now pass.

Change-Id: Icb74562a0e6422cd4564f63db991aa431e0e3119
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-01-28 09:27:14 +02:00
Jarek Kobus
98a89fb711 Hardcode a special case of using qOverload for slots without arguments
Pick-to: 6.0
Fixes: QTBUG-90308
Change-Id: I35cd45679ded626654dd0e7e3eea8a7bb14c1d56
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-01-15 17:39:46 +01:00
Joerg Bornemann
04f11f9935 Remove .prev_CMakeLists.txt files
Those serve no purpose anymore, now that the .pro files are gone.

Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-12 20:59:13 +01:00
Joerg Bornemann
ad2da2d27a Remove the qmake project files
Remove the qmake project files for most of Qt.

Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.

Also leave the qmake project files for utils and other minor parts that
lack CMake project files.

Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-07 15:32:28 +01:00
David Skoland
27d96b4789 Replace QtTest headers with QTest
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.

Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-22 15:20:30 +01:00
Friedemann Kleint
a46a723dba Tests: Fix building with qmake on Windows
Apparently some library definitions went overboard, link them directly.

Pick-to: 6.0
Change-Id: I009737f7e3edff5619241b700a627dc4e25e6018
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-17 13:02:15 +01:00
Alexandru Croitor
2304acab5f CMake: Regenerate projects using pro2cmake one last time
And fix up some wrong qmake project files

Pick-to: 6.0
Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-10 11:52:30 +01:00
Friedemann Kleint
cb064dee3a uic/rcc: Use QT_VERSION_MAJOR for major version
Amends 539a16a69fa1ef302cf4eb97ff5a7f8afb606d15.

Task-number: QTBUG-89124
Change-Id: I68c9ab2179d464d83c3fd9eefc5609b7a5a58e27
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-12-07 11:37:35 +01:00
Friedemann Kleint
e4395f3f68 Fix uic/rcc generating outdated export for Qt for Python
Bump version to 6.

Fixes: QTBUG-89124
Change-Id: Ifcf60552b5b6efb86f79da34da9c34b8efae9fa4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit fc9cda5f08ac848e88f63dd4a07c08b2fbc6bf17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-04 15:46:04 +00:00