Commit Graph

9460 Commits

Author SHA1 Message Date
Timur Pocheptsov
2c5d21be43 H2 auto-test, degrage flowControlServerSide
our powerful VMs die/time out on 30 requests, use 10 only.

Change-Id: Ibf3ceedeac1839f9a88f88def844c7d61786b94f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 515c6e7639)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-06-13 04:16:54 +00:00
Mårten Nordheim
2e7b7e4c90 QSslSocket: add and set the TLSv1.3-specific PSK callback
If this callback is not set then OpenSSL will call the callback
used for <= TLS 1.2 unconditionally when connecting. If using PSK it
will call it again later once the preshared key is needed.
We don't currently handle the TLSv1.3 PSK, but we definitely should.
But for now we can work around it - when psk_use_session_callback is
called we simply change the PSK callback to a dummy function whose only
purpose is to restore the old callback.

This is mostly done to keep behavior the same as it is now for users
(and to keep our tests running).

Later we can add a new signal and handle this new feature properly.

Reviewed-by: Simo Fält <simo.falt@qt.io>
(cherry picked from commit d8efc8d718)

Task-number: QTBUG-67463
Change-Id: I4aca4ae73ec4be7c4f82a85e8864de103f35a834
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-06-13 04:16:09 +00:00
Timur Pocheptsov
c6763ec149 tst_qnetworkreply - QSKIP/disable tests that deadlock on Windows
We use global object to store errors found by q_X509Callback.
Thus, we also use a lock/mutex. It would appear all tests
involving in-process server and QNAM are prone to intermittent
failures on our Windows VMs - it's always about timeouts due
to the client socket (QNAM) locking and the server socket blocking
main thread while trying to acquire the same lock.

The real fix is to re-write our verification callback so that
it does not need locking/does not block the main and 'http'
threads as a result. But such change is too dangerous for
5.13.0 so we instead have a somewhat handicapped/reduced
test on Windows.

The fixed QSSlSocket will go into 5.13.

Task-number: QTBUG-76157
Change-Id: Ia54701bcb3f6f079a69e52c8904ac3efcee4a787
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-06-04 14:36:58 +02:00
Christian Ehrlicher
8bcc6f111b QComboBox: add QT_DEPRECATED_X() for deprecated functions
QT_DEPRECATED_X() was not added with
d6d33f0b80 for the deprecated
QComboBox functions - Add them now.

Change-Id: I8d4ea08766ae6ff052dfccac6c3f35ecf34affb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-09 20:29:26 +02:00
Liang Qi
b5c2535eb0 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/3rdparty/pcre2/qt_attribution.json

Change-Id: Ibae941cb12662f27bd6962ee02bc235971c59a15
2019-05-03 10:44:24 +02:00
Paul Lemire
389dec3e7c Only generate temporaries when it makes sense
- Never for global inputs
- Otherwise only if the temporary is referenced more than once
  -> meaning it's actually caching the result of some operation

Tests updated accordingly.

Change-Id: Ic76615370d23dee3965ca6350d5257a8be5a3e22
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2019-05-02 12:47:05 +00:00
Liang Qi
166889ddcb Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/kernel/qobject.cpp

Change-Id: I8ca1163a1fa8072dcd16ea4426c58219149599fd
2019-05-02 09:39:31 +02:00
Alexander Volkov
ef3daddae1 Use QPlatformTheme::TouchDoubleTapDistance for touch events
... and update the cached values on theme change.

Modify tst_QWidget::touchEventSynthesizedMouseEvent()
to avoid unexpected double click detection.

Change-Id: I151c47e851ebba7550b1b09caca2781c28d7d3d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-01 20:29:16 +00:00
Volker Hilsheimer
78d0b6e975 Ignore failing test for free space on APFS
The file system appears to cache too aggressively, so if the reported
storage size doesn't change after flushing to disk, ignore the failure.

Change-Id: Iba7dce79591447fac296bfe92c2dc993d36d0c2a
Fixes: QTBUG-69868
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-30 10:58:13 +00:00
Joerg Bornemann
0e4326d717 Remove cruft from testProcessEOF.pro
TEMPLATE_PREFIX is gone since Qt 5.0.0.

