Commit Graph

54026 Commits

Author SHA1 Message Date
Andreas Buhr
30a70fc6e0 Workaround MSVC 2022 bug about QString::replace
MSVC 2022 (17.0.0) complains about "'QString::replace':
12 overloads have no legal conversion for 'this' pointer".
This is a compiler bug. It is reported to MS. Still we workaround
it here so that qtbase can be built with MSVC 2022.

Pick-to: 6.2
Task-number: QTBUG-96975
Change-Id: I0180e2e6760d2809ca61e3cd8f02b04f970172a7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-11-10 14:10:20 +01:00
Yuhang Zhao
6652bf2353 Bump WINVER, _WIN32_WINNT and _WIN32_IE to _WIN32_WINNT_WIN10 (0x0A00)
And bump NTDDI_VERSION to 0x0A00000B (NTDDI_WIN10_CO) at the same time,
to unblock the developers from accessing the latest Windows APIs.

Pick-to: 6.2
Change-Id: Ifbc28c8f8b073866871685c020301f5f20dc9591
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-10 20:31:05 +08:00
Laszlo Agocs
a8be40bd64 rhi: Expose the maximum uniform buffer range limit
Pick-to: 6.2
Task-number: QTBUG-97715
Change-Id: I7f0a52c410b9b77f735fb3b7fd33141674bb0cda
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-11-10 13:31:05 +01:00
David Skoland
cdf784a1c7 Remove unreachable breaks
Change-Id: I0e005964624125d3ab12f77c94fd393802547a13
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-11-10 13:31:05 +01:00
Topi Reinio
68942a3772 Doc: Add \QtMajorVersion macro
This macro expands to the major version of Qt, complementing the
already existing \QtMinorVersion macro.

Pick-to: 6.2 5.15
Change-Id: I64861f8cc50d73f34369311a19b5e554645a4127
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-11-10 13:31:05 +01:00
Øystein Heskestad
09291eead4 Add additional grapheme, word, and sentence break class tests from tr29
Stop turning THAI CHARACTER SARA AM into a grapheme boundary because it
breaks a test and chromium does not consider it to be a separate
grapheme.

Fixes: QTBUG-88545
Change-Id: Ib1aea8dbb66ac42b2129cf9fe04c39f5f76eeb36
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-10 09:44:03 +01:00
Fabian Kosmale
76b4739e07 QFactoryLoader: unconditionally provide toJson
Amends c0a8cfe167. The StaticPluginLoader
needs it, too, and that one is available in non-library configurations.

Change-Id: I5d396e78abe7358a5df5ef816cfe92137d3ae4b5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-10 09:18:07 +01:00
Ievgenii Meshcheriakov
aee0021fc8 QLocale: Add support for Kaingang and Nheengatu languages
Update the locale generation script to support Kaingang and
Nheengatu languages. These are new in CLDR v40. Regenerate
the locale data.

Task-number: QTBUG-94358
Change-Id: I5195d5161d8c4d9f17129bbcfde39dfd3fcf1cd5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-10 00:36:12 +01:00
Ievgenii Meshcheriakov
96a03533f9 Update CLDR-derived data to newly-released v40
Update tst_qlocale to take into account "narrow" day representation
change for Russian locales. This version of CLDR changes narrow forms
to one letter. Previously those forms were identical to short forms
(two letter). The new representation is consistent with other languages
and so does not appear to be a bug.

Fixes: QTBUG-94358
Pick-to: 6.2
Change-Id: I9724c281a250685da8232e5c05c9c375a8c79253
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-10 00:36:12 +01:00
Ievgenii Meshcheriakov
2c505eea01 locale_database: Add entry for 'South Sudan Standard Time'
This timezone is new in CLDR 40, Olson database calls it Africa/Juba.
The offset is UTC+2.

Reference: https://techcommunity.microsoft.com/t5/daylight-saving-time-time-zone/2021-time-zone-updates-for-republic-of-south-sudan-now-available/ba-p/2234981

