Commit Graph

7125 Commits

Author SHA1 Message Date
Oliver Wolff
7e7bc031e9 winrt: Fix tst_qcoreapplication
On winrt, the default application version is determined by its
manifest file. The template's default version is 1.0.0.0.

Additionally addRemoveLibPaths should not fail if libraryPaths
only contains currentDir.

Change-Id: Ifdd517f1bfe2fdf641f3d728ebe1fa144df1a8ca
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-05-11 06:37:34 +00:00
Marc Mutz
38bbd8fbac Add some missing breaks in switch statements
Found by GCC 7.

Change-Id: I90267617a038558e5b5213c598a949baf8d4d9be
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-05-10 16:09:42 +00:00
Frederik Gladhorn
7f80c96432 Stabilize tst_QApplication::touchEventPropagation
CI metrics show that this test was flaky ~38 time in 3 days.
The problem is old: after we get a surface, a window manager can still
decide to re-position the window.
The fix is to simply send the touch event in a position where it is sure
to hit the window (usually the offset is the title bar height).

The blacklisting seems to not have worked, I could reproduce the failure
on a linux/xcb machine.

Change-Id: I5229fe020ba75c984fd3b6c322ad00d769707573
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-05-10 04:52:04 +00:00
Filippo Cucchetto
be0a221ae4 Fix missing handling of columns when merging selection ranges
This commit fixes two bugs:
1) Two ranges should not be merged if they are of different columns.
The old code would have merged (0,0) with (1, 1). Tranforming a selection
of just two indexes in a rectangle of four indexes.
2) The QItemSelectionRange appended had wrong column and worked only for
indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1)
so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)).
This QItemSelectionRange is invalid because topLeft columns is greater than
bottomRight column. The fix take in consideration the bottomRight column.

Task-number: QTBUG-58871
Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2017-05-09 13:46:51 +00:00
Teemu Holappa
16f950c702 Skip failing autotests with b2qt toolchain
Task-number: QTBUG-59966
Change-Id: I36d114107187db22841ebfeff8fa8175daff6d03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-05-09 08:11:18 +00:00
David Faure
74d79fcf1a QMimeDatabase: update freedesktop.org.xml to shared-mime-info 1.8
... and update the unittest accordingly.

Compared to the 1.8 release there is one change in freedesktop.org.xml,
the magic for application/x-java-keystore was changed from host32 to
big32, as done upstream, see https://bugs.freedesktop.org/show_bug.cgi?id=99328

Task-number: QTBUG-60608
Change-Id: I47de71c9396cfc3eabc884d5679c73a3e4850a17
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-05-08 18:04:24 +00:00
Giuseppe D'Angelo
b7da94ce52 QObject: turn the narrowing test into static_asserts
The conditions checked are compile-time conditions anyhow.
Simplify or strenghten a few conditions while at it.

Change-Id: If07f2aedca4c3632d852a8fdb2b3f7eb55a96c93
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2017-05-08 14:24:02 +00:00
Sami Nurmenniemi
be36fca32b tst_qmessagehandler: fix qMessagePattern for arm with optimizations on
Backtrace logging tests were not passing for arm when -O2 option was used.
Set "-fno-inline" on for the app whose backtrace is to be inspected.

Task-number: QTBUG-59966
Change-Id: Id1bbf78c31dc524357a30c7d39c239689621b155
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-08 11:18:10 +00:00
Glen Mabey
cab9bc8fba Eliminate ambiguous casts involving qfloat16
The operator double() and operator long double() members of qfloat16
are causing cast ambiguities.  This removes them, leaving only
operator float() which seems to be adequate.

Also, additional arithmetic operator tests were added which without
this removal fail to compile.

Change-Id: Id52a101b318fd754969b3de13c1e528d0aac2387
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-05-07 16:44:55 +00:00
Marc Mutz
b92267cd4c Remove some more register keywords
They're deprecated since C++11 and removed in C++17.

Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-05-06 16:59:18 +00:00
Giuseppe D'Angelo
dbd55cdaf3 QHash/QMultiHash: fix operator==
The existing QHash::operator== does not work when the same
keys appear in different order between the two hashes being compared.
However, relying on iteration order on a QHash is (as usual) a bad
idea and one should never do it.

Task-number: QTBUG-60395
Change-Id: Ifb39a6779230e26bbd6fdba82ccc0247b9cdc6ed
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-05 12:18:25 +00:00
Frederik Gladhorn
d517c386b2 Enable tst_qaccessibilitymac
The test was disabled because it was checking if we had the right
permissions. It does seem as if the permissions do not matter as
long as everything is in process though.
As seen by the regression in fafdb171e0
it's important to run the test. This regression would have been
caught.

Change-Id: Ia1938e683badd1de2657aa6dc8a3b3bbe430e8c8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-05-04 11:18:14 +00:00
Palo Kisa
46aecbd72b QIconLoaderEngine: Fix actualSize() for no-entry
Return an empty size if no suitable entry found to avoid mismatch with
the returned pixmap()'s size (the QIconEngine::actualSize() returns the
originally requested size).

Change-Id: Ia278719a54392b62c5f9fc0529476baba5cd7df0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-05-03 06:56:07 +00:00
Alex Trotsenko
124b9a6ff8 Improve suppression of spurious socket notifications under Windows
There were still two cases where spurious notifications would be
possible:

    - user calls hasPendingDatagrams()/pendingDatagramSize() on UDP
      socket somewhere outside the slot connected to readyRead()
      signal (::WSARecvFrom posts FD_READ notification, even if
      a notification for incoming datagram already exists in the
      message queue);
    - a socket was registered to receive several types of event and
      WM_QT_ACTIVATENOTIFIERS message is located between the
      different events for this socket in the queue.

