Commit Graph

11601 Commits

Author SHA1 Message Date
Tor Arne Vestbø
55687924e3 cmake: Re-enable qcoreapplication and qtimer tests
They were disabled in ad0e3e26fa,
but that was probably accidental.

Change-Id: Ia9cbccfbeecfe84768c3465f5699ed44b7f932a5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-12 15:11:52 +02:00
Ulf Hermann
ef93fdeb09 Provide methods for adding values to a sequential iterable
Provide functionality to add and remove values, so that you can use a
sequential iterable as stack or queue if the underlying container
supports this. To this end, provide a way to specify whether the
value should be added or removed at the beginning or the end of the
iterable.

Change-Id: If63d302f3ca085e56d601116ce4dfaa6b94a0c4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-12 09:12:26 +02:00
Ulf Hermann
73fe229eb4 QMetaContainer: Add an "input" iterator capability
For completeness' sake we should expose this. The iterators provided by
QIterable and friends will check the category at runtime, and should give
sensible feedback.

Change-Id: I778894f340c862f79a18c6c5607bcbba98dd7598
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-12 09:12:18 +02:00
Timur Pocheptsov
605d2163f1 QSsl: workaround a 'very secure' OpenSSL version (CentOS 8.x et al)
CentOS it seems not only backported some OpenSSL 3 functions,
but also raised the default security level to 2, making some of
our keys (and MDs?) 'too weak' and failing auto-tests here and
there as a result. For our auto-test we lower the level to 1,
as it is expected to be.

Fixes: QTBUG-86336
Pick-to: 5.15
Change-Id: I7062a1b292e8b60eb9c2b2e82bd002f09f9da603
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-12 05:36:08 +02:00
Allan Sandfeld Jensen
5bb4baae03 Replace qreal with float in QColor
There is no reason to use double precision for colors. We at most have
16 significant bits anyway.

Change-Id: I8b402cd978675b8ba7248176976d934363212ff1
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-09-11 20:41:15 +02:00
Andreas Buhr
ac7e518a64 [QtCore] Fix QDateTime unit test: time zone of system was used
Test data for QDateTime unit tests was constructed in system's local
time, which made unit test outcome dependent on the time zone of the
system running the tests.
This led to failing unit tests on systems with libc6 version
2.31 or newer. A QDateTime in a timezone, which has daylight saving
time, was created and then used in Hawaii's time zone,which has no
daylight saving time. Newer glibc checks this and returns errors.
This patch changes the behavior to create the test data in a
specified time zone setting.

Task-number: QTBUG-80441
Change-Id: I0330b647fa011be99141dde09001ff2d58bd3a5f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-11 19:34:25 +02:00
Lars Knoll
0078391c18 Fix warnings coming from using the deprecated overload of qCheckSum
Change-Id: I719c2d56a690fd245d3917045de4005f118c688b
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-09-11 19:32:34 +02:00
Lars Knoll
7544c242cb Revert "Remove timeStep parameter from QAnimationDrive::advanceAnimation"
This reverts commit f51b690e91.

The commit made all animation tests in qtdeclarative on macOS
flaky.

Change-Id: I4ccaa879df7e2ba7e253657de01cbabc9b2c655f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-11 17:11:02 +02:00
Mårten Nordheim
e0918af700 QAuthenticator: condition using GSSAPI on credentials availability
AFAICT with GSSAPI the normal workflow is to run kinit or similar and
authenticate before running programs relying on it. Therefore
we can try to get the credentials before we choose whether or not
to use Negotiate.

Pick-to: 5.15
Task-number: QTBUG-85123
Change-Id: If0478fdd45389b2939ad87c2f582776fe56959bb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-11 13:37:48 +02:00
Ulf Hermann
549b7053a2 Rename QMetaSequence's "elements" to "values"
This is so that they are in line with the "value_type" usually found in
containers. Associative containers have "key_type" and "mapped_type" and
we will use those names for access to elements in QMetaAssociation.
Using "value" as name for sequential containers improves consistency.

