Commit Graph

36165 Commits

Author SHA1 Message Date
Kari Oikarinen
a88063008d Blacklist tst_QItemDelegate::comboBox on openSUSE
This failed (occasionally) in finding the editor widget, so wait for the window
to be shown properly. Also enter the event loop with QTRY_VERIFY and not for a
fixed time of 1 s.

This however just moved the point of failure. Now the test fails since the
clearing and setting of focus does not dismiss the editor widget sometimes, so
still blacklist it.

Task-number: QTBUG-67282
Task-number: QTBUG-66216
Change-Id: Iec598609fce23a25d7b955082d0973685d612715
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-12 12:48:12 +00:00
Kari Oikarinen
b096982899 Don't mark tst_QFiledialog as insignificant_test
Change-Id: Id3fef4e66bd8f96c8f87dd94bbca216cc65f8489
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2018-04-12 12:21:55 +00:00
André Klitzing
4acaa0caf2 Update bundled sqlite to 3.23.1
[ChangeLog][Third-Party Code] Sqlite was updated to version 3.23.1

Change-Id: I27edf023fdcad30fb2171b04fa374910dd4d9122
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-04-12 12:21:43 +00:00
Kai Koehne
7cb7b35e0a Doc: Fix typo in The Property System section
Change-Id: Ie31c56369baf26f5592c95dacea60ae58fdbccfe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-04-12 12:21:32 +00:00
Morten Johan Sørvig
0300886c13 Cocoa: Add QNSView Metal Layer support
Make sure the layer is updated on window resize and
screen change.

Add a support test and print a warning if we try to
create a Metal layer without Metal system support.
This test should ideally be done earlier, before
configuring the QWindow to use Metal.

Link against the Metal framework: The minimum deployment
target is already 10.11 so this does not add additional
deployment requirements.

Change-Id: I0a38e824d0b6042bb52520dfaf0958ce21bb40b8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-04-12 12:14:18 +00:00
Edward Welbourne
5c63e6fd75 Clean up some trivia in tst_QTimeZone
Fix a mistaken #ifdef that should have been #if; and only call
QTimeZone::availableTimeZoneIds() once in transitionEachZone_data(),
while switching to use of a ranged-for.

Change-Id: Id27aae9ef450f21350283099c892ca7173884b94
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-12 11:48:06 +00:00
Kari Oikarinen
350a64196f tests/auto/dbus: Avoid unconditional qWait()s
Use QTRY_COMPARE instead of a wait followed by QCOMPARE. Unless the condition
doesn't change and the wait provides the opportunity for things to go wrong.

Task-number: QTBUG-63992
Change-Id: I13474a45f1f4df9d77a418729a5748235ae0dd1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-12 05:49:07 +00:00
Gabriel de Dietrich
375dd7ad34 QMacStyle: CE_TabBarTabShape is now HITheme-free
This should be the last bit of QMacStyle depending
on HIToolBox APIs.

Small and mini sizes support coming later. Same
for the focus ring.

Change-Id: If625fccb87ebd0607b96a8c5040888df5a2a1032
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-12 03:49:12 +00:00
Gabriel de Dietrich
c3d2862ed3 QMacStyle: SE_TreeViewDisclosureItem is now HITheme-free
Change-Id: I34f1325adc661edde7bba7d7374bc8cfb80900ae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-12 00:22:54 +00:00
Gabriel de Dietrich
7c86719566 QMacStyle: PE_FrameTabWidget in now HITheme-free
Change-Id: If14e67bdae41099bb87fe2d7c4f65926d325766b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-12 00:22:48 +00:00
Gabriel de Dietrich
4b9e6b65c9 QMacStyle: Remove cached focus ring drawing
We go for direct drawing for now. Some of the logic was
a bit sketchy, and we need to measure how useful is caching
and eventually compatible with the focus frame animation.

Change-Id: Id30a68f77a4129197536e8ca251906ee8a730925
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-12 00:20:48 +00:00
Gabriel de Dietrich
91fa300cbe QMacStyle: CC_ComboBox is now HITheme-free
For the time being, no more stretched QComboBox. They
were already looking bad before and nobody complained,
so it's a non-issue. In the future, we might use square
combo boxes in the same way as we do for push buttons
but for non-editable QComboBox only.

Removes what is now dead code, including some leftovers.

tst_QMacStyle updated to reflect size changes to accom-
modate the focus ring.

Change-Id: I60fac86b9acb52cc96373bca0b3cad598ec4f1e7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-12 00:20:42 +00:00
Sergio Martins
5de49ab4ed Fix grouped dock widget from shifting down when created
Animated .git attached to the bug report for easy understanding.