Task-number: QTBUG-94358
Pick-to: 6.2
Change-Id: Ib70dbd9b472eb9cf8cb62a0eb5e241199148c077
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-10 00:36:11 +01:00
Andreas Buhr
0098dd8120 Capture full logcat output in Android unit tests
Previously, when running unit tests on Android, the log presented
to the user was the log as known to the Qt logging system. This
does not include log messages generated by Java code using e.g.
Log.d("message"). Neither does it include log messages by system
libs. This patch changes androidtestrunner to capture the full
logcat output for the unit test. This improves the developer
experience when working with unit tests.

Fixes: QTBUG-93438
Change-Id: I580f728349041eb8a84a32d187754b7b5448f512
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-11-09 22:39:24 +01:00
Ulf Hermann
81c92aec66 QTestLog: Properly own the loggers
Previously, the loggers would leak if the application failed to call
stopLogging(). Now they are owned by the global static which will delete
them in that case.

Also, since we have to adapt loggerCount() to the fact that std::vector
uses size_t, recognize that we only ever want to know whether the number
of loggers is 0. Change the method to only provide that information
rather than the actual number.

Change-Id: Ieb2e185048d573ec7f36373ad49bb2a0ca391ce3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-09 21:36:50 +01:00
Fabian Kosmale
a4ce85f356 QDomDocument::setContent: Open device if necessary
This restores the Qt 5 behavior in Qt 6, but prepares for disabling it
in Qt 7. We want to deprecate the current behavior, as it makes it
unclear who is responsible for calling close.

Fixes: QTBUG-97747
Pick-to: 6.2
Change-Id: I2c99eb96667e784576d8850085068ca334d75b16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-11-09 18:33:39 +01:00
Allan Sandfeld Jensen
c677b3b8af Add compatible weak pointer move operations
We have those on QSharedPointer, so adding them for consistency.

Change-Id: Iab5eddc79206605a4bcce46f63e0fb685aed40ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-09 13:42:23 +02:00
Hannah von Reth
740d652f2d Fix internal mimetypes db on Windows when compressed by an external tool
Ensure to use binary encoding when handling the output of the
compression tool.
With out this change \r are dropped and the compressed file is corrupted.

Change-Id: Iaf9b1fc015a376682f793aff079f45d03b201aec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-09 08:39:38 +01:00
Eirik Aavitsland
1a984b3d2d Avoid painting outside boundaries when printing QGraphicsProxyWidget
Implement clipping to widget geometry when rendering to other
paintdevices.

Fixes: QTBUG-98026
Pick-to: 6.2 5.15
Change-Id: I5652bdb8cc052ae34f05ea7963943d2b5b28e220
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-11-09 01:34:31 +01:00
Tor Arne Vestbø
851ed6f0b1 Don't quit application if we're not in exec
The documentation states that the function will not have any effect
before control enters the main event loop. Prior to 0c02f133f3
this was incidentally true due to QCoreApplication::exit just setting
quitNow to true and exiting all the event loops (which before exec
were none), and exec() setting quitNow to false explicitly. But
now that we plumb the quit down to the platform we can't rely
on this incidental behavior, and need to check explicitly.

Fixes: QTBUG-98088
Pick-to: 6.2
Change-Id: I54cece3630e39e4456abc3b372839c0b5c4c4713
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-11-08 23:44:05 +01:00
Joerg Bornemann
7be143f438 CMake: Fix default install prefix of top-level non-developer builds
A top-level non-developer build is supposed to default to a prefix like
"/usr/local/Qt-6.3.0".  That wasn't the case.

In QtSetup.cmake we check CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT,
set CMAKE_INSTALL_PREFIX and did the same thing later in
QtBuildInternalsExtra.cmake, with a different value.  Make sure we run
the latter code only in per-repo builds.

Pick-to: 6.2
Fixes: QTBUG-98087
Change-Id: I4a1291dfd126aa11c21d69809f2cf7b075c98d2e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-08 23:12:33 +01:00
Mårten Nordheim
ac7e94090f qoperatingsystemversion_win: fix thread race
If two threads call the function at the same time before the static is initialized
one of them may end up with a half-written object.

Amends 3fe89eec61

