Commit Graph

59220 Commits

Author SHA1 Message Date
Lu YaNing
d84d7d36af Clean up dead code
Amends commit ce73b4db62

Change-Id: I4ed0fc817882e06b16aa9eed959d4a10730d37ac
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-10 22:40:28 +08:00
Alexandru Croitor
0f5af511ea Revert "coin: Build qmake examples in non-qtbase repos"
This reverts commit 3cb3218797.

Reason for revert: Breaks in qtdeclarative

Change-Id: Iefe2954826bca80ebb2aecb8e8d8367290c218d0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-10 10:50:20 +00:00
Alexey Edelev
a02750d12f Isolate freetype feature
If freetype feature is not enabled we don't deliver its header
files as part of Qt. The freetype font database was used
as the generic fontdata base for unix platforms. This uses
QPlatformFontDatabase as the generic one if neither fontconfig
nor freetype features are enabled.

Fixes: QTBUG-109270
Change-Id: I9e935fd1557db417eb94d44b6a0d88818d567fbe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-10 11:44:39 +01:00
Fabian Kosmale
b9c80ecc08 CMake: Add qt 'policy' support
This mimics CMake's policy support. The policy state is stored in an
internal __QT_INTERNAL_POLICY_<policy> variable; by using normal
variables, we gain support for stacking for free.
Policies can be explicitly en- or disable via qt6_policy; that command
also has a GET mode to retrieve them again.
Furthermore, one can now pass min and max version to
qt6_standard_project_setup, to opt in to a certain set of defaults
introduced in a given Qt version.

We add support for policies in QtModuleHelpers, so that we can check for
known policies while building Qt itself.

No actual policies exist yet; but a follow up commit will introduce one
for qt_add_qml_module.

Change-Id: I57a0404c9193926dd499f94cc5f73e359355c0b3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-10 10:43:38 +00:00
Amir Masoud Abdol
8aae821b5a Fix for misplacement of the qt-cmake-standalone-test in -developer-build
Amend d77ce33082

Change-Id: Idab13c45b15b07e10bee47fff20481581d22dfac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-10 11:43:08 +01:00
Assam Boudjelthia
f3c998510d Fix infinite loop when iterating content uri sub-files/dirs
make QAbstractFileEngineIterator::currentFilePath() virtual
and implement it under AndroidContentFileEngine to return
current fileName because content uris shouldn't be constructed
manaully like normal file paths.

Pick-to: 6.4 6.2
Fixes: QTBUG-104776
Change-Id: I4643a73a3bd4019bedaa056c35468117bcec18dc
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-12-10 07:40:11 +02:00
Edward Welbourne
2f440169c0 Adapt to QTimeZone replacing Qt::TimeSpec usage
In the process actually handle all time-spec cases in various places
that only handled UTC or LocalTime, or at least note that they don't
where that's not practical. Also tidy up header ordering and ensure
QDateTime's header is included wherever it's used, while adding the
include for QTimeZone where needed.

Task-number: QTBUG-108199
Change-Id: Ic1a5cdf0aaf737bf1396aa8ac58ce2004cef7e19
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-10 06:39:44 +01:00
Edward Welbourne
8c8d6ff7b6 Deprecate QDateTime methods using plain Qt::TimeSpec
As foreshadowed when QDateTime adapted to route all QTimeSpec use
through QTimeZone, this commit deprecates the old API in favor of the
newly more capable QTimeZone-based API.

Fixes: QTBUG-108199
Change-Id: I9a3f9f94d4a5d8cc229db72b3e4731a9e318a076
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-10 06:39:33 +01:00
Volker Hilsheimer
074a4e16a3 Windows: Enable dark mode system palette by default
Can be overwritten by setting the "darkmode" parameter of the QPA
platform to 0 or 1. The Windows Vista style (which is the
default on Windows) will overwrite the platform theme's palette with the
light system palette (see a2518b4140), but
styles that support rendering in dark mode will just run with the dark
palette.

More work needed in qtdeclarative to make the Qt Quick native style for
Windows also overwrite the palette, and to handle palette changes in Qt.

[ChangeLog][Windows] Qt applications that use a style that supports
dark mode rendering (such as the classic Windows or Fusion styles) will
respect the dark appearance setting on Windows. Applications that use
the Vista style, which doesn't support rendering in dark mode, will
use the light system palette. On dark mode systems, the window frame
will be dark if the palette is dark.