Looks like we shouldn't set window flags after a setGeometry() and
before having the window resources. If we do that, then the requested
geometry won't be honoured. No idea if it can be fixable in the QPA
and won't risk doing it there.

Fixes the problem on macOS and Windows.
On Linux it was OK, and still is.

Task-number: QTBUG-67611
Change-Id: I8244b4956a5ac9afcf257bea762c2c3084b563f8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-11 19:16:21 +00:00
Sergio Martins
a553e2f6b5 Fix z-order when dragging a dock widget over another
the drop target would create a floating group window, which would
have higher z-order since it just had show() called on it.

raise the window we're dragging when the target is mutated into group
window.

Bug can be seen on the .gif attached to QTBUG-67611.

Change-Id: I5dad058468e24327b14d1e7f76c3ad0287d26ee8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-11 19:16:16 +00:00
Daniel Savi
6a4b6971f4 Add more formatting to QTextDocumentWriter when writing ODF files
QTextDocumentWriter only supports a small subset of table formatting
when exporting to ODF-format. This patch adds more formatting
capabilities to the ODF exporter:
- table border support
- table alignment
- table width
- respect column constraints (column widths)
- add a tab before soft line breaks. This will avoid causing the last
line to stretch all over the cell in justified paragraphs.

With this patch, line height settings are now exported, too.

[ChangeLog][QtGui][QDocumentWriter] QDocumentWriter now supports table
borders, table alignment, table width, column widths, line height and
image resolution when exporting QTextDocuments to ODF files.

Task-number: QTBUG-63581
Change-Id: I2d269ef0f842e73af64d48bfef531d5fa3078088
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-11 18:44:31 +00:00
Oswald Buddenhagen
297957c4d5 syncqt: remove support for aliasing private headers
creating private deprecated forwarding headers is rather pointless, as
keeping source compatibility for private headers is unnecessary.
consequently, the feature wasn't used anywhere. remove it to reduce
complexity.

Change-Id: I6202e5141f0387615f90efa0ec707ac208419227
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-11 16:50:08 +00:00
Oswald Buddenhagen
d6b8f193f9 syncqt: nuke -private option
it's been a no-op (always on anyway) for quite some time now.

Change-Id: I9611ca73ddaef4422a16d85338e1dae473a50fbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-11 16:50:04 +00:00
Oswald Buddenhagen
939fe877ef syncqt: nuke -relative option
it's been dead code for ages.

Change-Id: I0e2f976a5b02119d296bdaa20eb2ddb40a8fd0ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-11 16:50:00 +00:00
Mårten Nordheim
f8e551cf08 Fix loading pkcs#8 encrypted DER-encoded keys in openssl
When we load DER-encoded keys in the openssl-backend we always turn it
into PEM-encoded keys (essentially we prepend and append a header and
footer and use 'toBase64' on the DER data).

The problem comes from the header and footer which is simply chosen
based on which key algorithm was chosen by the user. Which would be
wrong when the key is a PKCS#8 key. This caused OpenSSL to fail when
trying to read it. Surprisingly it still loads correctly for unencrypted
keys with the wrong header, but not for encrypted keys.

This patch adds a small function which checks if a key is an encrypted
PKCS#8 key and then uses this function to figure out if a PKCS#8 header
and footer should be used (note that I only do this for encrypted PKCS#8
keys since, as previously mentioned, unencrypted keys are read correctly
by openssl).

The passphrase is now also passed to the QSslKeyPrivate::decodeDer
function so DER-encoded files can actually be decrypted.

[ChangeLog][QtNetwork][QSslKey] The openssl backend can now load
encrypted PKCS#8 DER-encoded keys.

Task-number: QTBUG-17718
Change-Id: I52eedf19bde297c9aa7fb050e835b3fc0db724e2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-11 14:30:08 +00:00
Anton Kudryavtsev
a0ab7c6e29 QSplitter: some cleanup
Use nullptr instead of 0 for pointers

Change-Id: I048e48eb4701c08af9d05df69d6f8a261db015cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-11 14:29:40 +00:00
Timur Pocheptsov
e3cea2a7b9 QSslSocket (OpenSSL 1.1) - respect requested protocol version
Properly handle single protocol TLS configurations. Previously,
due to the use of generic (non version-specific) client/server method
they worked as ranges of protocols instead. This also fixes a couple
of previously broken tests.

Task-number: QTBUG-67584
Change-Id: Ied23113a4fab6b407a34c953e3bd33eab153bb67
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-11 12:10:01 +00:00
Allan Sandfeld Jensen
4b6542c9ff Remove last uses of interpolate_4_pixels_16 on SSE2 and NEON
With SSE2 or NEON interpolate_4_pixels is faster than
interpolate_4_pixels_16, and using it saves a branch of duplicated code.

