Commit Graph

35814 Commits

Author SHA1 Message Date
Qt Forward Merge Bot
1af15a5659 Merge "Merge remote-tracking branch 'origin/5.11.0' into 5.11" into refs/staging/5.11 2018-05-18 11:17:10 +00:00
Qt Forward Merge Bot
294f036a11 Merge remote-tracking branch 'origin/5.11.0' into 5.11
Change-Id: Idfb5542f76cfd5ccda7521e529505e5a4a54c797
2018-05-18 11:22:37 +02:00
Friedemann Kleint
24d7a2229d Documentation: Fix URLs to GL(ES) functions
Replace the XML pages which are typically displayed as broken
by the XTHML pages. Strip some suffixes.

Change-Id: Idf2b9706f169484c659582a1a2d38904d5dd81aa
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-05-18 08:45:21 +00:00
Kari Oikarinen
883d58dacd Fix tst_QDoubleSpinBox::editingFinished failing after other tests
Wait for the spinbox to show become active in the previous test. Also use
QWidget::activateWindow() instead of QApplication::setActiveWindow(). Use of the
latter seemed to result in some confusion where QWidget::isActiveWindow()
returned true but QWindow::isActive() on the underlying window returned false,
leading qWaitForWindowActive() to fail.

Also remove superfluous setting of focus. It was just set and verified.

Change-Id: I023cdc2d272e23b2537b32606b7a3bf35bf671ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-18 07:09:58 +00:00
Thiago Macieira
c359df5ca6 Add support for QSharedPointer<cv qualified>::create()
[ChangeLog][QtCore][QSharedPointer] Fixed a problem that made create()
on a type with const qualification fail to compile.

Task-number: QTBUG-68300
Change-Id: I0825ff5b5f6f4c85939ffffd152f3e55e5b9caae
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-05-17 15:08:04 +00:00
Andy Shaw
fce6303a35 Remove a reference to a no longer used database server
Task-number: QTBUG-32390
Change-Id: I7556507267be04ca50c4ad0c7d49f3aa5fe31a90
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-05-16 14:40:19 +00:00
Nico Vertriest
d9c430cfd9 Doc: Update connect syntax Order Form Example
Task-number: QTBUG-60635
Change-Id: Ia474a23db7c32e68cb23ffa6ec14b9c6376cadec
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-16 12:00:00 +00:00
Nico Vertriest
57fae860fd Doc: Modify connect statements Echoplugin Example
Task-number: QTBUG-60635
Change-Id: I4313ff65875d20b768d7ad6e9c8322bd5cf7f1ab
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-05-16 11:59:27 +00:00
Nico Vertriest
3b28e3d871 Doc: update connect syntax digitalclock example
Task-number: QTBUG-60635
Change-Id: I9d8411b639e5cf74c9cb03de4b5f6081bb549151
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-16 11:57:51 +00:00
Andy Shaw
b0f3cc1594 sqlite: Allow for duplicated placeholders with just one placeholder
This accounts for a case of a placeholder being duplicated in the
prepare query, but where only one placeholder was used. This amends
e4e87a2ece

Task-number: QTBUG-68299
Change-Id: Ia92ee912facd51a13e7222886debb219b24442b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-05-16 11:42:25 +00:00
Alexandra Cherdantseva
9c707f140e Windows Platform: Redirect wheel event to a window under mouse cursor
Revert a part of af5c8d04fb
which affected mouse wheel event redirection.

Task-number: QTBUG-63979
Change-Id: Ice88675aadbb8a7477b3758a607db5979d62562c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-05-16 09:02:40 +00:00
Friedemann Kleint
b145201128 Windows QPA: Fix wrong initial size when launched on secondary screen
Send changed events from QPlatformWindow::initialize()
synchronously so a protentially changed screen takes
effect in QWindow::resize() called by QWidget::show_sys().

Task-number: QTBUG-67777
Change-Id: I889500d458caf0e782bdbc237ce790f0b0bc2d95
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-05-16 08:23:42 +00:00
Kari Oikarinen
ae8743bf86 tst_QCommandLinkButton: Add back wait to the beginning of setAutoRepeat()
setAutoRepeat() is failing on macOS and Windows when run together with
defaultAndAutoDefault(). It succeeds when run on its own. Adding the wait allows
it to succeed when run with the other tests as well.

Amends 0cb940b1d3, which removed the wait.

The comment is the same as before. I couldn't see a better way to replace the
wait (QApplication::topLevelWidgets() already returns only the testWidget and
testWidget->isActiveWindow() returns true).

