Commit Graph

43974 Commits

Author SHA1 Message Date
Alexandru Croitor
0d177053b9 Regenerate projects one last time before merge
Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-12 17:30:49 +00:00
Leander Beernaert
36089f5e77 Fix metatypes source dependencies for non-prefix build
Change-Id: I0b262929f74c8da10f42d9ddbc7c119dc21619cf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 09:34:12 +00:00
The Qt Project
f4a52b79ce Merge "Merge remote-tracking branch 'origin/dev' into wip/cmake" into wip/cmake 2020-02-12 08:47:47 +00:00
Leander Beernaert
99da0c164b Use INSTALL_QMLDIR instead of Qt6_DIR for qmltypes properties
Change-Id: Ic7e6230656670ebe925530eea5e34b16b6fea59b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:45:38 +00:00
Christophe Giboudeaux
aa94565f89 Use INSTALL_DOCDIR when possible
Hardcoding 'doc' causes issues when installing qtbase but also
when trying to build the other modules documentation.

Change-Id: I5c57852add59d0dc0d067813feea0bbb0962c84b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:45:22 +00:00
Mårten Nordheim
f126d44db6 Add library mapping for QtShaderTools
Change-Id: Ideefd13d75bdd4e0463c0f7b1e15c0781cfffe8c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:44:51 +00:00
Leander Beernaert
572c03eb7a Add support for qt_helper_lib()
Add qt_add_3rdparty_library() function as a replacement for qmake's
qt_helper_lib feature.

All 3rdparty libraries will be available under the Qt:: alias when built
through this method so that they can properly register as dependencies
of a Qt module.

This patch also adds Qt3rdPartyLibraryConfig.cmake.in to export the
CMake configuration for static builds and shared libraries.

Change-Id: I52bf3a95ca22fccd9ab54343468847bb1b570c28
Fixes: QTBUG-81969
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:43:29 +00:00
Leander Beernaert
a2eb09a377 Only export public module link dependencies for shared builds
Unless we are building under a static library configuration there is no
reason to export the dependency on private libraries.

Change-Id: I724da38495dc55cc2783d4b19c01533fc0900d22
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:37:38 +00:00
Alexandru Croitor
c53f8c038c Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ia0f7f0f1511f9f593c6d4585c859d1bf1353540d
2020-02-11 20:23:12 +01:00
Samuli Piippo
9bab556005 Fix typo for Mtdev pkgconfig target
Change-Id: Id6e7057e8010f67ba1c8ce948abc59bc7abf7b7b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-11 09:20:14 +00:00
Alexandru Croitor
c9e67a7926 CMake: Regenenerate projects where recent changes happened
Change-Id: If86e49d73a45b7cfc494fa48bdc6cb1ba503b112
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-11 10:19:45 +01:00
Alexandru Croitor
f1ae5ae726 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-11 10:19:42 +01:00
Johan Klokkhammer Helsing
79da236e76 QOpenGLContext: Remove QGL helpers
They were all private, and used only by QGL* (which have been removed) so
should be safe to remove.

Task-number: QTBUG-74408
Change-Id: Ia7fdff8f0bb963449470dbd8296cbdd8652c50e2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-11 07:45:03 +00:00
Jan Arve Sæther
a0da15f2c9 Remove comments about destructors needing to be empty
Not important, but removes some ### Qt6 comments from my radar

Change-Id: Ifd1bf44c44ece8fa1314d3c7e0e95d1bd37ae0ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-02-11 07:34:20 +01:00
Eskil Abrahamsen Blomfeldt
15aade6c76 Fix compilation with -no-directwrite
The refactoring for adding the DirectWrite font database broke
disabling this feature, which in turn broke compilation with CMake,
since the configure test isn't added there yet.

Change-Id: I7727145112df7f1009a09f09bf3368645fb1b5da
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 23:03:51 +01:00
Lars Knoll
7b0422d467 Remove dead code
We don't support unsharable containers anymore.

