Commit Graph

2138 Commits

Author SHA1 Message Date
Li Xinwei
19bb9837a1 Skip building debug bootstrap lib for CMake 3.20 and multi-config build
When building qtbase with CMake 3.20, only release tools will be built
by default in a multi-config build, so it is possible to skip building
debug bootstrap lib.

Task-number: QTBUG-88414
Change-Id: I266ac458ae3c89c593656e4ebdc788ae5797b788
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-05-23 14:00:53 +08:00
Joerg Bornemann
c3b5ca129a rcc: Fix error message when temporary file cannot be opened
If rcc cannot open the file passed with --temp, display the path of the
temporary file, not the one of the output file.

Pick-to: 6.1
Change-Id: I58f8ab2f68ac2f1a19feb6b02974dff9fc8b7ec1
Reviewed-by: hjk <hjk@qt.io>
2021-05-21 23:15:42 +02:00
Lars Schmertmann
46db337975 androiddeployqt: Refactor apkSignerRunner
Avoid to publish all local variables in the lambda and
only provide the necessary information as parameter.

Change-Id: Iea68280f79f90ac3d5f7b9a0a92e073865a1d291
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-05-21 16:05:44 +02:00
Joerg Bornemann
76eefab088 Add proper dependencies to apk targets
Before, building ${target}_make_apk always re-built the apk, instead of
rebuilding the apk only when inputs changed. This patch fixes that by
moving the creation code from a custom target to a custom command with
proper dependencies.

The androidtestrunner tool now does not check for the existence of an
apk anymore and always runs the make command that is supposed to build
the apk.

The ${target}_prepare_apk_dir target is not needed anymore by the Qt
build but is still used by Qt Creator's Android support. Add a
clarifying comment.

Fixes: QTBUG-93431
Change-Id: I00d65d616fef9511b03b65f879c4bc6cb92dfc30
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-17 19:14:44 +02:00
Andy Shaw
a8a6558a84 Allow for arguments that have an equals as part of it
Since you can pass a define to org.gradle.jvmargs that can have the
name=value approach, then we need to ensure that this is accounted for.

Task-number: QTBUG-88989
Pick-to: 6.1 5.15
Change-Id: I2a795bff7ce683eca521b3a987293b3320accb6a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-05-14 08:12:09 +00:00
Assam Boudjelthia
531d12edaf Android: check that app's lib_name value doesn't contain spaces
android.app.lib_name is used for the app's lib that contains the main()
function, *.so lib files usually have non-spaced names, thus to avoid
wrong changes done to the manifest file, it's better to throw an error
in this case.

Change-Id: I4d4f0235612b308c78fd06a77690604c5c69f8ff
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-05-12 12:49:45 +00:00
Mike Achtelik
08d8c59629 androiddeployqt: Check if apk is already aligned
Newer versions of the android gradle plugin already align the apk
internally. Therefore it is not necessary to indiscriminately align
every apk. So let's first check, if it is already aligned and only
align it if necessary. This prevents possible alignment errors,
which might occur when aligning it again. If it is already aligned,
we can just copy and continue signing the apk.

Fixes: QTBUG-88989
Change-Id: If29004e372e7927c88a900dc56f490bf9bce9ec7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-05-12 10:09:17 +02:00
Fabian Kosmale
300dec66ce QMetaMethod: Store method constness in metaobject system
[ChangeLog][QtCore][QMetaMethod] It is now possible to query the
constness of a method with QMetaMethod::isConst.

Change-Id: I8a94480b8074ef5b30555aeccd64937c4c6d97d4
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-05-07 21:50:58 +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
96d9cf8de4 uic: Fix font family code generation for python
Amend the code introduced by d8602ce58b
to generator correct code for Python.

Change-Id: I71fc9a1830d6bd591d32ce08002572c29f02a27f
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit b2ebc64dd9914359fe8acf2bc9960e341e98cf80)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-05-03 16:09:23 +00:00
Thiago Macieira
19fa58447e Revert "Include qsimd.cpp in bootstrap build"
This reverts commit 9268cb8085. That was
done in the mistaken assumption that the bootstrap library needs the
fast hashing algorithms. It doesn't, since it's only used for tools that
need deterministic output anyway.

This fixes the build on x86 where the compiler is enabling rdrand by
default (Ivy Bridge systems, but also -march=haswell and the GCC 11
-march=x86-64-v3):

qsimd.cpp:750:37: error: redefinition of ‘qsizetype qRandomCpu(void*, qsizetype)’
  750 | QT_FUNCTION_TARGET(RDRND) qsizetype qRandomCpu(void *buffer, qsizetype count) noexcept
      |                                     ^~~~~~~~~~
In file included from qsimd.cpp:44:
qsimd_p.h:354:25: note: ‘qsizetype qRandomCpu(void*, qsizetype)’ previously defined here
  354 | static inline qsizetype qRandomCpu(void *, qsizetype) noexcept
      |                         ^~~~~~~~~~

Change-Id: I755911ae7d0341f49039fffd167afc7540bf0dd6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-05-01 18:55:42 +00:00
Friedemann Kleint
f55fc61346 uic: Update qclass_lib_map.h
Task-number: PYSIDE-1404
Change-Id: I6101402891749a767119a5688d9a5a6299ee840d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-05-01 16: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
Tor Arne Vestbø
9268cb8085 Include qsimd.cpp in bootstrap build
QHash, which is included in the bootstrap library, uses qCpuFeatures()
as part of the implementation of qHashBits(), when the __ARM_FEATURE_CRYPTO
is available, so we need to ensure the definition of that function is
also included.

Change-Id: I3eeb3685335120a4861c397ab9c82540bcfcd17c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-27 22:07:44 +02:00
Alexandru Croitor
b25eb6e0bd CMake: Introduce zlib find script to work around hardcoded iOS SDK
Xcode allows building a project targeting either the device or
simulator sysroot in one single build dir, but for the sysroot
switching to work there should be no linker or compiler flags
referencing absolute paths of a specific sysroot.

During CMake configuration of a project targeting iOS, all found
system libraries will be within one single sysroot, either the device
one or the simulator one, whichever one was passed to
CMAKE_OSX_SYSROOT. CMake will then generate the Xcode project
and pass those absolute paths, which makes sysroot switching within
Xcode not work.

To avoid that, the CMake documentation recommends passing linker and
framework flags of the form '-lfoo' and '-framework bar' instead of
absolute paths. Xcode then takes care of setting the correct framework
search path.

Zlib is one of the libraries found in the iOS sysroot and thus passed
as absolute path.
To avoid that, create a new FindWrapZLIB find script. The target it
creates will pass the absolute path to the library on non Apple
platforms and an -lz linker flag on Apple platforms (macOS and iOS).

To avoid issues with target global promotion when system PNG package
is found, ensure that a found ZLIB::ZLIB target is promoted to global
manually in src/gui/configure.cmake.

Pick-to: 6.1
Change-Id: I8bd8649be4f680a331ad51925f27cb9d13ac5e5f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-04-19 20:30:45 +02:00
JiDe Zhang
50a7eb8cf7 Add the "Territory" enumerated type for QLocale
The use of "Country" is misleading as some entries in the enumeration
are not countries (eg, HongKong), for all that most are. The Unicode
Consortium's Common Locale Data Repository (CLDR, from which QLocale's
data is taken) calls these territories, so introduce territory-based
names and prepare to deprecate the country-based ones in due course.

[ChangeLog][QtCore][QLocale] QLocale now has Territory as an alias for
its Country enumeration, and associated territory-based names to match
its country-named methods, to better match the usage in relevant
standards. The country-based names shall in due course be deprecated
in favor of the territory-based names.

Fixes: QTBUG-91686
Change-Id: Ia1ae1ad7323867016186fb775c9600cd5113aa42
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-15 20:17:49 +08:00
Tasuku Suzuki
865f3c2a11 Fix build without features.systemsemaphore
Change-Id: I73059f48d37253b5f962f96f693f26c7d55a31e1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2021-04-14 16:24:33 +09:00
Joerg Bornemann
20db8dbeeb androiddeployqt: Fix the fallback location of rcc
Now, that rcc lives in libexec, we need to assume the location of rcc to
be "bin" on Windows and "libexec" elsewhere.

Pick-to: 6.1
Fixes: QTBUG-92245
Change-Id: Idb81a5d02bae9ca3254e7590140a128500572b07
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-07 10:21:52 +02:00
Qt CI Bot
87308fb95d Merge integration refs/builds/qtci/dev/1616690051 2021-03-25 20:23:15 +00:00
Fabian Kosmale
cb43aaca11 Introduce QMetaObject::metaType
This function returns the metatype corresponding to the metaobject, or
an invalid metatype for namespaces.

This works as follows: First we increment the metaobject revision for
new metaobjects. Metaobjects with older revisions are handled by doing a
lookup by name. That fallback is also used for dynamic metaobjects (from
QtDBUS and those created by QMetaObjectBuilder).
For new metaobjects, we store the metatype in its metatype array, behind
the property metatypes. This avoids any changes to the property and
method metatype extraction logic: For properties, the metatype access
does not change, as the new metatype is after their metatypes. For
method metatypes, we already have an indirection layer (using offsets),
so by adjusting those offsets by one, the same logic keeps working.

To distinguish between namespaces and dynamic metaobjects, namespaces
store the metatypeinterface pointer for void in the metatype array,
whereas dynamic metaobjects store a nullptr.

One nice additional benefit is that this simplifies the generator logic
in moc, as the metatype array is now never empty.

Task-number: QTBUG-92077
Change-Id: Id3f920f28553f12032a71a1a87dad29e5374dbe7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-03-25 17:33:07 +01:00
Alexey Edelev
fef850c51a Extend qtpaths functionally to replicate the 'qmake -query' behavior
'qt-version', 'install-prefix', 'binaries-dir' and 'plugin-dir' are
covered by the introduced qt-query option. So make them obsolete and
hidden in the application help.
Note that the 'qtconf' option will affect the output of options
associated with QLibraryInfo.

[ChangeLog][Tools] qtpaths got new --qt-query argument that can be
used instead of qmake -query. The new --qtconf, --query-format
arguments allow you to further tweak its output.

[ChangeLog][Tools] The qt-version, install-prefix, binaries-dir
and plugin-dir options of the qtpaths tool are deprecated.

[ChangeLog][Tools] The qtpaths tool has been moved from the
qttools repository to the qtbase repository.

Fixes: QTBUG-75870
Change-Id: I949acf79c8ce321811ee81cf707c1ae0eccb547d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-25 12:58:04 +01:00
Martin Storsjö
1ac2e85025 qtpaths: Fix cross compilation for windows
The cmake target may not be named "qtpaths", but one should be using
${target_name} instead. If cross compiling, and
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING isn't set, the tool won't be built
at all and there's no such target to set properties on, and if it
isn't set, the target name is something else.

Change-Id: I3d904036106b38df6e56ad35d400cf9a0bb1cbdf
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-15 10:30:18 +02:00
Alexey Edelev
933343b16d Move qtpaths from qttools repository to qtbase
qtpath should replicate the functionality of 'qmake -query'. Also we
want this tool to be available in builds without qttools.

Task-number: QTBUG-75870
Change-Id: I6578fc4fc45dd940fd353a5cfe6db0a12744230a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-12 13:20:04 +01: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
Edward Welbourne
36ea42effc Remove redundant code in androiddeployqt/main.cpp
Prompted by a PVS-studio article.

Pick-to: 6.1 6.0
Change-Id: I9699cc9baf9c90a6cf5b9564cd175205a9b2fa6b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-02-18 13:05:50 +01:00
Alexey Edelev
566ba523ad Move static PCRE2 defines to non-system PCRE2 section
Private PCRE2-specific definitions should be only used with the
built-in PCRE2 library.

Ammends 7c69eb8868

Fixes: QTBUG-90556
Change-Id: If47e0b9eaaece290676d6c2b484bb52281aa7c68
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-02-01 14:34:46 +01:00
Alexey Edelev
7c69eb8868 Use system PCRE2 for Bootstrap library
By default, use system PCRE2 for Bootstrap library, if not
cross-compiling.

Fixes: QTBUG-90556
Change-Id: I7291927565484073cadacec9a381b54b44ebeaec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-25 20:55:14 +01:00
Kai Köhne
9165866b19 Bump copyright year to 2021
Change-Id: I18a9c2de391ca51655148b2e3cc9abdfbb8ddbcf
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-25 20:00:44 +01:00
Laszlo Agocs
c6d6029909 Update QVulkan(Device)Functions to Vulkan 1.2
This also needs improvements to qvkgen. What we get with this patch
are the Vulkan 1.1 and 1.2 core API's additional 11 instance-level
and 30 device-level commands present in QVulkanFunctions and
QVulkanDeviceFunctions.

All of these are attempted to be resolved upon construction. When the
implementation does not return a valid function pointer for some of them
(e.g. because it is a Vulkan 1.0 instance or physical device), calling
the corresponding wrapper functions will lead to unspecified behavior.
This is in line with how QOpenGLExtraFunctions works. The simple
autotest added to exercise some Vulkan 1.1 APIs demonstrates this in
action.

The member functions in the generated qvulkan(device)functions header
and source files are ifdefed by VK_VERSION_1_{0,1,2}. This is essential
because otherwise a Qt build made on a system with Vulkan 1.2
headers would cause compilation breaks in application build environments
with Vulkan 1.0/1.1 headers when including qvulkanfunctions.h (due to
missing the 1.1/1.2 types and constants, some of which are used in the
function prototypes). In practice this should be alright - the only
caveat to keep in mind is that the Qt builds meant to be distributed
to a wide variety of systems need to be made with a sufficiently new
version of the Vulkan headers installed, just to ensure that the
1.1 and 1.2 wrapper functions are compiled into the Qt libraries.

Task-number: QTBUG-90219
Change-Id: I48360a8a2e915d2709fe82993f65e99b2ccd5d53
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-19 14:17:55 +01: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
Laszlo Agocs
2aa7ad5e67 qvkgen: Skip command elements with alias
Otherwise we end up with generating broken qvulkanfunctions cpp and h
files.

For example, encountering the following command element should lead to
taking no action, this is not something we want to emit a corresponding
wrapper function for:
  <command name="vkResetQueryPoolEXT" alias="vkResetQueryPool"/>

This is required to be able to upgrade the bundled vk.xml to something
newer.

Fixes: QTBUG-90330
Task-number: QTBUG-90219
Change-Id: Ie6e3a8794207e30a172820eb055238bf52a0c0b9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-15 15:21:15 +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
Friedemann Kleint
179696fcb8 uic: Do not generate QComboBox::AdjustToMinimumContentsLength into code
The enumeration value was removed in Qt 6 by
1a342b2db1. Ignore it.

Add a check to helper function checkProperty() and move
the code from a5e2f2ddad there
as well.

Pick-to: 6.0
Task-number: QTBUG-89093
Fixes: QTBUG-89700
Change-Id: I0890be8fff155d7342e2386b7f6b0783a5f3a192
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-01-04 10:25:41 +01:00
Joerg Bornemann
88fe9d3d97 CMake: Fix FEATURE_static_runtime build
We must call qt_set_common_target_properties on Bootstrap too, because
that's were FEATURE_static_runtime is handled.

Change-Id: Ie54f7d599d0c3a54b761e6c679983b475e77c17d
Pick-to: 6.0
Fixes: QTBUG-89201
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com>
2020-12-09 22:12:17 +01:00
Assam Boudjelthia
fa0dc83135 Revert "Android: print tailored warning if qml dependency path is a dir"
This reverts commit c730a29260.

Reason for revert: The original change was wrong and caused
androiddeployqt to skip valid QML resource paths. 

Additionally, change log output from "file" to "path" when skipping
an import path.

Pick-to: 6.0 5.15
Fixes: QTBUG-89281
Change-Id: Ic338d147a04a03bb1d7acbede11b647ff036922a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-12-09 20:01:13 +00:00
Kai Koehne
9198d7f044 Remove qlalr documentation stub
The documentation is only a stub, and hasn't been built since Qt 4 times.
qlalr is also first and foremost an internal tool nowadays, so it's very
unlikely we will fully document it.