Change-Id: I628b7e1446bb2d56843b843bca72d279a6b247e6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-11 11:30:58 +02:00
Mårten Nordheim
5a47939d5c tst_QNetworkReply: Avoid race in ioGetFromHttpWithAuth
Our authentication code is race-y by design:
1. When two requests are fired off and queued at the same time in the
same QHttpNetworkConnection then if one of them encounters
"authentication required" then it will copy whatever credentials it got
to all the other channels in the connection. This is likely what the
first part of the test is testing.
2. If a later request is fired off and it includes credentials in the
url then the newly included credentials should be used instead of the
cached ones.

The race here can occurr when one socket either takes too long to
connect or the connected signal is not received early enough. Then the
first socket is used for both requests and then we can hit case #2 when
the url contains credentials.

Pick-to: 5.15
Change-Id: I646a5378d8c1256b2de98b51912953df29f68cb2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-11 11:30:57 +02:00
Andy Shaw
37e7c3c116 Interbase: Add support for the boolean type
This is added to Interbase in v7 and Firebird in v3 which has been
available for sometime now. This means the minimum supported for
Interbase is now v7.

[ChangeLog][QtSQL][Interbase] The minimum required version for Interbase
is now v7.

Fixes: QTBUG-83401
Change-Id: I9927fd962f25c935be8ed5d2b7c76c00fb88cd8c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-09-11 07:32:42 +02:00
Richard Moe Gustavsen
b028fb60e3 macos: Rename macos style to macOS
This change shouldn't matter much to widgets, since style names
there are case insensitive. But for controls style names are
case sensitive, and in that case, "macOS" looks more correct.

Change-Id: Ia1d442bce465692ff58fecba1cc68ecbb2e52549
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-11 06:23:39 +02:00
Andreas Buhr
3a1dad83ed [QtCore] QDateTime: switch from newRow to addRow in unit tests
Instead of doing string formating first and then using QTest::newRow,
we can do both at the same time using QTest::addRow

Change-Id: Ia5c90eb705a806e37b96a1fa174a6557f91bee6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-09-11 06:12:13 +02:00
Andreas Buhr
1ab2d8f5eb [QtCore] Adapt QDateTime unit tests to use QByteArray
To not have to bother with encodings, a few QStrings are changed
to QByteArrays. This way, a few calls to QString::fromLatin1 and
to QString::toLocal8Bit can be removed

Change-Id: Ia0cf27fc2a86f9842ed0f3ebe47b050bb8a3f4e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-09-11 06:12:04 +02:00
Lars Knoll
6ae7a02104 Remove most compiler warnings about missing overrides
Remove around 1000 compiler warnings about missing overrides
in our auto tests.

This significantly reduce the compiler warning noise in our auto
tests, so that one can actually better see the real problems
inbetween.

Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-11 00:20:47 +02:00
Jarek Kobus
e15153a738 tst_QTimer::remainingTime(): get rid of QTest::currentTestFailed()
Looks this is redundant in fact and unneeded. The check can never be
evaluated to true, since if so, it would mean it had failed in the
previous iteration, in which we already handled the exit from the loop.

Fixed also some comments.

Task-number: QTBUG-83419
Change-Id: I4fe56bfac39cd58b1166967f3ccb80cdff882748
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-10 20:08:12 +02:00
Mårten Nordheim
8a3847aab9 QNAM: Enable HTTP/2 by default
It has been in Qt for some years now and 6.0 marks a good point to
enable it by default. The exception is connectToHostEncrypted where we
still require the users to enable it explicitly since there's no logical
way to disable it.

[ChangeLog][QtNetwork][QNetworkAccessManager] HTTP/2 is now enabled by
default.