Pick-to: 6.2
Change-Id: Ie08970f9ee283fd75292a8b44a1fca89de4b04eb
Reviewed-by: Yuhang Zhao <2546789017@qq.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2021-11-08 22:39:45 +01:00
Tor Arne Vestbø
2010df52d4 Draw QTableView grid lines centered between table cells
We were reserving space between table cells corresponding to one logical
pixel, which on retina screen results in two device pixels. By drawing
the grid line with a cosmetic pen, we were only filling one of these
pixels, leaving space for leftover pixel dust from earlier blits.

By drawing with a non-cosmetic pen of size 1, and ensuring that the grid
line is drawn at the center of the grid, we end up filling the entire
grid line, without overdrawing the table cells.

Pick-to: 6.2
Change-Id: I7f4d2b27380e5a3d221e265a25f7531fdc4a02b3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-11-08 21:26:52 +01:00
Mårten Nordheim
d2c5494c3d QNI: Windows support for the isMetered API
As a drive-by: fix some improper indentation

Task-number: QTBUG-91024
Change-Id: I29e04aff3638dfb2aab9d40650c55a48baba7222
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-08 21:12:14 +01:00
Joerg Bornemann
4f360e3b76 Assume qhelpgenerator in libexec instead of bin
Task-number: QTBUG-88791
Change-Id: I0f6dc14401e715a98322abc21da3f88e34118e27
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-11-08 19:27:32 +01:00
Tor Arne Vestbø
ecfbc918d7 macOS: Add QCALayerBackingStore::preserveFromFrontBuffer helper function
Pick-to: 6.2
Change-Id: Iadd4791907564b8b82437643c54696ffa778d882
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-11-08 19:04:59 +01:00
Tor Arne Vestbø
4ffdf2270a macOS: Rename QCALayerBackingStore::prepareForFlush()
The need to finalize the back buffer isn't limited to flushing.

Pick-to: 6.2
Change-Id: I98b04ab49ec27ea536e99462deab8d48a8e40e82
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-11-08 19:04:59 +01:00
Tor Arne Vestbø
5190e77d87 macOS: Track painted area of backingstore buffer via its dirty region
When introducing support for scrolling the backingstore it doesn't make
sense to track the painted region explicitly.

Pick-to: 6.2
Change-Id: I370932f02490ac526fb049908f99af678884e807
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-11-08 19:04:59 +01:00
Tor Arne Vestbø
38130406ca macOS: Don't defer back/front-buffer swap in CALayer backingstore
CoreAnimation doesn't immediately mark a surface as in use the moment
we assign it to a layer, but defers it until the surface has bee picked
up by the window server. In theory this would allow us to defer the swap
until the next beginPaint(), which would allow painting to the back buffer
again before Core Animation has time to flush the transaction and persist
the layer changes to the window server, and would also automatically deal
with requests to flush without painting anything.

But, since a client may do several rounds of beginPaint/endPaint before
flushing, we might end up in a situation where we detect that a surface
is in use in the middle of several paint rounds, and end up swapping in
a new back buffer without copying over the previously painted content,
like we do in prepareForFlush. To be on the safe side we swap the back
and front buffer straight away.

We also need to mark the surface in use, to prevent the same problem
from appearing when the window server doesn't pick up the surface in
between two rounds of flushes.

Pick-to: 6.2
Change-Id: Ib418852424773c399df710da33a388e8d2c2e92c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
2021-11-08 19:04:59 +01:00
Edward Welbourne
e9e0862051 Correct and clarify some comments
Change-Id: I011b04cf0dccea51c00c597c8dff74d574fe36ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-08 17:05:25 +01:00
Edward Welbourne
4b4bc388de Express 64-bit integral constants consistently
Use the Q_INT64_C() macro and qint64()-as-function instead of C-style
casts.

Change-Id: I9d169715da96a49898e9c9e2a6d3ee5182e1d91c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-08 17:05:25 +01:00
Edward Welbourne
f4b19f8bba Give symbolic names to some constants used in time-zone tests
Where std::numeric_limits<...>::min() is used used as invalid value
for an API return, save it as a named constant so that the comparisons
are against an informative name, rather than leaving the reader to
guess the significance of the min-value.

Change-Id: Ia99c75e21856f65cb4494120d05eed36f5fc2d50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-08 17:05:25 +01:00
Edward Welbourne
2b26dea51b Fix some out-of-range issues with time-zone support
The MS-Windows back-end neglected to check for overflow when mapping
date and time to milliseconds from the epoch. Add the checks for that
and take care not to return qint64-min as a transition time - that's
the invalidMSecs() value used as a special marker.