Task-number: QTBUG-72028
Change-Id: I416b4fd59eb3f64701b403984c7ac2359536abbe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-10 06:39:05 +01:00
Volker Hilsheimer
12b7eab4d2 Detach event points when cloning pointer events
Input events that originate from actual device interaction should reflect the
device's state, and device and events need to be kept in sync so that event
sequences (such as multi-touch events, where we have begin/update/end cycles
spanning multiple events) are working correctly.

For that reason, the event point data in pointer events is explicitly shared,
and we only detach in exceptional situations. This saves us memory allocations,
and makes sure that the event point data carried by events, and the event point
data stored persistently in the device, are kept in sync.

Cloned pointer events do not originate from device interactions, and should
therefore not sync back to the device. E.g. accepting a clone should not modify
the original event data stored in the device. There are exceptions here as
well, e.g. when cloning an event in Qt in order to deliver a translated version
of it to a different scene. Different points might even get delivered to
different scenes or windows, or at least different items in the same scene. For
that reason, we explicitly detach, and then explicitly write back the relevant
states after the cloned event has been delivered.

But in general, we should assume that cloned events do not write back to the
device. Since QEventPoint is an explicitly shared data type that never detaches
itself, we have to explicitly detach it when making copies that should not be
shared.

The ideal implementation of this would be to do the detach in the copy
constructor of QPointerEvent, which is called when cloning. However, Qt itself
makes copies of QPointerEvent without using clone, e.g. when assembling lists
of touch events for the different subscenes or windows in
QGuiApplicationPrivate::processTouchEvent, where event objects are added to a
QVarLengthArray<QMutableTouchEvent>. This makes copies, and those copies must
not detach.

So we have to implement the special cloning behavior in each override of
QPointerEvent::clone(). For this, introduce a dedicated macro for the common
member functions. This macro must be used for QPointerEvent subclasses.

Fixes: QTBUG-107560
Change-Id: I4b56f9e71c7d067ba9054a2a631e8ba5bc7b1ab9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-12-10 06:38:58 +01:00
Mate Barany
585f2a31c6 QXmlStreamWriter: port API from QString to QAnyStringView
QXmlStreamWriter is basically a fancy way to append to a
string, not saving any of them individually, so this API
is a perfect candidate for replacing all of the QStrings
with QAnyStringViews.

[ChangeLog][QtCore][QXmlStreamWriter] Ported API to
QAnyStringView (was: QString).

Fixes: QTBUG-103302
Change-Id: I9fb1f2d5793cf9f35d468c46c0127d3ebd57f3dd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-10 01:00:27 +01:00
Marc Mutz
bbb01309b4 QXmlStreamWriter: prepare for port to QAnyStringView
The UTF-8 support in Qt is still lacking, so QUtf8StringView doesn't,
yet, have the likes of contains(), endsWith(), etc that the existing
QString code uses in Q_ASSERTs.

Provide free functions that work for UTF-8 haystacks and ASCII needles
by falling back to QByteArrayView or QLatin1StringView.

Also break a replace() use into a series of indexOf() + chunked
write(). This is rather expensive for QString, so port the
writeCDATA() function that uses this to QAnyStringView already, ahead
of the bulk of the changes in Mate's follow-up patch.

Task-number: QTBUG-103302
Change-Id: Ic66261740817ede2600b78a383cf667a31df7bfc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2022-12-10 01:00:23 +01:00
Mate Barany
9addd9a89d Port QXmlStreamWriterPrivate::writeEscaped to QAnyStringView
This is a prerequisite step of porting QXmlStreamWriter to
QAnyStringView.

Task-number: QTBUG-103302
Change-Id: Icdbe3d23bd96461b0ace497ac9995040cfcdb470
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 01:00:18 +01:00
Mate Barany
7241d2fb5a Port QXmlStreamWriterPrivate::writeStartElement to QAnyStringView
This is a prerequisite step of porting the QXmlStreamWriter API to
QAnyStringView.

Task-number: QTBUG-103302
Change-Id: I73383c2b09a4a70bfc23bbc6c6b1d62cb878a6b1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 01:00:13 +01:00
Mate Barany
a0bb64126c Port QXmlStreamWriterPrivate::findNameSpace to QAnyStringView
This is a prerequisite of porting the QXmlStreamWriter API to
QAnyStringView.