Fixes: QTBUG-85902
Change-Id: Ia029a045727cc593d77df9eb3a5888522ad19199
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-10 18:28:43 +02:00
Joerg Bornemann
b5234817f1 Introduce QProcess::startCommand(QString, OpenMode)
The removal of the QProcess::start(QString, OpenMode) leads to more
porting work than anticipated. A call like

    QProcess p;
    p.start(cmdline);

must be transformed in the following cumbersome way:

    QProcess p;
    QStringList args = QProcess::splitCommand(cmdline);
    QString program = args.takeFirst();
    p.start(program, args);

This patch revives QProcess::start(QString, OpenMode) and renames it to
QProcess::startCommand. This is still source-incompatible, but the
transformation is much simpler:

    QProcess p;
    p.startCommand(cmdline);

[ChangeLog][QtCore][QProcess] Added QProcess::startCommand(QString,
OpenMode) as replacement for the removed QProcess::start(QString,
OpenMode).

Change-Id: I5499bbb39a025e115042c43a4cc63affddae585c
Reviewed-by: hjk <hjk@qt.io>
2020-09-10 18:05:28 +02:00
Timur Pocheptsov
4f658d04da Fix a rather sloppy test case in tst_QSslKey
It's not guaranteed that all curves we want to use are supported
by a specific build of OpenSSL library we have to link with. Filter
out files that contain EC, which is not among the curves, reported
by QSslConfiguration::supportedEllipticCurves.

Fixes: QTBUG-46203
Pick-to: 5.15
Change-Id: I70d7e6fcacb3d81f8c771e4a8d6cca06295e7474
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-10 17:32:09 +02:00
Andrei Golubev
ec7e680c50 Remove '\0' space reservation logic in QString
Changed QString to use implicit element reserved by QArrayData

Task-number: QTBUG-84320
Change-Id: If517500b3f0e71bb8d2989c64815a634aa8dd554
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-10 17:31:23 +02:00
Volker Hilsheimer
8186bd628f Remove obsolete APIs and comments from QAbstractPrintDialog
Merging QAbstractPrintDialog with QPrintDialog, as proposed in the
removed comment, seems to have little value, given that the platform
specific implementations rely on the current abstraction.

Adjust examples and tests; with the QAbstractPrintDialog test now
testing the QPrintDialog::options API, the corresponding test function
can be removed from the QPrinter test.

Change-Id: Ia8906627898332e8590ea9b27e3d71dfcc6e8d71
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-10 17:29:52 +02:00
Andreas Buhr
1b02cfd38d Adapt QDate unit tests to not take into account system locale
QDate was changed to consistently use the C local in
serialization and parsing in git commit
5ba66c5622.
This commit reflects this change in the unit tests.

Task-number: QTBUG-80441
Change-Id: Ib21a215ef0e36c9eaa2c161b92c6877a50ae6f06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-09-10 17:29:38 +02:00
Morten Johan Sørvig
b3c991ae8f Port from devicePixelRatioF() to devicePixelRatio()
This ports all of QtBase.

Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-10 17:28:11 +02:00
Andrei Golubev
7a15d71def Fix possible corner cases in qarraydataops.h
Updated moveNonPod function to behave correctly under
exceptions being thrown. This is the version that was implemented
at some point but then got changed prior to merge. Added tests for
moveInGrowthDirection (which uses moveNonPod in general case) to
verify that range movements are correctly done

Updated QCommonArrayOps access modifier from private to protected
to allow testing of internal stuff by subclassing

Task-number: QTBUG-84320
Change-Id: Idb994a72ee601762e32248670cdc7819aaca0088
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-10 14:21:47 +02:00
Andrei Golubev
6e8985e357 Make Q*ArrayOps erase aligned with std::vector::erase
Scoped GrowsBackwards-optimized erase to only be applied
when erase starts at the beginning of the element range.
In other cases, old "left-shifting" erase is used to align
with std::vector::erase invalidation policy

