Commit Graph

35604 Commits

Author SHA1 Message Date
Kari Oikarinen
edef007137 tests/auto/gui/kernel: Use QTRY_VERIFY instead of manual wait loops
This reduces the timeout from 10 seconds to the default 5, but the tested events
(resize events, painting) seem like something that should happen in 5 seconds.

Change-Id: I1d12372f37264bf7be64096e43813cd03f567102
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-04-11 06:11:27 +00:00
Kari Oikarinen
b318c14bd5 Stabilize tst_QWidget_window::setWindowState
Bumping the timeout removed flaky failures in an RHEL debug VM.

Task-number: QTBUG-67151
Task-number: QTBUG-66216
Change-Id: I2fde636149f5104a41b757df956d84edc420e7c7
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-11 06:07:26 +00:00
Kari Oikarinen
8c3475c190 tst_QGL: Use qWaitForWindowExposed()
Instead of an unconditional wait.

Change-Id: I360cd665c10c3fd4f936c95ef04957ae1c49c0de
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-11 06:05:46 +00:00
Juan Jose Casafranca
95c8f24b71 Enable BuiltIn input in the shader graph builder
BuiltIn inputs shouldnt be translated into a code input. We comment the
input line for this variables

Change-Id: I3b7d2fd06afc6a122d90a999fc5a5246fc93234e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2018-04-10 23:49:37 +00:00
Oswald Buddenhagen
436a6fbb83 configure: make plain -xcb switch effective
the option is a quad enum, with "yes" meaning "either system or qt". the
distinction is made only in the "system-xcb" feature, while "xcb" itself
must be forced on in the "yes" case.

Task-number: QTBUG-67251
Change-Id: Ib706e79a902ae0f1b64ca6d4611c9214b7b7e928
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-10 18:51:18 +00:00
Oswald Buddenhagen
2c6801cb37 configure: cache test output as well
that way we can create a config.log which is consistent with the end
state even if (some) tests are not executed this time around.

Change-Id: Ia953ede62d6640aab912559f435ceb1f9ec6d9dc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-10 18:51:13 +00:00
Oswald Buddenhagen
0e204c7dc4 don't call qmake's exists() with an empty argument
Change-Id: I73330bd1c2de1734c5ac5c668ff9af7e85fc902a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-10 18:51:07 +00:00
Dmitry Shachnev
a35c6a49c9 glx: Fix loading OpenGL library when libGL.so symlink is missing
Task-number: QTBUG-67537
Change-Id: Ib59bc27582f44b0c6b04efa57c44d877e1685bbb
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-10 19:57:51 +00:00
Sergio Martins
4eeafe1cbf Fix crash if dock widget gets deleted while dragging
By using a QPointer.

Change-Id: I16832dadc9cd8cefc4f9f276b1242c0000097b95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-10 15:56:18 +00:00
Mikhail Svetkin
28f9b35b35 Fix integer overflow (1 << (' ' - 1))
On platforms where integer by default is int32(max is 2147483647) and
(1 << (' ' - 1)) will be 2147483648

Change-Id: I790d33bd4e473925d6897dd87cbffdfe8dd7938f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-10 09:29:56 +00:00
Anton Kudryavtsev
4160315fb5 QSplitter::indexOf: fix documentation
Change-Id: I2943c076879cbf229f209743b3b5c1f5fcd78302
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-10 09:23:41 +00:00
Tor Arne Vestbø
49a760e454 iOS: Remove sending of duplicate touch events after broken merge
The merge in 0f315adf91 resulted in keeping both code paths,
in effect sending two touch events for each native touch event,
and also re-introduced the bug fixed by sending the touch events
asynchronously in some cases.

Change-Id: Id81f02d9597f4e0baeaddbdf9057fa32b6c31b2f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-10 08:59:12 +00:00
Kari Oikarinen
32d9cf7310 Fix tst_QFiledialog::completer
The test was failing because the files it expected to create were not actually
visible on the disk.

This was because 189e9c93d7 made QTemporaryFile
use unnamed files if the file name is not actually requested. Fix by forcing the
temporary file to be made with the requested name.

CI has not caught this because the test executable is marked insignificant_test
on Linux.

Change-Id: Ibe0244fdfcc66acf3be4314da51b4c0b3b520b71
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-04-10 08:33:15 +00:00
Kari Oikarinen
3e2c930242 tst_QEventLoop: Remove unconditional qWait()
Task-number: QTBUG-63992
Change-Id: I9d9e3966252f01cded489313561641e1c0292b91
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-10 08:32:21 +00:00
Andy Shaw
ef2d1e3970 Extend the MariaDB define check to cover the later versions too
Change-Id: Ide89b4e07feb116bf152cbf3f5630d313e8ba0f1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-10 08:07:51 +00:00
Gabriel de Dietrich
3b85d53913 macx-clang: Update informal documentation for xcb build
Remove references to XKB and explain what to do if
pkg-config is missing or unwanted.