Change-Id: I181962b942191187baf62f13d0abd17e7ebdcce1
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-04-30 10:51:02 +00:00
Tony Sarajärvi
3308a81942 Extend blacklisting of setWindowState to cover RHELs
Task-number: QTBUG-68864
Change-Id: I7503877fbbe6109806d9fd087514588d2ac640c7
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-04-29 17:11:08 +00:00
Qt Forward Merge Bot
9f1a1e320c Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ibce9bfef928ce39070183c488ce86ae32e5ea705
2019-04-28 01:00:26 +02:00
Lars Knoll
b4cc294347 Fix page breaking with large images
Don't go into an infinite loop breaking pages, when an image is about
as large as the page. Correctly take top and bottom margins into account
when calculating whether the image could fit on one page.

Amends change 416b4cf685.

Fixes: QTBUG-73730
Change-Id: Id311ddf05510be3b1d131702f4e17025a9861e58
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-26 18:21:18 +00:00
Tony Sarajärvi
902ae438aa Extend blacklisting of dirsBeforeFiles as it's flaky
Task-number: QTBUG-75452
Change-Id: I4b35dfff6c0a888e62441e51985e0bccb2081be1
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-04-26 16:41:51 +00:00
Eirik Aavitsland
ecfda0d523 Fix manual lance test: avoid using deprecated api
...and other slight modernizations and minor fixes.

Change-Id: Ide587d9fe59ca9113ae775882c99a50debaf9000
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-26 07:47:12 +00:00
Qt Forward Merge Bot
0dff40adf8 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I6ecf7074eda57ef4954fb3fdc7a6d1e8cd229340
2019-04-26 01:00:13 +02:00
Eirik Aavitsland
d6c3fa6e0c Fix aliased painting with non-uniform scaling
The full stroker does not produce good results for aliased lines
thinner than 1 pixel. Avoid it by making sure that such thin lines
are painted by the cosmetic stroker, even when they have
non-uniform transformation.

Fixes: QTBUG-73866
Change-Id: I7b5f0fa555903246e0c3fd92cd435cc8c0b15a24
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-25 06:07:00 +00:00
Gatis Paeglis
37b5bb42d8 manual shortcut test: add more shortcut sequences
Change-Id: I45fdda6f35f7ab1416a273ed136e49bc3f002cc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-04-24 18:48:13 +00:00
Edward Welbourne
9dfc2aa75d Purge use of some deprecated methods from QDateTime tests
QDateTime's short names setUtcOffset() and utcOffset() have been
deprecated since 5.2, in favor of setOffsetFromUtc() and
offsetFromUtc().

QDate's shortDayName() and shortMOnthName() have been deprecated since
5.10, in favor of QLocale's dayName() and monthName().  Also, the
tests that were using them are testing methods only present when the
datestring feature is enabled; so condition them on that feature.

Change-Id: Ibfd4b132523ca8fbc1cb163353a44e0500877fd5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-23 17:31:21 +00:00
David Faure
ed66c932b1 QListWidgetItem constructors: don't emit dataChanged(invalid, invalid)
This is a regression introduced by 63967313f5 which blocked signals
on the view, but not on the model.

Change-Id: Ib2f93fe6ef842264aaba200c98ee4a19065ca220
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-04-23 16:17:20 +00:00
Shawn Rutledge
7718b70898 Blacklist tst_QWidget::windowState on WinRT
Task-number: QTBUG-75270
Change-Id: Icf1089b4d3681bc6a42be9c095acb5315dd67781
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-04-23 11:32:28 +00:00
David Faure
ba6e0e4aac QHeaderView: fix assert when restoring section sizes over less columns
If columns are removed and we get notified via layoutChanged, the code
tries to restore old section sizes, and went out of bounds, leading to
an assert in QVector. Simply add an if() to skip restoring out-of-bounds columns.

This comes from https://bugs.kde.org/show_bug.cgi?id=395181,
which translates into the unittest that is part of this commit.