Task-number: QTBUG-103302
Change-Id: I1433de66c9aefe6f3e8f7cd8e831718d2db88eb6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 01:00:06 +01:00
Mate Barany
1a1fd1566c Port QXmlStreamPrivateTagStack::addToStringStorage to QAnyStringView
This is a prerequisite of porting the QXmlStreamWriter API to
QAnyStringView.

Task-number: QTBUG-103302
Change-Id: I48eca902a7b8f0e0a52202936947a2b60353f08c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 01:00:02 +01:00
Mate Barany
7741665a9c Port QXmlStreamWriterPrivate::write to QAnyStringView
Replace the const QString &s overload with a QASV
overload.

Remove the const char (&s)[N] and const XmlStringRef&
overloads, with the QASV overload they are redundant.

Leave the const char *s, qsizetype len overload for
now but make it call the QASV overload.

Task-number: QTBUG-103302
Change-Id: I4f92d76248d5b7531472056a51ca06aa25dbac01
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 00:59:56 +01:00
Ievgenii Meshcheriakov
1523714bfa Android: Fix building with non-empty QT_NAMESPACE
Change-Id: I1f0c00fe444a5898ba16c4bcd6a65c388a32a664
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-09 18:14:23 +01:00
Axel Spoerl
b4653636a7 Beautify QApplication::compressEvent
Replace if-statement to check compressable event types with a switch.
Replace if / else if sequence dispatching to type specific compression
code paths with a switch.
Replace iterated for loop with a ranged one.

Task-number: QTBUG-107808
Change-Id: I9054b625f1898fa793f78de1b477a2113a4e33f0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-09 18:14:23 +01:00
Giuseppe D'Angelo
9e75a4cca3 QDomDocument: ensure a defined order of attributes when saving
XML does not impose any semantics based on the order of the attributes;
they're an unordered set. Quoting [1]:

> Note that the order of attribute specifications in a start-tag or empty-element tag is not significant

and [2] 2.2.5:

> An unordered set of attribute information items

Still, using a QHash-based implementation to store attributes is
annoying, because one cannot serialize the document in a stable way.
The order of attributes is going to depend on the QString hash function
(which we can change at any time) and the QHash seed (which is random
and changes at every run). In other words, saving the same DOM will
yield non deterministic outputs. That's annoying for testing,
reproducible builds, and so on.

Switching to an _ordered_ associative container for storing attributes
won't, on its own, ensure any specific ordering. That's because:

* attributes are currently kept associated using their name as the key,
ignoring an eventual namespace prefix;

* there's some convoluted logic that sometimes emits attributes in the
xmlns namespace (to qualify a prefix).

Hence, just go for the straightforward implementation and sort the
attributes before streaming them. In the main loop I could have used a
range-based for loop over the associative container used for attributes;
since it's a Qt container, it would have yielded just the values in the
map, and we are not interested into the keys. However I'm preparing for
further changes down the road, so I'm opting for key/value iteration.

I'm deliberately not offering an opt-out because:

* I don't think this is so expensive to justify an opt-out;
* I'm going to remove QHash anyways in a follow up commit.

[1] https://www.w3.org/TR/xml11/#sec-starttags
[2] https://www.w3.org/TR/xml-infoset/#infoitem.element

Task-number: QTBUG-76800
Task-number: QTBUG-25071
Change-Id: I6282ae2ccbee9c0099f138de48b94bb7c40b3680
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-09 16:29:11 +01:00
Alexey Edelev
6294ee060e Add _qt_internal_apk_dependencies if qt_finalize_project is never called
With CMake versions < 3.19, we don't have a deferred call of
qt_finalize_project. In qt_add_executable we only have immediate
finalizaton call of qt_finalize_executable, but
qt_android_generate_deployment_settings still depends on the
_qt_internal_apk_dependencies target that is created by qt_finalize_project only.
Create an empty target for the cases when we need to generate
deployment setting but qt_finalize_project is never called.

Pick-to: 6.4
Fixes: QTBUG-106634
Change-Id: If0608cb527eea662e0f9dd41f2751fe49ce433db
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-09 16:16:49 +01:00
Joerg Bornemann
3cd19719e5 Fix moc warning for qwineventnotifier.h on non-Windows platforms
Disable AUTOMOC for qwineventnotifier.h on non-Windows platforms.
Add a comment to remove qwineventnotifier.h from non-Windows platforms
for Qt7.