Change-Id: I68821bf1f9ca3811ec8adda583f0c7326421c6b6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-08 15:15:58 +01:00
Friedemann Kleint
3fb039ca23 rcc: Remove support for Python2
Qt for Python only supports Python3.

Change-Id: I7b13b1f9482579b1e1128d15ee5734d063a7c4b8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-12-07 17:09:07 +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
Li Xinwei
013abe3206 CMake: Avoid MSVC C4996 warnings
The qmake build system defines _CRT_SECURE_NO_WARNINGS in
mkspecs/features/qt_module.prf, the cmake build system should do the
same thing in qt_internal_add_module().

Adding this definition can avoid warnings like:
warning C4996: 'strncpy': This function or variable may be unsafe.

As a special case, Bootstrap uses add_library() instead of
qt_internal_add_module(), so _CRT_SECURE_NO_WARNINGS should also be
defined in src/tools/bootstrap/CMakeLists.txt.

Pick-to: 6.0
Change-Id: Ic82193d177f82785fd84948efa78c49ca8d8db46
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-04 13:54:49 +08:00
Friedemann Kleint
a5e2f2ddad uic: Do not generate QDockWidget::AllDockWidgetFeatures into code
The enumeration value was deprecated by
qtbase/f15aa1fd84e46dfc4d9a78b3a7ba482e42abd9c1 and removed in Qt 6.

Pick-to: 6.0
Task-number: QTBUG-89093
Change-Id: Iaf46adc1e1bd79e4aaab066c9fa4bf84a8ee34d0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-03 17:17:03 +01:00
Fabian Kosmale
df8fbcf382 Avoid signed overflow in moc
moc's preprocessor needs to implement certain math operation to
correctly handle #if conditions. Unfortunately, its implementation is
not overflow safe. However, those are rare enough in practice that we
in general do not need to care about them.
This patch adds a workaround for one case where UBSAN run into an
overflow related issue.
A complete fix would require to make moc spec compliant (do math with
std::max_(u)int_t operands; always wrap on overflow) in all operations.

Pick-to: 6.0 5.15
Fixes: QTBUG-88825
Change-Id: Ic4d2cb097db2fa2f9d4681bbaab3068eaa2745aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-03 13:51:32 +01:00
Assam Boudjelthia
c730a29260 Android: print tailored warning if qml dependency path is a dir
androiddeployqt might be misleading when the path is adir
and the warning says that the file does not exist.

Pick-to: 5.15
Change-Id: I1129f49af58a0637a240fcfd425a61b2ed15c840
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-12-01 15:13:10 +02:00
Joerg Bornemann
d4e9f0e633 CMake: Re-generate project files in src
Pick-to: 6.0
Change-Id: I1f5f822d68129490f1a7c495f718aead0b520ca9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-30 23:17:47 +01:00
Andreas Buhr
0440614af0 Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE
Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with
move semantics, its name is misleading. Q_RELOCATABLE_TYPE was
introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE
is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE
by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this
patch should have no impact on users.

Pick-to: 6.0
Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-30 17:16:21 +01:00
Fabio Falsini
88ab9e1800 Change android target SDK version to 29
Play Store now accept only app with target
SDK version set to 29 or above

Pick-to: 6.0
Change-Id: If38f20c88fd6b0e6f29939cdf3d2eb793c0e1489
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-11-26 20:05:41 +01:00
Andy Shaw
d8602ce58b QFont: Prefer setFamilies() over setFamily()
By depending on setFamilies() then we can be sure that font names with
spaces, commas, quotes and so on are correctly handled without being
misinterpreted. For now it will split on the comma when a string
containing one is passed to setFamily. But from Qt 6.2 this will be
removed to preserve the family string as a convenience function.

[ChangeLog][QtGui][QFont] Indicated that setFamilies/families is
preferred over setFamily/family to ensure that font family names are
preserved when spaces, commas and so on are used in the name.

Change-Id: Id3c1a4e827756a4c928fed461a4aafa5a0f06633
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-11-20 14:30:22 +01:00
Assam Boudjelthia
4ef3da04c3 Android: use extraPrefixDirs with qmlimportscanner
This will ensure that qmlimportscanner can use the extraPrefixDirs,
when an extra prefix is provided like the case with Conan builds.

Task-number: QTBUG-88519
Change-Id: Idec3916b043822da094973a7e246a6ee4af14c83
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-11-19 13:28:46 +02:00
Lars Knoll
185d212bf5 Avoid linker errors for the bootstrap lib in debug builds on MSVC
Change-Id: I35406ede2246c9eadba9dcecb1bdb65848b07e42
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-11-19 12:28:44 +01:00
Zhang Sheng
e13173c112 Adjust code format, add space after 'if'
Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-11-16 12:53:37 +00:00
Giuseppe D'Angelo
784a290c4b QFileInfo: mark constructors as explicit
These look like leftovers (API flaws).

Construction of QFileInfo from QString (or similar) should be not
implicit, as QFileInfo construction is expensive (might hit the file
system), and this may have users overlook APIs (for instance build a
QFileInfo out of QDirIterator::next(), instead of using ::fileInfo();
using QDir::entryList instead of entryInfoList; etc.).

Leave an opt-out mechanism to ease porting.

Fix a handful of usages around qtbase, with at least a couple of them
likely to be actual "sloppy" code.

[ChangeLog][Potentially Source-Incompatible Changes][QFileInfo] Most
QFileInfo constructors are now explicit. The
QT_IMPLICIT_QFILEINFO_CONSTRUCTION macro is provided to keep old code
working.

Change-Id: Ic580e6316e67edbc840aa0c60d98c7aaabaf1af6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-15 18:30:16 +01:00
Jarek Kobus
f4edc44265 Update qclass_lib_map.h according to split of svg module
Fixes: QTBUG-88259
Change-Id: Ibda15aabe2c42dd6b59f5a11d18abb154c176526
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-11-13 20:58:02 +01:00
Giuseppe D'Angelo
8780fbb2eb Build Qt (and client apps using it) with /permissive-
*Not* using /permissive- exposes Qt and client apps to interesting
bugs and/or build failures, (e.g. QTBUG-87225, or
19b5520abf). We demand strict
conformance by any other compiler, it's time to demand it from
MSVC too.

The Windows headers themselves are clean starting from the
Windows Fall Creators SDK (10.0.16299.0), and moreover Qt 6 will
drop WinRT; therefore, the comment in the mkspecs does not apply
any more.

Since /permissive- implies /Zc:referenceBinding, drop that
option. The other implied options are set on MSVC < 2017,
but I leave them in to avoid tinkering with the fragile lists
of C/C++ flags.

Rename the CMake internal helper function to better describe
what it does.

Fixes: QTBUG-85633
Fixes: QTBUG-85637
Fixes: QTBUG-85635
Fixes: QTBUG-88244
Change-Id: Ie03fddb61aa066fdc14b7231c22e7108b4a02fbb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-10 20:01:49 +01:00
Volker Hilsheimer
f9058a7534 moc: output errors and warnings in a way that matches compilers
gcc, clang, and MSVC all use lowercase "warning:", "error:" and
"note:". Follow that standard.
Also, include a column number; just print 1, as the Symbol doesn't
give us a column number, and searching backwards for a newline seems
overkill.

This fixes IDE integrations that parse compiler output using regular
expressions.

The test checks for moc output, but most tests were so far only
running on Linux systems. Expand this to Unix for most tests, which
then includes macOS.

Change-Id: I0a6151cc0dc50e52ca72ff8048a45213aebdb3a8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-11-09 12:50:10 +00:00
Fabian Kosmale
d3ed7dac8a moc: Handle include in enum, take 2
The existing logic broke down when we reentered the enumerator parsing
loop, and encountered a INCLUDE_MOC_END token in the first handleInclude
call. Fix this by restarting the loop in that case.
Amends d8a2456fbf.

Fixes: QTBUG-88125
Pick-to: 5.15
Change-Id: I87acaa986a81de53730eddc40bc7d48c15328aba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-11-03 19:36:34 +00:00
Lars Knoll
f8c30759d9 Make the QMultiHash(const QHash &) constructor explicit
And add a QMultiHash::unite(const QHash &) method to avoid
a copy of the data when inserting a QHash into a multi hash.

Change-Id: I864aa9d2b9b7b2c367c3c4d140a2ce2f5408ae09
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-03 16:28:14 +01:00
André Klitzing
71223cc92b Use (void) instead of Q_UNUSED
This change allows the user to use -Wextra-semi-stmt without a warning.
A macro should never include a ; by it's own. Macro Q_UNUSED already
adds semicolon.

Fixes: QTBUG-82978
Pick-to: 5.15
Change-Id: I6d8d009cf89f0c8bbb6a9fee986e81302ebd7459
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-31 20:59:27 +01:00
Lars Knoll
d4b206b246 Split QMutex and QRecursiveMutex
These classes should not inherit from each other
anymore in Qt 6. The reason is that this makes
the 95% case of using a non-recursive mutex
much slower than it has to be.

This way, QMutex can now inline the fast path
and be pretty much as fast as QBasicMutex is
in Qt 5. They actually use the same code paths
now. The main difference is that QMutex allows
calling tryLock() with a timeout, which that
is not allowed for QBasicMutex.

[ChangeLog][QtCore][QMutex] QMutex does not support
recursive locking anymore. Use QRecursiveMutex for that
purpose. QRecursiveMutex does not inherit QMutex anymore
in Qt 6.

Change-Id: I10f9bab6269a9181a2e9f534fb72ce65bc76d989
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-17 12:02:56 +02:00
David Skoland
4a7280598b Fix Clang compiler warnings (-Wrange-loop-analysis)
In a macOS environment, Clang throws a number of compiler warnings
about loop variables when building qtbase.

See task for more info about the environment.

This changes a handful of loop variables,
like QJsonValue references into QJsonValueRefs.

Task-number: QTBUG-87216
Pick-to: 5.15
Change-Id: I26006efd7c75c2d56ebc7f7efb4c9bdcabe92e8b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-17 11:56:30 +02:00
Assam Boudjelthia
3d8447de59 Android: fix path issue with backslashes on Windows
The androiddeployqt tool wasn't handling dependencies with backslashes
properly, some dependencies like libplugins_platforms_qtforandroid was
written into libs.xml as
plugins\platforms\libplugins_platforms_qtforandroid_armeabi, the the app
won't be looking for the correct path of the lib to load.

Task-number: QTBUG-87574
Change-Id: Iad8c74d30d090adf69a17f2dafb455dff50b3d99
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-10-15 18:37:25 +03:00
Assam Boudjelthia
13b4c332b4 Android: add missing new line to androidtestrunner help
Change-Id: Idba54c15af64b8dadcba9fa2125d6aae5e6c6bc9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-10-13 15:32:33 +03:00
Allan Sandfeld Jensen
564b59d903 Another round of replacing 0 with nullptr
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.

Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-10-07 23:02:47 +02:00
Allan Sandfeld Jensen
c82f73666d Replace Q_DECL_UNUSED with [[maybe_unused]]
Use C++17 attribute directly

Change-Id: Id853e7a5117065e4adb549f81303c1820fe198ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-03 11:58:08 +02:00
Assam Boudjelthia
1907599bfd Android: rename Android's package name for Qt 6
Rename Android package name org.qtproject.qt5.android to
org.qtproject.qt.android to avoid inconsistency with Qt 6 name.
Also, we include the major version number in the jar target.

Task-number: QTBUG-86969
Change-Id: Ibb68947289be1079911b34ea157bf089cc52c47f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-03 11:22:35 +03:00
Alessandro Portale
c3b0828e3b Android: Make checking a dependency path accept both separator styles
The path of dependencies (.so, .jar, etc.) might use either native or
non-native dir separators. Let's support both cases.

Amends: 4e94465096

Task-number: QTBUG-87066
Change-Id: I8ce3235db5bab8c4c139f841d3a2fe74d3c7c7f2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-10-02 11:55:20 +00:00
Assam Boudjelthia
4e94465096 Android: account for native separators when checking a dependency path
The path of dependencies (.so, .jar, etc.) might use native dir
separators, but if checks when not accounting for that.

Task-number: QTBUG-87066
Change-Id: I0a09231f2a19f448f1ba520fd738d129d64ff5c7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-01 22:23:33 +03:00
Alessandro Portale
47ae99a07a Android: Append .exe suffix to qmlImportScanner in androiddeployqt
Change-Id: I9d67d94eb9c19b36075311ddee20c972a645d28d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-09-30 20:18:57 +02:00
Assam Boudjelthia
bfd07072fe CMake: make QT_ANDROID_DEPLOYMENT_SETTINGS_FILE consistent with qmake
Make name format of QT_ANDROID_DEPLOYMENT_SETTINGS_FILE consistent with
qmake, that is android-${target}-deployment-settings.json.

Task-number: QTCREATORBUG-24678
Change-Id: I2bdb056cf7a82fd83aaf658f3a405a0c9ef05756
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-28 17:25:19 +00:00
Lars Knoll
850d850c5a Use QMetaType instead of integer based type ids
Change the implementation of Qt DBus to use QMetaType directly
instead of integer based type ids.

Change-Id: I999023b58fa50dcc3504386467faf09874f7d2cf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-23 19:30:28 +02:00
Alexandru Croitor
403213240c CMake: Regenerate projects to use new qt_internal_ API
Modify special case locations to use the new API as well.
Clean up some stale .prev files that are not needed anymore.
Clean up some project files that are not used anymore.

Task-number: QTBUG-86815
Change-Id: I9947da921f98686023c6bb053dfcc101851276b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-23 16:59:06 +02:00
Alexandru Croitor
a3bd80c08c CMake: Regenerate projects
Clean up the state of the projects,
before changing the internal CMake API function names.

Task-number: QTBUG-86815
Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-22 19:08:53 +02:00
Kai Koehne
5d8f6beb46 rcc: Make output deterministic for directories
QDirIterator is documented to be non-deterministic.

Fixes: QTBUG-86675
Pick-to: 5.15
Change-Id: I4161871a409bbaf85347ee6a60ef1189f56a1b22
Reviewed-by: hjk <hjk@qt.io>
2020-09-19 13:48:03 +02:00
Edward Welbourne
3a53fd9f23 Make moc ready for when null byte-arrays have null constData()
Various places in moc relied on the magic behavior of QByteArray, that
provided a non-null pointer to a null byte when the byte array was
null, resulting in crashes when QT5_NULL_STRINGS is turned off.  Fixed
them to cope with this (and optimised out some pointless effort, when
empty QByteArrays are involved, in the process).

Change-Id: I617a878eb2e9ac8be244080efa1f0de4ac9a68a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-17 18:13:13 +02:00
Assam Boudjelthia
615b92008a Android: remove --no-daemon arg for Gradle
Allow Gradle builds to run using JVM daemon, this will improve the
current build time noticeably for clean builds and hugely for
incremental builds.

This will bring the Gradle build to comparable speed with a normal
Gradle build in Android Studio.

Task-number: QTBUG-86674
Pick-to: 5.15
Change-Id: Icc4267223802e4c9350b48099236650c023f868d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-09-17 10:29:16 +03:00
Alex Richardson
44920e7fb2 CMake: Fix building with -DQT_FEATURE_gui=OFF
Some CMake files currently assume that QtGui is always enabled and we
get a configure-time failure without these changes.

Task-number: QTBUG-86053
Change-Id: I28e32c180c32221f32519017bac6b518a19d5983
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 20:05:32 +02:00
Lars Knoll
79e0374143 Remove the SAX parser from QtXml
It has been deprecated and will live in qt5compat from now on.

Fixes: QTBUG-86480
Change-Id: I3744c7cee058d51d0fce633a174ab1a0f9235d2c
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-09-15 08:12:20 +02:00
Lars Knoll
e07a739138 Fix generated forward declarations in qdbusxml.cpp
Simply use qcontainerfwd.h, instead of declaring those manually.