Change-Id: I099bf01ff49e1b8f6e822a50f0fe4904965a7a9f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-09 17:55:10 +00:00
Gatis Paeglis
89ab15ac91 xcb: various coding style cleanups in qxcbbackingstore
- Pass QXcbBackingStoreImage a pointer to QXcbBackingStore. This
allow for simpler QXcbBackingStoreImage ctor.

- Use member initializers.

Change-Id: Ia992390060bb30e1184813cd0d115a8bf0fbc237
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-04-09 16:31:06 +00:00
Gatis Paeglis
315327f3d6 xcb: rename two classes in qxcbbackingstore
QXcbShmImage to QXcbBackingStoreImage as it is an image that
might or might not have SHM capability. The current name implies
that it always uses SHM.

QXcbShmGraphicsBuffer to QXcbGraphicsBuffer as it has nothing to
do with SHM.

Change-Id: I57ced75891e8b10515142769278a7f3f40da91ef
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-04-09 16:30:50 +00:00
Orgad Shaneh
fe19527a43 Configure: Restore default prefix on Windows
The configure unification accidentally changed it to /usr/local as used on
unix. Use C:/Qt again.

Task-number: QTBUG-61373
Change-Id: I758c639bdb07c97b55f990821e73a5135038f4a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-09 15:32:19 +00:00
Paul Wicking
37161d0380 Doc: Update QVariant::toString description, update see also links
Change the toString description to reflect that the listed types are not
exclusive, and update see also link to link to the canConvert method
that includes conversion table.

Task-number: QTBUG-67174
Change-Id: I3ad2889c98a235995b94a2d0496a6fb8c024b7bb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-04-09 09:43:51 +00:00
Mårten Nordheim
5c4e5032b5 Unblacklist qsslkey for Linux
Except RHEL-6.6 and 7.4

It was blacklisted in f3939d943e, along
with a lot of other entries. No specifics are known about why it was
blacklisted originally, but now it only fails on RHEL because they
use OpenSSL 1.0.1.

Change-Id: I6d1d1b7b7bf5386b2115b8780163550cf03bbad7
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-04-09 09:34:50 +00:00
Mikhail Svetkin
f5a624c9b9 Fix integer overflow (1 << 31)
On platforms where integer by default is int32(max is 2147483647) and
(1 << 31) will be 2147483648

Change-Id: I59ccb5344d5ad7d085f01bbc7cebdf6152ff7755
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-09 08:40:29 +00:00
Mårten Nordheim
1c92bb87fe Fix TlsV1SslV3 case in the WinRT SSL backend
It would previously only enable TLS v1.0, but it should also enable
SSL v3. According to Microsoft's documentation[0] that is exactly what
"SocketProtectionLevel_Ssl" does.

[0]: https://docs.microsoft.com/en-us/uwp/api/windows.networking.sockets.socketprotectionlevel

Change-Id: Id48f1ad310d994b8379116c9fa2102db858d7f69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-04-09 07:24:52 +00:00
Johan Klokkhammer Helsing
1b109dbd91 tst_QClipboard: Skip on Wayland, as it requires real input events
On Wayland, manipulating the clipboard requires an input event serial, which is
not possible to get unless the compositor sends us input events.

Change-Id: If5231a5db85f8d6ad988ea93f240cee0c3466f9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-09 07:12:29 +00:00
Johan Klokkhammer Helsing
b451c9dfdc tst_QTouchEvent: Wait for window exposed instead of active
This makes the tests pass on Wayland compositors that don't automatically give
focus to newly created windows. Such as a headless Weston, which is very useful
for testing.

Task-number: QTBUG-66846
Change-Id: I502504b333499c89be193a3ebc19d41264a13580
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-04-09 07:11:47 +00:00
Nico Vertriest
5ffd47b764 Doc: Update connect syntax in I18n Widgets Example
Task-number: QTBUG-60635
Change-Id: Icfa0d09ac6c9ad4396fbe1138277bb1dd866a803
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-04-09 06:51:23 +00:00
Nico Vertriest
5c240f380a Doc: Add brief statements to Address Book Example chapters
Task-number: QTBUG-60635
Change-Id: Ice6d2b6a475ba4352a87bb46366826334aed2af2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-04-09 06:51:07 +00:00
Nico Vertriest
cb57700456 Doc: Update Find Files example
- review text
- update screenshot

