Commit Graph

42715 Commits

Author SHA1 Message Date
Frederik Gladhorn
045bb3df92 cmake: add gui/kernel tests
Fixes: QTBUG-78224
Change-Id: I9e6294b5035b066dead0f5ff91f81e472bc56d62
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-31 09:49:30 +00:00
Frederik Gladhorn
79c384ebb0 cmake: add widgets/kernel tests
Fixes: QTBUG-78230
Change-Id: Ia59f531f92e1f8499a8e814ff48c36f65984ff2a
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-31 09:49:03 +00:00
Simon Hausmann
3e5e7b8201 Fix formatting to conform to black rules
Ran make format.

Change-Id: Ib4fc021c30834a69a9a5df653435dd92dc6a9c05
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-29 09:28:26 +00:00
Leander Beernaert
0cab837fd7 Convert tests/auto/other
Change-Id: I79ba4f6bbbbede8ddab278dd987d9ad98277a229
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-28 12:19:50 +00:00
Leander Beernaert
b0aee08ff6 Convert qvulkan test
Change-Id: I395fa1c08bb67d65604962883dce3b390c604b9c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 12:05:17 +00:00
Leander Beernaert
c3de886b61 Port qopengl and qopenglconfig tests
Change-Id: Ic3b61fb7f23cb884552126038d0bdf289d0cbc6a
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 12:04:59 +00:00
Leander Beernaert
1fa03ced47 Port rhi tests
Change-Id: I3bf5731696a0647bf0e62758eb3d1742ba097041
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 12:04:46 +00:00
Leander Beernaert
4046b970e7 Add replacement for '*g++*' to pro2cmake.py
Change-Id: I3dc04a6169a98b7ff22392b979e743c41d6e0475
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-28 10:40:46 +00:00
Leander Beernaert
69fb4ae343 Distinguish between qt_plugin and regular plugins
If we do not encounter the load(qt_plugin) statement in the .pro file
but we do see the entry CONFIG+=plugin, treat the target as a regular
CMake library instead of treating it as a qt_plugin by default.

Change-Id: I67ad5c865a1a5ab691a6b0d86c2db4b686aa04dd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 09:20:37 +00:00
Leander Beernaert
080f9ad160 Enable running test on Android
This patch converts all add_executable calls when building for Android
to a module library and replaces the call to add_test() to use
the android testrunner binary.

Change-Id: I10ba5919217cdc93cc2cbbb7d13ad9d10fc5ac1a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 09:18:28 +00:00
Alexandru Croitor
d183c21a2c Fix declarative tests
e1fd607493 in qtbase removed the
qml1 imports enum from qlibraryinfo.cpp, qconfig.cpp, etc.

With the recent merge from dev, this was not adjusted in
qt_generate_qconfig_cpp, and thus we generated one too many strings
in qconfig.cpp, which resulted in
QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) returning
"imports" instead of "qml" subfolder, thus causing all qml modules
not being found.

Fix this by removing the extra qconfig.cpp entry, and all other
references to the location.

Change-Id: I128f667281138e2e0ef0fe1ced4af0405c532fef
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-25 16:21:06 +00:00
Toni Saario
9cd12fad8b Fix invalid condition for test execution
Equals_value check that if the property is same as given value.
Equals_property compares properties in this case the OS of target and host.

Change-Id: Ica42f0f99562911a97d2f6bd02bd8a6420c980ac
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-25 08:53:49 +00:00
Leander Beernaert
340763d1ff Add --skip-install-root option to androidtestrunner
Add the above option to android test runner since its not required
when building with Cmake.

Change-Id: Ie5c9b0af29cfa76802723960071b3bd2a37a56a5
Reviewed-by: Qt CMake Build Bot
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-24 07:16:51 +00:00
Leander Beernaert
f2cb720e3f Add Android test runner tool
Change-Id: I235bc07be0e0f7a3b0ce6297c187950a57fb31ed
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-23 11:15:56 +00:00
Leander Beernaert
790d380f8b Add custom targets to generate Android APK
This patch adds two custom targets to generate android apks. The
targets are named ${TARGET}_prepare_apk_dir and ${TARGET}_make_apk. The
first one insures the binary is copied to the right location and the
latter invokes androiddeployqt on the apk directory.