Change-Id: Ifafa1c9b4eb43d16b3866be3dd74dda1c592f084
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-10 19:20:17 +01:00
Lars Knoll
e12577b563 don't limit QCryptographicHash to 2^31 bytes of input
Change-Id: Icd43d3b387af9ef9e9b8adb9a6388c741949c9e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-10 19:19:56 +01:00
Alexandru Croitor
3af9d49bb7 Merge remote-tracking branch 'origin/wip/cmake' into dev
Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
2020-02-10 18:35:07 +01:00
Vitaly Fanaskov
f216c801ea QTextBrowser: remove deprecated signal highlighted(const QString&)
Task-number: QTBUG-81845
Change-Id: Ibdb0fe40557b901596cc8ef37c9707f99b4df403
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:48 +01:00
Vitaly Fanaskov
e59094cb86 QSpinBox: remove deprecated signal valueChanged(const QString &)
Task-number: QTBUG-81845
Change-Id: I91148cac553f63b44968337ccc121e7376ee4465
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:47 +01:00
Vitaly Fanaskov
9cc8949cc6 QComboBox: remove deprecated signals
The following signals have been removed:
- void activated(const QString &);
- void highlighted(const QString &);

Task-number: QTBUG-81845
Change-Id: I61b552d9258987d4252202953aaf4909f9bd718e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:45 +01:00
Vitaly Fanaskov
f19fbbdb2f QVector: implement methods for adding new elements constructed in place
Fixes: QTBUG-80293
Change-Id: I687dc05a9ad2bad7bab3dc2b1173edf75550d57e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-10 18:28:43 +01:00
Leander Beernaert
c431e2d33c Refactor Metatypes dependency propagation
Every metatypes.json files is now added as an INTERFACE source file to a
target. This enables us later to correctly collect all the
metatypes.json files from dependent targets. This information is also
correctly exported via export()/install().

To avoid the metatypes.json appearing in every target's source list,
the file path is wrapped in a generator expression which will only be
evaluated when the consuming target has the property
QT_CONSUMES_METATYPES set to true. At the moment this is limited to
targets which need to interact with qmltyperegistrar.

Change-Id: I0ffebcd069a923383f7ed11cde2c94ecf2fb13f3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 15:07:34 +00:00
Ulf Hermann
71436d5499 Fix typos in the documentation for Q_REVISION
Change-Id: Ic55ab0dfca0f62e8d29a4e7d41384bed6fb1da62
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-10 10:20:20 +01:00
Lars Knoll
7caaf4eb7f Don't rely on iterators being stable while modifying the hash
The Mapping struct referred to where it got inserted into the
source_index mapping table by a const iterator to the table. That
is rather fragile, as changing the table invalidates the iterator.

It happened to work with QHash in Qt 5, but will break with the new
implementation in Qt 6.

Instead simply store the key in the Mapping struct so that it can
be quickly found in the hash.

Also fix one place, where we unconditionally call erase on an iterator
returned by constFind(). Turns out constFind() did sometimes not find
the item in question and returns end().

Change-Id: I0420a06d496f640a3150478e8c644d4cc669ceff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-09 17:41:52 +01:00
Tor Arne Vestbø
dfaa61482c Blacklist tst_QGuiApplication::quitOnLastWindowClosedMulti on macOS in CI
Change-Id: I55cb9a6b3aebac68fb1b20127ba7aa501b4a3f2b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-08 14:01:11 +01:00
Olivier Goffart
4933a5f892 Use C++17 for qmake and force the build of everything with C++17
We will want to use C++17 code in our headers soon.
(including the one in the bootstrap libraries)

This patch is quick and dirty, I guess it will be cleaner once we move to cmake

Updated QMAKE_MACOSX_DEPLOYMENT_TARGET because 10.13 runtime does
not support C++17 stdlib features

Change-Id: I75ac171436945dddd1bb953a9c8d323ac20da7ac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-08 09:49:07 +01:00
Mårten Nordheim
3568ad58f5 Introduce a configure-time check for C++17 filesystem
Various compilers have various fun ways of failing to compile when it
is used so let's check if they will work properly during configure
rather than much later.

Change-Id: Ia93d4b91b3d269b4cab2a5f677c3c89e06b44ce3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-07 23:51:06 +01:00
Ulf Hermann
f64694647a moc: Extend revision markers to allow for major and minor version
As we want Qt's own revisions to follow the Qt versioning scheme, we
need to allow for the minor version to reset to 0 now. In order to
facilitate this, we interpret the argument passed the current Q_REVISION
macro as major version and allow for an optional minor version. Both are
encoded it into the resulting revision number.

Change-Id: I3519fe20233d473f34a24ec9589d045cdd162a12
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-02-07 21:23:55 +01:00
Christian Ehrlicher
0eb922a4e9 QtSql: remove deprecated signal 'notification(QString)'
It was deprecated in Qt5 and the replacement signal with three arguments
can be used instead.