QTimeZonePrivate::dataForLocalTime() neglected to handle the case of
the backend being unable to answer offsetFromUtc() for one of the
times requested, which the MS backend might.

Change-Id: I6d7ee2cbf9aaf6678abb24a20e18b5cdac7f5a23
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-08 17:05:25 +01:00
Joerg Bornemann
71e490f0ba Provide a qtpaths wrapper script when cross-building Qt
The qtpaths tool is supposed to replace "qmake -query", and it must be
available for cross-builds as a wrapper script like qmake.

Re-use the existing facility for creating the qmake wrapper script for
creating the qtpaths wrapper script.

Pick-to: 6.2
Fixes: QTBUG-97821
Change-Id: I460bae61a531994422e1c0fba09c79e4aa65713f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-08 13:41:03 +01:00
Zhang Hao
c0bc4c7638 Initialize QStyleOptionProgressBar with QStyle::State_Horizontal
In Qt 5, QStyleOptionProgressBar::orientation was Qt::Horizontal by default.
In Qt 6, we need to init state with QStyle::State_Horizontal so that code
setting up a style option doesn't need to do so explicitly.

Amends add8262f72

Pick-to: 6.2
Fixes: QTBUG-93412
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: Iaa311cf0f4bab72c0bacbd8e698ba24660bca6b8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-11-08 08:06:00 +00:00
Thiago Macieira
04ee5795cc qC{Debug,Info,Warning,Critical}: Simplify #ifndef QT_NO_xxx_OUTPUT
Further simplifies the definition of the macros.

The class is placed in an unnamed namespace so two translation units can
still have different settings.

A difference is that the expanded no-output code is now using QDebug,
not QNoDebug, but it should get dead-code-eliminated either way.

Change-Id: I3eb1bd30e0124f89a052fffd16a7564f4450ec8a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-11-06 20:43:22 -07:00
Thiago Macieira
d20b78a569 qC{Debug,Info,Warning,Critical}: centralize common parts
Move some content to a helper structure and the rest to a common macro.

Immediate advantage is that we avoid calling the category function
twice. The Q_UNLIKELY also moves most of the formatting code out of the
hot code paths of the functions where it's used.

Change-Id: I3eb1bd30e0124f89a052fffd16a754e980c1d971
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-11-06 20:43:21 -07:00
Ievgenii Meshcheriakov
5fc9c02a69 QProcess: Distinguish between null and empty QProcessEnvironment
The documentation for QProcessEnvironment's default constructor
says:

    This constructor creates an empty environment. If set on a
    QProcess, this will cause the current environment variables
    to be removed.

This is not the case however, because setting such an environment
for a process is equivalent to not setting an environment at all
and the child process is executed with parent's environment.

It is still possible starting from Qt 6.2.0 to create an empty
environment by adding a variable to a null environment and removing
it, but that's cumbersome, and the comparison operator says that
it is equal to the null environment but it is obviously behaving in
a different way.

This change adds an additional constructor to QProcessEnvironment
that can be used to construct a null environment, and changes the
default constructor to produce an empty environment. The comparison
operator is changed to correctly distinguish between such objects.
This is a behavior change, but the current behavior is broken
and this is unlikely to affect working code.

[ChangeLog][QtCore][QProcessEnvironment] An additional constructor
was added to explicitly create an object that when set on QProcess
would cause it to inherit the environment from parent (this was
formerly the behavior of a default-constructed QProcessEnvironment,
which will now (as documented) actually give a process an environment
with no variables set). A new method inheritsFromParent() was added
to test for such objects.

Fixes: QTBUG-58053
Change-Id: I15e20c6a5f01ebe2c736d5578c75dba1ee319320
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-07 01:53:44 +01:00
Lorn Potter
7f8fd38931 wasm: fix size of QDialogs
We can simply propagate the minimum window size.

Pick-to: 6.2 5.15
Fixes: QTBUG-83503
Change-Id: Ia9f67c92ca37fd0f4e89f08e5153e12c1385f6f8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-11-06 15:36:06 +10:00
Lorn Potter
663a175893 wasm: fix network reply status attribute
We were emitting the finished signal before the status code attributes
were being set.