Another theory I had was something waiting for the KeyRelease so I changed
QApplication::sendEvent() uses to QTest::keyClick(). It did not help but that
still seems preferable.

Change-Id: If87d1e6e018751f3068ea4c913ae6731aba41ff0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-16 06:10:08 +00:00
Liang Qi
09cb23f342 Fix build for Android with android-clang
kernel/qnetworkinterface_linux.cpp:172:18: error: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'qsizetype' (aka 'int') [-Werror,-Wsign-compare]
                if (!NLMSG_OK(hdr, len))
                     ^~~~~~~~~~~~~~~~~~
    kernel/qnetworkinterface_linux.cpp:197:26: error: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'qsizetype' (aka 'int') [-Werror,-Wsign-compare]
                    } while (NLMSG_OK(hdr, len));
                             ^~~~~~~~~~~~~~~~~~

Change-Id: I3d0a4efc9fc42dd9b0726f2b62ff494220b8026e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-16 06:06:04 +00:00
Liang Qi
5349cb9d3c Fix build for Android with android-clang
dialogs/qprintdialog_unix.cpp:149:15: error: private field 'm_printer' is not used [-Werror,-Wunused-private-field]
        QPrinter *m_printer;
                  ^

Change-Id: Idce515a3e66019756b6ad2d305072e0a89bb823b
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-16 06:06:01 +00:00
Thiago Macieira
6e2ad0c79c ucstrncmp: refactor with 32- and 8-byte loads
First of all, this removes the UB that used to try and calculate the
distance between the two strings. That's a valid technique in assembly,
but dangerous in C++ and totally unnecessary. The compiler is perfectly
able to generate loops with a single induction variable all on its own.

Second, this commit makes the main loop use 32-byte comparisons (16
characters at a time), which is a reasonable size for strings. We use
AVX2 if that's available, or an unrolled pair of 16-byte loads
otherwise. After the existing 16-byte comparison, this commit inserts an
8-byte (4-character) comparison and then reduces the final, unrolled
comparison to just 3 characters.

Change-Id: Ib48364abee9f464c96c6fffd152e474b39e1f293
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-05-15 17:09:01 +00:00
Thiago Macieira
85278a6970 qlalr: fix build in C++17
std::unary_function and std::binary_function are gone. Remove their
uses.

Change-Id: I5d0ee9389a794d80983efffd152c96f0f2149b40
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-15 17:07:09 +00:00
Thiago Macieira
2c93ff91be QtTest: compile in C++17 mode: no more std::unary_function
Change-Id: I5d0ee9389a794d80983efffd152cbce4da448ddf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-05-15 17:07:04 +00:00
J-P Nurmi
410b943516 QMacStyle: remove unused qlibrary.h include
Fixes build with -no-feature-library, because the qlibrary.h header
contains QT_REQUIRE_CONFIG(library).

Change-Id: If64ece8bd77e8824b86dc91f95dd9062cb2a1644
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-05-15 08:14:06 +00:00
Jan Grulich
d55165b9c4 Fix filter parsing in flatpak FileChooser portal
Filters are usually in format (Name (*.foo *.bar)), but valid filter is
also (Name ( *.bar *.foo )), containing additional spaces. When we split
content in the brackets divided by spaces, there will be then empty
strings which we need to filter out, otherwise the result we send over
DBus is not valid.

Change-Id: Iaa265189408f47324bc9b269d534bf4c8d7d2cae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-15 08:06:17 +00:00
Friedemann Kleint
c4cbb3f315 QFusionStyle: Fix width of editable combo box
Add a scaling overlooked in 63d08003cf.

Task-number: QTBUG-68194
Change-Id: I97c771435e4316ec55aacc527335b62cb4dfd9ec
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-05-15 06:07:40 +00:00
Tasuku Suzuki
fefe5cdf0c Fix build without features.cursor
Change-Id: I450bd9f160c64f718c49e87d274c1ccc4a657aca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-15 00:42:15 +00:00
Thiago Marcos P. Santos
f148580e72 Fix Android loader
Invalid syntax due to missing closing brackets and
exception not being handled when calling .close()
on a stream.

Change-Id: If8f191fbc44fe1b031fd86abff5163bca434156a
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-14 16:07:41 +00:00
Kari Oikarinen
2fc274ddb5 Skip tst_QProcess::processesInMultipleThreads under QEMU
tst_QProcess hangs sometimes in QEMU. Based on my experiments in a debug VM the
offending test seems to be processesInMultipleThreads(), since that was were I
was able to reproduce the hanging in.