Change-Id: Ide42176a758f87b21957c40508127d67f1d5a2d9
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2019-04-23 09:42:54 +00:00
Liang Qi
9d67bf6e96 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/tools/qlocale.qdoc
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
2019-04-16 09:34:50 +02:00
Hugo Beauzée-Luyssen
2a815855a9 corelib: invokeMethod: Allow non copyable functors to be used
[ChangeLog][QtCore][QMetaObject] Non-copyable lambdas can now be used
with invokeMethod(). For consistency reasons, the functor object is
now always moved.

Fixes: QTBUG-69683
Change-Id: I66ff5e21d6d1926f0f7c5f8c304bed1a90b69917
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-04-12 20:18:20 +00:00
Frederik Gladhorn
21dcb96ddc QStyleSheetStyle::repolish: only run on direct children
When re-parenting, some widgets change their children. For example
QLabel, when set to rich text, will not update, until receiving a polish
call, at which time getting a list of all children recursively and then
trying to call functions on them will crash, since the children change
in the middle of this operation.

Fixes: QTBUG-69204
Fixes: QTBUG-74667
Change-Id: I95dd83ebeed14c017e22552ddd47658ae8a09353
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-04-12 14:33:32 +00:00
Paul Lemire
a552864c3b QShaderGenerator: don't generate temporary variables for global inputs
Up until now, the QShaderGenerator would create temporary variables
for uniform, attributes, const. This change makes it use the global
inputs directly rather than relying on the intermediate properties.

Change-Id: Ia9497367d61e536969fe87536606f309c286dbb2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2019-04-10 09:52:53 +00:00
Paul Lemire
60181f13a3 QShaderGenerator: fix substitution for attributes on GL2/ES2
GL2/ES2 expect it to be attribute and not in like later versions of OpenGL.

Task-number: QTBUG-74829
Change-Id: Iddd22386ed315d6e6843d8225e49a4b73b6ad9ba
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2019-04-10 09:52:50 +00:00
Volker Hilsheimer
3f17029aa1 Fix resolving NTFS symbolic links that point to UNC shares
Without this change, the target of a symbolic link that points to a UNC
share would include UNC in the target path, and not be correctly made
absolute.

Add a relevant test case, and use the opportunity to factor out the
helper code that creates NTFS symlinks into a function that takes
care of error handling.

The file created with the new test case only gets cleaned up correctly
when passing the file path into QDir::rmdir, which is either way the
right thing to do.

[ChangeLog][QtCore][QFileInfo] Fixed resolving of symbolic links to UNC
shares on NTFS file systems.

Change-Id: I9ba75d627aedf7c4cc289f0cb71088d795d30d8a
Fixes: QTBUG-73688
Task-number: QTBUG-63970
Task-number: QTBUG-30401
Task-number: QTBUG-20791
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-10 04:53:52 +00:00
Qt Forward Merge Bot
ff88e20b83 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
2019-04-10 01:00:08 +02:00
Milian Wolff
5f2afe18cc Fix QMetaObject::newInstance on non-QObject meta object
QMetaObject::newInstance returns a QObject, thus it's not possible to
create a new instance of a Q_GADGET using this function. Previously, we
returned a non-null QObject pointer for such scenarios, which then
leads to crashes when one tries to use it. Now, we check whether the
meta object inherits QObject's meta object, and error out early
otherwise.

Change-Id: I7b1fb6c8d48b3e98161894be2f281a491963345e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-09 15:46:35 +00:00
Timur Pocheptsov
4b445481c3 tst_http2 - extend 'singleRequest' test case
to test different h2 modes: "h2c" (clear text with protocol upgrade),
"h2" (encrypted, negotiating via ALPN extension), "h2-direct" (encrypted,
no ALPN), "h2c-direct" (plain text, no protocol upgrade). This patch-set
is  an amendment to the recent fix in the protocol handler where we were
crashing in "h2c-direct" mode.