Task-number: QTBUG-84320
Change-Id: I2e7f3b96b056bc371119eb2d36cc7c74af52c394
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-10 11:24:19 +02:00
Allan Sandfeld Jensen
030962b01c Cleanup QAction::visible property
Gives it its own changed signal, and simplifies setting from group,
while fixing an inconsistency in propagation.

Change-Id: I22b243210260a8878144fa4b60204df46f847f37
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-10 09:24:18 +00:00
Shawn Rutledge
ae7442a4e9 Give QEventPoint a d-pointer after all
I still have doubts that QEventPoint can't be made small enough that
copying would be cheaper than reference-counting and all the indirections
in now-noninline accessors, but this gives us the usual freedom to
change the data members later on.

Change-Id: I792f7fc85ac3a9538589da9d7618b647edf0e70c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-10 03:15:49 +02:00
Jarek Kobus
db3d5a3097 Fix flaky QTimer::remainingTime() test
Before, we used not so accurate QTest::qWait(50)
to measure the accuracy of more precise timer's interval.
In addition, the checked range for remainingTime (50, 200)
was probably wrong, since by definition it couldn't be more than 150,
as we started the timer with interval of 200 and waited at least 50.

In this fix we have additional "tester" timer to measure remainingTime
of "tested" timer. The "tester" is a singleShot timer with interval of
50, and is started together with "tested" timer. Whenever the "tested"
timer timeouts, it restarts the "tester" timer - this is done desired
number of times (2 by default, like in the original test).

The test itself lies now inside tester's lambda. We fix the tested
range (at least 1, no more than 150). The minimum value could in
theory be greater, but it's enough to test that it's not overdue.

Finally, we wait for expected number of test runs. We give it twice
as much time as is in theory needed.

Task-number: QTBUG-83419
Task-number: QTBUG-58519
Change-Id: I43836d787d804f22bb66515ebb215d040189c4f3
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-09-10 02:49:59 +02:00
Ulf Hermann
7a2f129748 Blacklist tst_qcolumnview::scrollTo on macOS
It flaky fails for both normal and reverse cases.

Pick-to: 5.15
Task-number: QTBUG-41341
Change-Id: If6ecd6dc58f131bb67d46a5d508f59b6bb0fd962
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-09 18:52:11 +02:00
Thiago Macieira
7e93870401 QProcess/Unix: introduce setChildProcessModifier()
[ChangeLog][Source-Incompatible Changes] QProcess::setupChildProcess()
was removed. To execute code in a child process, use
QProcess::setChildProcessModifier()

[ChangeLog][QtCore][QProcess] Added setChildProcessModifier() function
with which one can provide code to be run in the Unix child process
between fork() and execve(). With this function, it is no longer
necessary to derive from QProcess in order to execute actions in the
child process.

Another reason is that we can tell whether the std::function carries a
valid target much more easily than we can tell whether QProcess was
overridden.

The setupChildProcess() virtual function does not need to be marked
final, since no overrider could ever return an inaccessible private
class. This also makes sure the error presented to the user is about the
return type, not about attempting to override a final.

Clang:
 error: virtual function 'f' has a different return type ('void') than the function it overrides (which has return type 'QProcess::Use_setChildProcessModifier_Instead')

GCC:
 error: conflicting return type specified for 'virtual void MyProcess::setupChildProcess()'
 note: overridden function is 'virtual QProcess::Use_setChildProcessModifier_Instead QProcess::setupChildProcess()'

ICC:
 error: return type is neither identical to nor covariant with return type "QProcess::Use_setChildProcessModifier_Instead" of overridden virtual function "QProcess::setupChildProcess"

MSVC is not relevant since it doesn't compile to Unix.

Change-Id: Ia8b65350cd5d49debca9fffd15f801161363aea7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-09-08 21:00:29 -07:00
Marcel Krems
348b86d976 Fix failures in tst_qdatetime under non-english locales
QDateTime::toString uses the C locale since 5ba66c5622
So don't expect locale specific day- and month-names.