Since the whole test executable hangs, blacklisting is not enough, so skip the
test.

Task-number: QTBUG-67760
Change-Id: I34f8852be955a8612deac22b369f68d79a139d11
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-05-14 12:36:33 +00:00
Andy Shaw
bb6ba17019 Treat the Content-Disposition header as a known header
Change-Id: I307f67b10759d17f603a340b14266ab47d195497
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-05-14 12:36:32 +00:00
Kari Oikarinen
3909d37cb7 tests: Include QFileInfo in emulationdetector.h
Otherwise using it later is a compile error on ARM if no header including it has
been included before.

Change-Id: I422eeb948da4a22bc3f649daff39740703039372
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-05-14 12:36:28 +00:00
Jüri Valdmann
8e47474baf QJsonDocument: Avoid overflow of string lengths
The added test case contains the binary JSON equivalent of

    ["ž"]

with the modification that the string's length has been set to INT_MAX. In
Value::usedStorage this length is used through the pointer d like so

    s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d);

Because 2 * INT_MAX is UINT_MAX-1, the expression as a whole evaluates to 2,
which is considered a valid storage size. However, when converting this binary
JSON into ordinary JSON we will attempt to construct a QString of length
INT_MAX.

Fixed by using String::isValid instead of Value::usedStorage. This method
already takes care to avoid the overflow problem. Additionally, I've tried in
this patch to clarify the behavior of Value::isValid a bit by writing it in a
style that is hopefully more amenable to structural induction.

Finally, the test case added in my previous patch had the wrong file extension
and is renamed in this one.

Task-number: QTBUG-61969
Change-Id: I45d891f2467a71d8d105822ef7eb1a73c3efa67a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-14 10:52:47 +00:00
Kari Oikarinen
bff2101994 tests/auto/widgets/dialogs: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I679a0f482ec2c3ed5d896f1c40c67d9932c6fc18
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-05-14 10:39:00 +00:00
Kari Oikarinen
627de835b1 tests/auto/widgets/graphicsview: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: Ibbcf5bf968fcf1b1c3a043c805bdcc23a4005f00
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-05-14 06:05:19 +00:00
Thiago Macieira
6eef81ee1c QFileSystemEngine: don't try to use statx(2) if SYS_statx isn't defined
If glibc's <unistd.h> does not define SYS_statx but <linux/stat.h> did
define struct statx and related constants, we failed to compile.

Task-number: QTBUG-68205
Change-Id: I04a43ee94975482f9e32fffd151e66bbe6988554
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-14 04:46:28 +00:00
Thiago Macieira
69e0393399 QByteArray::setNum: use the existing latin1 lowercasing table
Not sure this makes the code faster, but it removes two functions.

Change-Id: I5d0ee9389a794d80983efffd152d830da44b1bfe
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-13 22:39:26 +00:00
Christoph Keller
8c029e98bf Fix build of applications on iOS
When QMAKE_TARGET_BUNDLE_PREFIX is set in the .pro file then
this value should be used instead of the default value for
PRODUCT_BUNDLE_IDENTIFIER. Therefore, PRODUCT_BUNDLE_IDENTIFIER
should be set inside default_post.prf so that it can take the
value of QMAKE_TARGET_BUNDLE_PREFIX after it may have been set.

Task-number: QTBUG-66462
Change-Id: Iec1e2a43632efe6021b9d6bfdb78bd941326c456
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-13 08:48:53 +00:00
Mårten Nordheim
5134ff882a OpenSSL v1.1.1: fix qtbug18498_peek
Previously the test worked because the client was the last party to know
when encryption was established. However, due to changes in the TLSv1.3
handshake the server is now the last one.

In either case, relying on both to be encrypted when one of them is
finished is not great, so now we only quit the event loop when both
client and server have emitted 'encrypted'.

Change-Id: Ic1fc75671206d866f7ea983805fd58a99657aac6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-05-11 08:42:17 +00:00
Thiago Macieira
68e6d64fe3 QString: fix off-by-one error
The check for having N valid characters is ptr + N <= end, because
ptr + N == end indicates that we have exactly N characters in the
string.

Change-Id: I5d0ee9389a794d80983efffd152d28d5aa485ce4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-05-10 17:34:45 +00:00
Christian Ehrlicher
fae53562ae QLineEdit example: fix link to QLineEdit::setInputMask
Fix a typo to properly link to setInputMask instead setMask.