Provided patch ensures that the message queue is synchronized with
the Qt event processing mechanism and adds a way to detect spurious
notifications inside the window procedure.

Task-number: QTBUG-58214
Change-Id: I49609dace601f300de09875ff1653617efabd72f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
2017-05-03 06:46:18 +00:00
Alex Trotsenko
91c1b5490e QWindowsPipeReader: fix possible invalid invocation of ReadFileEx()
If the user calls QLocalSocket::setReadBufferSize() with a value less
than the current size of the pipe buffer, startAsyncRead() would call
ReadFileEx() with invalid parameters:

  ReadFileEx(handle, nullptr, some_big_value, ...);

Change-Id: I3d153e3ec34f8038dc001c1c896aeceb666a8979
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-05-02 05:21:29 +00:00
Friedemann Kleint
425986acf3 Windows: Fix tst_QFileDialog2::completionOnLevelAfterRoot()
Change the check for the unambiguous match to be case insensitive.

Task-number: QTBUG-60466
Change-Id: Iaa019cc803a56b015f45309fb1b3a7a8a3d82ee4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-29 07:39:09 +00:00
Thiago Macieira
cf0c44fe83 Fix test build with ICC: QFlags does not auto cast to uint
I don't know why.

 tst_qflags.cpp(114): error: no instance of function template "verifyConstExpr" matches the argument list argument types are: (Qt::MouseButton)
 tst_qflags.cpp(91): note: this candidate was rejected because there is a type mismatch after argument substitution

Change-Id: I84e363d735b443cb9beefffd14b9581d77933cb8
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-04-28 12:37:09 +00:00
Allan Sandfeld Jensen
82c06fb0f5 Fix return of empty paths with multiple points on intersections
The intersection algorithm for intersection with rects, might return
one edge of the rect even if that edge does not intersect with the path.
To deal with that we collapse paths with empty bounding rects to the empty path.

Task-number: QTBUG-60024
Change-Id: I3e305983c66548e772d7d7ce3de99d715edbdd1b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-04-28 07:58:25 +00:00
Timur Pocheptsov
b6968f508c Revert "Blacklist tst_QSslSocket::protocolServerSide on OS X 10.11"
This reverts commit 96c27f0dfa.
We now use a custom keychain that should fix the original
problem with the test.

Change-Id: I52e4105f34a46ad7080750d9a62480ebe3a56e68
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-27 12:25:51 +00:00
Gabriel de Dietrich
445191bba8 QMenu: Display the menu title on the torn-off menu's title bar
Change-Id: If16e262a6c8b39dff517cc105cf55686d4c22582
Task-number: QTBUG-11693
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-26 22:27:53 +00:00
Timur Pocheptsov
5218a80bd1 Revert "tst_qsslsocket::protocolServeSide - fix for macOS 10.11"
The fix is outdated - the tests it was fixing - pass on 10.11.

Change-Id: I8b42c1d3d2f1279382b15c20587dcc93cf1b6b40
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-26 13:18:20 +00:00
Sami Nurmenniemi
e5a1c7fff7 Fix tst_QLineEdit for offscreen and minimal platforms
Unselecting with offscreen and minimal platforms behave similarly as in
Windows and QNX. If left or right key is used for unselecting, cursor
position is changed.

Change-Id: I022cd2fec80ad1875fec983e1e3536a105e18bb2
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
2017-04-26 12:42:08 +00:00
Sami Nurmenniemi
a1e94bcfbb Fix tests that assume system files are owned by root for qemu
If QEMU is provided sysroot with QEMU_LD_PREFIX, it opens files from there. If their
owner is the current user, testing their access rights based on assumption that they
are root fails. Skip the tests in that case similarly as is already done when the
tests are run as root.

This fixes following tests:
- tst_QTemporaryDir::nonWritableCurrentDir
- tst_QNetworkReply::getErrors(file-permissions)
- tst_qstandardpaths::testCustomRuntimeDirectory

Task-number: QTBUG-59966
Change-Id: I972ce37b4b5a7747cdd732a8e4a737ef09cbc6a5
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-26 09:12:12 +00:00
Sami Nurmenniemi
9b52cfd64c Fix tst_QWindow modal dialog tests for offscreen and minimal platforms
Changed testing of focus of modal dialogs to match behavior on offscreen
and minimal platforms.

Change-Id: Ife3ea41b4b78df2e64c8d8e740332914b1e5a67c
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
2017-04-26 09:11:53 +00:00
Sami Nurmenniemi
ba21e42463 Fix tst_QWidget for platform "offscreen"
Some features are not implemented by "offscreen" platform. Skip tests
failing because of that. Some failing cases are also already skipped or
blacklisted on "xcb" platform.