Similar changes had already been done other places it was used, those
have been updated to follow a similar logic.

Change-Id: I040d96480f7f925f659602f66f931d28b59312a5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-04-11 07:53:53 +00:00
Liang Qi
093290a662 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/ios/quiview.mm

Change-Id: I0fd0adeca1590fffddd577873172f6d987a60412
2018-04-11 09:34:23 +02:00
Friedemann Kleint
a5e2ec5cdb Fix documentation of the Event Transitions Example
Fix warning:
eventtransitions.qdoc:50: (qdoc) warning: Unknown command '\s1'

Amends 3b2d2ada5b1b66ad65eda10d70b5b48d32ef9c5.

Task-number: QTBUG-60635
Change-Id: I4002c9769d30d9b8cb2a7255aa2258f6251ea39f
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-04-11 07:32:28 +00:00
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
Christian Ehrlicher
c7cbf21699 QPixmapCache: make sure to not overflow cache limit
The cost for the pixmap cache was calculated in bytes but
setCacheLimit() takes the size in kilobytes. This lead to the
situation that all values above 2097152 overflowed and disabled
the caching completely. Fix it by calculating the cost in
kilobytes as it is done in QGLContext.

Task-number: QTBUG-45293
Change-Id: Ib8dc2360c8f3201ce0b615a04c38b5ccaa8fc6cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-04-10 18:45:27 +00:00
Gabriel de Dietrich
4840ec7c68 QNSView: Remove useless QWindow pointer check
It seems that's the only place we were doing any check.
We can remove it since it's not supposed to happen, and
it would have crashed already if it had.

Change-Id: Ic2034d2d278899f30a7d07284057e63a12e8eb10
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-04-10 16:27:23 +00:00
Gabriel de Dietrich
a6c7eeacdc textedit example: Fix disabled Cut/Copy menu items
This amends commit fe1ea010b9.

Change-Id: Ia1f9fa4a6dd4481b5295df986f882f1120c3d8b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-10 16:27:14 +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
Anton Kudryavtsev
eba996edcc QSplitter: micro optimization
Use QStringBuilder to avoid needless allocation

Change-Id: I483b7c4875539580234f4254e16a6cdb7737e7b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-10 13:56:06 +00:00
Tor Arne Vestbø
5414d372d4 iOS: Send window-system event also when embedded in native iOS app
The iOS event dispatcher has been split into two; one dealing with the
QPA event processing, which we should always do, and one dealing with
the longjumping that we do when running the user's main on a separate
stack.

Change-Id: I1f819db33c608aad130ff23cbbadcf84363a32d2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-04-10 13:28:57 +00:00
Timur Pocheptsov
fdc28956c9 Revert "tst_QSslSocket::signatureAlgorithm - fix for OpenSSL 1.1"
This reverts commit e2694fa602.
I'm reverting this patch - I'll fix QSslSocket instead to respect
the requested protocol version.

Change-Id: Ia4bb09a8801c58bc76837518934ac7a3eedd3c07
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-10 13:17:02 +00:00
Friedemann Kleint
2268b6bcdd QtGui: Add qt_imageToWinHBITMAP(), qt_imageFromWinHBITMAP()
Add functions for converting QImage to HBITMAP and back
supporting additional formats of QImage (RGB888, RGB555,
Indexed8 and Mono). Add test with roundtrip to tst_qimage similar
to tst_QPixmap::toWinHBITMAP().

Task-number: QTBUG-51124
Change-Id: Ib568898e7162686bfa527d828785628eb0b78e21
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-04-10 12:20:45 +00:00
Mårten Nordheim
5e7a64d1e3 QCryptographicHash: Add a static method to retrieve hash length
It's useful when you need to check how long a hash will be without first
generating one.

[ChangeLog][QtCore][QCryptographicHash] Add a static method, hashLength,
which returns the length of the output of a hash function in bytes.

Change-Id: Id6a454016523de83d157fd95c50105c6db4bb1d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-10 12:17:43 +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
Qt Forward Merge Bot
e027c7241f Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I0120f804522c0c652e9537b6e9fe08189f071ed2
2018-04-10 01:00:26 +02:00
Gatis Paeglis
b2035d38e8 xcb: minor cleanups around QT_CONFIG(xcb_xlib)
- Remove unused createVisualInfoForDefaultVisualId() function.
  This amends dff3c0f14f.

- Inline QXcbConnection::xlib_display().

- Don't nest QT_CONFIG(xcb_native_painting) in QT_CONFIG(xcb_xlib).
  configure.json already checks for the dependencies, we don't need
  to do that again in *.h/*.cpp.

Change-Id: If39912e67ce9baa31faf091bebe120bac5cf6876
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-09 18:14:47 +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