Task-number: QTBUG-61775
Change-Id: I0cb00de8dcaece613467e25b41e93661d6e98308
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-09 17:45:29 +00:00
Kari Oikarinen
ebcc6687b0 Blacklist tst_QWidget::raise on openSUSE
The test occasionally gets an unexpected paint event on openSUSE.

Task-number: QTBUG-68175
Change-Id: I998d79dd12aac1f924c14d7ff7e864c4f081983c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-05-09 13:05:54 +00:00
Liang Qi
20a8d4d216 Merge "Merge remote-tracking branch 'origin/5.11.0' into 5.11" into refs/staging/5.11 2018-05-09 12:57:29 +00:00
Qt Forward Merge Bot
552c45bea9 Merge remote-tracking branch 'origin/5.11.0' into 5.11
Change-Id: Id6e2acd5e31c1ac858ddf1d8873a6f10694141de
2018-05-09 13:48:42 +02:00
Kari Oikarinen
7eab9ec63b Stabilize tst_QMdiArea::subWindowList
Flakily failed on openSUSE.

Task-number: QTBUG-68170
Change-Id: Ic75e081238ccf4bad54de39e6bdaa892796b599e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-09 09:58:04 +00:00
Kari Oikarinen
e110ab6c28 tests/auto/widgets/itemviews: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: Id4fcb0c2e4f83edd9508565468e16f57e100c780
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-05-09 05:52:22 +00:00
Thiago Macieira
a2df0ef57a Fix build with GCC 8: memset/memcpy/memmove of non-trivials
qarraydataops.h:73:17: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type
‘struct TCBPoint’; use assignment or value-initialization instead [-Werror=class-memaccess]

Change-Id: I5d0ee9389a794d80983efffd152ce10eb557341f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2018-05-09 05:43:26 +00:00
Tasuku Suzuki
b32c0ecc4c Fix build without features.completer
Change-Id: Idc79921f85a920bc8c1280513ce78ee0cb00d415
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-09 00:21:33 +00:00
Friedemann Kleint
1b7337d23d qlalr: Fix startup crash in static builds
Replace the global variables qout, qerr by a functions to delay
the initialization.

Task-number: QTBUG-68166
Change-Id: Ib023da1bccc7eabc6e633ccb8945e5f209c5765e
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-08 15:19:14 +00:00
Kari Oikarinen
c580644fe9 tests/auto/network: Avoid unconditional qWait()s
Replace with QSignalSpy or QTRY_COMPARE when possible.

Task-number: QTBUG-63992
Change-Id: I18dc8837301424855487a12ee62451a5aeb21bf0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-05-08 12:35:40 +00:00
Friedemann Kleint
09d4faa008 QtGui: Enable synchronous delivery for QWSysIf:::WindowScreenChangedEvent
Task-number: QTBUG-67777
Change-Id: I6d52b650fb33283010ef06259da83cdb2fd3483f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-05-08 09:22:03 +00:00
Friedemann Kleint
807f819357 Manual dialogs test: Add about dialog showing style and scaling
Change-Id: I8750956056466d3cfd99903fb5e432ac81223403
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-05-08 06:57:15 +00:00
Joni Poikelin
3a912e92bb Fix building with -no-feature-shortcut
Change-Id: I7576055a6d81d6a7a075ebff16ca6b0ced4e984e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-08 06:15:43 +00:00
Tasuku Suzuki
8f7dcba204 Fix build without features.timezone
Change-Id: I3f8421103afa61baf415636b4dc8cf93fb477bcc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-08 01:59:08 +00:00
Mitch Curtis
f72777b969 QShortcutMap: print ambiguous shortcuts when DEBUG_QSHORTCUTMAP is defined
This is useful to see why shortcuts (in Qt Widgets and Qt Quick) are
not behaving as expected. For example:

    The following shortcuts are about to be activated ambiguously:
    - QKeySequence("Esc") (belonging to QQuickShortcut(0x7fcd4c8e6a70,
        name = "exploreViewBackOrCloseShortcut"))
    - QKeySequence("Esc") (belonging to QQuickPopupItem(0x7fcd4c8e5110))

Change-Id: Id20a3017d69cfe417c2286dccf46b3d5ff0b31b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-07 12:03:26 +00:00
Kai Koehne
64836ec256 TestLib: Fix license headers in qabstractitemmodeltester.*
Change-Id: Ide05bcdd30cd5f672949aacd5564a4a73c38366d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-07 09:39:48 +00:00