Change-Id: I8152cef387b50ec03ee2bfd92b56910a6f22754c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-23 09:08:10 +00:00
Leander Beernaert
d5dc755c65 Convert ANDROID_PACKAGE_SOURCE_DIR for android (pro2cmake)
Change-Id: I76730852e4433d095bc42ff617254a77f2d1bf51
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-23 08:11:47 +00:00
Frederik Gladhorn
f745ef0f67 cmake scripts: do not override local target through includes
This is needed for tests/auto/gui/kernel/qguiapplication which includes
the qcoreapplication test. Without this change, the target name is taken
from the included .pro file, instead of from the current file.

Change-Id: I2d8a207fd70a49ad956fb9a83a59811d89682082
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-23 08:07:54 +00:00
Frederik Gladhorn
61fa61ec16 cmake scripts: do not add spaces in empty lines
When adding resources inside a condition, we'd end up with lines
containing just spaces.

Change-Id: I623203d042e2492bdd72f97d8b9d90517040b0df
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-23 08:07:30 +00:00
Frederik Gladhorn
ccdbd32416 cmake scripts: handle aix-g++
Change-Id: I62b9e9fa9aae3350dc8c668a98453c2373c1a709
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-23 08:07:18 +00:00
Frederik Gladhorn
d784864b58 cmake: add gui/image tests
Fixes: QTBUG-78223
Change-Id: I9a5c90bb664e3baa4481e6bdaa9a4990e3f68317
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-23 07:56:08 +00:00
Leander Beernaert
c4b7f79e76 Mimic qmake by building our own xinput
When we don't find the xinput library on the system, build it ourselves.

Change-Id: I399e847513cdd1c2dcdc1d862265284002f8808a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-21 17:56:51 +00:00
Leander Beernaert
13f1be6cd6 Regenerate all configure.json files
Change-Id: Iabd2430adc4877859dc73f4092927a69decf0311
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-21 14:49:12 +00:00
Leander Beernaert
58964af094 Handle Library dependencies in compile tests
Update configurejson2cmake.py to also write out the libraries compile
tests depend on.

Change-Id: I22dbc227a33b9b5d39a2198c6ee6062e7e1bf3de
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-21 14:36:35 +00:00
Tobias Hunger
edf61092f2 QtBuild: Use STRING type for install locations
Use STRING type for install locations as we use them relative to the
CMAKE_INSTALL_PREFIX.

PATH type will get expanded to absolute paths by newer CMake versions,
so that breaks our logic.

Change-Id: I36be1f0378c4fb07ad8db0051d540f9d243000be
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-21 11:29:04 +00:00
Tobias Hunger
1c2db89027 Write out a module description file
Write out a file with some JSON data to describe a module.

This file contains information on how that module has been built.

Change-Id: I8a604692663cbb7b76b96b97124130e30b822e4b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-21 11:28:55 +00:00
Leander Beernaert
f8c1909320 Convert corelib plugin tests
Change-Id: Ia98f7945a2c5b09a9b4d59e430cf05a7fecb7d55
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-21 11:17:20 +00:00
Leander Beernaert
51979657a1 Add ALLOW_UNDEFINED_SYMBOLS to add_qt_plugin
Allow plugins to be built with undefined symbols when
ALLOW_UNDEFINED_SYMBOLS is specified.

Change-Id: I6bc809e3e5257302157bf8484f850d8319674a4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-21 10:04:22 +00:00
Alexandru Croitor
78b89547ad Temporarily disable automatic static linking of bearer plugins
The bearer plugins cause duplicate symbol errors when linking
executables in a static build.

Re-apply commit b2662b05dd

