Commit Graph

58425 Commits

Author SHA1 Message Date
Volker Hilsheimer
dbf6e2db3b QComboBox: remove dead code
We used to explicitly fade out combobox popups on macOS, but even the
cocoa platform plugin no longer implements a fadeWindow function.

Pick-to: 6.4
Change-Id: I5cd61da2c755ec0f312c451f0ea966aa48399385
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-12 01:53:42 +02:00
Volker Hilsheimer
cdadd1bdb3 Allow programmatic closing of windows that are modally blocked
In Qt 6, after changes such as 121fddcf5a,
we go through the QPA layer to close widget windows properly. Closing
and hiding of windows is now done in when we receive and handle the
window system's CloseEvent.

Such an event to a modally blocked window should be blocked, so that
users can't close a modally blocked window. However, if the event is the
result of a call to QWindow::close, then it should not be blocked.
Luckily, we know that the event is the result of such a call, so let
such events through. This restores compatibility with Qt 5, where it was
possible to first open a new dialog, and then close the previous dialog.

Add a test case.

Fixes: QTBUG-107188
Pick-to: 6.4 6.2
Change-Id: Id812c1fc36aa0e1a10dfb8d3a16a11d387289b05
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
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>
2022-10-12 01:53:42 +02:00
Marc Mutz
aa37e67ef7 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace, with manual
unstaging of the actual definition and documentation in dist/,
src/corelib/doc/ and src/corelib/global/.