Fixes: QTBUG-107109
Change-Id: I8f769aa764daeb634211aca7114f94b50cc0a85d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-09 16:16:49 +01:00
Joerg Bornemann
1180d5b8a2 CMake: Add Android build information to generated module .json files
Qt Creator maintains a mapping from Qt version to Android NDK version
and other build information. It's simpler to let the Qt build write the
Android build information into modules/Core.json and have Qt Creator use
this information.

This adds the following properties to the module JSON files:
  - built_with.android.api_version
  - built_with.android.ndk.version

Task-number: QTBUG-108292
Change-Id: I0febda5192289c5afb1a098880b31bef6317db35
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-09 16:16:49 +01:00
Joerg Bornemann
8bffcdc52f CMake: Install module JSON files to INSTALL_ARCHDATADIR/modules
The module description JSON files contain architecture-specific
information. Therefore they should reside below INSTALL_ARCHDATADIR
instead of INSTALL_DATADIR.

Moving these files should be unproblematic as there are no known users
of these files.

Change-Id: Ibff1f7b6ce2d1633ebce33861358ad5d1cae2beb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-09 16:16:49 +01:00
Piotr Mikolajczyk
4f0272befb Add possibility to retrieve displayId for Android
When handling multiple screens in Android system it is needed
to have the information about the display's Id. This patch
provides this possibility.

Task-number: QTBUG-105325
Change-Id: Id91aeaa59b17d5a098b672e220a5182b97320703
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-09 16:16:48 +01:00
Allan Sandfeld Jensen
d4eb5d1110 Cleanup short-cut id deprecation
Wasn't marked deprecated in documentation, and was needed for user
construction of QShortcutEvents.

Fixes: QTBUG-109090
Change-Id: Ibf0ad83a57de724d9b88a7e610ba04c2c662983b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-09 16:16:48 +01:00
Timur Pocheptsov
10b5b4cbba QCocoaFileDialogHelper: protect against dangling pointers
NSSave/Open panel is a shared object, that can outlive Qt's counterpart.
While its delegate is a weak property, somehow it can outlive Qt-object,
which _owns_ this delegate, as a result an attempt to emit a signal
on m_helper results in a crash. QPointer can help with such problem.

This is a speculative fix, since we don't have a realible reproducer.

Fixes: QTBUG-109287
Change-Id: Iccc4a063a24e33e0a5c0fd07b3c203d0c17317ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-09 16:16:48 +01:00
Mårten Nordheim
4af5f0b983 TLS[openssl]: Bump minimum warning level to Critical on Win/macOS
On these platforms there is a platform-native plugin that can be used
instead. If, as has happened, a developer uses the OpenSSL backend
without OpenSSL being available they may be confused by the output of
OpenSSL without it being of any concern.

Leave the warning level low on other platforms since they have nothing
to fall back to.

Pick-to: 6.4.2 6.4 6.2
Change-Id: Ic36a0429a9e8eed728aa59ec9e028626d6579de1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-09 16:16:48 +01:00
Edward Welbourne
5da038ab51 Port QDateTimeEdit internals to QTimeZone
In the process, centralize the creation of date-time values, where
doing so requires catching invalid results caused by spring-forward
gaps; this saves some repetition and extends the treatment to more
places that did need it. Also, de-inline two overrides of virtuals;
being inline does them no good.

Replace the Qt::TimeSpec member of QDTEPrivate with a QTimeZone so
that creation of values can be streamlined and to make it easier to
add support for (currently unsupported) OffsetFromUTC and TimeZone
timespecs in the public QDTE API.

This greatly simplifies a lot of the code, while preparing it for a
long-needed extension to its functionality.

Task-number: QTBUG-80417
Task-number: QTBUG-108199
Change-Id: I0ac2c78025013bf89899e3ef1a56e89392f67ce5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-09 16:16:48 +01:00
Edward Welbourne
3f282e8896 Adapt corelib to use QTimeZone in place of Qt::TimeSpec
This saves (mostly in corelib/time/) some complications that used to
arise from needing different code-paths for different time-specs.

Task-number: QTBUG-108199
Change-Id: I5dbd09859fce7599f1ba761f8a0bfc4633d0bef9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:48 +01:00
Edward Welbourne
e71099989e Add QDateTime::currentDateTime(const QTimeZone &)
This unifies currentDateTime(void) and currentDateTimeUtc(), adding
the missing equivalents for a time-zone or fixed offset from UTC.
In the process, make the documentation less wordy.

[ChangeLog][QtCore][QDateTime] currentDateTime() now accepts a
QTimeZone parameter to select the time representation to use for the
result.