Change-Id: I3ff5ed1396a59b72b59a95f927d404ccd202d0b8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-04-09 04:08:01 +00:00
Qt Forward Merge Bot
93acb76222 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I05d14a40e17554691bad369d0363e88413afd9b3
2019-04-09 01:00:06 +02:00
Friedemann Kleint
f7949df243 tst_QUrl: Fix left-over temporary directory on Windows
The test changes the current directory to the test directory
in fromUserInputWithCwd(), but did not restore it, causing:

Totals 898 passed, 0 failed, 1 skipped, 0 blacklisted, 368ms
********* Finished testing of tst_QUrl *********
QTemporaryDir Unable to remove "C:\\TEMP\\tst_qurl-ryVxqu" most likely due to the presence of read-only files.

Restore the old directory at the end to fix this.

Change-Id: I62669868f3c6d97dd38ebac76515428c14b7e1e7
Reviewed-by: David Faure <david.faure@kdab.com>
2019-04-08 18:44:25 +00:00
Qt Forward Merge Bot
01a269593d Merge remote-tracking branch 'origin/5.12.3' into 5.12
Change-Id: Id60d508c0f25fd5e67be07daafd2d4c56ae73934
2019-04-08 09:53:39 +02:00
Qt Forward Merge Bot
ce7f14d2e0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iec860bb703f983b7438e67c695b9c454e72b3e0f
2019-04-06 01:00:08 +02:00
Edward Welbourne
82ad4be4a2 Fix various uncommon cases in QTzTimeZonePrivate backend
Includes a fixup for 03fadc26e7, which
removed the check on empty transition list, needed when no data are
available.  Ensured that such a data-free zone would in fact be
noticed as invalid during init().

Fixed handling of times before the epoch (we still want to consult a
POSIX rule, if that's all that's available) while ensuring we (as
documented) ignore DST for such times.

Fixed handling of large times (milliseconds since epoch outside int
range) when looking up POSIX rules.  Gave QTimeZonePrivate a YearRange
enum (to be moved to QTimeZone once this merges up to dev) so as to
eliminate a magic number (and avoid adding another).  Moved
year-munging in POSIX rules after the one early return, which doesn't
need the year range.

Added test-cases for the distant past/future (just checking UTC's
offsets; SLES has a minimal version of the UTC data-file that triggers
the bugs fixed here for them).

Fixes: QTBUG-74666
Fixes: QTBUG-74550
Change-Id: Ief7b7e55c62cf11064700934f404b2fc283614e1
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-05 20:31:26 +00:00
Friedemann Kleint
5a168507b1 Manual dialog test: Output URLs when testing QFileDialog
Change-Id: Icfaedcd68ff387cc888e41ec0b1db1810122b229
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-05 05:57:17 +00:00
Volker Hilsheimer
7935d86e7d Populate test data for reverse lookups using system tools
Hardcoding IP addresses and their respective DNS records is fragile.
We care about Qt producing the same result as other DNS querying tools,
so testing that instead.

Running a python script for this is easiest, and assumed to be quite
reliable.

In case where python fails/is not present, fall back to nslookup.
That tool is available on Linux, macOS, and Windows, although the
output it produces varies. This change implements very basic
line-parsing that can interpret the various results encountered
during testing on those platforms.

This also reverts commit bbaceff253fae13d8e56691bc9de7e1981db5118,
which blacklisted the tests that failed due to changes in DNS
records.

Use the opportunity to replace usage of gitorious.org.

Change-Id: I967de226bd603c805df7fe3ed4e871d92d2d0750
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-04-05 05:50:18 +00:00
Qt Forward Merge Bot
f80b7995f3 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia7328524f2cd9d5995ac8705f0fe0bf570b2e831
2019-04-04 01:00:07 +02:00
Friedemann Kleint
06d753e87b Brush up and stabilize tst_QSizeGrip
- Remove unused dummyWidget and thus empty slots initTestCase(),
  cleanupTestCase().
- Add slot cleanup() checking for an empty top level widgets list
  and introduce QScopedPointer to ensure it passes.
- Use QTRY_VERIFY in hideAndShowOnWindowStateChange().