Task-number: QTBUG-99313
Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 23:17:18 +02:00
Marc Mutz
fd2685c2f0 Short live q20::fill{,_n}!
It just adds constexpr to it (we're ignoring the range version).

Apply it to QStaticByteArrayMatcher, where it replaces rather
lengthy initialization code.

Pick-to: 6.4
Change-Id: I1d60216fb04c94fa66fce5cc01313b3e9ba856ac
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-11 21:17:17 +00:00
Marc Mutz
e1d21fe813 QString: rename parameter clashing with member function of the same name
The size parameter shadows the size() member function, so rename it to
newSize.

Prepares for a follow-up change that ports from count()/length() to
size().

Change-Id: I0ca8af57d6351f85a568409a8d02b66371bb05e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 23:17:17 +02:00
Thiago Macieira
a94731c2ad tst_QTcpServer: use a random port number in addressReusable
Just in case the same test is being run in parallel. We do that by
creating a listening TCP server in the test process. This test is
supposed to test the address reusability, so a clean close on a server
that never accepted a connection should not cause reusability issues.

Change-Id: I12a088d1ae424825abd3fffd171ccfb9fc5c09ee
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-11 09:36:11 -07:00
Thiago Macieira
742584b0f2 tst_QTcpServer: Output useful more useful info for addressReusable
To try to figure out why QProcess::waitForReadyRead is returning false
so quickly. Though we know it's going to be "Address in use".

FAIL  : tst_QTcpServer::addressReusable(WithoutProxy) 'process.waitForReadyRead(5000)' returned FALSE. (Failed to listen: The bound address is already in use
Netid State  Recv-Q Send-Q Local Address:Port  Peer Address:PortProcess
tcp   LISTEN 0      50         127.0.0.1:49199      0.0.0.0:*    users:(("crashingServer",pid=40529,fd=4))
)

Pick-to: 6.4 6.2
Change-Id: Ic43a460bfc7c7eb6379405b7a1a064e502b6fef3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-11 09:36:11 -07:00
Thiago Macieira
49e62c51f2 QVariant/Doc: expand what toList & toMap conversions may succeed
I don't know when conversion through sequential and associative
iteratables was added, probably some time in the 5.x. QString and
QByteArray got conversions to sequential iteratables for Qt 6.1 with
commit c9a1102269. Since that was
intentional, I'm just documenting reality.

Fixes: QTBUG-107246
Pick-to: 6.2 6.3 6.4
Change-Id: Id8d5e3999fe94b03acc1fffd171b863b1a0ead68
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-10-11 09:36:11 -07:00
Thiago Macieira
909112fa52 QSharedMemory/doc: update docs to be more modern
- We don't support HPUX any more, so no need to talk about it
- Clarify that it's the QSharedMemory destructor that releases the
  resources on Unix systems
- Explain the System V and POSIX backends and how to detect them
- Add a note about Android not being supported.
- Add a section about using QFile for shared memory

Change-Id: I413ea647c2a5453b8307fffd17174c8083416529
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-11 18:36:11 +02:00
Shawn Rutledge
47ab723d82 doc: Add docs for QPointingDevice::GrabTransition and grabChanged signal
Pick-to: 6.2 6.4
Fixes: QTBUG-97697
Task-number: QTBUG-102160
Change-Id: I6b782206a873bfe1837c419d15b0d6949d5b819d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-10-11 18:36:11 +02:00
Shawn Rutledge
bc857f466d Fix clazy warnings in QPointingDevice::grabChanged signal
- a signal does not need to be marked const; but fixing it would be BIC,
  so has to wait until Qt 7
- QPointingDevice::GrabTransition should be fully qualified
- wrap the long line while we're at it

Amends 2692237bb1

Change-Id: I5d518bbbcb62d336bae0d59647b16018d83b9479
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-11 18:36:11 +02:00
Dominik Holland
f6626cf3c3 Fix broken Text rendering when noantialiased NativeRendering is used
In case antialiasing is disabled the QFontEngine::Format_Mono is used
to render in the glyph cache.
In this format the padding needs to be 8-bit aligned.

Fixes: QTBUG-107038
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Icf69150b6b446099ad05d706ddcab0a57f8fe0c0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-11 18:35:59 +02:00
Ievgenii Meshcheriakov
c4e550703c Update UCD to Revision 30
This corresponds to Unicode version 15.0.0.

Added the following scripts:

    * Kawi
    * Nag Mundari

Full support of these scripts requires harfbuzz version 5.2.0,
this version adds support for Unicode 15.0:

    https://github.com/harfbuzz/harfbuzz/releases/tag/5.2.0

Fixes: QTBUG-106810
Change-Id: Ib06c526e49b0f01ef9f21123bcf875c6b19f2601
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-10-11 14:10:59 +00:00
David Skoland
20144aab0b wasm: Make Chrome default testing browser
Currently, emrun will pick the browser to run tests on somewhat
arbitrarily. For predictability and stability, we should use one
browser as a basis, and Chrome seems to be a good fit as wasm features
are generally in good shape on it and it has good support for launching
from command-line.

Change-Id: I1d06a5916ad24ab9df9b0826c0773c652e6d3fcd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-10-11 16:10:58 +02:00
David Skoland
89826b9970 wasm: Disable coin test runner for wasm targets
qttestrunner.py needs special logic to handle wasm
tests, which is not implemented yet. Disable the
coin testrunner until that is implemented.

Change-Id: Idfd001df5f6dcf44904940ace9adef5a355886cf
Pick-to: 6.4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2022-10-11 16:10:58 +02:00
Dmitry Shachnev
638c4a3014 Fix file which had SPDX-License-Identifier on two lines
This breaks our automation in Debian.

Pick-to: 6.4
Change-Id: Iee035dee8e0d89e22540a2691689da46c4c301a3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-10-11 14:10:58 +00:00
Dominik Holland
0e1ce757d5 Add a configure option to exit on poll errors
If an error is returned from qt_safe_poll inside the event dispatcher
the error is currently printed and ignored.

For most cases this behavior seems to be fine, but when used in critical
systems e.g. automotive or medical, a error might indicate a more severe
problem and the application should be stopped instead.
The system can then decide itself what to do e.g. restarting the
application using a watchdog.

Change-Id: Iaf5abb20bb3941eaeff19d14e41c395c88fa088d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 14:55:23 +02:00
Edward Welbourne
35ff456407 tst_QString::compare(): rename a test tag to be unique
There were two data8 rows; and no data9, so that was easy to fix.

Change-Id: I8191de142e1a3be57bf1ad97e63d5780f2859fea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:24:51 +02:00
Edward Welbourne
3af2747c46 tst_QString::number_base(): distinguish negative binary test-cases
Two test cases were called "base  2, negative"; one of them use -1 as
value, so s/negative/minus 1/ for it.

Change-Id: Ia5da3952d93976262cc8423d4e75ec19dab9a088
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:24:39 +02:00
Edward Welbourne
167da771f6 tst_QRE::wildcard(): use more informative data row tags
Using simply the pattern didn't work so well when some patters are
used repeatedly, on different haystacks. So include the haystack
in the tag name. Remove one straight up duplicate row.

Change-Id: Ib46364581f23c493e83d75e6d04ab09e4329a3a5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2022-10-11 11:24:11 +02:00
Edward Welbourne
042702d961 tst_QBAApiSymmetry::toInt_data(): deduplicate a data-row name
One "empty" test was base ten, the other left the code to work out the
base. Change the latter's name to reflect that difference.

Change-Id: I4918eb0d293420df315d86e532787950b8f05be8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 11:24:01 +02:00
Edward Welbourne
cc204f96c9 tst_QCborValue: remove duplicate data row from tests
The addCommonCborData() helper had two identical rows named simple255.
It only needs one.

Change-Id: Ie934c31f373069788c3ef774fde8956b54814e67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:23:50 +02:00
Edward Welbourne
2192d6a62e tst_QPlugin::scanInvalidPlugin(): de-duplicate a data-tag
Change-Id: Ibc25041b5e003cf21d781012f279e9bdd75a2ee9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:23:40 +02:00
Edward Welbourne
97470a7838 tst_QUuid::fromString(): tweak a test to avoid data-tag collision
Two of the uuidA test cases had an open-brace for the string and no
close; one of them ended with a space (which, apparently, is valid).
Since the data-tag was constructed by formatting the string in a
fixed-width field, padding with spaces, these two cases coincided.

Fortunately the only uuidB test-case had closing as well as opening
braces, so we can just switch the test for "trailing space is not an
error" to use it, instead.

Change-Id: I7068d40145c6b6b3b72777b029282850b1d1ea81
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2022-10-11 11:23:15 +02:00
Edward Welbourne
439066ea84 tst_QResourceEngine::checkStructure(): fix name of some data rows
The first "test1 text" test-case related to a file called test1.txt;
but the second related to a file called test2.txt; I suspect a
copy-and-paste with incomplete post-edit. In any case, change the
latter's data tag to reflect the difference.

Change-Id: I8354a3d1bd18715d6717dfd0962aa70faefbee90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:23:04 +02:00
Edward Welbourne
f89d3484b2 tst_QUrl::fromUserInput(): distinguish to data rows by name tag
Change-Id: Ia3d232466ae618c26b95a6c33b094b197a2e4ec8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:22:53 +02:00
Edward Welbourne
6e4a5211a2 tst_QUrl: distinguish two ipvfuture test-case data tags
Change-Id: I20e318b4c17c35aae5f5440b2fd9c6e0af7c4a70
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:22:41 +02:00
Edward Welbourne
5455ea7ccd tst_QUrlQuery: remove duplicate of reconstructQuery data row
Change-Id: I7903eca0887c0cbccef9fcadac6e95009703e1c2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:22:31 +02:00
Edward Welbourne
ef8905aa2b tst_QFile: distinguish invalid from valid in mapResource data-tags
The test was using the same tags twice each, giving no clue to the
difference between the two test-cases for each.

Change-Id: I645b01c0c4008a766e505047cb05cc22640ee129
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2022-10-11 11:22:22 +02:00
Edward Welbourne
50561716f0 Distinguish the repeats of QSystemSemaphor's processes tests
It's not clear why this test repeats each test-case five times, but
give the duplicates distinct names, at least.

Change-Id: I4a098d90c3fe6f61842745c1d5f62047fe13a9b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-11 11:22:14 +02:00
Edward Welbourne
1f07199a48 Remove duplicate tst_QVariant canConvert:Int data row
There were simply two copies of the same row-adding code.

Change-Id: I12240dedf2649c314ad32984f4de9d6b9bf280d8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-11 11:22:04 +02:00
Edward Welbourne
691de7f696 Rename some tst_QTextStream::manipulators() data rows
Two rows named "hex" were a collision we should avoid.
The two "showpos" rows could be better distinguished.

Change-Id: I43727041eb00e6883ce8b34b346de5e2a63f1a34
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-11 11:21:57 +02:00
Edward Welbourne
16732e368a Reflow tst_QTextStream::manipulators_data()
Now I can read it and work out how to rename the duplicated data tag.

Change-Id: I78f2b3f38f955fa6e6a88cb87cfca6e4f755a177
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-11 11:21:47 +02:00
Edward Welbourne
11997578ac Provide optTitle for a NumberDoubleTestData testcase that needs it
The test-case for 0.0001 with precision 0 has the same expected text
as that for 0.0 with the same precision; which lead to QBA's test of
it getting a duplicated data tag. Add an optTitle for the one that
isn't precise to deduplicate.

Change-Id: I03600e2af43f6d11b53e05e8027924c92ed4db89
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-11 11:21:38 +02:00
Edward Welbourne
3f43ddbd10 Rename tst_QBA::toFromHex()'s longer no-leading-zero data-row
No two data-rows should have the same name.

Change-Id: I0e222498ca5bb973f703b7e6bd314fc38bb4db4d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 11:21:30 +02:00
Edward Welbourne
5c4dcd0697 Rename tst_QBA::movablity() to fix the typo
There's an i between b and l, as well as after l.

Change-Id: I9252935687e25f1f11aacb11286edf666ff9af8a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 11:21:15 +02:00
Edward Welbourne
e61dc8a83b Don't duplicate a column name in tst_QByteArray::movablity_data()
It first added a column, then some rows, then called
prependExtended_data(), which expects to be called first in a data
function and starts by adding the same column. So put that first and
drop the duplicate addition of the column.

Change-Id: Ia5cf86f821608e78f0e4872db2b3167ef81cc59e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-11 11:21:06 +02:00
Edward Welbourne
f71daf857c Fix tst_QQuaternion's duplicate test tags
Having the same test tag for two rows of a data table makes the report
less useful. We also intend to forbid doing that.

Change-Id: I67ec32514b6550f4f97610a2140f1383d0d85b23
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-10-11 11:20:58 +02:00
Alexandru Croitor
a6b430337c CMake: Only build ssl tests if the feature was enabled
Pick-to: 6.4
Task-number: QTBUG-107538
Change-Id: If2d473fbf8240b356d226be7bc4058506149a0e6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-10-11 11:13:36 +02:00
Thiago Macieira
5b7f8fa986 QSystemSemaphore: make it a Q_GADGET
So we can have Q_ENUM.

Change-Id: If4c23ea3719947d790d4fffd17152a37d0fe551b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-10 19:51:31 -07:00
Thiago Macieira
184717e3a7 dbus_minimal_p.h: copy the libdbus-1 copyright to the top
See qt_attributions.json too.

Pick-to: 6.4
Fixes: QTBUG-107128
Change-Id: I810d70e579eb4e2c8e45fffd1719fbf448154abf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-10 11:19:55 -07:00
Giuseppe D'Angelo
fcd294a9ec QPrivateSignal: disable implicit conversions from initializer_list
The whole point of QPrivateSignal is to forbid anyone but the class
itself from emitting a certain signal. This is a "workaround" introduced
in Qt 5.0, due to the fact that the PMF syntax for connections requires
users to take the address of a signal, and that is only possible if the
signal itself is public. (In fact, signals were protected in Qt 4.)

The Q_OBJECT macro defines the private QPrivateSignal class. A QObject
subclass that wants to "protect" its signal emissions can declare a
signal carrying an argument of type QPrivateSignal:

  signals:
    void aSignal(int, QPrivateSignal);

If the class itself wants to emit the signal, it can do so:

  emit aSignal(42, QPrivateSignal());

But if "someone else" wants to, they can't use the QPrivateSignal type
because it's private.

  emit obj.aSignal(42, SomeClass::QPrivateSignal());  // ERROR

Here's a hair in this soup: list initialization. If a braced-init-list
is used, [over.ics.list] simply *ignores* access control. This allows an
"untyped" initializer-list to match QPrivateSignal and perform aggregate
initialization:

  emit obj.aSignal(42, {}); // works!

This kind of defeats the whole purpose. Therefore: make QPrivateSignal
not an aggregate and give it an explicit default constructor, disabling
copy-list-initialization for it. This means that using `{}` will fail to
compile (class is no longer an aggregate, a constructor must be
selected, and copy-list-initialization will not select an explicit
constructor).

This isn't a complete fix by any means. There's always the possibility
of using enough template magic to extract QPrivateSignal's type (e.g. as
a local alias) and then create an object of that type; but that sounds
extremely unlikely to be happening "by accident" (whilst it's super-easy
to just type {} as the argument and not realize that you were not
supposed to do so).