Change-Id: I6d87bf14b60469b457e8e9335868f8cdb0303817
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-12 23:36:04 +02:00
Joerg Bornemann
756c65d367 Fix build with -trace lttng
Fix superfluous space in qtgui.tracepoints and make tracegen more
lenient towards unknown types (the ETW implementation outright ignores
those).

Pick-to: 5.15
Fixes: QTBUG-86546
Change-Id: I71cc323afa1009dbaefe20e55818ecb6c0b09c59
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2020-09-11 11:30:55 +02:00
Ulf Hermann
ace19063cb Moc: Require complete types consistently
If we require complete types when generating the list of metatypes, then
we also need to require them when generating each entry, and vice versa.

Change-Id: I68394f8628bb6cd89f77bb829b1d4b5ab35071a0
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2020-09-10 11:24:19 +02:00
Fabian Kosmale
69d239ef00 Enforce complete method types of QML registered classes
For QML, we like to avoid doing string to type lookups at runtime as
much as possible. Therefore, QML registration macros like QML_ELEMENT
now cause moc to require complete types not only for properties, but
also for all methods known to the metatype system.

Change-Id: Ied3d940c102719db4852d3a748d05be1f415b353
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-03 09:46:57 +02:00
Ulf Hermann
53fde3c573 Reimplement QSequentialIterable using QMetaSequence
Change-Id: Ie721a5f0caa697c4bf15a81f3762cf79d3c54f5a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-03 08:27:44 +02:00
Eskil Abrahamsen Blomfeldt
0e0149c64d Ignore weight in .ui files instead of converting it
In 3558704ed5, we added code to
support old .ui files which used the old integer scale for font
weights by checking for a special attribute which would help
separate new and old files.

Since then, it has become apparent that the weight element in
.ui is not actually used for anything, since it is only emitted
when the bold flag is set and always has to match QFont::Bold
in these cases.

So instead of converting, we simply ignore it now, and respect
the bold flag instead.

This also reverts the changes to ui4.* in uic, since the
scale attribute is no longer needed.

Task-number: QTBUG-42248
Change-Id: I1898868b58004099590f4eaf01f24c57bd34d779
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-03 07:31:45 +02:00
Lars Knoll
ad32ac5b4f Make bindings introspectable through moc
Add a new BINDABLE declaration to the Q_PROPERTY() macro that tells moc
where to find the QBindable for the property.

Add a QUntypedBindable base class to QBindable<T> that gives access to
generic functionality and checks argument compatibility at runtime.
QBindable<T> will still do static checking at compile time.

Add QMetaProperty::isBindable() and QMetaProperty::bindable()
to be able to dynamically access the binding functionality.

Change-Id: Ic7b08ae2cde83fd43e627d813a886e1de01fa3dc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-02 22:44:29 +02:00
Lars Knoll
e6988d4d0b Remove QNotifiedProperty and Q_PRIVATE_QPROPERTY
And all related functionality. This is being replaced by
Q_BINDABLE_PROPERTY and Q_OBJECT_BINDABLE_PROPERTY in the
next few commits. The new infrastructure coming will play
nicer along with the existing property system.

Commented out some autotests, that will get reimplemented
with the updated infrastructure.

Change-Id: I50c30bd4d5c6c6b6471f8eb93870e27d86f5a009
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-02 22:44:27 +02:00
Ulf Hermann
4fbb2f66d6 Add a QMetaSequence interface
This is in line with QMetaType and will be used to implement a mutable
QSequentialIterable. Later on, a QMetaAssociation will be added as
well, to implement a mutable QAssociativeIterable.

The code here represents the minimal set of functionality needed to have
a practical sequential container. The functionality is not completely
orthogonal. In particular, the index based operations could be
implemented in terms of iterator-based operations.

Task-number: QTBUG-81716
Change-Id: Ibd41eb7db248a774673c701549d9a03cbf2e48b6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-01 13:35:39 +02:00
Marcel Krems
ab5e444c8f Remove remaining traces of deprecated QtMsgHandler
Change-Id: I28aecb444eb9bc9e26e6ff8998904dbf28419f25
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-08-29 16:24:21 +02:00
Tor Arne Vestbø
92a32e050f Remove QMacNativeWidget and QMacCocoaViewContainer
The functionality should be available via QWidget::winId(),
and QWidget::createWindowContainer() + QWindow::fromWinId().

Any bugs in this area should be fixed by improving the general
wrapping APIs.

Fixes: QTBUG-83254
Change-Id: I86584a4a8138d17d65a50da39efd58039f10da91
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-08-28 14:16:52 +02:00
Assam Boudjelthia
09ac1bdfc5 Android: enable androiddeployqt to get the host's rcc binary path
Since Qt 6 CMake installs the host and target into separate directories,
androiddeployqt fails to get the correct path to rcc. This change
includes the host's rcc binary path in deployment-settings.json.

Task-number: QTBUG-85399
Change-Id: I610bb6fea1180a119e4c0ceb75bf78c175ae430e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-28 12:44:14 +03:00
Assam Boudjelthia
00a1e5da7e Android: add option to get app arguments with AndroidManifest.xml
AndroidManifest.xml file and the Android plugin already has a way
to provide commandline-arguments to app with the tag
"android.app.arguments". This change allow to set it from qmake/cmake
and allow Qt Creator to use that.

Task-number: QTCREATORBUG-23712
Change-Id: I3e680f40fd36ba6aaac7f344fb9509d2c3360e74
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-08-28 10:23:18 +03:00
Jonas Karlsson
3558704ed5 Use OpenType font weights
Task-number: QTBUG-42248
Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-08-28 07:26:54 +02:00
Lars Knoll
50661a9558 Change QByteArray to handle large arrays
Use qsizetype throughout.

Change-Id: I787af7fcfa17e1be87decb64c41c609cc24be117
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-27 18:58:20 +02:00
Assam Boudjelthia
862ac16ab1 Android: add the option to set package signing information from env vars
Use the following env vars to help conceal private signing information:
- QT_ANDROID_KEYSTORE_PATH
- QT_ANDROID_KEYSTORE_ALIAS
- QT_ANDROID_KEYSTORE_STORE_PASS
- QT_ANDROID_KEYSTORE_KEY_PASS

[ChangeLog][Platform Specific Changes][Android] Added the option to
conceal package
signing information using environment variables.

Task-number: QTBUG-84922
Change-Id: I1fac51ed9e88ef42c761bc916ba1c3bf439806e8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-08-25 10:07:16 +03:00
Volker Hilsheimer
fb9ec8ad44 Move QFileSystemModel into QtGui
This requires a QAbstractFileIconProvider in QtGui, as the standard
QFileIconProvider depends on QStyle, and cannot be moved out of
QtWidgets.

QAbstractFileIconProvider returns strings for file types, but returns
no icons yet. Support for a default icon set might be added in a
follow-up commit.

Change-Id: Ib9d095cd612fdcf04db62f2e40709fcffe3dc2b7
Fixes: QTBUG-66177
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-25 06:33:44 +02:00
BogDan Vatra
86e90aa346 Be verbose
make apk takes a LOT of time, showing that it's not hanged it's useful.

Change-Id: I4fb11e0f535cf2311d71dff3710135b465ecc06b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-08-24 21:10:25 +03:00
Karsten Heimrich
a735038376 Move QStateMachine from QtCore to QtScxml
Task-number: QTBUG-80316
Change-Id: I2ee74110fd55e94d86321d3b3dc5bb8297424ed4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2020-08-24 20:10:25 +02:00
BogDan Vatra
45b56d86bb Fix running qml tests on Android
First and foremost the condition was wrong ...
In order to help running qml test cases on Android without any android
specific hack on
user's .pro files we copy the entire project folder to assets. I copy the
entire folder
and not only the tst_*.qml files because it might contain data which is
needed by the tests to run.

Change-Id: I06323d9d52904317410dd2f440de65a0766a48b5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-08-24 14:50:56 +03:00
Lars Knoll
0161f00e50 Use QMetaType in QMetaCallEvent
And don't use int based type mapping anymore.

Change-Id: I456e76d1933ef646a7bd39ce565886b89e938a44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-24 00:19:36 +02:00
Lars Knoll
1697fbdf05 Deprecate the static int based API in QMetaType
And remove one of the type id to name mapping that still
existed in QMetaType. QMetaTypeInterface can provide that,
so there's no need to have a second copy of the data.

qMetaTypeTypeInternal() can still map all the names of all
builtin types to ids. That functionality is for now still
required by moc and can't be removed yet.

Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-24 00:19:05 +02:00
Karsten Heimrich
2766322de3 Move QStringRef and remains to Qt5Compat
Export some private functions from QUtf8 to resolve
undefined symbols in Qt5Compat after moving QStringRef.

Task-number: QTBUG-84437
Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-20 00:58:13 +02:00
Karsten Heimrich
3398eeadf6 Refactor QXmlStreamStringRef
Use a QStringPrivate inside the implementation. This saves
two pointers, and actually makes this a safe replacement for
QStringRef inside the implementation of QXmlStreamReader.

Unexport the class as all members are inline, and move it
into the QtPrivate namespace as class QXmlString.

Change-Id: I43fa4684f569514c8c621838dcc346657ac1a915
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2020-08-19 19:48:10 +02:00
Lars Knoll
6eb1cdd1c6 Refactor qxmlstream_p.h
Pull the file apart, so that the parts generated from qxmlstream.g
are separated from the definition of the private class.

This will in the future simplify maintenance and refactoring.

Change-Id: I4a9c1bb1e377dee1e6d3b9aa9b0dfa64c5806c45
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-08-19 19:48:09 +02:00
Karsten Heimrich
a8028a02df Port the QXmlStream API from QStringRef to QStringView
This gives some source incompatibilities, most of them can be
handled by using auto instead of QStringRef explicitly.

[ChangeLog][Important API changes] QXmlStream now uses QStringView
insteead of QStringRef in it's API. Using auto forvariables returning
a QStringRef in Qt 5 should lead to code that can be used against both
Qt versions.

Fixes: QTBUG-84317
Change-Id: I6df3a9507276f5d16d044a6bdbe0e4810cf99440
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2020-08-19 19:48:03 +02:00
Allan Sandfeld Jensen
2df41e2c48 Remove binary compat sources for qbytearray and qstring
No longer needed in Qt6.

Change-Id: I29567e175e07cc3658f0619acfd604abf64f6459
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-19 19:04:34 +02:00
Kai Koehne
0243951e0a MSVC: Fix C4996 warnings when building Qt
Task-number: QTBUG-85227
Pick-to: 5.15
Change-Id: I22ca672d993d77164c91939d1b8fad0c0332b57a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-08-19 12:46:09 +02:00
Edward Welbourne
2584998c66 Follow through on ### Qt6 comments in qglobal.h
Left the translation NOOP for later, pending advice on how to fix
QIODevice, which doesn't compile without them.

Task-number: QTBUG-85700
Change-Id: Icc423ecabb43714d98b5d9b0f9a96c5bb6ef1d78
Reviewed-by: Martin Storsjö <martin@martin.st>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-18 12:55:38 +02:00
Joerg Bornemann
80862621cd CMake: Link Boostrap against PlatformCommonInternal
...to pull in extra defines, includes, libdirs and framework paths.

Change-Id: I7c252f5edbcf15f7e2ad69ace4e15fbacf6cca8a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-17 18:19:26 +02:00
Volker Hilsheimer
e1536e3a86 Purge versioned style options from UIC
For Qt 6.0, all versioned style option types have been merged into the base
class, and version number has been reset to 1.

Task-number: QTBUG-84221
Change-Id: If729720813c0cf284271a9084311ed6eb820ecca
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-08-16 15:03:46 +02:00
Lars Knoll
f741a12de1 Disentangle QIODevice dependencies
Move the QIODevice::OpenMode enum into a base class, so that
we can remove the full QIODevice (and thus QObject) dependency
from qdatastream.h and qtextstream.h.

This is required so that we can include QDataStream in qmetatype.h
without getting circular dependencies.

As a nice side effect, QDataStream and QTextStream can now inherit
QIODeviceBase and provide the OpenMode enum directly in their
class scope.

Change-Id: Ifa68b7b1d8d95687ed032f6c9206f92e63bfacdf
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2020-08-15 20:55:31 +02:00
Alexandru Croitor
af263b003b Android: Be more verbose about which binary is not found
It's unclear that the actual file searched for is different from the
error output. Make it clearer.

Task-number: QTBUG-85399
Change-Id: Ia5eb6d03c42b399604ce452b88408e0e5071d17c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-08-15 08:13:24 +02:00
Lars Knoll
096e268764 Avoid UB in moc generated code
Introduce a Q_OFFSETOF() macro that uses the optional support of
offsetof() for non standard layout types and disables the
corresponding compiler warnings. All our supported compilers
support offsetof() on non standard layout types.

Use the macro to do the offset calculations required in moc
generated code to replace a manual offset calculation that
was dereferencing a null pointer.

Change-Id: I4aab3af3c8bbaa90372f2234aa1cf8399d023c22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-07 13:35:45 +02:00
Giuseppe D'Angelo
14090760a8 Long Live QMap as a refcounted std::map!
... and QMultiMap as std::multimap.