Task-number: QTBUG-60635
Change-Id: I596ce0e08be9ed9aea7834eeda1c3c2c19c28d7a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-04-09 06:50:52 +00:00
Nico Vertriest
23b2d2ada5 Doc: Update Event Transitions Example
- added screenshot
- some modifications to the text

Task-number QTBUG-60635

Change-Id: I57b269f93cdba696b424b5ba008d0f46ac612cda
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-04-09 06:50:21 +00:00
Kai Koehne
335754d0a3 Fix license header for tst_toolingsupport.cpp
Change-Id: Id355afc8eb57a40a0f8d06fa2920f03d94ef9337
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 06:37:01 +00:00
Kari Oikarinen
b49a2e671a tst_QPrinter: Use qWaitForWindowActive() to wait for dialog
Instead of an unconditional wait.

The QSKIP is necessary because the PDF format is non-native and the Windows
implementation of QPrintDialog doesn't work then.

The macOS implementation has the same warning, so add the check for that OS
as well.

The test has previously passed, since it hasn't seen not actually opening the
dialog as an issue.

Change-Id: Ib53e378b232580358f13e0c5206404412f9e6ee2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-09 05:59:39 +00:00
Thiago Macieira
a9d903d18f QSemaphore: Fix 64-bit Linux QSemaphores initialized to non-zero
The original design for the 64-bit futex had the token count replicated
in the high part. But the constructor wasn't setting it. This is one of
the issues I had noticed when investigating QTBUG-66875, but didn't need
to address since the the fix I ended up applying in commit
081c001deb made that unnecessary: the high
part only had the number of waiters.

Unfortunately, when commit f502270c0f06daba75c1da381bd1658d81aa7bba
brought back the token count in the high part, I failed to correct that
problem. As a consequence, every QSemaphore that was initialized in the
constructor to a non-zero value would eventually deadlock.

This commit fixes that oversight.

Task-number: QTBUG-67481
Change-Id: I662b8f168c74440ab1a8fffd1522be6b85adb4d0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io>
2018-04-06 22:46:49 +00:00
Edward Welbourne
28c9ad199c Revise dates of Pacific/Kiritimati's day-skip transition
The TZ database has recently revised its ccount of when they skipped a
day to cross the international date line, from skipping Jan 1st 1995
to skipping December 31st 1994.  So Move the before-days check to
December 30th; and correct the Feb 2nd that was meant to be Jan 2nd
(and does need to remain so, for compatibility with systems with out
of date data).

Task-number: QTBUG-67497
Change-Id: I5b9483c553205817f995f91793662a5a85e03192
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-04-06 18:05:04 +00:00
Johan Klokkhammer Helsing
fbb9c0461c QOpenGLTexture: Set wrap mode if NPOT textures are not fully supported
The OpenGL wrap mode defaults to GL_REPEAT although it is not supported for
non-power-of-two textures on hardware that only has limited support.

I.e. the following would create a texture with an invalid wrap mode:

    auto *t = new QOpenGLTexture(QOpenGLTexture::Target2D);
    t.setSize(123, 456);

This patch adds a check in QOpenGLWindow::setSize to see if it's called with a
non-power-of-two size on hardware without full support, and if so sets wrapMode
to ClampToEdge (which should work on devices with limited support).

Task-number: QTBUG-67418
Change-Id: I56e9f4383dbf5430c2bc5e4e9e585712b3603c13
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-04-06 12:47:11 +00:00
Andy Shaw
d90fb72c20 Pass on local html links with a fragment to openUrl()
If a file link to a html file has a fragment part included then this
will be lost when passed to QDesktopServices::openUrl() as this is not
kept in the conversion of the QUrl. So by checking the filename in the
case of a fragment existing in the url, we can be sure that the
information is passed on correctly for html files.

Task-number: QTBUG-14460
Change-Id: I8167d8c164713dd999603ba9e74150f4f1a4abea
Reviewed-by: David Faure <david.faure@kdab.com>
2018-04-06 12:45:02 +00:00
Andy Shaw
ec23d96c86 oci: Use OCIBindByPos2 to accommodate data longer than USHRT_MAX
OCIBindByPos2 is only needed when using execBatch(), binding data that
is longer than USHRT_MAX works for exec() so this is left unchanged.

Change-Id: Ifdcf91939d184f225d24c13052ea0b81611ecf91
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-06 12:44:37 +00:00
Kari Oikarinen
fd87c8da82 tests/auto/other: Avoid unconditional qWait()s
There is no need to qWait() before a QTRY_VERIFY. qWait() will also
intermittently handle events while waiting, so calling it in a loop isn't
necessary.