Task-number: QTBUG-108199
Change-Id: I761c4bc050cc671c1c767d707f6d2dd85cc1ac0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:48 +01:00
Edward Welbourne
e4a1705a8d Expand testing of QDateTime to exploit QTimeZone's handling of specs
For now, just addDays() and the springForward() test, as proofs of
concept for future work to be more systematic.

Change-Id: Id2c4e9ad304d3aef6fdfb48ae6328df8c638c934
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:47 +01:00
Timothée Keller
832a337831 Windeployqt: change platform plugin base filter
Add infix to "qwindows" for platform plugin search if it exists, to
account for libinfix builds

Task-number: QTBUG-105820
Pick-to: 6.4
Change-Id: I7a3c671fb6cdb4a216f6f4bffb445add4f8e0c83
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-12-09 16:16:47 +01:00
Edward Welbourne
f46c18c627 Adapt QDateTime to route QTimeSpec uses via QTimeZone
Free most APIs using QTimeZone from feature timezone and route all
APIs taking a naked QTimeSpec via these, in preparation for their
eventual deprecation. Since qtimezone.h includes qdatetime.h (and MSVC
blocks our ability to remove the need for that), qdatetime.h's
declarations can't use a default value for QTimeZone parameters; so
add overloads taking no zone (or spec) to handle that.

[ChangeLog][QtCore][QDateTime] All QDateTime APIs involving a
Qt::TimeSpec can now be routed via QTimeZone's lightweight time
description support, saving the need to have different code paths for
different time specs. In the process, QDateTime gains a
timeRepresentation() method to return a QTimeZone reporting the
(possibly lightweight) time description it uses. (The older timeZone()
method always returns a non-lightweight QTimeZone, whose timeSpec() is
Qt::TimeZone.)

Task-number: QTBUG-108199
Change-Id: I23e43401eb2dbe9b7b534ca6401389920dd96b3c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:47 +01:00
Edward Welbourne
ae6186c7e8 Adapt QTimeZone to handle Qt::TimeSpec machinery
[ChangeLog][QtCore][QTimeZone] QTimeZone is now always defined;
feature timezone now controls most of its prior API and some new API
is added, most of it always present, to enable QTimeZone to package a
Qt::TimeSpec and, for Qt::OffsetFromUTC, its offset. Prior to this
change, APIs using Qt::TimeSpec had to provide a separate function
taking a QTimeZone alongside a function taking a Qt::TimeSpec and
optional offset; it will now be possible to unify these into a single
function taking a QTimeZone. Adaptation of other Qt classes to do so
shall follow.

Task-number: QTBUG-108199
Change-Id: If5ec3cc63920af882ebb333bf69cde266b1f6ad7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-09 16:16:47 +01:00
Edward Welbourne
ab15c02991 Add a note on the meaning of offsets from UTC to QDateTime
Change-Id: Iad29c26fcac10e0db0cf3b092ef670e8ce80bf46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:47 +01:00
Edward Welbourne
2c2010ddfe Fix some more details in QDateTime documentation
It also needs a mention of the ICU escape hatch from MS's borked zone
data. There were a couple more "UTC start of 1970" phrasings to update.
The difference between 01:59:59 and 03:00:00 is only a second, not a
minute, when a spring forward skips 02:*:*.
Clarify documentation of copy assignment.

Change-Id: Id177733d5702a1d104ab8cc49008c844170276d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:47 +01:00
Edward Welbourne
89777803c8 Fix ordering of includes in qdatetime.cpp
Last two entries were the wrong way around.
Inclusion of "qplatformdefs.h" was spurious.

Change-Id: Ida445471d76ff72154d8bcd95900b5df7d32e1ac
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:46 +01:00
Assam Boudjelthia
633ab16bc8 CMake:Android: copy templates, bindings and gradle files pre_build
At the moment when doing a non-prefix build and changing some of those
files, CMake will not update the changes to the build folder unless
done manually or a re-configure is done manually.

qt_copy_or_install() only does copy those files at configure time once,
and using CMAKE_CONFIGURE_DEPENDS would be an overkill here and even
a bit of an extra annoyance, so in this case having a custom command
seem to be suitable.

Done-with: Alexey Edelev <alexey.edelev@qt.io>
Change-Id: I55aa9e9d3eea32a4bb54c64abd4cbdcb891c44b6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-09 15:25:02 +02:00
Amir Masoud Abdol
fd6b136337 Do not make versioned hard-links when -developer-build
Amends ca24ee14df