[ChangeLog][QtCore][Potentially Source-Incompatible Changes] It is no
longer possible to use `{}` to construct a QPrivateSignal object
(specifically, QPrivateSignal's default constructor is now explicit).
This means that emitting a signal that carries a QPrivateSignal argument
(i.e. a "private signal") cannot any longer be done by using something
like `emit aSignal({})`; instead, such usages must be ported to
`emit aSignal(QPrivateSignal());` or equivalent.

Change-Id: Iac379aee3a8adca5a91d5db906a61bfcd0abc89f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-10 20:19:45 +02:00
Volker Hilsheimer
2ef130a41d JNI: add generic support for array-types
The typeSignature for a type T[] is always "[" + typeSignature<t>, so we
can just implicitly support arrays of any known type. To prevent support
for multi-dimensional arrays, make sure that the underlying type is not
also an array.

By adding a QJniTypes::isArrayType in addition (that is true for any
type with a signature starting with '['), methods like
QJniObject::callMethod could then return a special QJniArray type that
provides array-specific functionality.

As a drive-by, and since all lines need to be touched to add braces,
replace std::is_same<>::value with std::is_same_v.

Change-Id: Iccadf03cfceb8544381a8f635bb54baeddf46c99
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-10-10 20:19:30 +02:00
Mårten Nordheim
ad736e9150 tst_QTcpServer: blacklist addressReusable on macOS
For some reason it has become extremely flaky.
Blacklist to unblock most patches.

Pick-to: 6.4 6.2
Task-number: QTBUG-107500
Change-Id: I11c3ff5e018981be46c20282fa171bce687596b2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-10-10 19:22:32 +02:00
Mårten Nordheim
4f17a64f35 tst_QTcpServer: convert QSKIP to blacklist
So we can gather statistics on whether it is still failing

Pick-to: 6.4 6.2
Change-Id: I1f4080f4d96f31ce2b689cda175af3a35563e232
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-10-10 19:22:32 +02:00
Doris Verria
2acd212acc QGuiApp: Set QStyleHints's appearance based on platform theme
QStyleHintsPrivate::setAppearance was only called when the theme
changes, and up until then the reported QStyleHints::appearance()
was Unknown. To fix, the QGuiApplication should set the
appearance once the platform theme is created.

Change-Id: I5353031628d1f1a8b1e23bed0b2fb0bc0622cbe8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2022-10-10 15:48:28 +02:00
Doris Verria
abbd9c91f5 QIOSTheme: Set appearance based on UIScreen if no windows created yet
Set the theme's appearance based on the UIScreen's, which follows the
app's or system's configuration, if no UIWindows are created yet.

The UIWindow and UIScreen will have the same appearance (the
traitCollection change is propagated hierarchically from screen to
window) unless UIWindow's overrideUserStyleInterface is explicitly
set to differ from that of the screen. In that case,
traitCollectionDidChange will be called for the window (but not the
screen) and when we update the palette calling the UIColor API, the
colors will be resolved based on
UITraitCollection.currentTraitCollection property, which follows the
window's appearance. That is why we need to set the theme's appearance
based on the window's.

Change-Id: I43207f351559fb82efc2f281eafb3cd1c96bbf75
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-10-10 15:48:16 +02:00
Mårten Nordheim
9e7f91781d WindowsKeyMapper: Fix unsigned/signed mismatch error
error C2220: the following warning is treated as an error
warning C4018: '>': signed/unsigned mismatch

Pick-to: 6.2 6.4
Change-Id: I4ba59f3aa6bbd7b37fe469e6271df207a7d11c99
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-10-10 13:06:37 +02:00
Mikolaj Boc
bbbc952d01 Use the target output name for test targets on WASM
Since all tests can now be run by the batched test runner, rename the
main resource to a more suitable {_target_output_name}.html

Change-Id: Icda80ce95ac9ae51851d52ebb4b1ce668c528324
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-10-10 13:06:37 +02:00
Thiago Macieira
8c1776ee07 qpoll: disallow file descriptors bigger than FD_SETSIZE
I don't know which platforms qpoll.cpp is still used and if in those
there's even a way to increase the file descriptor limit above
FD_SETSIZE's. But this is an easy change and protects against buffer
overruns.

Pick-to: 6.4
Change-Id: I810d70e579eb4e2c8e45fffd1718ca1aac8e6bef
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-10 04:06:37 -07:00