Change-Id: I6d0db8d9fa9bea2039c548e32bc39a8173403c3a
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-07 20:22:45 +01:00
Christian Ehrlicher
947d1eaaa4 QtSQL: remove SQLite2 and TDS driver for Qt6
They were deprecated in Qt4 (TDS) and 5.14 (SQLITE2) so they can be
removed now in Qt6

[ChangeLog][QtSql] Removed obsolete TDS and Sqlite2 drivers

Change-Id: I55118fb03106564d519a99ab55f9b5cf528179f3
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-07 20:22:44 +01:00
Jarek Kobus
e14e5e104d Replace the QMatrix field of QTransform with qreal[3][3]
Remove temporarily the reference returned by QTransform::toAffine()
since we don't keep the QMatrix object internally anymore.
This is done in order to compile the rest of the code.
The follow-up patch is going to remove that method completely.

Task-number: QTBUG-81628
Change-Id: If7140eedb7582d81ac8da529017cf792174e86ab
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-07 20:05:41 +01:00
Alexandru Croitor
1c571e5fe7 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-07 18:19:51 +00:00
Ulf Hermann
2145cdc54d Core: Provide comparison functions for QTypeRevision
The unspecified segment is between 0 and 1. This is because
QTypeRevision::zero(), as the default revisision needs to be smaller
than any other. At the same time we want explicitly specified non-zero
revisions to be larger than unspecified ones. Breaking this down on a
per segment level gives us the order shown here.

Change-Id: I1cca12f1180eb6f77563fb5b22c3400e118dc5e9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-07 19:19:50 +01:00
Mårten Nordheim
360d9fba23 Use posixpath when generating relative path
Fixes generating some paths with the backslash in the beginning

Change-Id: Ic7705d61f9362d3b854b2eb95f95a8951beca72d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-02-07 13:57:59 +00:00
Alexandru Croitor
abc2e51041 Fix cross compilation builds with template v2
Make sure to split the command arguments after variable substitution
like it is done in call_cmake.yaml.

Amends d445112cc0

Change-Id: Id23fcfa5b58c33e05495413fb10349fbcff1bfac
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-07 12:37:10 +00:00
Liang Qi
d445112cc0 cmake: upload artifact for qtbase android build and etc
Task-number: QTBUG-78945
Change-Id: I3361e63ed4830ac0e1ebb9d4b9495df09c45f476
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-07 10:05:51 +00:00
Eskil Abrahamsen Blomfeldt
78da102810 Make text decorations consistent between ways of drawing text
The drawGlyphRun() and drawStaticText() functions would calculate
the horizontal origin of the decorations based on the left-most edge
of the left-most glyph, in practice including the left bearing of
that glyph in the position. But in drawText()/QTextLayout it will
always be drawn from the position given as input by the user of the
function.

The inconsistency was detected in an upgrade of Harfbuzz NG, where
the tests on macOS would get a -0.05 left bearing, and as a result
the decorations would be painted one pixel to the left in
drawGlyphRun()/drawStaticText() compared to QTextLayout.

It is not a big deal in practice, but in order to get the Harfbuzz
update in, we fix the inconsistency now, by passing the user-input
position into the decoration function.

This was also an opportunity to consolidate the two code paths, and
to unexport the qt_draw_decoration_for_glyphs() symbol, which was
exported in Qt 4 only to be usable by Qt Quick 1.

Change-Id: I243404b2710ae378e84d7587efae719da3879944
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-07 08:54:11 +01:00
Eskil Abrahamsen Blomfeldt
31911d387b DirectWrite font db: Fix unstretched font selection
A typo in the conversion between DirectWrite stretch and Qt stretch
caused all unstretched fonts to be registered as ultra-condensed.

Change-Id: I2ec64fcef44cc6259946b761a7bfac0ce191971e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-07 08:54:11 +01:00
Timur Pocheptsov
4c4b5a97c3 Skip test cases that is failing on macOS >= 10.14
bind on port 1/82 is now success, in QTcpSocket's test things are more
broken: changing the test row makes the test flaky with port not available
due to the previous test case.

Task-number: QTBUG-81905
Change-Id: Iaf1b5457fa3961a4f6bc92b79aa4668a8359136e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-07 08:54:11 +01:00
Alexandru Croitor
b06f086460 Don't add private module headers for private modules when not needed
If a module has the NO_MODULE_HEADERS option, we should not add
the private module header paths to the BUILD_INTERFACE of private
modules.

This fixes building static non-prefix qtdeclarative builds on Linux,
where non-existent QtXcbQpa headers failed the qtdeclarative
generation step.