Just use the implementation from the STL; we can't really claim that
our code is much better than STL's, or does things any differently
(de facto they're both red-black trees).

Decouple QMultiMap from QMap, by making it NOT inherit from
QMap any longer. This completes the deprecation started in 5.15:
QMap now does not store duplicated keys any more.

Something to establish is where to put the
QExplictlySharedDataPointer replcement that is in there as an
ad-hoc solution. There's a number of patches in-flight by Marc
that try to introduce the same (or very similar) functionality.

Miscellanea changes to the Q(Multi)Map code itself:

* consistently use size_type instead of int;
* pass iterators by value;
* drop QT_STRICT_ITERATORS;
* iterators implictly convert to const_iterators, and APIs
  take const_iterators;
* iterators are just bidirectional and not random access;
* added noexcept where it makes sense;
* "inline" dropped (churn);
* qMapLessThanKey dropped (undocumented, 0 hits in Qt, 1 hit in KDE);
* operator== on Q(Multi)Map requires operator== on the key type
  (we're checking for equality, not equivalence!).

Very few breakages occur in qtbase.

[ChangeLog][Potentially Source-Incompatible Changes] QMap does not
support multiple equivalent keys any more. Any related functionality
has been removed from QMap, following the deprecation that happened
in Qt 5.15. Use QMultiMap for this use case.

[ChangeLog][Potentially Source-Incompatible Changes] QMap and
QMultiMap iterators random-access API have been removed. Note that
the iterators have always been just bidirectional; moving
an iterator by N positions can still be achieved using std::next
or std::advance, at the same cost as before (O(N)).

[ChangeLog][Potentially Source-Incompatible Changes] QMultiMap does
not inherit from QMap any more. Amongst other things, this means
that iterators on a QMultiMap now belong to the QMultiMap class
(and not to the QMap class); new Java iterators have been added.

Change-Id: I5a0fe9b020f92c21b37065a1defff783b5d2b7a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-06 19:15:39 +02:00
Allan Sandfeld Jensen
5747f31392 Another round of 0->nullptr cleanup
Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-07-31 12:56:50 +02:00
Alexandru Croitor
e755ce99d9 CMake: Regenerate load(qt_app) projects
To use the new qt_internal_add_app function.

Change-Id: I9776ce18c3a8b01f1a42e8da346cfd0a98374ef8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-07-31 12:55:33 +02:00
Fabian Kosmale
27fcf66319 QMetaType: force properties to have a complete type again
When the compile time metatype support for methods was introduced, we
needed to allow incomplete types to avoid breaking a large amount of
code. However, this mistakenly enabled using incomplete types for
properties, too. In contrast to methods, properties lack the fallback
code to retrieve the metatype at runtime. Thus, this commit restores the
completeness requirement for properties again. This is done by always
calling QMetaTypeForType for properties in qTryMetaTypeForType.
Amends fa987d4441

Change-Id: I5f66ff289631c056eecebe40926bf321d283eea7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-24 07:46:29 +02:00
Tor Arne Vestbø
d4e78fce16 Suffix qt_pluginMetaData with class name
Allows defining multiple static plugins in the same translation unit.

Change-Id: I175fd4980b21a461a18c23ed1a62a3cea73e67a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-16 20:51:04 +02:00
Ulf Hermann
1ebb891c2f moc: Accept NAME attribute for any properties
At the time when we parse it we don't know if the property will be a
QProperty.

Change-Id: I720afa6d5ec284c727328db92c791771def82f41
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-07-15 12:44:30 +02:00
Fabian Kosmale
8cdaeb2655 moc: allow wrapper generation for QProperty in pimpl class
Previously, only QNotifiedProperty was supported. As moc cannot
determine by itself whether the backing property is a QProperty or a
QNotifiedProperty, allow NOTIFY false to indicate that it is a plain
QProperty. For symmetry, NOTIFY true is also allowed and means that the
backing property is a QNotifiedProperty.

Change-Id: I66f3105c976ef084198ce8658bc07499a3cb1cd8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-07-14 17:06:46 +02:00
Sona Kurazyan
361dc074f2 Move QRegExp and its remaining mentions out of QtCore
Task-number: QTBUG-85235
Change-Id: Ibd6c98d952c1bb9916b64715c6430fb0d3fe3843
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-13 10:53:23 +02:00
Ulf Hermann
f9e1674094 moc: For non-STORED QProperties, expect a pointer
This way we can return a nullptr for cases where the class does not want
to provide a property at all. For example outside of bindings when
reading the default value. The moc-generated code can check for such
nullptrs and handle them.

Change-Id: I7ff478cb254012147bb7aed3feb160e3e679cb6d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-09 22:34:46 +02:00
Ulf Hermann
0cd3820e4d moc: Allow out-of-line storage for Q_PRIVATE_QPROPERTY
If you pass "STORED false" the name is interpreted as function to be
invoked in order to access the property. This allows storage of a
property in a lazily allocated data type.

Change-Id: I4d3a9cac6985c6419ce687868cb74b91921595a6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-07-08 11:01:38 +02:00
Sona Kurazyan
631127126c Introduce QByteArrayView
Created a QByteArrayView in symmetry with QStringView.
Added the basic tests symmetrical to QStringView tests.

Moved the implementations of non-modifying methods of QByteArray to
namespace QtPrivate, to be reused inline from both QByteArray and
QByteArrayView. Changed QByteArray's counterparts of those methods to
take QByteArrayView as argument instead of QByteArray. Removed
QByteArray's operator QNoImplicitBoolCast(), because it was causing
ambiguity when calling those methods with QByteArray argument (it was
there to perevnt if(!ba)/if(ba) from compiling, but currently that would
be ambiguous and won't compile anyway).

[ChangeLog][QtCore][QByteArrayView] New class.

Task-number: QTBUG-84321
Change-Id: I05f92e654cf65c95f2bb31b9c9018746ac110426
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-08 08:45:49 +02:00
Volker Hilsheimer
82cb1ecca2 Fix another printf format warning with qsizetype
As done in 939f5112a1 elsewhere, use %zd
and cast explicitly to size_t.

Change-Id: I2fc7607725829f80cc125568246503af341749f1
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-07 11:48:45 +02:00
Jarek Kobus
77bb50de8f Use QList instead of QVector in qtbase
Fixes all other QVector occurrences

Task-number: QTBUG-84469
Change-Id: I5f9311298d341a9a3061a6a640539583d1618939
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-07 11:48:45 +02:00
Lars Knoll
df853fed66 Use qsizetype in QList
The change creates a slight source incompatibility. The main
things to take care of are

* code using printf statements on list.size(). Using qsizetype in
printf statements will always require a cast to work on both 32
and 64 bit.
* A few places where overloads now get ambiguous. One example is
QRandomGenerator::bounded() that has overloads for int, uint and
double, but not int64.
* Streaming list.size() to a QDataStream will change the format
depending on the architecture.

[ChangeLog][QtCore][QList] QList now uses qsizetype to index into
elements.

Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-06 21:31:14 +02:00
Lars Knoll
ded37aedc9 Implement a proper iterator for QTypedArrayData
This avoids ambiguities in our API when someone e.g. writes
vector.insert(0, ...).

It requires a slight workaround in qlalr, where std::search()
for libc++ doesn't like that our difference_type is qsizetype.

Change-Id: I40aa1040781ffbdd12d04410078207969b3bde53
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-06 21:30:54 +02:00
Tor Arne Vestbø
939f5112a1 androiddeployqt: Fix format specifier warnings
Fixes: QTBUG-85344
Change-Id: I298370ef04b9be502c54bfee729e97379ad81231
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-07-03 11:14:11 +02:00
Jarek Kobus
e114e580e7 Use QList instead of QVector in other tools
Task-number: QTBUG-84469
Change-Id: I90d0e2e723bb4d205d7bf333b21cdf583fdf4ea0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-25 22:30:54 +02:00
Fabian Kosmale
844e4f7b98 moc: Fix QProperty code generation
This addresses two issues:
1. The generated code for QNotifiedProperty<T, ...> was broken when T is
   a pointer. Notably, const S* &  is not a constant reference to S*.
   This is addressed by consistently using T const& instead of const T&.
2. The Q_PRIVATE_QPROPERTY approach assumed that the property name and
   the getter are equal. This does break when they are not, and we are
   unable to change either of them due to API compatibility concerns. An
   example of this would be QQuickItem's parent property with a
   parentItem getter. Therefore, we now allow the usage of NAME to
   override the name of the property.

Change-Id: Idf2e85576c74371b5b0f6db15dbe6f2d17c5e33d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-25 14:11:56 +02:00
Jarek Kobus
670c5bd140 Use QList instead of QVector in moc
Task-number: QTBUG-84469
Change-Id: Id95a656e6277a7c348c02c3267a45ac176c1643b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-06-22 16:46:08 +02:00
Jarek Kobus
a298a8ea54 Use QList instead of QVector in uic
Task-number: QTBUG-84469
Change-Id: I2ce8ca51409c8e29a84d88bdda968e6dec419bea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-22 13:58:30 +02:00
Karsten Heimrich
18ec53156e Move QTextCodec support out of QtCore
* Assume UTF-8 on all Unix like systems
* Export some functions to be able to compile QTextCodec once
  moved to Qt5Compat.

Task-number: QTBUG-75665
Change-Id: I52ec47a848bc0ba72e9c7689668b1bcc5d736c29
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-20 02:04:38 +02:00
Simon Hausmann
b0f445a152 Add support for QNotifiedProperty to the moc
Change the meaning of Q_PRIVATE_QPROPERTY to imply that the property is
implemented using a QNotifiedProperty. That requires passing the owner
object instance to the value and binding setters.

Similarly, detect QNotifiedProperty members like QProperty.

Change-Id: If49bbb04c8ccd4a661973888c50d2d556c25034f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-18 17:26:11 +02:00
Assam Boudjelthia
4041610cb2 Android: warn about too long build paths on Windows
If Gradle build fails on Windows, check for java files that exceed
the max length of 260 that Gradle can handle, then warn about the length
issue.

Pick-to: 5.15
Task-number: QTBUG-83875
Change-Id: Ia7462bc816b3efa4ba9fdd0f179fdc4c06e23248
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-06-18 12:17:34 +00:00
Alexandru Croitor
976fa5134a CMake: Use intelcet flags for bootstrap and qmake
This should fix build failures on Ubuntu 20.04.

Amends fa98adbd04

Change-Id: Iff399faff0cf06f5b88d756b1f632b8798069578
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-18 11:51:41 +02:00
Assam Boudjelthia
9ba88a2689 Android: fix qmlimportscanner not correctly assigned
Change-Id: I6c1212085211e060dda0a84a8660b653bcd30817
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-06-15 11:54:52 +03:00
Lars Knoll
6bbfae9457 Port dbus from QStringRef to QStringView
Task-number: QTBUG-84319
Change-Id: Ifdfad6b7ac8b61ead71382e5ae3cb22b50b2504c
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-06-15 10:44:10 +02:00
Lars Knoll
2393432cd0 Port androiddeployqt and uic from QStringRef to QStringView
Task-number: QTBUG-84319
Change-Id: I7f30a4d73dd98ee1977645d7274816cd71307506
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-15 10:44:04 +02:00
Alexandru Croitor
a08bf7f00a CMake: Fix usage of gc_binaries feature
The qt_internal_apply_gc_binaries function should apply both compile
and link flags, not just link flags.

The flags should be applied publically to all consumers of Bootstrap
regardless if the gc_binaries feature is enabled.

The flags should be applied publically to Core only in case if the
feature is enabled (aka for static builds only).

Change-Id: Id42af0d9b527004d74c04eff2c9e3c2be1e76aac
Fixes: QTBUG-84461
Task-number: QTBUG-83929
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-12 22:34:12 +02:00
Lars Knoll
d0689ec867 Get rid of the obsolete isEditable flag for properties
Change-Id: I54411bd8e223671523c9c8fad5c80bfa6b5b7097
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-06-11 19:39:56 +02:00
Fabian Kosmale
630c7b4811 Cleanups in QMetaProperty
This changes the layout of the meta object data, so
also bump the meta object revision.

Original-patch-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: I176fb16c207e8ebe59e358e69554be813406232f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-11 19:39:54 +02:00
Lars Knoll
5603be705e Qt6: remove support for property flags being functions
Property flags should be compile time booleans, not something to
be determined at runtime.

We've been using this to dynamically disable some properties in QWidget
based classes dependent on the state of a different property, but this
should better get implemented on top of our widgets.

Change-Id: I6296e8761303ecdf24d9e842142e8596304c015d
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-11 19:39:53 +02:00
Volker Hilsheimer
44fb925f50 Phase 2 of removing QDesktopWidget
Remove QDestopWidget public header, simplify the implementation that
maintains a Qt::Desktop type QWidget for each QScreen, and turn
QWidget's initial target screen into a QScreen pointer.

QApplication::desktop() now takes an optional QScreen pointer, and
returns a QWidget pointer, so that applications and widgets can get
access to the root widget for a specific screen without having to
resort to private APIs.

QDesktopWidgetPrivate implementations to look up a screen for an index,
widget, or point are now all inline functions that thinly wrap
QGuiApplication::screens/screenAt calls. We should consider adding those
as convenience APIs to QScreen instead.

Note that QWidget::screen is assumed to return a valid pointer; there is
code that handles the case that it returns nullptr (but also code that
trusts that it never is nullptr), so this needs to be defined, verified
with tests, and asserted. We can then simplify the code further.

Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-06-08 20:29:49 +02:00
Volker Hilsheimer
94dcb5454f Remove the deprecated QDirModel
QFileSystemModel is the documented replacement. It uses threads to
populate the model, which QDirModel doesn't.

Change-Id: I7818ecd8f849eb566ac176612f382e17a0471c47
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-04 19:11:19 +02:00
Leander Beernaert
5a779a4ad3 CMake: Make it possible to build tools when cross-compiling
This patch allows tools to be built for the target platform when the
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING parameter is set at configuration
time.

To avoid naming conflicts, the target tools are suffixed with "_native".
The qt_get_tool_target_name() function can be used to get the tool name
for both scenarios (cross and non-cross compilation).

Extend pro2cmake to refer to the right target name for tools.
The relevant write_XXX functions have a new target_ref parameter that
will be "${target_name}" for tools and literally the target name for
everything else.

Fixes: QTBUG-81901
Change-Id: If4efbc1fae07a4a3a044dd09c9c06be6d517825e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-02 22:42:15 +02:00
Fabian Kosmale
fa987d4441 MetaObject: Store the QMetaType of the methods
This does the analog of 46f407126e for the
methods we care about (signals, slots, Q_INVOKABLEs). In addition to the
actual QMetaType, we store an array with offsets so that we later can do
a mapping from methodIndex to metatype.

The newly added QMetaMethod::{return,parameter}MetaType methods can then
be used to retrieve the metatypes.

This does however require that all involved types are complete. This is
unfortunately not a feasible requirement. Thus, we only populate the
metatype array on a best effort basis. For any incomplete type, we store
QMetaType::Unknown. Then, when accessing the metatype, we fall back to
the old string based code base if it's Unknown.

Squashes "moc: support incomplete types" and  "Fix compile failures
after QMetaMethod change"


Fixes: QTBUG-82932
Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-02 22:42:15 +02:00
Alexandru Croitor
a9fbe53966 CMake: Regenerate tools and 3rd party
Change-Id: I38e065cddc954e8594a5dce823c3bb5385a8a1e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 23:22:43 +02:00
Fabian Kosmale
d8a2456fbf moc: handle include directives in enums
When including files, moc inserts a MOC_INCLUDE_BEGIN and
MOC_INCLUDE_END token into the token stream. Those are already handled
in the toplevel Moc::parse function, but parseEnum lacked support so
far.

Pick-to: 5.15
Fixes: QTBUG-80578
Change-Id: I35c8fd959347d94af20090b3a505dd9e6bfaff88
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-27 09:21:08 +02:00
Lars Knoll
2b8863a98c Get rid of some QTextCodec leftovers
There's no real dependency to QTextCodec in those files anymore.

Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-14 07:51:20 +02:00
Lars Knoll
33bb695a28 Start porting QTextStream away from QTextCodec
As a first step add setEncoding/encoding() methods that use the
QStringConverter::Encoding enum, and port all uses of setCodec()/
codec() over to the new API.

Internally QTextStream still uses QTextCodec, this will be ported
over to QStringConverter in a follow-up change.

Change-Id: Icd764cf47b449b57f4ebd010c2dad89e6717d6c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-14 07:50:13 +02:00
Lars Knoll
ea0a08c898 Move the UTF conversion methods to qstringconverter
Separate them from the qutfcodec, so that the codec
can later on be moved out of Qt Core.

Fix the QUtf methods to take qsizetype instead of int
for length arguments.

This also makes it possible to not build QTextCodec into
the bootstrap lib anymore.

Change-Id: I0b4f83139d61b19c651520a2f3a5012aa7e85cb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-14 07:46:38 +02:00
Lars Knoll
f64a6bd638 Start work on a new API to replace QTextCodec
The new QStringEncoder and QStringDecoder classes
(with a common QStringConverter base class) are
there to replace QTextCodec in Qt 6.

It currently uses a trivial wrapper around the utf
encoding functionality.

Added some autotests, mostly copied from the text codec
tests.

Change-Id: Ib6eeee55fba918b9424be244cbda9dfd5096f7eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-14 07:46:14 +02:00
Joerg Bornemann
286d79d2ed pro2cmake: Handle QMAKE_TARGET_XXX variables
Change-Id: I62151e04d21c20d8c8ad5825464f26074c8abc3d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-12 14:31:12 +02:00
Jean-Michaël Celerier
3f1cffdb2e Fix some build warnings due to bad integer format in printf
Change-Id: I4b882b0a800f92eaa13f38ed23caa4b1f4992e26
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-05-12 14:27:31 +02:00
Friedemann Kleint
21a66c167d uic: Adapt to ActiveQt module restructuring
Task-number: QTBUG-78167
Change-Id: I827db1bf519a6ffcc609d215e08622bf910d519e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-11 12:45:31 +00:00
Lars Knoll
56a7984a90 Remove QRegExp from the bootstrap library
All it's uses have been replaces with QRegularExpression.

Change-Id: I5bcdfdd8a39dad6d1288f18f1b24d2eea9e028d2
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
2020-05-06 09:57:31 +02:00
Cristian Maureira-Fredes
2f975b39a9 uic/Python: import all the classes for QtCore and QtGui
We already had this approach for QtWidgets, so to avoid
adding the specific cases every time, we import all the
classes from QtCore and QtGui.

Change-Id: I38dd2eec3bbdfb83f156a48f35a2f4fda44528c7
Pick-to: 5.15
Fixes: PYSIDE-1287
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-05-05 22:04:51 +02:00
Thiago Macieira
0ef6b3d138 Remove use of std::not1 completely
libc++ that comes with XCode does not have the feature macros, resulting in
warnings printed. Just invert the condition in the functor itself.

lalr.cpp:316:84: warning: 'not1<Nullable>' is deprecated [-Wdeprecated-declarations]

Pick-To: 5.15
Change-Id: I99ab0f318b1c43b89888fffd160bf8d79bc4b47e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-05 12:28:23 -07:00
Marc Mutz
6da4ff824e Port two more local QSets to QDuplicateTrackers
Apart from a more fitting, minimal, API, QDuplicateTracker also
transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or
at least reduce, memory allocations.

Change-Id: Ia9e837ebba88aeb1916da041fc8460a0692a03e4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-05 18:58:35 +02:00
Friedemann Kleint
ae7e701074 uic: Generate string-based connections for custom slots
Qt Designer let's you add custom slots and signals to the main
form; they should use string-based connection syntax since the
class is not known in setupUI(). Amends
da3cb1deb6.

Task-number: QTBUG-76375
Change-Id: I5a3a5630f77c812d48db1cdb7a8658a4d2718228
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-05 15:35:51 +02:00
Friedemann Kleint
da3cb1deb6 uic: Generate Qt 5 connection syntax
Add a enum and formatting for member function pointer based
connections. Now preferably use member function pointer for Qt classes
or parameterless connections.

This should not require qOverload() within Qt classes after the
Signal/Slot disambiguation.

Add command line option to force either syntax for all connections.

Task-number: QTBUG-76375
Change-Id: Icdb4051e1173172a71cd536bdbc7d1ab1edf267d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-04 08:12:33 +02:00
Simon Hausmann
3d7265db90 Provide a way of exposing private QProperties with a fake API
The API reduces the amount of manual plumbing required to offer a
conceptual property through the traditional setter/getter API as well as
through QProperty<T> API. Since the latter would require inlining the
type and thus making it impossible to add new properties without
breaking binary compatibility, this patch introduces a fake API that
behaves similar but does not contain the property by value.

Change-Id: Ib9bccd867f0e4e36a520e5583ba348e728284253
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-30 19:39:25 +02:00
Simon Hausmann
b480acb372 Allow for private properties to be implemented using QProperty
Recently the moc learned that Q_PROPERTY(int x ...) can mean that "x" is
implemented as QProperty and then allows installing bindings, etc. -
this works by scanning the same class' members.

For our own use of QProperty, we need to place the QProperty member
itself into the d-pointer to be able to maintain the ability to add new
properties without breaking binary compatibility. That however means
that moc can't know that a certain property is backed by QProperty - we
don't scan the members of the private class.

As a workaround, this change enables the syntax where the property type
used in Q_PRIVATE_PROPERTY may be wrapped with QProperty<T>.

In addition this patch fixes the compilation of such declared properties
by ensuring the accessor prefix (t->$accessor) is applied also for the
QProperty related meta call variants.

Change-Id: I8fbdc49319048b57f4eb0b65b56daba0459e9598
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-04-30 19:39:19 +02:00
Leander Beernaert
6dd90afb76 CMake: Regenerate projects to match updated plugin API
Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-27 12:21:29 +02:00
Qt Forward Merge Bot
efd7757154 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/widgets/qabstractbutton.cpp
	src/widgets/widgets/qbuttongroup.cpp
	src/widgets/widgets/qbuttongroup.h
	src/widgets/widgets/qsplashscreen.cpp
	tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
        tests/benchmarks/opengl/main.cpp

  Needed update:
	src/plugins/platforms/cocoa/CMakeLists.txt

Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
2020-04-22 15:28:01 +02:00
Friedemann Kleint
a54294369d rcc: Fix line endings on Windows when redirected
Extend the fix 53d5811b0c
to work for the file generation mode as well.

Pick-to: 5.15
Fixes: PYSIDE-1273
Change-Id: I5a91e2de87b44658f276cea87cbd730452b1bd78
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-04-20 20:25:32 +02:00
hjk
300bd7fff8 rcc: Always seed the hash with 0
That was already done to pass the auto tests, but the randomization also
bites for reproducible builds.

Change-Id: Ibf4da513059deb5a806d2ac1a83c1994edf09d4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-04-17 09:02:22 +02:00
Lars Knoll
23b14237f8 Port androidtestrunner to QRegularExpression
Change-Id: If135b29996b7036d65472a1b5fa4817cd7907aba
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-04-15 14:37:35 +02:00
Lars Knoll
e174c2f7d7 Port tracedef to QRegularExpression
Change-Id: I38bbf36719c99d4fda102eca375011c38792dd4a
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
2020-04-13 09:40:26 +02:00
Lars Knoll
5b10b57c45 Port androiddeployqt from QRegExp to QRegularExpression
As a drive-by, also fix spelling of architecture.

Change-Id: Ibeaa6b611ddbb75b9492deb5d97a64ed8b030c3a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-04-13 09:40:16 +02:00
Lars Knoll
33752a9bd3 Include QRegularExpression in the bootstrap library
This allows us to use regular expressions in bootstrapped tools
such as moc and tracegen.

Change-Id: I4310dd15bf26651aac6ab30c884e025ca06b3099
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-13 09:40:09 +02:00
Lars Knoll
c6cdf38e75 Change qHash() to work with size_t instead of uint
This is required, so that QHash and QSet can hold more
than 2^32 items on 64 bit platforms.

The actual hashing functions for strings are still 32bit, this will
be changed in a follow-up commit.

Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 20:03:25 +02:00
Qt Forward Merge Bot
8823bb8d30 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/opengl/doc/src/cube.qdoc
	src/corelib/global/qlibraryinfo.cpp
	src/corelib/text/qbytearray_p.h
	src/corelib/text/qlocale_data_p.h
	src/corelib/time/qhijricalendar_data_p.h
	src/corelib/time/qjalalicalendar_data_p.h
	src/corelib/time/qromancalendar_data_p.h
	src/network/ssl/qsslcertificate.h
	src/widgets/doc/src/graphicsview.qdoc
	src/widgets/widgets/qcombobox.cpp
	src/widgets/widgets/qcombobox.h
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
	tests/manual/diaglib/debugproxystyle.cpp
	tests/manual/diaglib/qwidgetdump.cpp
	tests/manual/diaglib/qwindowdump.cpp
	tests/manual/diaglib/textdump.cpp
	util/locale_database/cldr2qlocalexml.py
	util/locale_database/qlocalexml.py
	util/locale_database/qlocalexml2cpp.py

Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.

Updated CMakeLists.txt in each of
	tests/auto/corelib/serialization/qcborstreamreader/
	tests/auto/corelib/serialization/qcborvalue/
	tests/auto/gui/kernel/
and generated new ones in each of
	tests/auto/gui/kernel/qaddpostroutine/
	tests/auto/gui/kernel/qhighdpiscaling/
	tests/libfuzzer/corelib/text/qregularexpression/optimize/
	tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
	tests/libfuzzer/gui/text/qtextdocument/sethtml/
	tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
	tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.

Changed target name in
	tests/auto/gui/kernel/qaction/qaction.pro
	tests/auto/gui/kernel/qaction/qactiongroup.pro
	tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake

Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.

Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
2020-04-08 20:11:39 +02:00
Simon Hausmann
5422fb7948 Allow declaring QProperty<> based Q_PROPERTYies with a notify signal
This requires mostly making moc a bit more permissive, which has the
advantage that it also simplifies the code a little bit.

The newly added test case demonstrates how to connect such a property
with a change signal.

One test case needed to be changed regarding the callback as the
publicProperty member now has a (permanent) observer and therefore
re-assigning the binding will re-evaluate it as the value might have
changed.

Change-Id: Ia7edcec432de830bdd4e07d943c5d4550c175ca4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-04-08 11:26:39 +02:00
Mårten Nordheim
d8b49e6b51 QtNetwork: Delete bearer management
All remaining pieces are gone, configuration included.

Relevant CMakeLists and configure.cmake were regenerated.

Fixes: QTBUG-76502
Change-Id: I667b5da7e3802830d236d50b5e9190c2ee9c19e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-04-05 16:41:08 +02:00
Lars Knoll
64b1af3fa0 Warn that the EDITABLE flag for property declarations is deprecated
Additionally mark QMetaProperty::isEditable as deprecated.

Change-Id: I1abe4c6f2d30c2f96380f9e5942be431dbfed38f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-04-02 15:21:46 +00:00
Friedemann Kleint
098d2edb07 uic: Generate include statement for QActionGroup
Legacy forms from Qt 3 may still contain QActionGroup,
generate an include statement for them.

Change-Id: I292967f23f798a132ec7e360e437b20a529c3a26
Complements: bcaff2b06f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-31 18:51:57 +02:00
Eskil Abrahamsen Blomfeldt
adc205631b Android: Update minimum version to 23 again
In 519ea72108, the minimum SDK
version was moved away from the AndroidManifest.xml, and when
the change was merged, we lost parts of the update to set
the minimum version to 23.

This redoes it in the remaining locations.

Change-Id: Iada8188d3c0c8ec0a4801c1d219640ecb3976753
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-30 13:04:06 +01:00
Mitch Curtis
3f73995a03 Move undo framework out of Qt Widgets
- Moves QUndo* classes (except QUndoView) from src/widgets/utils to src/gui/utils
- Moves related auto tests from widgets to gui
- Replaces QUndoAction with lambdas that do text prefixing

[ChangeLog][Undo Framework] QUndo* classes (except QUndoView) were moved from Qt
Widgets to Qt GUI.

Done-with: volker.hilsheimer@qt.io
Fixes: QTBUG-40040
Change-Id: I3bd8d4d32c64f8dee548f62159a1df2126da89d8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-30 12:36:29 +02:00
Volker Hilsheimer
d975ad4ed7 Merge QGuiShortcut and QShortcut again in QtGui
QShortcut has only one widget specific feature, which is whatsThis; that
is just a QString, so the setters and getters can just as well be in
QtGui.

The widgets specific implementation of shortcut matching and of showing
the whatsThis balloon stays in QtWidgets, in the private implementation.
Using virtual functions in the private we can override the empty default
in QtGui, and by adding a virtual factory function in QGuiApplication,
the correct private is instantiated depending on the kind of application
running.

Change-Id: I09ae4a5482f9fb70940c5e2bfe76d3d7fd710afc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-29 19:31:14 +01:00
Volker Hilsheimer
bcaff2b06f Remove QGuiAction again and split QAction implementation up instead
Duplicating the number of classes is a high price to pay to be able to
have some QAction functionality behave differently, or be only available
in widgets applications.

Instead, declare the entire API in QtGui in QAction* classes, and
delegate the implementation of QtWidgets specific functionality to
the private. The creation of the private is then delegated to the
Q(Gui)ApplicationPrivate instance through a virtual factory function.

Change some public APIs that are primarily useful for specialized tools
such as Designer to operate on QObject* rather than QWidget*. APIs that
depend on QtWidgets types have been turned into inline template
functions, so that they are instantiated only at the caller side, where
we can expect the respective types to be fully defined. This way, we
only need to forward declare a few classes in the header, and don't
need to generate any additional code for e.g. language bindings.

Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-29 11:18:57 +01:00
Lars Knoll
53f8f23369 Get rid of QRegExp usage in rcc
As a drive-by, enable testing of rcc in the cmake build.

Change-Id: I4150ff3ffe7404bab0cbc72f80b23b47a60cf33d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-03-25 09:34:37 +01:00
Mitch Curtis
69a5be7ef0 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib2a2e3a292af43be3a980c2ccc943c08f4bbf72f
2020-03-20 11:28:14 +01:00
Eskil Abrahamsen Blomfeldt
1a18e138f4 Android: Fix deployment on Windows host
The paths in the build properties require forward slashes
apparently. On Windows, we would default to native backslashes
and they would be stripped from the path. Converting to forward
slashes fixes the problem.

Issue was introduced by dd04fb639b,
since before that, the NDK path was retrieved from the environment.

Fixes: QTBUG-82944
Change-Id: I6c51113efcf671461a5871991b3225a52b95266c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-19 10:23:07 +01:00
Simon Hausmann
d4f0445331 Add support for exposing public QProperty members in the meta-object system
At the moment this makes the type as well as the setter/getter available
through the meta-call as well as the ability to register observers and
bindings. Only QProperty members that are annotated with
Q_PROPERTY(type name) are made public through the meta-object.

Change-Id: I16b98fd318122c722b85ce61e39975284e0c2404
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-03-18 15:42:58 +01:00
Lars Knoll
dee55af0a5 Remove QRegExpValidator
As QRegExp will be moved to a compat library in Qt 6.

Change-Id: I181aec45bd798f49d2c50a0e7fb64782e004b854
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-03-17 08:35:50 +01:00
Simon Hausmann
bc64ccbf00 Re-generate various CMake projects and configure after merge
Change-Id: I02f5926c6664aab518c5c81e0c33dca0818a1871
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 20:43:56 +01:00
Simon Hausmann
c2f167b412 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-16 20:43:50 +01:00
Simon Hausmann
ff922e7b87 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/kernel/qmetatype.cpp

Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
2020-03-16 18:41:27 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Tor Arne Vestbø
db745fdd2d cmake: Fix naming when referring to Apple macOS
Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:52 +01:00
Topi Reinio
26ed956cbc Doc: Remove \contentspage commands
The command is deprecated and has no effect apart from generating
a documentation warning.

Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-15 10:48:58 +01:00
Alexandru Croitor
14546d1816 rcc: Teach rcc the --no-zstd option
It is needed when cross-building Qt using CMake, where the zstd
feature might have different values between the host and target,
in which case the build system tells rcc not to use zstd when
the feature is disabled.

Amends d20c980576

Change-Id: I9dc55b59b1be5272b79aa5f1e2daf2b516a157d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-12 11:41:26 +01:00
Tor Arne Vestbø
5f940253bf macOS: Merge qcore_mac cpp and mm files
Files ending with .mm are Objective-C++ files, so we don't need
a separate file for the C++ parts.

Change-Id: I3ef52bc98291fd461b889978a538e81630d17c6e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-12 06:07:35 +01:00
Qt Forward Merge Bot
865afac250 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
2020-03-11 15:34:21 +01:00
Qt Forward Merge Bot
116d68f105 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/plugin/qlibrary.cpp
	src/corelib/plugin/qlibrary_unix.cpp
	src/corelib/plugin/qpluginloader.cpp

Change-Id: I866feaaa2a4936ee5389679724c8471a5b4b583d
2020-03-11 11:27:49 +01:00
Kari Oikarinen
d6d902a990 Merge 5.14 into 5.14.2
Change-Id: Ib4b26bad47a850cde6253fb3422aae34b2cf622b
2020-03-10 09:43:16 +02:00
Lars Knoll
a0ffdf765e Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-04 19:10:37 +00:00
BogDan Vatra
519ea72108 Android: Bump gradle (plugin) versions
Move min & target sdk from AndroidManifest.xml to build.gradle

Fixes: QTBUG-70817
Change-Id: Id9bb9825a3232587e0255b2d3d6f0273c5f9b66a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-04 18:02:35 +00:00
Friedemann Kleint
649d7abcd2 Update uic's class lib map to reflect QtOpenGLWidgets
Task-number: QTBUG-74409
Change-Id: I5de957156c3120422f5c8f2e702e198f9f6cc43d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-03-04 15:31:13 +00:00
Lars Knoll
2a4b957789 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
2020-03-04 14:39:18 +00:00
Eskil Abrahamsen Blomfeldt
5f1afeacf6 Android: Increase minimum API level to Android-23 / Android 6
There are certain APIs we need which cannot be used without this,
and in general it simplifies some code.

[ChangeLog][Android] Minimum Android version is now Android 6.0,
API level 23.

Change-Id: I72ca3b429bf48969e16e2bc6b99d9c4af993ea77
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-04 08:28:04 +01:00
Cristián Maureira-Fredes
3f7d087d33 uic: Add pass to empty functions
When there are no translations on the UI file,
the function was left empty but without a 'pass'
statement, generating a SyntaxError,
this change includes it to avoid problems while
using the generated Python file.

Fixes: PYSIDE-1234
Change-Id: I30482a95c95fb4b4f4456531946a79c960d76318
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-03-03 14:50:35 +01:00
Qt Forward Merge Bot
63312fe2ec Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
2020-03-03 14:13:02 +01:00
BogDan Vatra
6806cb341c Android: fix apk generation on Android API 23+
Starting with Android API 23+ gradle enables uncompressed native libs by default.
We must set android.bundle.enableUncompressedNativeLibs = false to gradle.properties,
to force it to compress them and extract them on the device.

Fixes: QTBUG-80766
Change-Id: Ia6d8d9179a341bbe7f8dc254a3b31d2ee8d7a5d7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-03-03 13:37:21 +02:00
Qt Forward Merge Bot
60ec012d8d Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I851c0328c3c38ea67b5ad115b205ac6a1262706e
2020-02-29 01:00:44 +01:00
Edward Welbourne
305ddbeb5b Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-28 15:37:11 +01:00
Johan Klokkhammer Helsing
eca884a483 Remove various traces of QGL
Removed friend declarations, some check etc.

Task-number: QTBUG-74408
Change-Id: I1c5b46a564beee2c1d894678b908803f91df68aa
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-28 09:59:39 +01:00
Cristián Maureira-Fredes
de1d51a3fd uic: handle header tag for python imports
Fixes: PYSIDE-1233
Change-Id: Id2b6e2a8b833da6ea4417d06643b2f7b045515a9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-27 11:19:39 +01:00
Qt Forward Merge Bot
75c0ffaf6d Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/network/bearermonitor/CMakeLists.txt
	examples/network/CMakeLists.txt
	src/corelib/tools/qlinkedlist.h
	src/sql/kernel/qsqldriver_p.h
	src/sql/kernel/qsqlresult_p.h
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
2020-02-26 18:39:21 +01:00
Alexandru Croitor
26059d1b9b CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:

- the python scripts do not ignore certain system_foo features anymore
  (it is a hardcoded list for now just to be safe)

- configurejson2cmake now outputs
  qt_find_package(WrapSystemFoo) calls for bundled libraries
  (see below)

- the harfbuzz .pro file is modified to accommodate pro2cmake
  not being able to correctly parse some conditional scopes

- the freetype .pro file is modified to make sure linking of the
  library succeeds without duplicate symbol errors, which qmake
  doesn't encounter due to magical exclusion of cpp files that are
  included in other cpp files (presumably for include moc_foo.cpp
  support)

- feature evaluation for Core, Gui, Network now happens in the
  qtbase/src directory, so that bundled libraries can be conditionally
  built

- for each bundled library there are now two FindWrap scripts:
  - FindWrapSystemFoo which finds an installed library in the system
  - FindWrapFoo which either uses the system installed library or
    the built bundled one depending on a condition

- projects that intend to use bundled libraries need to link against
  WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
  (this is handled by pro2cmake).
  Unfortunately manually added qt_find_package(WrapFoo) calls might
  still be needed as is the case for WrapFreetype and others.

- a new cmake/QtFindWrapHelper.cmake file is added that provides
  a macro to simplify creation of WrapFoo targets that link against
  a bundled or system library. The implementation is fairly ugly
  due to CMake macro constraints, but it was deemed better than
  copy-pasting a bunch of almost identical code across all
  FindWrapFoo.cmake files.

- a qtzlib header-only module is now created when using bundled
  zlib, to provide public syncqt created headers for consumers
  that need them. These are projects that have
  'QT_PRIVATE += zlib-private' in their .pro files
  (e.g. qtimageformats, qtlocation, qt3d, etc.)
  This is unfortunately needed due to QtNetwork using zlib
  types in its private C++ API.

The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2

The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz

The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others

Among other things, this change allows building qtbase on Windows
without requiring vcpkg.

Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-25 15:43:16 +01:00
Olivier Goffart
46f407126e MetaObject: store the QMetaType of the properties
Change-Id: I563e7232b70e94de4184f2c23a581319313dcf5c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-25 15:43:15 +01:00
Olivier Goffart
4dbac23e53 Normalize types at compile time
This also fix the normalization algorithm:
 - Some 'const' after pointers were not removed as they should.
 - No need to keep the space in '> >' and '< :' in C++11 anymore
 - Fix normalization of 'long unsigned int' and similar

Change-Id: I2b72f0fede96c1063e7b155d9f25a85fccfc7bf9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-20 16:11:02 +01:00
Sona Kurazyan
63a559845c Remove QLinkedList
QLinkedList has been moved to Qt5Compat. Remove and stop mentioning
it in docs, examples (the docs & examples for QLinkedList itself will
be moved to Qt5Compat) and remove the corresponding tests.

Also remove QT_NO_LINKED_LIST, since it's not needed anymore.

Task-number: QTBUG-81630
Task-number: QTBUG-80312
Change-Id: I4a8f1105cb60aa87e7fd67e901ec1a27c489aa31
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-19 21:01:07 +01:00
Alexandru Croitor
eaa29378b9 CMake: Fix c++ standard config tests with MSVC
Need to pass additional -Zc:__cplusplus flag when using
MSVC, so that the __cplusplus define has correct values.

Additionally make the option be propagated to consumers of Qt
via the public Platform target, which QtCore links against.

Change-Id: Ie1283c25334b93f993529beb7fb32bdb001627f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-18 14:44:57 +01:00
Liang Qi
6b2535ea15 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/widgets/graphicsview/boxes/scene.h
	src/corelib/Qt5CoreMacros.cmake
	src/corelib/Qt6CoreMacros.cmake
	src/network/ssl/qsslsocket.cpp
	src/network/ssl/qsslsocket.h
	src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
	src/testlib/CMakeLists.txt
	src/testlib/.prev_CMakeLists.txt
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp

Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.

Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
2020-02-13 18:31:40 +01:00
Ulf Hermann
35f973d222 moc: Record whether a meta object is an object, gadget, or namespace
So far, objects had no identification, and both gadgets and namespaces
were called "gadget". qmltyperegistrar, however, is especially
interested in the distinction between namespaces and anything else.

Task-number: QTBUG-68796
Change-Id: Ic5739727bdef7766de6e535c6568920198fadb2b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-02-13 11:40:05 +01:00
Qt Forward Merge Bot
9a5df00a61 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8caee4d1ce0eed27d905194df3c3d46c5d07d2b0
2020-02-12 01:00:50 +01:00
BogDan Vatra
dd04fb639b Set also ndk.dir
It's needed when ANDROID_NDK_HOME is not set

Fixes: QTBUG-81978
Change-Id: Id6108083ae62757ca839d652793d98a89e6cb6b5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-11 11:16:42 +02:00
Alexandru Croitor
3af9d49bb7 Merge remote-tracking branch 'origin/wip/cmake' into dev
Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
2020-02-10 18:35:07 +01:00
Qt Forward Merge Bot
9634055543 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I5d80d84d1fd9f52e7c8e4895cc34d4d29043f400
2020-02-08 01:00:08 +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
Alexandru Croitor
1c571e5fe7 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-07 18:19:51 +00:00
Friedemann Kleint
e9efd96e62 uic/Python: Add imports for Q(Date)Time, QKeySequence
Those types are used as properties of Q(Date)TimeEdit,
QKeySequenceEdit.

Fixes: PYSIDE-1215
Change-Id: I8b9ffebb8229fff447aa7dd6bee6e037d708333c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-06 17:46:21 +01:00
Qt Forward Merge Bot
8ce0ad805d Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/network/ssl/qsslsocket_openssl_symbols.cpp

Change-Id: I8c13b5c48a8ecce96540b39c6d5f8ca146eb2339
2020-02-06 11:10:34 +01: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
Friedemann Kleint
6baed76654 uic/Python: Set form object name correctly
Add missing "not" for the isEmpty() check.

Fixes: PYSIDE-1210
Change-Id: I3798d483df9d077300ff69dc5d3a8d08812f534e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-05 10:37:02 +01:00
Lars Knoll
c6e1b54f94 Cleanup code where we mixed QHash and QMultiHash iterator code
Change-Id: Ib229cad13ca21d6288e009c6ee1c39fa974f80b8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Alexandru Croitor
a1dbdcbd6e Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
        src/corelib/Qt5CoreConfigExtras.cmake.in
        src/corelib/Qt5CoreMacros.cmake
        src/dbus/Qt5DBusConfigExtras.cmake.in
        src/widgets/Qt5WidgetsConfigExtras.cmake.in

Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
2020-01-29 16:57:27 +01:00
Qt Forward Merge Bot
a3fc03c130 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I98b1a5a11ece3957a1115c1d9be8841759206ffe
2020-01-29 01:00:56 +01:00
Qt Forward Merge Bot
558fc903ac Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qvariant.cpp
	src/corelib/serialization/qjsoncbor.cpp
	src/corelib/serialization/qjsonvalue.cpp
	src/corelib/tools/tools.pri
	src/gui/image/qimage.cpp
	src/gui/kernel/qguivariant.cpp
	src/widgets/kernel/qshortcut.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json
	tests/auto/tools/moc/tst_moc.cpp
        src/opengl/qglframebufferobject.cpp

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Leander Beernaert <leander.beernaert@qt.io>
Change-Id: Ie7f5fa646c607fe70c314bf7195f7578ded1d271
2020-01-28 14:14:20 +00:00
Alexandru Croitor
c9bea1ad62 Add initial support for CMake "Ninja Multi-Config" generator
This allows doing debug_and_release builds with Ninja on all
platforms.
The "Ninja Multi-Config generator" is available starting with CMake
3.17.

Desired configurations can be set via CMAKE_CONFIGURATION_TYPES.
Possible values: "Release, Debug, RelWithDebInfo, MinRelSize".
For example -DCMAKE_CONFIGURATION_TYPES="Release;Debug".

The first configuration is the 'default' configuration which is
built when calling ninja with no arguments.

To build all targets of a certain configuration use "ninja all:Release"
or "ninja all:Debug".

To build all targets in all configurations use "ninja all:all".

Note that the first configuration influences which configuration of
tools will be used when building the libraries for all configurations.
In simple terms, when configured with
-DCMAKE_CONFIGURATION_TYPES="Release;Debug" the release version of moc
is used by AUTOMOC.
When configured with -DCMAKE_CONFIGURATION_TYPES="Debug;Release"
the debug version of moc is used by AUTOMOC.

Framework builds and Ninja Multi-Config don't currently work together
due to multiple bugs in CMake, which ends up generating an invalid ninja
file with duplicate rules. There are also issues with placement of the
debug artifacts.

This will be handled in a follow up patch after CMake is fixed.

Task-number: QTBUG-76899
Change-Id: If224adc0b71b7d1d6606738101536146aa866cd7
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-27 11:47:57 +00:00
Leander Beernaert
48c82e90af Post Merge Fixes
Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-24 12:29:18 +00:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +01:00
Fabian Kosmale
cb3152086c Introduce Q_PROPERTY attribute REQUIRED
This is meant to correspond to required properties in QML.

Change-Id: I2645981e13f7423bc86b48370c165b3cfe2aaa62
Task-number: QTBUG-81561
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-01-23 16:47:45 +01:00
Olivier Goffart
73d1476fb1 Replace most use of QVariant::type and occurrences of QVariant::Type
I made a clazy automated check that replaced the use of QVariant::Type
by the equivalent in QMetaType.
This has been deprecated since Qt 5.0, but many uses were not yet removed.

In addition, there was some manual changes to fix the compilation errors.

Adapted the Private API of QDateTimeParser and QMimeDataPrivate
and adjust QDateTimeEdit and QSpinBox.

QVariant(QVariant::Invalid) in qstylesheet made no sense.

But note that in QVariant::save, we actually wanted to use the non-user type.

In the SQL module, many changes were actually reverted because the API
still expects QVarient::Type.

Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-23 16:46:51 +01:00
Andy Shaw
54c713e58f Android: Respect the --no-build option for APK packages
Fixes: QTBUG-80884
Change-Id: I90bc3100aeb85089256ce414434c98753e02c79c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-01-18 14:02:07 +01:00
Qt Forward Merge Bot
c70208c2d0 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-01-17 08:52:14 +01:00
Olivier Goffart
983432effd Introduce Q_MOC_INCLUDE
A new macro that can be added in the header file parsed by moc to tell moc
to include that file in the generated file

Change-Id: I03ad702c3fcd8380371015f226ee4b7456daf132
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-17 02:22:22 +01:00
Qt Forward Merge Bot
0a4e5bb265 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/kernel/qshortcut.cpp
	tests/auto/network/access/spdy/tst_spdy.cpp

Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
2020-01-16 11:20:42 +01:00
Qt Forward Merge Bot
c3123c757a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
2020-01-15 01:00:39 +01:00
Leander Beernaert
89d4f2f13e Remove invalid conversion and make it clearer for the future
Change-Id: I62fc075a4ebec7783a1e5fa35e113951aab9e674
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-14 14:24:43 +00:00
Friedemann Kleint
21a14767b3 uic/Python: Fix missing QCursor import
Fixes: PYSIDE-1182
Change-Id: I1ccc524a152ea75508166f3d2c0c60f8d829cd8f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-14 14:17:52 +01:00
Leander Beernaert
0761715f79 Regenerate src/
Change-Id: Icef5e834a6acc1cc4488bbed7749e81e1f2388b3
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-14 12:37:25 +00:00
Cristián Maureira-Fredes
3f6275960c uic: add customwidget imports support for python
Fixes: QTBUG-81073
Change-Id: I29659481b14927ffcb8f2cb1829b577a67e4b937
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-14 08:11:53 +01:00
Qt Forward Merge Bot
cccc9d0b95 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
2020-01-13 10:13:01 +01:00
Liang Qi
a59c768489 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/kernel/qobject.cpp

Change-Id: I4780b25665672692b086ee92092e506c814642f2
2020-01-09 20:30:39 +01:00
Jani Heikkinen
1e42c97cf0 Bump copyright year
Change-Id: I9468ef21a2cf03cf07c38f012a2aa9bae6d02a03
Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-09 14:41:53 +02:00
BogDan Vatra
3b54009b13 AAB files can be signed only with jarsigner tool
Fixes: QTBUG-80406
Change-Id: I04b99477c744e7dd729a791c81194b90c4ec658a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-01-09 08:26:50 +02:00
Friedemann Kleint
75391511ff Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
2020-01-07 08:34:53 +01:00
Joerg Bornemann
4b2de41b13 CMake: Add support for framework builds
Framework builds are enabled by default on macOS.
They are controlled via the framework feature.

Task-number: QTBUG-75751
Change-Id: I00bc64672f02bbd1672508b2b5010d202984a961
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CMake Build Bot
2020-01-06 11:53:53 +00:00
Qt Forward Merge Bot
3a010f72b8 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/kernel/qvariant.h

Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
2020-01-06 07:20:18 +00:00
Cristián Maureira-Fredes
9b647bf5ac uic: setWeight replace semi-colon by language::eol
Change-Id: I87f9c2896cfd6f83f683cf731e4a62aef627d69c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-05 15:31:41 +01:00
Liang Qi
a503bf5470 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qvector.h
		Make QVector(DataPointer dd) public to be able to properly merge
		5b4b437b30 from 5.15 into dev.
	src/widgets/kernel/qapplication.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
2020-01-04 15:32:34 +01:00
Friedemann Kleint
01f0df1cf5 uic: Add handling of resources imports for Python
The Python-bases pyside2-uic would write an import for each
resource file encountered, adding a "_rc" suffix. Add this
handling.

Task-number: PYSIDE-1171
Task-number: PYSIDE-1170
Change-Id: I870d61ca7262c0684de5359a5f990d23a4171032
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-03 16:10:13 +01:00
Friedemann Kleint
8b0b2057d0 uic: Add colon missing for "if()" constructs in Python
Task-number: PYSIDE-1169
Change-Id: I63c5305b0ddad1c4fcd585b65c3c78c05b40bac1
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-03 15:09:53 +01:00
Friedemann Kleint
7c0341daee uic: Fix empty strings for Python
Introduce a constant in the language namespace.

Fixes: PYSIDE-1174
Change-Id: Ic3e58580b20c1d9a6ddf97f20709a3046d4b6f0c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-03 12:54:00 +01:00
Qt Forward Merge Bot
4054c0d6ed Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	src/plugins/platforms/xcb/qxcbscreen.cpp
	src/widgets/accessible/qaccessiblewidget.cpp

Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
2019-12-27 09:29:30 +01:00
Cristián Maureira-Fredes
b31aef2900 uic: Rename raise() to raise_() for Python
Fixes: QTBUG-80791
Change-Id: Ia6339b8c683147456cdffa7f2d45972e8eacd92c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-12-19 12:38:58 +01:00
Allan Sandfeld Jensen
52876e0a82 Basic QImage cleanup
Remove deprecated methods and do marked TODOs for Qt6.

Change-Id: I905743cf909776c6433616b3a7c3b544d75f2afe
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-12-18 10:00:29 +01:00
Alexandru Croitor
cf3d4cf3c3 Teach moc to output a Make-style depfile
If moc is invoked with the --output-dep-file option, it will generate
a "moc_<source_file_name>.d" dep file which contains dependency
entries that can be consumed by a Makefile / Ninja build system.

This is useful for build tools (like CMake) to know when moc should be
re-ran.
In the future, it might also be useful for ccache (teach ccache not to
re-run moc when not necessary).

The dependency list contains: the original source file, the passed
--include files (like moc_predefs.h), the include files that
were discovered while preprocessing the source file, and the plugin
metadata json files listed in Q_PLUGIN_METADATA macros.

The file paths are encoded using QFile::encodeName, so using the local
8-bit encoding.

The paths are also escaped (so ' ' replaced by '\ ', '$' by '$$',
etc) according to the Make-style rules as described in
clang's dep file generator
https://github.com/llvm/llvm-project/blob/release/9.x/clang/lib/Frontend/DependencyFile.cpp#L233

For reference, the equivalent Ninja depfile parser source code can be
found at
https://github.com/ninja-build/ninja/blob/v1.9.0/src/depfile_parser.in.cc#L37

Additional options that can be passed:
--dep-file-path - to change the location where the dep file should be
generated.
--dep-file-rule-name - to change the rule name (first line) of the
dep file (useful when no -o option is specified, so output goes to
stdout).

Encoding story.
Note that moc doesn't handle non-local-8-bit characters properly when
processing include directives at the preprocessor step. Specifically
the content of the main input file is read as a raw byte array (which
can be UTF-8 encoded) and then each include directive is resolved via
Preprocessor::resolveInclude(), which calls QString::fromLocal8Bit().

Because moc uses the QtBootstrap library, only a limited set of codecs
are available: various UTF 8 / 16 / 32 codecs and
QLatin1Codec (ISO-8859-15).

This means that on Windows, if the source input file is UTF-8 encoded,
and contains include names with UTF-8 characters (like an emoji or any
character >= 127 that is not in the QLatin1 codec), moc will fail to
resolve and process that include, and thus no dep file entry will be
created either.

On macOS / QNX / WASM the main locale is UTF-8, so file content
and paths will be processed correctly (hardcoded via QT_LOCALE_IS_UTF8
in src/corelib/codecs/qtextcodec_p.h).

On Linux it will depend on the current locale / encoding set,
and if that encoding is one of the ones supported above. UTF-8 should
work fine.

[ChangeLog][QtCore][moc] moc can now output a ".d" dep file that can
be consumed by other build systems.

Task-number: QTBUG-74521
Task-number: QTBUG-76598
Change-Id: I5585631ff1bbbae4e2875cade9cb6c20ed018c0a
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2019-12-17 21:43:41 +01:00
Allan Sandfeld Jensen
deeaa500ad Mark the old style unprefixed stream functions deprecated
Requires a third definition for the source-compatible but deprecated
version.

Change-Id: I260ae79f4547f99eed701b10e0b25222f81cd5ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-16 11:23:47 +01:00
Mårten Nordheim
b79d74e96f moc: change QMap::unite to QMap::insert
Which is the intended behavior.

Change-Id: I0cffc623fc09284f3d95850f840564dca20ed0d4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-12-12 15:25:39 +01:00
Lars Knoll
c7e35ffe69 Use a QMultiHash explicitly if insertMulti() is being used
This is a step towards deprecating QHash::insertMulti() and clearly
separating QHash and QMultiHash.

Change-Id: Ic2c7665673ff00d4f2186e94850710b70330f8ba
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-12 15:25:22 +01:00
Milian Wolff
656d6f2a9b Support Q_GADGET QMetaObject super class hierarchies across templates
This patch fixes the QMetaObject::superClass hierarchy for Q_GADGETs
that inherit from a template which in turn inherits another Q_GADGET.
One common scenario where this is applied is for the CRTP. Without this
patch, moc would stop at the template and then sets the superClass
QMetaObject to a nullptr. For QObjects this works, since there moc knows
that every child must by definition inherit QObject. In order to support
this for Q_GADGETs too, we defer the judgment about the availability
of a staticMetaObject in the base class to compile time through the
existing QtPrivate::MetaObjectForType<Base>::value() helper.

[ChangeLog][QtCore][moc] Moc now correctly sets a non-null
QMetaObject::superClass for Q_GADGETs that inherit from a template which
inherits another Q_GADGET.

Change-Id: I103b5efd74ed24172dffce477ca2ed6d0f374d44
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-12-12 13:02:52 +01:00
Qt Forward Merge Bot
be270ac82b Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-12-12 11:39:59 +01:00
Ulf Hermann
23d2312506 Split cborstream feature in two
Reading of Cbor streams is substantially more complicated than writing
as it requires float16 support. When writing Cbor, we can just choose to
always write 32bit floats, even if we could compress the numbers into
16 bits.

We need Cbor writing in the bootstrap library, but we cannot easily add
float16 support.

Furthermore, Cbor reading is required for plugin support, but not Cbor
writing. It might make sense for some users to build a custom Qt with
Cbor writing disabled.

Therefore, provide two features, cborstreamreader and cborstreamwriter,
split up the code in cborstream.{h|cpp} into several files, and enable
Cbor writing in the bootstrap library.

Change-Id: I15450afb0e328a84a22ebca9379cffc4f900a75a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-12 10:42:27 +01:00
Qt Forward Merge Bot
11d7788c18 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I69238f23882deebeaad46e4fdcf899ab22cc2b8f
2019-12-12 01:01:04 +01:00
Michael Dippold
3162345670 Support both qrc and qml files for qmlimportscanner
Some projects can be configured to have both qrcFiles and qml-root-path
included in the deployment settings file. The addition to qrc scanning
prevented the qml root directory from being scanned.

Change-Id: Idadb62f5572be45d0083294440bdb29740c2c47e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-12-11 11:14:47 -08:00
Samuel Gaist
42aa740df7 rcc: Fix namespace handling for initializer
rcc currently always writes the namespace mangling macros in both the
initializer constructor and destructor. This patch add the missing
handling of the --namespace option for that part of the generated code.

[ChangeLog][Tools][rcc] rcc now generates correct code when using the
--namespace option.

Change-Id: I7e5e608eb0ad267d11d601fc69c1a87d3f655a6e
Fixes: QTBUG-80649
Reviewed-by: hjk <hjk@qt.io>
2019-12-10 13:30:31 +01:00
Qt Forward Merge Bot
bef74b6c3a Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
2019-12-09 10:16:01 +01:00
Lars Knoll
e58b44d557 Change representation of string data in the meta object
Don't store our string data as QByteArrayLiterals anymore, but revert
back to simply storing them as an array of char* and offsets into that
array.

This is required to be able to inline size and begin into QByteArray
itself. Once that change is done, we can then avoid creating copies of
the string data again.

Change-Id: I362a54581caefdb1b3da4a7ab922d37e2e63dc02
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-12-08 18:19:58 +01:00
Olivier Goffart
cedf0207d1 Use Q_NAMESPACE for the Qt namespace, and remove the old moc hack to support it
Since I can't #include qobjectdefs from qnamespace because of circular dependency,
move the Qt macro in the qtmetamacros.h header.

Deprecate QObject::staticQtMetaObject since now one can just use Qt::staticMetaObject

Change-Id: I11982aa17c2afa2067486b113f8052672f3695eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-12-06 20:29:15 +00:00
Allan Sandfeld Jensen
ece0c0a5e7 Tidy nullptr usage
Move away from using 0 as pointer literal.

Done using clang-tidy. This is not complete as
run-clang-tidy can't handle all of qtbase in one go.

Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-06 12:13:20 +01:00
Leander Beernaert
0f220d473a Collect Json Metatypes from CMake's Automoc
This patch adds a new bootstrap tool which will read CMake's
AutoGenInfo.json and ParseCache.txt to determine what the current
list of json files is that needs to be passed to moc --collect-json
option.

Right now this is enabled for qt_add_module() with the option
GENERATE_METATYPES. pro2cmake has also been updated to detect qmake's
CONFIG += metatypes and to generate the above option for modules.

The implementation lives in Qt6CoreMacros so it can eventually be used
in the public facing apis.

The generated meta types file is saved under the target property
QT_MODULE_META_TYPES_FILE.

Change-Id: I03709c662be81dd0912d0068c23ee2507bfe4383
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-12-04 10:48:06 +00:00
Qt Forward Merge Bot
ad4ef9836c Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ib8357609b37b7cc22b51c27602ba60c69bf91da9
2019-11-29 01:01:08 +01:00
Friedemann Kleint
0c4e502b56 androidtestrunner: Fix warnings about missing parameter to QStringLiteral
Use QString instead, fixing:
src\tools\androidtestrunner\main.cpp(474): warning C4003: not enough arguments for function-like macro invocation 'QStringLiteral'

Change-Id: I88b8c0f1dfa7828460e8952510e3d4150ab68896
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-11-28 11:19:16 +01:00
Leander Beernaert
43f341a137 Moc Sort json file list in collectjson
This patch ensures that the list of input files are sorted before being
collected. This provides consistency when comparing results generated
from the CMake port which do not have the same order as qmake.

Change-Id: I46e3acf7c26dfd21fd0c1196bdeddf22acbf6ba5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-11-27 10:59:58 +01:00
Friedemann Kleint
719ad1db55 uic: Migrate from QList to QVector
Replace QList by QVector in the ui4.cpp/.h files and replace
occurrences in remaining code.

Change-Id: I15913710b339ef1ef5f7e3c72a7a1be69a87079b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-11-26 15:13:47 +01:00
Leander Beernaert
1c655fb0fc Post merge fixes
Change-Id: I78d3c9687f99c0a32da04257e297e88ef0b02581
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-25 14:53:27 +00:00
Qt Forward Merge Bot
58c69df4d3 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qhash.h
	src/gui/kernel/qevent.h
	src/widgets/kernel/qshortcut.cpp
	src/widgets/kernel/qshortcut.h

Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
2019-11-25 11:30:04 +01:00
Leander Beernaert
26e8769124 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
2019-11-19 13:53:21 +01:00
Qt Forward Merge Bot
adc7bbe910 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/gui/rhi/qshader.cpp
	tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp

Change-Id: I1c4ae718eb3592a0a0a90af9d11553f3ab68cad5
2019-11-15 16:29:40 +01:00
Alexandru Croitor
e9a58ba9e5 Regenerate src/*
Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-14 09:05:48 +00:00
Friedemann Kleint
0ec40c21c1 uic: Update ui4.cpp/h sources
Apply changes from qttools/4235774262f633da196a192248dbacf4f67f085e.

Task-number: QTBUG-79896
Change-Id: I49466980a7c5983f57d4948386b15e8fcec82343
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-11-14 08:46:14 +01:00
Friedemann Kleint
f2cc6fd4a0 uic: Remove some usages of QList
Task-number: QTBUG-79896
Change-Id: I298a434040fa903509685b7cde82bbea722f3246
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-11-13 17:05:23 +01:00
Andy Shaw
2735c5bf06 Add support for passing qrc files to qmlimportscanner
With the qrcFiles entry in the deployment JSON for Android, it can now
pass this on to qmlimportscanner for scanning the qrc files for the
available imports. This enables qmake to populate the qrc files it has
referenced in the project, be it generated by qmake or added by the
user.

Task-number: QTBUG-55259
Change-Id: Ic512ce6f24508b3ea09ebdd07ac4446debfd9155
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-13 14:00:39 +01:00
Alexandru Croitor
cb6f92c481 Regenerate everything under ./src
Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-11-12 17:27:29 +00:00
Alexandru Croitor
e6a845ad88 Regenerate a bunch of projects after pro2cmake changes
Change-Id: I675a068411785364915a074ca0e631fec944d228
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-12 13:16:08 +00:00
Lars Knoll
5357231c0a Make QList an alias to QVector
This is almost 100% source compatible with Qt 5. Exceptions are

* Stability of references for large or non movable types
* taking a PMF for types that are now overloaded with r-value references
  in QVector
* The missing prepend optimization in QVector (that is still planned
  to come for Qt 6)

Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-30 11:52:48 +01:00
Qt Forward Merge Bot
8bcecd86fa Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I182a639748760393f9e6b0724259201588aeaae3
2019-10-27 01:00:50 +02:00
Qt Forward Merge Bot
7b3bdcbfe8 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
2019-10-26 01:01:32 +02:00
Qt Forward Merge Bot
86e74d60d2 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I208a36bf1c88c8291baaa5ca8fe8e838bc9d7aea
2019-10-26 01:01:14 +02:00
Cristián Maureira-Fredes
968cc365d2 uic: Add language::eol in more cases for python code
Change-Id: I0ab4b37399d3fba6d27cf90cab22676a3c599e5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-25 15:53:13 +02:00
BogDan Vatra
b5b9eb68c4 Fix typo
Change-Id: I9a429805414fb50aa059677beb5f8f8a48b72d9b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-25 07:03:37 +03:00
BogDan Vatra
1ce71a6a11 Fix bundled_libs section from libs.xml
Fixes: QTBUG-79376
Change-Id: If7681365110341379913ae46a96a2f2296197b8f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-25 07:01:32 +03: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
Qt Forward Merge Bot
563dc21c51 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ic062a5bd62621877b17cc0d47303b3c879241385
2019-10-22 01:00:49 +02:00
Ulf Hermann
35adb74ddd Reimplement JSON support on top of Cbor
In turn, deprecate the QJsonDocument methods that deal with JSON binary
data. You should use CBOR for data serialization these days.

[ChangeLog][Deprecation Notice] The binary JSON representation is
deprecated. The CBOR format should be used instead.

Fixes: QTBUG-47629
Change-Id: Ic8b92ea36de87815b12307a9d8b1095f07166db8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-21 19:12:51 +02:00
Christian Ehrlicher
aa4b0f5cb7 Uic: fix crash when trying to resource icon information
Fix a typo introduced in be56db2c49 to
avoid a crash when a pixmap is given for selected on but not for
selected off.

Fixes: QTBUG-79125
Change-Id: I84072b6b4e8a4d21684be21f5bff1deeaddbba6d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-21 09:48:30 +02: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
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
Alexandru Croitor
190e9dcdcf Regenerate files after dev -> wip/cmake merge
Note the following bigger things that had to be done:
Handle GSS library / feature with a new custom find module.
Implement rudimentary support for relocatability (does not currently
handle extprefix).

Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-14 19:01:19 +00:00
Friedemann Kleint
05a829f923 Win32: Consolidate registry code
Add a RAII class for registry keys and use it throughout
the code base.

Change-Id: I666b2fbb790f83436443101d6bc1e3c0525e78df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-14 20:26:42 +02:00
Alexandru Croitor
440286655e Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
2019-10-14 17:46:34 +02:00
Alexandru Croitor
b6e75ff3ea Regenerate qtbase after wip/qt6 -> wip/cmake merge
Note that android builds will be broken after this merge and
regeneration, because we don't currently handle the minimum required
changes that were brought in with the Android multi ABI support
that comes from 5.14.

This will have to be addressed in a separate change.
For now the build on Android will fail while compiling due to incorrect
generation of LIB_SUFFIX with QT_ARCH.

Change-Id: Ia4a871f4b7ddd0da11caf5f34e10a599a97bb55d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-14 08:49:24 +00:00
Qt Forward Merge Bot
e164d61ca8 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I129dd579f92cb2592a38ca043472b45cb926ae12
2019-10-14 01:00:34 +02:00
Qt Forward Merge Bot
8d8140dffa Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9953c1ca16862184c2373027e946c482ce8e6f0e
2019-10-13 01:00:43 +02:00
Alexandru Croitor
f4b4c4f79b Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
2019-10-11 16:23:19 +02:00
Liang Qi
9c84b7786c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/plugins/platforms/xcb/qxcbscreen.h
	src/src.pro

Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
2019-10-10 09:13:49 +02:00
Milian Wolff
2d7ec5922a Fix compile with tracing enabled: include QStringList header
Change-Id: I40f737338d10a871442bb453fe1eeede9dacec79
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-09 16:19:17 +02:00
Alexandru Croitor
4c06abb8dc Regenerate tools projects
Change-Id: I69a56ca2bd1d5f983197c6cde400c191c5dc7bd9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:09:38 +00:00
Simon Hausmann
a48a3e95cf Clean up tinycbor handling
Now that pro2cmake handles the include path resolution more like qmake,
the tinycbor wrapper target is not needed anymore.

Re-generated some CMakeLists.txt to complete that step.

Change-Id: I032b2e9bdf9e26f63f3c550d7bca5df93369a82a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 09:49:07 +00:00
Alexandru Croitor
cb90784eb1 Regenerate qmake and bootstrap projects
Change-Id: I6649a58752309a346bc03271f17fe80d0b727be3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 22:45:53 +00:00
Lars Knoll
4c571032f8 Add support for slots to receive the raw void ** arguments array
This is currently being used by dbus und our state machine framework,
and supported by hand editing moc generated code.

Get rid of that hack, and instead add support to moc to forward
the raw arguments array to the slot.

Change-Id: I0e36626f91eb01041464e6d931dc1d4660de91d2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-07 20:40:51 +02:00
Qt Forward Merge Bot
2c4b44d750 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ife31dad3c8dc43c5ff4d266e6d646230c5d20a50
2019-10-06 01:01:08 +02:00
Qt Forward Merge Bot
327b305e95 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
2019-10-05 01:01:06 +02:00
Simon Hausmann
da284ef10e Add support for machine-readable JSON output to the MOC
The --output-json parameter will make moc produce a .json file next to
the regular output file. With --collect-json the .json files for a
module can be merged into a single one.

Task-number: QTBUG-68796
Change-Id: I0e8fb802d47bd22da219701a8df947973d4bd7b5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-04 18:35:29 +02:00
Liang Qi
96a2044009 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplyhttpimpl.cpp

Change-Id: I059be651604623616fd31e8616be8ae61b4f8883
2019-10-04 15:27:15 +02:00
Edward Welbourne
0118e2e915 Include likely-adjusted uiLanguages for the system locale
QLocale::uiLanguages() on the system locale uses whatever the system
locale's query(QSystemLocale::UILanguages,...) returns. On Android,
this is just a list of locales. However, for non-system locales, we
also include some results of removing likely sub-tags from the locale
name, where equivalent. Thus zh-CN would also get zh and zh-Hans-CN
added to it; however, if the system locale is zh-Hans-CN, the shorter
forms are omitted. So post-process the system locale list in the same
way, albeit tweaked to avoid duplicates and rearranged so that we can
insert likely-adjusted entries between what they adjust and what
followed it.

Added QLocalePrivate::rawName() in the process, since it looks likely
to be useful in other contexts (and I needed its value): it just joins
such tags as are non-Any. This, however, uses QByteArrayList, so added
that (it's small) to the bootstrap library and qmake.

This follows up on commit 8796e3016f.

[ChangeLog][QtCore][QLocale] The system locale's UI languages list now
includes, as for that of an ordinary locale, the results of adding
likely sub-tags from each locale name, and of removing some, where
this doesn't change which locale is specified. This gives searches for
translation files a better chance of finding a suitable file.

Fixes: QTBUG-75413
Change-Id: Iaafd79aac6a0fdd5f44aed16e445e84a2267c9da
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-04 15:16:15 +02:00
BogDan Vatra
c8b07f7da3 Android: Do not extract QML assets data
Instead to extract the assets QML file, we create a .rcc bundle file
which is register by android qpa plugin before the it invokes the main
function. Thsi way we avoid extracting the QML files from assets as they
can be accessed directly from resources.

[ChangeLog][Android] Instead of bundling QML resources in assets
and extracting them on first start, Qt now creates an .rcc file
and register it before invoking the main function.

Change-Id: Icb2fda79d82c5af102cc9a0276ff26bb0d1599e8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-02 15:00:35 +00:00
BogDan Vatra
fcb78b5000 Android: Fix plugins naming
Android 5 doesn't extract the files from libs folder unless they are prefixed with "lib".
This patch sets a proper name for the plugin which will make gdb happy and it will also
avoid any name clashes.
If we rename the plugins when we copy them, gdb won't find them, therefore it can't load their
symbols.
On Android all the libs are in a single folder, so to make sure we don't have any name clashes,
we are prefixing the plugin name with it's relative path to qt folder (we replace / with _).

Fixes: QTBUG-78616
Change-Id: I7e0e67d65448532769d69f46b1856c029e2cf5cb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-01 11:36:24 +03:00
Simon Hausmann
e3888dd932 Merge remote-tracking branch 'origin/wip/qt6' into dev
Conflicts:
	src/gui/image/qpicture.cpp

Change-Id: Iecf79f96f54dc23bd703e6c4c634f909b796d7b3
2019-09-18 08:30:11 +02:00
Qt Forward Merge Bot
caf123a288 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ib6649a412e131bf679aab97c4c384520af348b4f
2019-09-06 09:44:10 +02:00
Alexandru Croitor
f255b1e8e2 Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I54741635460bb2d8f3fd0be535ee1968d6c442bb
2019-09-04 14:33:40 +02:00
Alexandru Croitor
098d7549c1 Android: Fix architecture extraction from file path in androiddeployqt
The regular expression was too greedy with the ".*" sub-expression,
thus if the prefix path contained underscores, the extracted
architecture value was wrong.

Example prefix:
~/dev/qt/qt514_built_android/qtbase

Example captured architecture:
built_android/qtbase/plugins/platforms/android/libqtforandroid_x86

First extract the file name from the given path, and then match
on just the file name.

Change-Id: I8e56e56747096c7a2398e959d91c2d1f65de2495
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-09-03 16:44:08 +02:00
Qt Forward Merge Bot
d2db94cc54 Merge remote-tracking branch 'origin/5.14' into dev
Change-Id: I10ca9b20c26838800c654103951367a36af3ee30
2019-09-03 01:01:24 +02:00
BogDan Vatra
c9f8893000 Add support for aab
Change-Id: I4814a51b25d5e3953e5e1c71d9a0e1bf3fed7385
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-09-02 18:32:13 +03:00
Leander Beernaert
a5ba29b79d Add support to override Qml Import Scanner binary to androiddeployqt
This patch is required to properly support the CMake port of Qt. With
CMake we have to build the host tools separately. When androiddeployqt
attempts locate the qmlimportscanner binary it is unable to do so,
since its not build.

This patch adds the --qml-importscanner-binary option to androiddeployqt
and it also allows the optio to be set via the qml-importscanner-binary
setting in the deployment configuration file.

Change-Id: I5393340bc1bc3e8fedae69f8bc3eb5adfe7dbfd7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-30 14:47:16 +02:00
BogDan Vatra
4cc3615b4e Use QLatin1String where possible
Change-Id: I8f94ba4880bcac735e4445d71f0e22774d9f78eb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-28 07:38:48 +03:00
Liang Qi
0f1f7fb97f Merge remote-tracking branch 'origin/dev' into 5.14
Conflicts:
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	src/widgets/kernel/qwidgetrepaintmanager.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
2019-08-27 09:45:52 +02:00
BogDan Vatra
5bb178c479 Say hello to Android multi arch build in one go
Multi arch build in one go is need to support the new .aab packaging format.

By default the users apps are built for all Android ABIs: arm64-v8a armeabi-v7a x86_64 x86
The user can pass ANDROID_ABIS to qmake to filter the ABIs during development,
e.g. qmake ANDROID_ABIS="arm64-v8a armeabi-v7a" will build only for arm ABIs.

[ChangeLog][Android] Android multi arch build in one go,
needed to support the new .aab packaging format.

Change-Id: I3a64caf9621c2a195863976a62a57cdf47e6e3b5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-26 12:59:15 +03:00
Jan Arve Sæther
529b271520 Don't excessively check all output files for failures
This is really just an optimization, but I suspect the author of the code
assumed that the bitwise &= operator short-cicuits. (It doesn't). So this
patch should then fix the code to have the intended behavior.

We don't have to check for failures in the remaining output files once
we've found one. pullFiles() returns just a bool indicating if one of the
output files has a recorded fail, so checking the remaining output files
after the first found failure is just a waste (and ideally they should
contain the same failure (however, flaky tests might break this ideal)).

Drive-by fix.

Change-Id: I951e500a69198e7ed124be32199ac81bbddb9bf7
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-08-22 11:21:38 +02:00
Soroush Rabiei
aa8393c94f Add support for calendars beside Gregorian
Add QCalendarBackend as a base class for calendar implementations and
QCalendar as a facade via which to access it.

QDate's implicit implementation of the Gregorian calendar becomes
QGregorianCalendar and QDate methods now support choice of calendar.

Convert QLocale's CLDR data for month names to a locale-data component
of each supported calendar and relevant QLocale methods now support
choice of calendar. Adapt Python scripts for locale data generation to
extract month name data from CLDR (keeping on version v35.1) into the
new calendar-locale files. The locale data for the Gregorian calendar
is held in a Roman calendar base, for sharing with other calendars.

Add tests for basic uses of the new API.

[ChangeLog][QtCore][QCalendar] Added QCalendar to support diverse
calendars, supported by implementing QCalendarBackend.

[ChangeLog][QtCore][QDate] Allow choice of calendar in various
operations, with Gregorian remaining the default.

Done-with: Lars Knoll <lars.knoll@qt.io>
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Fixes: QTBUG-17110
Fixes: QTBUG-950
Change-Id: I9d6278f394269a183aee8156e990cec4d5198ab8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-20 13:41:21 +02:00
Daniel Smith
f5c118b6b8 Fix escaping of additional app parameters in adb shell command
Change-Id: I80e5b98efbc9654c684b3d78ba0d6688c21bd0f3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-08-19 18:22:57 +02:00
Alexandru Croitor
c7ec7cd2a1 Merge branch 'wip/qt6' into wip/cmake
Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
2019-08-15 16:53:19 +02:00
Liang Qi
1dade1bd8a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	mkspecs/win32-clang-msvc/qmake.conf
	src/corelib/tools/qlist.h
	src/gui/painting/qcompositionfunctions.cpp
	src/gui/painting/qtriangulator_p.h
	src/gui/text/qfontengine_p.h
	src/network/kernel/qhostinfo_p.h
	src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp

Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
2019-08-13 09:46:17 +02:00
Allan Sandfeld Jensen
ae83398d82 Kill all QPictureIO
Has been deprecated for a long time.

Change-Id: I4579e3c2997c649f0fa66b9cdbcf8e7fc6d661a5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-12 10:56:52 +02:00
Lars Knoll
6f357f50b4 Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: Ib719a6249069e6bd6c9311bbec7f364855ab82ff
2019-08-06 12:24:37 +02:00
Liang Qi
f3b28e8021 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	qmake/generators/unix/unixmake2.cpp
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: Iba7aa7324f35543e0297a3680956420058cd3630
2019-08-05 09:28:48 +02:00
Marc Mutz
9ad8debe38 qlalr: fix compilation with C++20
std::not1 is deprecated in C++17, removed in C++20.

Use its replacement, std::not_fn.

Change-Id: I37d4929c81c2a5befeb44f954ae77b23960d2ff0
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2019-08-01 11:20:27 +00:00
hjk
4fa0b41523 uic: Avoid use of Q_UNUSED in the generated code
Instead, use (void)x; directly.

The current use of Q_UNUSED(x); generates warnings for an
empty statement the expansion of Q_UNUSED contains a semicolon
already.

Emitting Q_UNUSED(x) without the extra semicolon would be
an option, too, but as the future of Q_UNUSED's embedded
semicolon seems unclear right now, avoid its use altogether.

The change affects only generated code that's barely ever
read by a human, so the overall utility of "improved readability"
of Q_UNUSED in that place is questionable anyway.

Change-Id: I332527ed7c202f779bd82290517837e3ecf09a08
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-07-30 09:34:36 +02:00
Tasuku Suzuki
f0f46ade9e Fix SOURCES duplication in tools/bootstrap on macOS
Three *_unix.cpp are added twice for unix and for mac

Makefile:14766: warning: overriding commands for target `.obj/
qfilesystemengine_unix.o'
Makefile:14037: warning: ignoring old commands for target `.obj/
qfilesystemengine_unix.o'
Makefile:14913: warning: overriding commands for target `.obj/
qfilesystemiterator_unix.o'
Makefile:14184: warning: ignoring old commands for target `.obj/
qfilesystemiterator_unix.o'
Makefile:15071: warning: overriding commands for target `.obj/
qfsfileengine_unix.o'
Makefile:14342: warning: ignoring old commands for target `.obj/
qfsfileengine_unix.o'

Change-Id: Ia5f9d2873f738081c2d1e763efbdfc64209aaf7d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-07-19 23:18:53 +09:00
Thiago Macieira
9b8493314d Qt6: Fix uninitialized meta objects on Windows
Windows has a problem relating to cross-DLL variable relocations: they
are not supported. Since QMetaObject's link to the parent class is done
via a pointer, every QMetaObject in a DLL or in the EXE that derives
from a class from another DLL (such as QObject) will be dynamically
initialized.

This commit changes the meta object pointers in QMetaObject::d from raw
pointers to a wrapper class SuperData, which is almost entirely source-
compatible with the pointer itself. On all systems except for Windows
with Qt 6, it's binary compatible with the current implementation.

But for Windows with Qt 6, this commit will store both the raw pointer
and a pointer to a function that returns the QMetaObject, with one of
them non-null only. For all meta objects constructed by moc, we store
the function pointer, which allows the staticMetaObject to be statically
intialized. For dynamic meta objects (QMetaObjectBuilder, QtDBus, QtQml,
ActiveQt), we'll store the actual raw pointer.

[ChangeLog][QtCore][QMetaObject] Some internal members of the
QMetaObject class have changed types. Those members are not public API
and thus should not cause source incompatibilities.

The macro QT_NO_DATA_RELOCATION existed in Qt 4 but was called
Q_NO_DATA_RELOCATION and only applied to Symbian. It was removed in
commit 24a72c4efa ("qglobal: Remove
symbian specific features").

Task-number: QTBUG-38876
Fixes: QTBUG-69963
Change-Id: Id92f4a61915b49ddaee6fffd14ae1cf615525e92
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-16 18:34:41 -07:00
Alexandru Croitor
4dac45c9ee Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
2019-07-11 17:17:51 +02:00
Edward Welbourne
a9aa206b7b Move text-related code out of corelib/tools/ to corelib/text/
This includes byte array, string, char, unicode, locale, collation and
regular expressions.

Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-10 17:05:30 +02:00
Alexandru Croitor
3622ebaac5 Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I02cbc4f77a82100b96cdb90c160ce0207f180d7f
2019-07-08 13:20:48 +02:00