Change-Id: Ica7fbf18c03e673213dd9b72f31f71937cdcb145
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-06 07:19:19 +00:00
David Faure
a1b1dd3b84 QMimeDatabase: fix assert when fetching data for invalid mimetype
The Q_ASSERT(mimePrivate.fromCache) at qmimedatabase.cpp:218
which I added in commit 7a5644d648, was being triggered when calling comment()
for invalid mimetypes such as db.mimeTypeForName("").

Change-Id: I8037041a4b435d2a5ba24ec94b7858e38b2f0bf2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-06 07:19:01 +00:00
David Faure
e729ac6dc5 QSqlDatabase: Skip confusing thread warning on invalid QSqlDatabase
If the db isn't valid, then that's the actual issue, not the fact that we're
getting the same invalid db (with the same driver QSqlNullDriver) in
multiple threads.

Change-Id: I95490818ed78e741c3823e115f139c2cff01b0b1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-04-06 07:18:03 +00:00
Eirik Aavitsland
cab5f37ef4 Fix visual artifacts in diffuse image dithering (the default)
The distributed error fractions in the Floyd-Steinberg dithering
algorithm were not computed precisely. In particular, rounding errors
could be accumulated, leading to visual artifacts.

Task-number: QTBUG-67425
Change-Id: I77b48c3cab3e66ca161721d14b58fcc4188e74a8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-04-06 06:40:37 +00:00
Joerg Bornemann
0ee5cbb1a4 Set WindowsTargetPlatform[Min]Version if WindowsSDKVersion is set
This fixes qmake-generated project files for Visual Studio 2017 for
setups where the Windows 8.1 SDK is not installed.

Task-number: QTBUG-66265
Change-Id: I67712019f7142e40262f171eb23f9f1e6ab3a251
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-06 06:18:00 +00:00
Kari Oikarinen
b32d16d468 tst_QLocale: Avoid manual deletes
Also use data-driven test to reduce duplication.

Change-Id: I9516e52267cb3c7b239030fd73dbbf23ac8f52f7
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-06 05:44:50 +00:00
Oliver Wolff
11adeb24ff winrt: socket engine: Replace last occurrences of old connect syntax
Change-Id: I1d2f3b0b39de252f5392a2411ff4e3d94fd8593b
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-04-06 05:31:05 +00:00
Oliver Wolff
a634f01402 winrt: Properly deinitialize socket on connection failure
Change-Id: I4dde73423111ca4af386fa76ac26d1a1161fe493
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-04-06 05:31:04 +00:00
Oliver Wolff
29b21e83ba winrt: process pending data before closing a socket connection
If data is received and the remote immediately closes the connection,
it was possible that data was lost. If a remote closes the connection
make sure that any pending data is processed, before signaling closing
of the socket.

Change-Id: Ia94a616a31184fd28695919baaff99811fe0f1dd
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-04-06 05:31:03 +00:00
Kai Koehne
20d2f02485 Doc: Remove section about Qt Gui in Qt 4 from overview page
Qt 5 is now old enough that the delta to Qt 4 doesn't need to be on
the central module page anymore. This is best left to

   https://doc.qt.io/qt-5/portingguide.html

Change-Id: If65ef91765e1aca37fd7f107c2334ac65e403cd3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-04-06 05:29:53 +00:00
Jan Grulich
470a50375a Avoid multiple connections to same response in FileChooser portal
When not specified, xdg-desktop-portal keeps using same Request object
over and over when returning response, causing multiple connections
to same slot on same DBus object. While this is not problem when using
FileDialog just once, it is a problem for QML FileDialog which is
usually reused. For this purpose x-d-p provides handle_token option
where you can specify token to be used when creating Request objects.

Change-Id: Ie6569700c48e05fcefa4d5c22c921410f87ea7ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-06 05:07:05 +00:00
Gabriel de Dietrich
b6f7230cda configure: Detect Cocoa instead of Carbon
Change-Id: I9d1ff47481ad450b4b57c82e15186657eb7dcf93
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-05 21:04:22 +00:00
Gabriel de Dietrich
8396162027 QTabBar: Repaint when releasing mouse on selected tab
Some styles, most notably QMacStyle, require this to
properly reflect the pressed state.

Change-Id: Ie841d97afbe3cfdfde1254a7069876a1a0af2e52
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-05 21:04:06 +00:00
Gabriel de Dietrich
cff9142942 QMacStyle: Fix "on" toggle button text color
Change-Id: I344c63debdcf012a16305f1b2124e8ad0785d982
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-05 21:03:57 +00:00