Fixes: QTBUG-97984
Pick-to: 6.2 5.15
Change-Id: Ib179898dee2b9667d482348ad12180e8bdef74db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-11-06 15:08:54 +10:00
Thiago Macieira
8790142aeb QPluginLoader: fix indentation and comments
Indetnation was bad in commit 0ab3c5c250
and was missed in code review and one comment wasn't updated when the
code was.

Take the opportunity to remove an old TODO that has been completed for
years.

Change-Id: Ice04365c72984d07a64dfffd16b4899604513680
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-11-05 21:13:35 -07:00
Thiago Macieira
4fe71db2ee QCoreApplication: document the app's bindir is in libraryPaths()
The QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()
function has been there since at least Qt 4.5.1, so the documentation
for appendLibraryPaths() hasn't matched behavior for a minimum of 13
years. The documentation for libraryPaths() has mentioned this fact,
though.

Searching the application's bin dir is normal on Windows, as many
application packages are a flat install with the .exe and all .dlls in
one dir. I find it questionable to do so on Unix, though: any and all
applications expecting to be installed by a Linux distribution would not
install plugins to /usr/bin, whereas on macOS bundles have their own
organization anyway.

But I'm not prepared to change the behavior without more justification.
I can think only of broken configurations (such what is described in
QTBUG-97950 where a combination of bad decisions led to scanning all of
/usr/bin) and running an executable that is stored in a world-writable
directory.

Task-number: QTBUG-97950
Pick-to: 6.2
Change-Id: Ice04365c72984d07a64dfffd16b440868373d7a5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-05 21:13:34 -07:00
Thiago Macieira
1d62bf3150 Revert "QOperatingSystemVersion: Add support for Win10 sub-versions"
This reverts commit 9568362bfe because
the implementation does not use the agreed-upon solution of static
constexpr (thus, inline) variables. This change needs to be re-issued
after that suppotr lands.

Change-Id: Ib42f3828dcbed66603adc2a699cdac2a8469b263
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-06 00:27:42 +00:00
Marc Mutz
570485be95 QArrayDataOps: fix QList range ctors with mixed value_type in C++20 builds
The QList<X> range ctor is supposed to accept iterators with
value_types convertible to X, e.g. tst_qitemselectionrange passes
iterator to a container of QModelIndex to the ctor of a
QList<QPersistentModelIndex>. But copyAppend() is not a template, so
trying to pass QModelIndex* when QPersistentModelIndex* is expected
errors out.

Fix by taking the copyAppend() path only if the types match.

Amends 507be11303.

Change-Id: I5e3ff84a80dc05dafde5572463b33df9002c8fe0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-11-06 00:05:15 +01:00
Alexey Edelev
a07598e47b Move the ${target}_prepare_apk_dir target description
Move the description of ${target}_prepare_apk_dir to the right place.
The code related to qt_internal_plugins was mistakenly placed between
comment and target creation, so move it to avoid confusion.

Change-Id: Iaf178811a30ce0f51d6131c8a68f024d3efddfeb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-05 23:40:25 +01:00
Timur Pocheptsov
081a2b9b1f QMacStyle: skip 'custom' rendering of CE_HeaderLabel
Instead, similar to 'Fusion' style use what common style can do,
thus respecting text alignment and not always forcing VCenter
alignment.

Fixes: QTBUG-97698
Change-Id: I89ad01807afc217c3c33650e1f1d255d0b81ed46
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-11-05 20:30:08 +01:00
Ievgenii Meshcheriakov
7d7663cfc4 Use a HTTPS URL for the CLDR download link
FTP is insecure and is not supported by modern browsers anymore.

See also: https://mywiki.wooledge.org/FtpMustDie

Change-Id: Iad65d29912e79a4f3fadb9317bb5d9c5fe9b68d7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-05 19:32:23 +01:00
Luca Di Sera
ae0733c99b Doc: Remove broken homepage link for Vera fonts attribution
The attribution for the Vera Fonts project declares a page on the gnome
domain as the homepage of the fonts.

The page is not maintained anymore and was removed from the gnome
domain.