Change-Id: I17269169379c270bd7d6f2ddda03ad9b114a71ce
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
2017-04-26 09:11:41 +00:00
Thiago Macieira
9e2c6899e0 QUrl: fix IDN conversion when the ACE form is invalid
We guarded against the Unicode form being invalid and did not produce an
encoded form. But we did not guard against proper Punycode sequences
that decode to forms that had not passed the proper Nameprep stage. So
check for that and, if it fails, just keep the label in the form we
found it in (it's valid STD3 anyway).

[ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names
that look like Internationalized Domain Names to become corrupt in
decoded forms of QUrl, notably toString() and toDisplayString().

Task-number: QTBUG-60364
Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-25 00:51:43 +00:00
Tony Sarajärvi
2d1a115f9f Blacklist tst_MacGui autotest in macOS 10.11
Task-number: QTBUG-60385
Change-Id: I6e692ff55d26b9070343d612e2f872091d5c343d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-24 22:09:12 +00:00
Thiago Macieira
21dd5d314a QUrl: fix IDN whitelist checking when the TLD is in Unicode
The whitelist is kept in ACE form, so if the TLD came in Unicode, we
need to run ToASCII before we can check the whitelist. This is slightly
inefficient because we'll run the same operation later in this domain.

Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
2017-04-24 19:29:57 +00:00
Tony Sarajärvi
148188fef3 Rename macos blacklisting to osx
Change-Id: I7e370ad8e1e2cb87188e149c96681e4c18abaa4f
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-24 07:24:08 +00:00
Tony Sarajärvi
485b6c99db Blacklist tst_qsemaphore on macOS 10.12
Task-number: QTBUG-58745
Change-Id: I085a2ac60cc24c287140788a88512657238a2c4b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-24 07:24:01 +00:00
Olivier Goffart
d4cdc45426 Fix QMetaMethod::invoke and automatic type registration
This was simply not working for two reasons:
 - The index passed to QMetaObject::metacall was not right (there was an offset
   because of the return type)
 - If the registration succeeded, the arguments were not even initialized.

The tests in tst_moc always called QMetaMethod::parameterType before calling invoke,
which was properly registering the type. So this was not seen in the tests before.

[ChangeLog][QtCore][QMetaMethod] Fixed crash in invoke() with QueuedConnection and
types whose metatype gets automatically registered.

Task-number: QTBUG-60185
Change-Id: I4247628484214fba0a8acc1813ed8f112f59c888
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-22 11:25:49 +00:00
Marc Mutz
dfc2a4a537 QLoggingRegistry: remove rules vector
It only contained a concatenation of the individual rule sets,
probably to fix their order in a central place, as well as
simplifying iteration in defaultCategoryFilter().

Fix these two issues differently, but introducing a RuleSet
enum that lists rule sets in the order in which they should
be applied by defaultCategoryFilter(), and turn individual
rule sets vectors into a C array of vectors.

This enables two nested loops in defaultCategoryFilter to
replace the one loop over 'rules'. Apart from building up
'rules' in updateRules(), this was the only access to that
member. That leaves updateRules() with just the task of
running defaultCategoryFilter() on the new rule sets.
Consequently, a call to updateRules() can now replace the
identical loop in installFilter().

Performance should not suffer. Iterating over a fixed-size
array of vectors is hardly any slower than iterating over
a single vector, and while the construction of 'rules'
was probably a one-off task in most programs, this way
of keeping the rules also saves memory because rules are
not kept in two different vectors.

It is also more maintainable, of course.

Change-Id: Ibc132d096c8137dd02b034752646212e51208637
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-21 07:16:33 +00:00
Tor Arne Vestbø
eec388865f Skip tst_QMdiArea::setViewport on macOS due to flakey failures in CI
Task-number: QTBUG-58520
Change-Id: I582c190de45e85e2dfb397289720c655ec8d781c
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-20 14:45:24 +00:00
Sami Nurmenniemi
718216ee0b Fix tst_QTcpServer for QEMU
QEMU does not support all syscalls needed for tcp socket testing.
Skipped tests that can't pass on QEMU.

Task-number: QTBUG-59966
Change-Id: Ib6d12d0fc4c913a0222e13db57f0864b7fdf21ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-20 11:46:14 +00:00
Giuseppe D'Angelo
0794d61c82 QMetaType: fix the test
8a375341cf added swap() to QJson* classes
and marked them shared-not-movable-until-qt6.

This change made QMetaType start reporting that QJson* classes were
movable; however, the test used QTypeInfo and not QTypeInfoQuery to
double check that information.

Port the test to QTypeInfoQuery.

Change-Id: I3227a70a8f24c0013257e180e9cb9cfebe9947f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-20 07:19:57 +00:00
Marc Mutz
126c4eae84 Split Q_COMPILER_UNICODE_STRINGS: add Q_STDLIB_UNICODE_STRINGS
Since commit bf2160e72c, we can rely on
charNN_t support in all compilers except MSVC 2013, and since that
commit, we use (in 5.10, not 5.9, yet)

  !defined(Q_OS_WIN) || defined(Q_COMPILER_UNICODE_STRINGS)

when we only need charNN_t, the type, as opposed to its library
support (u16string, char_traits<char16_t>, ...).

This patch splits the Q_C_UNICODE_STRINGS macro into two, adding
Q_STDLIB_UNICODE_STRINGS for when we need std::uNNstring, leaving
Q_C_UNICODE_STRINGS for when we need just charNN_t support.

In QDebug, when constructing a QChar out of a char16_t, cast to ushort
first, since QChar(char16_t) was only officially introduced in Qt 5.10.

[ChangeLog][Potentially Source-Incompatible Changes] The internal
Q_COMPILER_UNICODE_STRINGS macro is now defined if the compiler
supports charNN_t, even if the standard library does not. To check for
availability of std::uNNstring, use the new Q_STDLIB_UNICODE_STRINGS
macro.

Change-Id: I8f210fd7f1799fe21faf54506475a759b1f76a59
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-20 06:50:36 +00:00
Tor Arne Vestbø
924b02aecb Revert "Initialize QLoggingRegistry rules on first use, not qApp construction"
This reverts commit 47cc9e23a3.

We use QCoreApplication::applicationDirPath in the logging initialization to find
a possible qtlogging.ini file. Because QCoreApplication::applicationDirPath requires
a QCoreApplication instance this leads to a qWarning, which in turn leads to a
recursive call to the logging initialization, and in turn to a recursive mutex deadlock.

Task-number: QTCREATORBUG-18031
Change-Id: Ic75e1e8c062eb647991725378489bf87c9648cca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-19 22:59:43 +00:00
Elvis Angelaccio
8043202114 QLineEdit: fix broken test
Commit 288bfb0bbd added a test that uses QLineEditIconButton, which
requires QT_BUILD_INTERNAL to be defined in order for the findChild()
call to work as expected.

Change-Id: Ieda18f4e26a91322e8a83c14f8d1fbbe4313ecf0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-04-19 22:59:41 +00:00
Allan Sandfeld Jensen
ee3ac3a3bf Fix PNGs saved from QImage transform of 8-bit images
Fixes two separate errors. QImage::transform was incorrectly adding
colors to the color-table of the returned image when the converted image
would not be indexed, and qpnghandler was looking at non-empty color-
table instead of color format.

Task-number: QTBUG-43708
Change-Id: Ife14b6428ca65ac7d3a0b36a89a73e56d64586b4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-04-19 10:08:41 +00:00
Elvis Angelaccio
288bfb0bbd QLineEdit: Make the clear button always the leftmost button
QLineEditIconButton currently draws a fully transparent pixmap in its
paintEvent() function, when the line edit is empty. This does not work
when there is another trailing QAction that is visible even when the
line edit has no text, as reported in QTBUG-59957.

To fix this issue, make sure the clear button is always the leftmost
button.

Task-number: QTBUG-59957
Change-Id: I8a4f96aae07856aa0e1053ebb338ba9bdf052a16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-19 08:49:49 +00:00
Tor Arne Vestbø
47cc9e23a3 Initialize QLoggingRegistry rules on first use, not qApp construction
Allows categorized logging before QCoreApplication has been created,
which otherwise would silently fail to output anything because the
category would never be enabled, despite QT_LOGGING_RULES being set.

Change-Id: Ia733105c5b6f28e22af511ced5271e45782da12b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-18 21:09:43 +00:00
Friedemann Kleint
9595622e36 QGraphicsBlurEffect: Fix for high DPI scaling
Preserve the device pixel ratio in the various helper functions
and when drawing.

Task-number: QTBUG-60026
Change-Id: Ieac9360b00044b6aedd0d3e1ad6e3b16d436f20f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-18 20:27:36 +00:00
Liang Qi
18934bcb0c Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/corelib/global/qglobal.cpp

Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
2017-04-18 10:46:22 +02:00
Ihor Dutchak
d1210281e4 Fix undefined behavior in QSharedPointer::create()
Initialize a deleter for a new object, created by
QSharedPointer::create(), only after the object is actually
constructed.

[ChangeLog][QtCore][QSharedPointer] Fixed undefined behavior when
creating an object with QSharedPointer::create() and its conscructor
throws an exception.

Task-number: QTBUG-49824
Change-Id: I07f77a78ff468d9b45b8ef133278e8cdd96a0647
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-17 09:56:15 +00:00
Dongmei Wang
ae6ef2e3ec QMenu: Fix torn-off menu display crash issue
When tearing off either a non-scrollable multi-colume menu
or a scrollable menu, displaying the torn-off menu crashes.
The root cause is when the torn-off menu is created, the
tear-off menu's style, margins and other attributes are not
set to it. The patch is to ensure the torn-off menu has
the same attributes as the tear-off menu does and set the
torn-off menu with a correct menu size.

Task-number: QTBUG-24815
Change-Id: Icea45f149ea8792671af4a62e62cad6ee01a1f95
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-04-14 17:06:12 +00:00
Dongmei Wang
eea585ad0b QMenu: Fix margins related display issues
Currently the contents margins and the menu paddings are not considered
for calculating the menu size, the positions and the size of tear-off
bar, scrollers and the positions of the menu items when scrolling the
menu, which results in the following problems when valid contents
margins and/or menu paddings are set:

- The tear off area is displayed in a wrong position. The mouse events
are not handled correctly in the tear off area. For example, when you
click in the tear off area, the menu should be torn off but nothing
happens
- For a multi-column menu, the menu width is not calculated correctly
- For a scrollable menu,
  - the menu width is not calculated correctly
  - the menu items are not displayed in correct positions
  - the scrollers are not displayed in correct positions
  - menu items are displayed on the area of borders and margins when
    scrolling the menu
  - the last menu item is not displayed above the bottom of the content
    area when scrolling the menu to the end.

The changes are to fix the problems above.

Change-Id: I7931e1088dff0029f2d4825e2aa34b4e32fdccd9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-04-14 17:06:00 +00:00
Marc Mutz
e1c8451ffe QVariant: implement QByteArray ↔ QUuid conversion
Seems like an obvious omission.

[ChangeLog][QtCore][QVariant] Can now convert QUuid to and from
QByteArray, not just QString.

Change-Id: Ib56ae86ca0c27adaf1e095b6b85e64fe64ea8d18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-14 12:54:21 +00:00
Marc Mutz
5662234afa QMatrix4x4: fix aliasing problem in operator*=
When multiplying a QMatrix4x4 by itself, we were clobbering the very
matrix we read from. Employ read-caching to avoid this aliasing problem.

[ChangeLog][QtGui][QMatrix4x4] operator*=() now calculates the correct
result even if the RHS and LHS are the same object.

Change-Id: I8534d56cfdd62c336577125127f05173fcec2873
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-04-14 12:29:35 +00:00
Liang Qi
94c576cf66 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
2017-04-12 20:08:56 +02:00
Simon Hausmann
2ad7f6ddf5 Preserve last modification timestamps of installed files
On non-windows platforms, we use the "-p" parameter of install(1) to
preserve the last modification timestamps of files. On Windows the use
of copy does not preserve them. As a cross-platform solution, this patch
introduces a simple built-in install command in qmake to copy files.

Task-number: QTBUG-59004
Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-12 15:50:51 +00:00
Sami Nurmenniemi
6e649f9714 Skip testing of QOpenGlConfig on platforms that don't support it
Task-number: QTBUG-59966
Change-Id: If74657d0a0133c67f57bf92ae96d2d868d523f0e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-12 08:36:39 +00:00
Sami Nurmenniemi
a890337433 Fix tst_toolsupport on 32-bit arm platform
On 32-bit arm platform, qint64 gets aligned differently than on 32-bit
x86. First difference between the platforms on QFilePrivate member
offset happens in QFileDevicePrivate::cachedSize:
- On 32-bit x86 it's offset is 148 (4-aligned)
- On 32-bit arm it's offset is 152 (8-aligned) and offsets of all the
  remaining members are +4 compared to x86
- On 64-bit architectures the offsets are the same

Change-Id: If110da27ea08504e78b167c0a21599420eaa9630
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-12 08:36:27 +00:00
Thiago Macieira
cdc5f47aeb Restore compatibility with Qt 5.7.0 and 5.6.1
QSysInfo::productType() returned "osx" for all versions of macOS, even
10.12. Change 3e2bde3578 was incorrect.

[ChangeLog][Important Behavior Changes] QSysInfo::productType() and
QFileSelector behavior on macOS was restored to match what Qt used to
return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2,
5.7.1 and 5.8.0 is removed.

[ChangeLog][Future Compatibility Notice] The identifiers that
QSysInfo::productType() and QFileSelector will use to identify macOS
systems will change in Qt 6.0 to match the Apple naming guidelines which
will be current then.

Task-number: QTBUG-59849
Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 05:14:19 +00:00
Thiago Macieira
e7493c8b54 tst_qhashfunctions: Test non-zero seeds too
Change-Id: Ib0e40a7a3ebc44329f23fffd14b2e927021a1a2e
Reviewed-by: David Faure <david.faure@kdab.com>
2017-04-11 06:38:14 +00:00
David Faure
c0ecfc08e3 QTextDocument: improve import of DIV tags
<div>1<br/></div>2 was inserting two newlines between 1 and 2, while all
tested web browsers only insert one newline - as long as there is nothing
between the <br/> and the </div>.

This was the cause for extra newlines being inserted in KMail when
replying to HTML emails, such as those generated by gmail.

Change-Id: I5145d977701e68913264357bba22780e7cdd3f7d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-10 09:44:01 +00:00
Filipe Azevedo
07bd5a90a3 Fix hidpi support for opengl window grabbing
Now set the QImage devicePixelRatio so the content is correct on all
screens.

Task-number: QTBUG-53795
Change-Id: Ic92eee98f691ebb1e0212498c1ae13ede74bca93
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-04-09 13:42:34 +00:00
Thiago Macieira
23d08ce2ed Fix QDir::mkpath() when the path contains "symlink/../"
It is incorrect to collapse a "symlink/.." segment because the parent
directory of the symlink's target may not be the directory where the
symlink itself is located.

[ChangeLog][QtCore][QDir] Fixed a bug that caused QDir::mkpath() to
create the wrong directory if the requested path contained a symbolic
link and "../".

Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e367730a1e24
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-04-07 20:26:02 +00:00
Thiago Macieira
795a54ff96 QDataStream: add operator<< and >> for std::nullptr_t
std::nullptr_t is nullary: it accepts only one value, nullptr. So we
don't need to read or write anything. This commit simply adds the two
operators that allow generic code to operate on std::nullptr_t if
required.

This commit also adds the actual use to QMetaType::load/save, even
though there's no change in behavior.

[ChangeLog][QtCore][QDataStream] Added operator<< and operator>>
overloads that take std::nullptr_t, to facilitate generic code.

Change-Id: Iae839f6a131a4f0784bffffd14aa37e7f62d2740
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-07 17:41:06 +00:00
Sami Nurmenniemi
ac76b2424d tst_qmessagehandler: fix qMessagePattern for arm
Backtrace logging tests were not passing for arm. Added compile option
-funwind-tables to support backtrace on arm.

Task-number: QTBUG-59966
Change-Id: I5e2443b1e3a644a239dab68db990e75ae8fade24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-07 08:12:14 +00:00
Sami Nurmenniemi
c7e7a785c6 tst_QFocusEvent: Fix checkReason_ActivateWindow for offscreen and minimal platforms
Widgets in platforms offscreen and minimal don't get focus back
automatically after hiding focused window. Extra activateWindow
is needed.

Task-number: QTBUG-59966
Change-Id: Iaf3d4e60483c4b2600472af199f7a7cd51b3fa6e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-07 08:11:54 +00:00
Sami Nurmenniemi
bbb67ca32c Fix tst_Collections for gcc/arm
- Alignment test was not compiling or passing on GCC / arm
- Using C++11 alignas() enforces maximum limit for the alignment, which
  at least on GCC / arm is __BIGGEST_ALIGNMENT__ multiplied by 8
- On GCC 6.2.0 / x86_84, maximum alignment accepted by alignas is 128
- On GCC 5.3.0 / arm, maximum alignment accepted by alignas is 64
- This change calculates biggest tested alignment on ARM targets
  and compilers supporting alignas() to the value calculated
  from __BIGGEST_ALIGNMENT__

Task-number: QTBUG-55492
Change-Id: If2b70000ff9cdc5ae8c5a00e39f79efcc6ba1221
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-07 05:54:04 +00:00
Sami Nurmenniemi
5c6d132408 Fix tst_QDirModel for qemu
QTBUG-43818 does not affect only Android, it can be reproduced also
with qemu.

Change-Id: I6364c09b3c7f860b34899e26056ad562b7c338f2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-07 05:53:47 +00:00
Liang Qi
c50f6a8329 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-04-06 14:35:54 +00:00
Sami Nurmenniemi
60f6e4428f Fix tst_QFile for qemu
Qemu does not report /proc/self/maps size correctly. Added expected
failure for it

Change-Id: I4019884702b8f9a33717b02e79c9e0c042b2449f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 12:19:55 +00:00
Sami Nurmenniemi
42b3ed763f Fix network tests on qemu/arm
Function if_indextoname fails on qemu because SIOCGIFNAME is not
supported. Expect failure if emulation is detected.

Change-Id: I53b41286d82458661e7fa723af385f323582ce7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 12:19:46 +00:00
Liang Qi
0fc569184c Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
	src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp
	src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
	src/widgets/widgets/qtabbar.cpp

Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
2017-04-06 14:16:31 +02:00
Allan Sandfeld Jensen
efb84b6189 Copy stretch to multifont fontDef
If we do not the fontDef of the multifont will be the default 0.

Task-number: QTBUG-59443
Change-Id: Ib223517975b2a57b2371e309d12cd8f918d30825
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-05 11:27:15 +00:00
Tony Sarajärvi
63ef26d583 Extend blacklisting of a tst_QMenuBar's test to cover Ubuntu 16.04
tst_QMenuBar::taskQTBUG4965_escapeEaten() already failed on
Ubuntu 14.04 and reproduces in 16.04.

Task-number: QTBUG-24326
Change-Id: I46170c9ce397f4042b308ca485b19364e6ee0663
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-05 10:31:00 +00:00
Sami Nurmenniemi
cd8d2c1743 Skip testing of QOpenGLWidget on platforms that don't support it
QOpenGLWidget is not supported on all platforms. Skip tests on those.

Change-Id: I0f9500553427903f20d248acaa20803276e3ab00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 14:13:03 +00:00
Sami Nurmenniemi
6d6a826038 Skip OpenGL tests on platforms that don't support OpenGL
Change-Id: Iff38950a940d602fbfcc35595624e56399aab53a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 11:06:38 +00:00
Tony Sarajärvi
05a943497b Extend blacklisting of tst_QMenuBar::check_menuPosition to Ubuntu 16.04
Task-number: QTBUG-46115
Change-Id: I1ed994e07e78d7e7c59967e86e9cc4160c6a55b1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-04 09:15:53 +00:00
Kai Koehne
b2efaeba79 tests: Unify license to GPL-EXCEPT
Change-Id: Ic718650a8a7bddd4ee28c5650a3f5baf70886e51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-04-03 07:18:46 +00:00
Tony Sarajärvi
801f89a9e8 Extend blacklisting of tst_QWidget to cover Ubuntu 16.04
Task-number: QTBUG-46116
Change-Id: I64465758deb360dd5445a80398617c0297ba561a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-03 06:54:04 +00:00
Tor Arne Vestbø
e9af32fcd4 Ensure that tst_QFontDatabase::addAppFont() tests the whole path to an engine
Change-Id: Ie22cd9d7d362de86e02b841d40d75eac46395952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-31 09:45:39 +00:00
Giuseppe D'Angelo
88a8feeacb QCryptographicHash: make SHA3 calculate SHA3, not Keccak
The SHA3 family is a modified version of Keccak. We were
incorrectly calculating Keccak (and even *testing* Keccak!),
but claiming it was SHA3.

To actually calculate SHA3, we need invoke Keccak on the original
message followed by the two bits sequence 0b01, cf. §6.1 [1].

[1] http://dx.doi.org/10.6028/NIST.FIPS.202

[ChangeLog][QtCore][QCryptographicHash] QCryptographicHash now
properly calculates SHA3 message digests. Before, when asked
to calculate a SHA3 digest, it calculated a Keccak digest instead.

Task-number: QTBUG-59770
Change-Id: Iae694d1a1668aa676922e3e00a292cddc30d3e0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-31 07:58:35 +00:00
Sami Nurmenniemi
a262837505 Fix tst_Selftest on QEMU
Two changes are needed to pass tst_Selftest on QEMU
1. Pass QEMU specific env variables to the subtests
2. Ignore output on stderr on some tests when running on QEMU

Change-Id: Ie1f722fd183aac5973e87d408005e06cbafcde17
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-31 07:09:46 +00:00
Thiago Macieira
9a0d47bcf1 tst_largefile: fix the mapOffsetOverflow case to match actual behavior
Unix mmap(2) system calls do allow for mapping beyond the end of the
file, though what happens after you try to dereference the pointers it
gives is unspecified. POSIX[1] says that implementations shouldn't allow
it:
 The system shall always zero-fill any partial page at the end of an
 object. Further, the system shall never write out any modified portions
 of the last page of an object which are beyond its end. References
 within the address range starting at pa and continuing for len bytes to
 whole pages following the end of an object shall result in delivery of
 a SIGBUS signal.

However, Linux allows this in read-write mode and extends the file
(depending on the filesystem).

Windows MapViewOfFile never allows mapping beyond the end.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html

Change-Id: Ie67d35dff21147e99ad9fffd14acc8d9a1a0c38d
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-31 06:31:25 +00:00
Tony Sarajärvi
d33b9774ac Extend blacklisting of parts of tst_QWidget to cover Ubuntu 16.04
tst_QWidget::updateWhileMinimized has been failing on Ubuntu 14.04
and was already blacklisted there. Now we extend it to cover Ubuntu
16.04.

Task-number: QTBUG-46116
Change-Id: I6758657cca46bb4c76cddb0298f9b87b8a43655b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-03-31 06:22:28 +00:00
Timur Pocheptsov
8bd67f61a6 tst_qsslsocket::protocolServeSide - fix for macOS 10.11
Mixing different protocols on client-server sockets works differently
on 10.11, making previously successful handshakes failing now.
Failure is specific to 10.11 with SecureTransport.

Change-Id: I35374b40fa3d167802775b526cf6465ae78749cf
Task-number: QTBUG-48860
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-30 17:01:35 +00:00
Tony Sarajärvi
c031ba30d5 Blacklist a QSequentialAnimationGroup autotest
Task-number: QTBUG-59806
Change-Id: Ib63614dbd9d57283a6394bfc4079308a3f4ddc93
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-03-30 12:10:31 +00:00
Tony Sarajärvi
96c27f0dfa Blacklist tst_QSslSocket::protocolServerSide on OS X 10.11
Task-number: QTBUG-48860
Change-Id: Ia352378f48b9ab404d06ac5ef9bf53afa8f192fd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-30 12:10:16 +00:00
Sami Nurmenniemi
b387257261 Fix layout tests for GCC 5.2.x/5.3.x
GCC bug 68949 causes tst_QGraphicsGridLayout and tst_QGraphicsLinearLayout
to fail on 5.2.x/5.3.x: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68949.
This change adds aggregate initialization to QSizeF arrays to work around
the bug. The bug was discovered when compiling and running tests on ARM
with GCC 5.3.0.

Change-Id: I9ecf7b032b6ca1477c29dca3bd7d0ec8d69a0454
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-30 06:58:07 +00:00
Sami Nurmenniemi
80f1762a59 Fix tst_QUdpSocket for QEMU
QEMU does not support all syscalls needed for udp socket testing.
Skipped tests that can't pass on QEMU.

Change-Id: I40882207a47cfafbc3becb3dff8e7cead9676255
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-29 14:29:43 +00:00
Timur Pocheptsov
baf7180776 Use HTTP2WasUsedAttribute for HTTP2
Previously we were always setting SpdyWasUsedAttribute for SPDY/HTTP/2/HTTP/1.1
(true/false) which is confusing. Now if HTTP2AllowedAttribute was set to true on
a request, we set HTTP2WasUsedAttribute. Otherwise, as we did before, we're setting
SpdyWasUsedAttribute.

Change-Id: I0c44cfb5469fef0c12719baa951197ee2accee4a
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-29 13:54:49 +00:00
Friedemann Kleint
50ab231582 tst_QGuiApplication: Split the quitOnLastWindowClosed() tests
Make it possible to blacklist the (newly created)
quitOnLastWindowClosedMulti() if all else fails.

Task-number: QTBUG-59088
Change-Id: I8c143a2017e7aefaf6cad6ada9c1464d40c952e7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-03-29 13:06:21 +00:00
Simon Hausmann
b263384589 Fix building of qopengl test on boot2qt
Only test for xcb specific sub-features if xcb is available in
the first place - not the case with Boot2Qt builds.

Change-Id: Iad49648ce1c8781d0c7bb2b2dcd4b7834434d51d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-03-29 12:29:50 +00:00
Laszlo Agocs
dd38574160 Switch to RGB(A|X)8888[_Premultiplied] for QOpenGLFBO readbacks on GLES
Instead of the never-ending blacklisting of "broken" drivers, simply switch
to always choosing a byte ordered QImage format with OpenGL ES, and keep
on using the (one and only) spec-mandated GL_RGBA/GL_UNSIGNED_BYTE combo.

There is nothing broken with not supporting BGRA for glReadPixels even when
GL_EXT_read_format_bgra (an out of date, pre-2.0 extension that got folded
into the spec to begin with) is present. We do not have a good way to tell
if BGRA_EXT is supported for glReadPixels or not, so just skip the whole
problem altogether.

Task-number: QTBUG-59283
Task-number: QTBUG-59303
Change-Id: I9f0605380923bd3b3ffdeb80f5c172d3e4cc7927
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-03-28 11:17:52 +00:00
Sami Nurmenniemi
514fff1e39 Fix largefile tests on ARM and QEMU targets
- Test tst_LargeFile::mapFile fails on Qemu for files over 4Gb.
  Fixed by limiting maxSizeBits to 28 (must be n*4 and < 32).
- Bug QTBUG-21175 is also effective on ARM targets. Fixed by
  expecting failure also on ARM.

Change-Id: I9103727e618a17259b4785ec8c284f3bb60ebea7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-28 06:55:32 +00:00
Liang Qi
7702fe8602 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
2017-03-27 10:42:08 +02:00
Marius Kittler
38550c562d json encoder: Harmonize number serialization with ES6
Ensures that numbers representable as 64-bit integer
are not printed using exponent notation.

Some JSON implementations such as the one of the Go
standard library expect this in the default
conversion to int.

Change-Id: Ic3ac718b7fd36462b4fcabbfb100a528a87798c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-25 14:26:30 +00:00
Olivier Goffart
94e6e8dfc6 tst_moc: fix include guards
Change-Id: I465c035cc741f94cb6737e86e33fbd1589ddaa8e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-25 12:53:09 +00:00
Edward Welbourne
e5c0371d18 Fix propagation of locale from widget to its children
Fix the condition in QWidgetPrivate::resolveLocale() to decide whether
to propagate locale: make it match setLocale_helper()'s condition when
deciding whether to propagate to descendants.  This lead to a
QDateTimeEdit's calendar popup not getting told what locale to use
correctly, unless we setLocale() on it overtly, which then blocked
propagation of locale changes to it unless QDateTimeEdit manually
propagated the changes.

Fix the documentation of WA_WindowPropagation to mention locale as
also being propagated (which it was in several places, only neglecting
this one in resolveLocale).

[ChangeLog][QWidget][Qt::WA_WindowPropagation] Propagate locale
consistently, along with font and palette, within the widget
hierarchy.  Previously, locale was propagated on ancestral
setLocale(), but not on creation of the descendant.

Task-number: QTBUG-59106
Change-Id: I92270f7789c8eda66a458274a658c84c7b0df754
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-24 13:57:22 +00:00
Olivier Goffart
d82d2f6716 QSslSocket: fix connection to a international domain name
RFC6125 section 6.4.2 specify we need to convert the IDN to ascii
before comparison. Note that we don't need to toLower anymore
because toAce takes care of it.

Section 7.2 recommands that we dod not attempt to check for wildcard
character embedded within the A-labels or U-labels of an
internationalized domain name. So we reject names that contiains a
'*' but starts with 'xn--'.

Change-Id: Ib0830520a1f82bbf9fd11818718277a479527ee3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-23 16:11:15 +00:00
Friedemann Kleint
e0becd6a8a tst_QMdiArea::tabBetweenSubWindows(): Improve warning message
The test has been observed to be flaky, printing warnings
"Rubber band has different geometry". Output the geometries.

Task-number: QTBUG-59641
Change-Id: I6c209f2a98a07655e8523c012c5562d602d217ad
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-22 20:04:13 +00:00
Ulf Hermann
329385a5d5 Build examples and tests only if their requirements are met
If the respective modules aren't available we cannot build the tests
and examples. We drop the qtConfig(opengl) requirement for the opengl
examples as
a, we would need to make the QtGui configuration available for that to
   work, and
b, we should not add too much detail to the tests and examples build
   configurations. Checking each test and example for every feature it
   uses would be too much.

Task-number: QTBUG-57255
Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-22 15:55:55 +00:00
Edward Welbourne
c587036dc6 Mark some methods in test code as overrides
CustomTextWidgetIface marked its text() method as an override;
DropOnOddRows marked its canDropMimeData() as an override; each
neglected some other methods that are overrides.  Convert
Q_DECL_OVERRIDE to the keyword in affected classes, to match.

Change-Id: I78b38e20a81e3e6aab282a1cb3d70cdf8a5f4135
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-03-22 14:29:58 +00:00
Marc Mutz
1ebd23a670 tst_QArrayData: fix unused variable warning in reallocate()
Trailing QFETCHes can be dropped.

Change-Id: I4dbc5ff07a6bf418a09822424a8fb036d8349114
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-22 09:22:34 +00:00
Thiago Macieira
cd58abb1db Autotest: make tst_QDir more reliable on tests being run out of order
mkdir(data2) depended on mkdir(data1) being run before, or it would
fail. In addition, the rmdir() test required the equivalent mkdir() test
being run before. So drop these annoying dependencies and make the tests
cleaner by having clear separation of the test data and merging the two
tests into one

The entryList() test still depends on the testdir being clean: it will
fail if mkdirRmdir() previously failed.

Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e35972d2a3d8
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-22 06:40:59 +00:00
Liang Qi
65faf45655 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/plugins/platforms/eglfs/eglfs-plugin.pro

Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
2017-03-21 19:07:53 +01:00
David Faure
05924ddff9 tst_qurl: skip test with ':' in filename, on Windows
Task-number: QTBUG-59622
Change-Id: Ib4b458b5d0fc2dd9ea6758b8517a953f6d768a39
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-03-21 13:15:53 +00:00