Task-number: QTBUG-79211
Change-Id: Ie4c1359f1f4d649a22570a31634c94fd22102730
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-18 14:48:21 +00:00
Leander Beernaert
bb7fa0b9a0 Fix OpenSSL include path for QtNetwork private tests
On platforms which use OpenSSL that is not installed in a standard
directory, e.g: android + vcpkg, private tests would fail to resolve
the include for OpenSSL.

Change-Id: I57ce6a83e3bc9a232d4285530f8619ffbfdf2f77
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-18 13:30:57 +00:00
Simon Hausmann
68296aaed4 Prospective fix for Boot2Qt build in the CI
One of the parameters that Coin passes to configure is this:

    -device-option DISTRO_OPTS="hard-float boot2qt"

The configure script would "swallow" the quotes and end up calling qmake
with -device-option DISTRO_OPTS=hard-float boot2qt, causing qmake to
complain that the standalone "boot2qt" option is unknown.

Fix this by preserving the quotes in the forwarding helper functions.

Change-Id: I16098bd35acb579ebf183b0f7746af8758269e7c
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
2019-10-18 13:21:29 +00:00
Leander Beernaert
077ea818af Rename builtin test data resource name
Rename the builtin test data resource name to something more unique as
there are name clashes when building tests which also add a resource
named 'testdata'.

Change-Id: Icc1bbff3134e1dbc6ea4f6a87a1715b936c723cc
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-18 13:20:56 +00:00
Leander Beernaert
373be4200b Add conversion code for Java code
Add support to pro2cmake to convert java code for android.

Add support to override API_LEVEL for the Android sdk jar file. If the
sdk is not found, we'll default to the one located by QT_ANDROID_JAR.

Change-Id: If0b746dc7f9148ac43e6592a4a4dd23d46bbd4cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-18 13:20:46 +00:00
Simon Hausmann
7e7f41e40c Pick the latest available C/C++ standard when compiling Qt
This maps the behavior of mkspecs/features/qt_common.prf and enables the
use of C++17 for example in Android, where the toolchain supports it
anyway.

Change-Id: I41f4bdb160a3929e2fb78f36efb1ad5f2ad391a5
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-17 19:23:25 +00:00
Simon Hausmann
2fa23e46c0 Fix C++ standard detection
We cannot use a generator expression in an if statement, it does not
work. Instead, we could inspect the CMAKE_C/CXX_COMPILE_FEATURES list,
but unfortunately that's not reliable. For example it detects that ICPC
supports C++17 when in fact that depends on the installed libstdc++.
Therefore this patch revives our own configure tests.

Change-Id: Ic3bc5762fbe81837722523e3881ac16e84628519
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-17 16:57:25 +00:00
Simon Hausmann
4df389eb4f Re-generate affected cmake files and configure.json after the merge
This also removes the workarounds of commit
b2662b05dd now that it's fixed "upstream"
in the .pro files.

Change-Id: Idd5e6273873a700fcda5a6cad2039c4e88b61f6f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-17 16:56:23 +00:00
Simon Hausmann
02164e0288 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
2019-10-17 09:41:36 +02:00
Qt Forward Merge Bot
6f27bb1352 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
2019-10-17 01:01:01 +02:00
Samuel Gaist
c222a9283d QAbstractItemModel: implement QRegularExpression support for match
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

[ChangeLog][QtCore][QAbstractItemModel] The match() method now
supports the new Qt::RegularExpression match flag value. This
will allow users to use either a string or a fully configured
QRegularExpression when doing searches. In the second case,
the case sensitivity flag will be ignored if passed.

Task-number: QTBUG-72587
Change-Id: I07c8d72a661c48b7f4fcf13ef8e95980bcdcb998
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-10-16 21:53:30 +02:00
Simon Hausmann
dc4212b3a6 Fix duplicate platform plugin definitions
androidplatformplugin.cpp and main.cpp both tried to define the platform
plugin entry point. That happens to work with the android toolchain by
chance, but it's certainly not intentional.