Task-number: QTBUG-80441
Change-Id: I08f53b6b33ed9e7eaaa58df4ca6a966c4ba9ef24
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-09 06:00:28 +02:00
Allan Sandfeld Jensen
d263ab6af5 Create consistent sets of QImage methods
Adds consistently named inplace and imperative methods.

Change-Id: I8739c1c4585d2ba4aa181bb9a681255d76c120d7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-09-09 00:14:49 +01:00
Shawn Rutledge
0e475eeea6 Refactor testlib touch functions into qtestsupport_gui and _widgets
Because we removed public setters from QTouchEvent and QEventPoint in
4e400369c0 and now it's proposed to give
QEventPoint a d-pointer again, the implementation of QTouchEventSequence
needs to start using QMutableEventPoint: being a friend will no longer
be enough, because the member variables won't be accessible in the future.
But because we have separate test libs for Gui and Widgets, it needs to
be further refactored into two classes.

Change-Id: I0bfc0978fc4187348ac872e1330d95259d557b69
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-08 08:02:15 +02:00
Andy Shaw
13fe0ab5de Interbase: Correctly read/write arrays to the database
The fix ensures that it can find the column for the array correctly
when reading/writing and also handles the integer typed arrays correctly
too.

Pick-to: 5.15
Fixes: QTBUG-83409
Change-Id: I92d982bdf0927e6ebc6dce84fec9ad6c44c26c25
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-09-08 08:02:14 +02:00
Giuseppe D'Angelo
cf482d702b tst_qmenubar: stop doing math on an enum
Cast to the right datatypes.

Change-Id: Ia1ba9be1b0530263e810b50408f432dca485744c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-07 15:50:02 +02:00
Giuseppe D'Angelo
fec51be209 tst_qshortcut (x2): use op | instead of op + to combine keys
Following the introduction of QKeyCombination, reduce the number
of warnings raised by the test. Drive-by, remove some pointless
math like Qt::SHIFT+0, which does not make any sense and would
actually fail to compile (shortly).

Refactoring the test to fully use QKeyCombination (instead of
ints) is left as a future exercise; some QKeyCombination->int
warnings are still around.

Change-Id: If825bc4c369986623447927bb11493c4f58b544f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-07 15:50:02 +02:00
Tor Arne Vestbø
89f7a2759c Deliver Quit event when calling QCoreApplication::quit()
Instead of QCoreApplication::quit() directly calling exit(0), which would
leave QGuiApplication and client code out of the loop, we now send the
Quit event, and let it pass through event delivery, before finally ending
up in QCoreApplication::event(), where we call exit(0).

This has the advantage that QGuiApplication can ensure all windows are
closed before quitting, and if any of those windows ignore the close
event the quit will be aborted. This aligns the behavior of synthetic
quits via QCoreApplication::quit() with spontaneous quits from the
platform via QGuiApplicationPrivate::processApplicationTermination.

Clients who wish to exit the application without any event delivery or
potential user interaction can call the lower level exit() function
directly.

[ChangeLog][QtGui] Application termination via qApp->quit() will now
deliver Quit events to the application, which in turn will result in
application windows being closed as part of the application quit,
with an option to cancel the application quit by ignoring the close
event. Clients who explicitly want to exit the application without
any user interaction should call QCoreApplication::exit() explicitly.

Task-number: QTBUG-45262
Task-number: QTBUG-33235
Task-number: QTBUG-72013
Task-number: QTBUG-59782
Change-Id: Id4b3907e329b9ecfd936fe9a5f8a70cb66b76bb7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-07 14:41:16 +02:00
Lars Knoll
0ae5b8af9c Clean up QTextBoundaryFinder and qunicodetools
Make QTBF ready for Qt6 by using qsizetype in the API and use
QStringView where it makes sense.

Change the exported API of qunicodetools to use QStringView as
well and use char16_t internally.