Change-Id: Ic9fdd8c5688d3449576eb8a5dd852c252e29bf5b
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-06 21:43:14 +00:00
Mårten Nordheim
b14ee53a08 Add necessities for qtquick3d
Change-Id: I39aadda7ed2b088a475ba5f940d1cb65b5b62f94
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-06 13:22:34 +00:00
Leander Beernaert
cb1fbfa1a0 Remove qt_add_qml_module() from QtBuild
This bit is being move to QtDeclarative as it is not required to build
QtBase.

Change-Id: I7b559b8b0e33e66d92c97c93bc43b650e7150237
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-06 12:22:09 +00:00
Leander Beernaert
2c297ac598 Load module specific extensions for QtBuildInternals
This patch enables each module to load their own
Qt${version}ModuleBuildInternals.cmake to expose module specific
features when building Qt.

These scripts are only loaded when the package QtBuildInternals has been
loaded.

Change-Id: Ie58dd93ddd292cf106fe7ef147151a51fd5aa2b1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-06 12:21:58 +00:00
Leander Beernaert
a43f2a6caa Safeguard against multiple definition of dbus-1 target
Change-Id: Ibba9ce7ce472fe2939386065087f0b07ad811c3f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2020-02-06 12:21:49 +00:00
Leander Beernaert
225113d59b Fix qt_add_qml_module() for non-prefix builds
Always set the installation directory for Qml modules as it is required
for qt6_add_qml_module() to set the correct properties so that qml files
can be copied to the right location.

This patch also fixes the copy of qmldir. As it previously stood, the
copied file was not complete as it is possible fore the contents to
change after we exit this function.

Change-Id: I974269cf0507664b005a93bf27ab19941d99f1d6
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 15:18:31 +00:00
Leander Beernaert
20bb59ca61 Allow manually specification of moc.json files for metatype generation
qt6_generate_meta_types_json_file() has been extended to allow the
generated moc_....cpp.json files to be manually specified. This now
enabled the metatype generation to be used without resorting to AUTOMOC.

Additionally, Core_qobject declaration order has been temporarily moved
as it otherwise does not produce the correct metatypes dependency file
for Core. This will be fixed in a follow up patch.

Change-Id: I3266ab3073db478458a0c1dbc8b9fbab16622a64
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 15:18:03 +00:00
Alexandru Croitor
ac38fa1182 Regenerate projects to correctly handle private dependencies
Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 14:36:31 +00:00
Alexandru Croitor
c5b61d2e90 pro2cmake: Handle QT += core-private correctly for modules
If a module project (Quick) contains QT += core-private, the
qmake semantics translated to CMake would mean the following:

target_link_libraries(Quick PUBLIC Core)
target_link_libraries(Quick PRIVATE CorePrivate)
target_link_libraries(QuickPrivate INTERFACE CorePrivate)

Whereas a QT_PRIVATE += core-private only means
target_link_libraries(Quick PRIVATE CorePrivate)

without adding any public dependencies to QuickPrivate.

To achieve that, we need a few modifications to both pro2cmake and
QtBuild.cmake

- pro2cmake doesn't automagically add public and private dependencies
  to targets when encountering a private module assigned to QT.
  Instead it generates the logic described above by passing correct
  LIBRARIES, PUBLIC_LIBRARIES, and PRIVATE_MODULE_INTERFACE values.

- pro2cmake doesn't do any dependency magic for non-module targets
  anymore, like executables, plugins, internal_modules. This means
  that QT assignments are now regular public dependencies.

- qt_add_module and qt_extend_target now accept a new
  PRIVATE_MODULE_INTERFACE option.

- qt_extend_target does not automagically make private modules be
   public dependencies on other private modules.

- qt_extend_target correctly assigns PRIVATE_MODULE_INTERFACE values
  to Private module only. For other target types, it's a no-op.

The change requires regeneration of all projects.

When we fix pro2cmake and QtBuild.cmake to properly handle
internal_modules (create only Private modules without creating
a non-Private counter part), we will need another project regeneration
to correctly assign dependencies.

Change-Id: I4c21f26b3ef3b2a4ed208b58bccb65a5b7312f81
Task-number: QTBUG-81780
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 14:36:16 +00:00
Samuli Piippo
4ddd4bf1aa Add additional include path for DRM
Tegra has drm.h header in include/drm instead of include/libdrm

Both paths are defined in libdrm.pc, but those are not used since this
cmake file searches only for xf86drm.h.

Change-Id: If1e979c7d5aec520b18eed5b3fcbb5ac2e15cc62
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 12:54:51 +00:00