Change-Id: Ie92281abfb2335aa3ee83bc0ba660700d3485b2d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-16 17:10:21 +02:00
Ulf Hermann
85ed676dff Provide a feature for CBOR stream I/O
We need to turn it off in bootstrap code.

Change-Id: I826e49fbc5f6128e56f84b58d29358dd7b0b9dc5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-10-16 12:16:04 +02:00
Johan Klokkhammer Helsing
821c2eb131 tst_qfiledialog2: Don't assume window activation is available
Prefer qWaitForWindowExposed over qWaitForWindowActive whenever possible, skip
in the other cases.

Makes the test pass on Wayland.

Task-number: QTBUG-62188
Change-Id: I60b4000c72c3727a2f33b79a5038469055b0fef2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-16 07:06:12 +02:00
Johan Klokkhammer Helsing
8814c5778d tst_QAbstractScrollArea: Use qWaitForWindowExposed instead of active
Makes the test pass on Wayland.

Task-number: QTBUG-62188
Change-Id: I53011ad623e4bdb557d79c136f06ce7ac00a08ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-16 07:03:09 +02:00
Qt Forward Merge Bot
e3f5912747 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I8348c823117dd3d594d365fc3583f7e44d44a81c
2019-10-16 01:01:07 +02:00
Qt Forward Merge Bot
faab18c65a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ifd83db69416230175ddc3161f640b612755018fc
2019-10-16 01:00:49 +02:00
Simon Hausmann
5f160a3699 Fix static linking when bearer management plugins are built
The bearer plugins include copies of moc generated code that results in
duplicate symbols when static linking pulls in multiple bearer plugins.
Instead of relying on toolchain defined behavior, this patch moves the
code that is shared into the shared library as private API. This way it
will exist only once in memory and once at link time, resulting no
linking errors about duplicate symbols.

Fixes: QTBUG-79211
Change-Id: Iafa45c234e7fdd998971fc9cb7116334d08907bc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-15 20:51:26 +02:00
Ulf Hermann
06ca5c49e7 Cbor: Avoid QUrl in bootstrap code
QUrl is not available when building qmake. Hopefully we can get rid of
this mess in Qt 6.

Change-Id: Ia234996dd4f27d7f843db227e4cf2db869c92dc1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-15 20:39:32 +02:00
Johan Klokkhammer Helsing
80ddac3a0a tst_qgraphicseffect: Wait for exposed instead of active
Makes the test pass on Wayland.

Task-number: QTBUG-62188
Change-Id: I3900925e74d8d940a8c5af87ea64a6ec3c8c3293
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-15 20:39:32 +02:00
Sona Kurazyan
9cc040a806 Prepare for deprecating the QDesktopWidget
QDesktopWidget is marked as obsolete in docs, but it is not yet
completely deprecated, some of its methods are still in use.

Replace uses of the following methods marked as obsolete:
- QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen()
- QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry()
- QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry()

Task-number: QTBUG-76491
Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-15 20:09:29 +02:00
Laszlo Agocs
92b9dcfe2b rhi: gl: Do not let external rendering trash our vao
Task-number: QTBUG-79221
Change-Id: Ie8e6376f79c816071c12962dc054838aeaabcaa5
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-15 20:09:29 +02:00
Tor Arne Vestbø
027d45cb57 macOS: Simplify Objective-C namespacing
We only need to use the QT_MANGLE_NAMESPACE macro when declaring the
interface of the class. As long as we couple that with an alias
declaration using QT_NAMESPACE_ALIAS_OBJC_CLASS, any further uses
of the class name can be un-namespaced, including declaring
categories on the class.

The only snag with QT_NAMESPACE_ALIAS_OBJC_CLASS is that it can
only be used once per class and translation unit, so forward
declarations get hairy, but we can avoid that by just including
the headers instead.

Change-Id: I333bcd18fe1e18d81fbd560b0941c98b1c32460e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-15 20:09:28 +02:00