Fixes: QTBUG-109271
Change-Id: I19065078fb23581bf552e44d8fef57d4a5d36eaa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-09 12:21:54 +01:00
Morten Sørvig
0b6db3b8be wasm: Fix qmake build
Add missing '\' on multiline variable assignment.

Sync EXPORTED_METHODS with cmake build.

Change-Id: I8c790c5f8a7bdae75d6b3e3d6e4482f6c69ecbe8
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2022-12-09 12:21:54 +01:00
Kai Köhne
486c8aae62 Doc: Change links from froglogic to qt domain
Pick-to: 5.15 6.2 6.4
Change-Id: Ic249f8dfa168948eddc83f35314708ffb40e75b1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-12-09 11:40:49 +01:00
Alexandru Croitor
3cb3218797 coin: Build qmake examples in non-qtbase repos
COIN_CONFIGURE_ARGS would only contain -make examples in qtbase
builds. In other repos it would use values like
NON_QTBASE_CONFIGURE_ARGS, which would not contain -make examples.

Check CONFIGURE_ARGS and TARGET_CONFIGURE_ARGS which are guaranteed to
contain -make examples when building any repo.

Amends 440438092b

Change-Id: I9bf086f8104da85ed8ece335a45c6628ea591f2a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-09 10:51:54 +01:00
Alexey Edelev
85b941f425 Remove CMake version check when adding _lib_pri to ALL
It looks like adding dependencies to interface libraries is either not
fixed or broken in CMake versions newer than 3.20. Remove the CMake
version check to ensure that 'lib_pri' targets are executed. This will
restore the initial behavior.

Amends cfcc4ef8ed

Pick-to: 6.2 6.4
Fixes: QTBUG-109240
Fixes: QTBUG-109239
Change-Id: I8c5b317fcdd0a715a1a668b4e955df1acfe4be8b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-09 10:51:54 +01:00
Yuhang Zhao
0c173cc8bc Windows QPA: fix indentation
Amends commit a94dcc3125

Change-Id: I1a84ee520ce698e0581a77a15f5f3f381dfa3ede
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-09 14:22:38 +08:00
Marc Mutz
50a0c4f3ce QString: fix append/prepend/insert/op+= with QT_RESTRICTED_CAST_FROM_ASCII
Since adding the QUtf8StringView overloads, calling these overload
sets with const char string literals became ambiguous in
QT_RESTRICTED_CAST_FROM_ASCII builds (both QString and QUtf8StringView
are a match).

Fix by providing the same templated overloads that
QT_RESTRICTED_CAST_FROM_ASCII enables for QString construction and
assignment for append/prepend/insert/op+=, too.

Incidentally, this makes these operations much faster than when they
constructed a temporary QString.

Change-Id: Ie9b38fc80cc00e142e094dab716938c6fda41ba1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-09 07:22:13 +01:00
Marc Mutz
1ecbab76b6 QOffsetStringArray: add contains() method
... use it in QNetworkReplyWasmImpl.

Change-Id: I648f02fcafda43af7ed9771cc1c7e2e2a6d38504
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 06:22:06 +00:00
Marc Mutz
4d43b995bf QLibraryInfo: undo the !__cplusplus protection again
Now that C code need not include the header for qVersion() anymore,
it's no longer needed.

Partially reverts 50b05e3e2a.

Change-Id: I917fbc883c315a0878e08da6aca9aed29c29917f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 07:21:28 +01:00
Marc Mutz
885aba7ffd Use qtversion.h instead of qlibraryinfo.h
... where 50b05e3e2a originally added
them.

While qtversion.h is included in qglobal.h, using qtversion.h directly
is a tiny step towards removing qglobal.h includes from our code-base,
so don't let this opportunity go to waste.

Change-Id: I28eaca1f4e250fc9e12e2ce6a6f94670a1d08dbe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-09 07:21:22 +01:00
Thiago Macieira
abaa3e6112 tst_qdbusmetatype: fix build with Clang (and probably MSVC)
This test makes use of a GCC extension-slash-defect in matching of
template template parameters. Either Clang has recently changed its
behavior not to accept them any more, or we've never compiled this test
with Clang.

Tested with Clang 15.0.6.

Pick-to: 6.4
Change-Id: I69ecc04064514f939896fffd172e98d826989ca3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-09 05:07:25 +00:00