Hence, we remove the "Homepage" key from the Vera Fonts attribution as
no homepage seems to exists at the moment.

Task-number: QTBUG-96127
Pick-to: 6.2
Change-Id: If4801eb96ce5568c4c18ecea7807ad87e165ca2a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-11-05 18:02:09 +01:00
Volker Hilsheimer
02164b292f Don't use QCursor::pos in QTabBar and fix hover handling
Relying on QCursor::pos makes tests fragile and prevents multi-seat support.
Instead, record the mouse position in the already existing event handling,
and use that instead. Styles might use either WA_Hover or enable mouse
tracking for the widget to enable hover-effects, so we need to support both.
Fix the scenario where a newly inserted tab ends up under the mouse, which
was previously not handled correctly (only the case of removing a tab was).

Clean up the repaint management when the hovered tab changes; just call
update on the old rect, and then later update on the new rect; there's no
need to make a copy first, updates are posted and compressed.

Add a unit test that makes sure that we paint tabs that should be under the
mouse in the hovered state. Since not all styles enable hovering and/or
mouse tracking in all cases, use a style sheet for those styles that don't.

Change-Id: I7cdbb18e9e04b52651e273680fec87b50cb81e05
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2021-11-05 16:54:55 +01:00
Joerg Bornemann
c5409964b0 configure: Allow specifying arbitrary variable assignments
It's now possible to call configure with arbitrary variable assignments
"FOO=BAR" that get passed as "-DFOO=BAR" to CMake.  There is no error
anymore for unknown variables.  CMake already warns about those:
"Manually-specified variables were not used by the project: FOO".

[ChangeLog][configure] Users can directly assign CMake variables with
configure, for example "configure CMAKE_CXX_COMPILE=clang++-11".

Fixes: QTBUG-88210
Change-Id: Ib15e63a895df717919dd2b6623fa4d284209776f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-05 16:54:55 +01:00
Zhang Hao
7451fb36fd plaintextEdit draw text with clipRect should consider cusorWidth
If the width of the text to be drawn is equal to the width of
clipRect, the cursor will not be displayed.
So we need add cursorWidth to the clipRect when draw text.

Fixes: QTBUG-94028
Pick-to: 5.15
Change-Id: I8686953f13c04d224327cf0f865ded7241d80ccd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-11-05 15:31:23 +00:00
Luca Di Sera
09a68dfa94 Doc: Move Q_OBJECT_COMPUTED_PROPERTY to QObjectComputedProperty
`Q_OBJECT_COMPUTED_PROPERTY` is a macro that is used to declare a
`QObjectComputedProperty`.

The documentation for the macro was related to the
`QObjectCompatProperty` documentation, which is internal.

A link to `Q_OBJECT_COMPUTED_PROPERTY` appears in
`QObjectComputedProperty`'s page, but fails to resolve as the required
documentation page is internal.

Furthermore, `QObjectCompatProperty` has a macro that is equivalent to
`Q_OBJECT_COMPUTED_PROPERTY`, `Q_OBJECT_COMPAT_PROPERTY`, whose
documentation is declared related to `QObjectCompatProperty`.

It is hence assumed that relating the documentation for
`Q_OBJECT_COMPUTED_PROPERTY` to `QObjectCompatProperty` was a typo, such
that the documentation for the macro is now moved to be related to
`QObjectComputedProperty`, resolving the linking issue in the process.

Task-number: QTBUG-96127
Pick-to: 6.2
Change-Id: I2c1bfd6ba64f13e186c65701593047b64bf0c199
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2021-11-05 15:31:23 +00:00
Alexey Edelev
45ce3c6fb9 Make sure that all MODULE_LIBRARY targets are built before deploying to Android
Users may add the implicit runtime depedencies to the MODULE_LIBRARY
targets, that are created using standard CMake API. When iterating a
project tree we collect all module libraries and add them as
dependencies to the qt_internal_plugins meta target. All the
${target}_make_apk targets depend on this meta target, so we can
be sure that plugins are built and present on the file system before
running androiddeployqt.

Task-number: QTBUG-94714
Task-number: QTBUG-88841
Change-Id: I4fa7f0772d23897f19db59c6e4ad38646bd3aed6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-05 15:56:07 +01:00