Change-Id: I853537bcabf40546a8e60fdf2ee7d751bc371761
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-07 09:09:55 +02:00
Marcel Krems
c93b91c766 Remove deprecated method QQuaternion::conjugate
Change-Id: If539e47618357ef329925033842f266447632e6f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-07 04:36:16 +02:00
Christian Ehrlicher
4e2656a6d2 QStyleOptionGraphicsItem: remove deprecated member matrix/levelOfDetail
QStyleOptionGraphicsItem::matrix and levelOfDetail are deprecated and
not used anywhere anymore.

Change-Id: Id4b0fa8ac3ac53d771e858ecda5524a5e690342d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-06 18:31:43 +02:00
Allan Sandfeld Jensen
68198de4db Use C++17 [[maybe_unused]]
In some places needs to be ordered before const/constexpr though.

Change-Id: I57a521ac0ad22b5a018761c4d52befbef69d64c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-06 18:31:43 +02:00
Allan Sandfeld Jensen
d3ff95dcb8 Round float->qfloat16 to even
Calibrated to match F16C and ARM-FP16 hardware conversions.

Change-Id: I3bdd4d3db3046fee4aeb24e4ce8b9bc9a06e0397
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-06 12:35:12 +02:00
Lars Knoll
75d1d2a913 Get rid of hasPendingEvents() and flush()
They are unused.

Change-Id: I77383f2be45551401ed9c2f88285511134cc8b0d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-06 00:17:12 +02:00
Giuseppe D'Angelo
2ab91dd68e tst_qdbuscpp2xml: stop doing math on enumerations
Cast it to int to do math.

Change-Id: Ia553cccb7e160df50e77fba63d66d0ed45c246c2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-05 17:12:50 +02:00
Lars Knoll
bbc19bd979 Make test pass on machines with many cores
Just starting 20 threads to test this won't cut it if
the machine you're testing on has an ideal thread count
of 16 or larger.

Change-Id: Icba8f00aa836fec6da41c71b318e9e17bdd47c0e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-05 02:08:49 +02:00
Volker Hilsheimer
0f39cfae93 Change QWidget::enterEvent signature to take a QEnterEvent
This is a source incompatible change for widget implementors.
Leaving the old enterEvent as a virtual overload is problematic due to
shadowing. Best to make a clean cut, widget reimplementors will get a compile
time warning if they mark their override as such, or if they try to call the
parent class implementation.

Addresses ### Qt 6 comment.

[ChangeLog][QtWidgets][QWidget] The virtual enterEvent handler now receives
a QEnterEvent, which contains information about mouse position and button
states, rather than a plain QEvent.

Change-Id: I233f594fd79c0c090983b3db8532913d00132fde
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-05 02:06:26 +02:00
Liang Qi
c91d1fdc10 xcb: drop Xinerama support
[ChangeLog][Important Behavior Changes][X11] Xinerama is no longer
supported.

Fixes: QTBUG-86082
Change-Id: Ieb57d9035e1659fc22bf8333247fc3573fb62992
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-09-04 17:28:49 +00:00
Volker Hilsheimer
00a5629d8d Remove deprecated QPrinter and QPagedPaintDevice APIs
Adjusting the QPrinter test case - some use cases no longer exist, or are
already tested in QPageSize and QPageLayout tests.

Adjust examples and manual tests.

Change-Id: I01cbc65f3d8031aea2dac86dd942126ba708b111
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-04 08:37:59 +02:00
Jarek Kobus
225cc60954 Fix flaky QFutureWatcher::startFinish() test
Since waiting for a spy employs polling, it may happen
that while waiting for a startedSpy we had received already
a signal for finishedSpy. This explains current flakiness.

The fix is to connect to lambdas instead and update
the hit count accordingly. Inside lambdas we also
ensure the correct order for started / finised signals.

After waitForFinished() unblocks we ensure that possible
pending asynchronous signals (started / finished) are processed
and check the final state.

Task-number: QTBUG-83076
Change-Id: I16963ef9c011cb613d7b409d3e3032303a942336
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-03 20:45:00 +02:00