Flakyness has been observed on openSUSE:

 FAIL!  : tst_QSizeGrip::hideAndShowOnWindowStateChange(Qt::Window) '!sizeGrip->isVisible()' returned FALSE. ()
           Loc: [tst_qsizegrip.cpp(126)]

Change-Id: I340fc1892dc00bcff1985e5a8a1e535975736484
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-04-03 15:06:06 +00:00
Qt Forward Merge Bot
ffe9c395dc Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia5d893e57deb78bc32e2053a5a79543ff847fe32
2019-04-02 01:00:26 +02:00
Alexander Volkov
011794130c Forward physical parameters for derived QImages
More specifically, for masks and rotated images.
Add tests for it, also add tests that image metadata is
forwarded for converted and copied images.

Fixes: QTBUG-49259
Change-Id: I05d4a468b17f53a2625500b871c01b2c53b981a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-04-01 15:21:27 +00:00
Alexander Volkov
685b8db13a Forward devicePixelRatio in QPixmap::mask()
Also add a test checking that devicePixelRatio is forwarded to
derivatives of QPixmap.

Change-Id: Idb2b3f033ccc0fd49bf54b11f5dffbce5a19b006
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-04-01 15:21:18 +00:00
Edward Welbourne
954b73445c Refine underflow check in QLocaleData::convertDoubleToFloat()
A string can parse as a non-zero double that's smaller than the
smallest float yet be a faithful representation of the smallest float.
So rather than testing for non-zero doubles less than the smallest
float, test for non-zero doubles that cast to float zero; these
underflow.  This means small values close below the smallest float
shall round up to it, rather than down to zero, requiring a tweak to
an existing test.  Added a test for the boundary case (and tidied the
test data).

Fixes: QTBUG-74833
Change-Id: I4cb30b3c0e54683574b98253505607caaf88fbfb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-01 14:40:14 +00:00
Eirik Aavitsland
3b7db8ac90 Fix assert/crash when creating QBrush with null QGradient
The QBrush constructor taking a QGradient would assert or crash if
passed a null (NoGradient) gradient. But it is not necessary for the
API to be as brittle as that: instead the result can simply be a null
QBrush object, i.e. the same as the default QBrush() constructor
creates (style == NoBrush).

This issue comes up now since with the recent introduction of
QGradient presets, the API opens for using QGradient directly, whereas
earlier, only the subclasses QLinearGradient etc. were to be used.

Fixes: QTBUG-74648
Change-Id: I1a9b1c4654e4375aa6684700a262cc0946851448
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-04-01 11:56:42 +00:00
Kari Oikarinen
18e4cf2900 Merge 5.12 into 5.12.3
Change-Id: I76905e3540585c3be221b89453c725828b05940b
2019-04-01 09:16:33 +03:00
Joerg Bornemann
9e97d64ccd Fix installation of .pdb files for applications that have VERSION set
For applications that set VERSION the installation targets of pdb
files were wrong in qmake's nmake Makefile generator.

Replace code that tries to reconstruct that target's versioned
extension with TARGET_EXT which already contains the fully resolved
target extension.

Fixes: QTBUG-74265
Change-Id: I9553a5f70170e077a59c866079ae51647ae80bef
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-03-31 12:45:24 +00:00
Qt Forward Merge Bot
0a7302abbc Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9935bacae0d6ba532418fc3d28adbc7ca1463604
2019-03-30 01:00:07 +01:00
Tony Sarajärvi
8d154810f5 Extend blacklistnig of tst_qwidgets to cover RHEL 7.6
Task-number: QTBUG-46116
Change-Id: I7d74dca7030a9c21b3654e3b5cde94015497208e
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-03-29 19:26:25 +00:00
Volker Hilsheimer
743e883c12 Blacklist the reverse lookup of 8.8.8.8 to unblock integrations
The DNS entry for the host has changed, dig answers with dns.google,
not with google-public-dns-a.google.com. While developing a proper
fix to the test, blacklisting this particular lookup allows
integrations to pass in the meantime.

Change-Id: Id37da6b24554803bf4e2c84be5b949ded40566e8
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-29 13:45:47 +00:00