Commit Graph

7803 Commits

Author SHA1 Message Date
Jesus Fernandez
345be58100 Fix assert when emitting a signal from a different thread
If a signal is emitted more than once in a multithreaded application the
QSignalEventGenerator::execute function asserts in the check for a valid
signal index. It happens after abandoning the state and all the
connections are disconnected. If we have pending signal to be
processed the QObject::sender() won't be able to resolve the sender
object.

Task-number: QTBUG-61463
Change-Id: I9d4b7266c6dddc9ff2e7453b05a6989876ccb332
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-12-14 16:30:38 +00:00
Oliver Wolff
27c840f5d4 Fix typo
Change-Id: If6111c59b958ba03f6ec5966af5cf443cae5cf9b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-13 13:07:48 +00:00
Laszlo Agocs
7257862fb2 Set sharedPainter correctly for QGraphicsEffect
Autotest is taken from the previously reverted
8b1377fde1.

Task-number: QTBUG-60231
Change-Id: I44dd79cba22b6baefdd6d95c176790bef0b7eafe
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-12-12 20:21:07 +00:00
Thiago Macieira
81a88639ac tst_QUdpSocket: fix linkLocalIPv4 test
I broke it in commit 4da2dda2aa. It wasn't
flaky or anything: it was plain broken and would never pass. That
indicates no node in the CI has an IPv4 link-local address (and
apparently neither did I at the time).

Change-Id: Ifb5969bf206e4cd7b14efffd14fb62176546916e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-12-05 15:33:12 +00:00
Thiago Macieira
637e8ebcc3 tst_QUdpSocket: Don't test for .bytesAvailable on untrusted platforms
FreeBSD, for example, does not have SO_NREAD and its FIONREAD returns
the full socket buffer size, including IP and UDP headers.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb5d8ca778d16a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-12-05 15:32:29 +00:00
Jan Arve Sæther
0c9e379dd8 Use a custom QAnimationDriver to take control over time
This should reduce flakyness of tests.

Change-Id: I26e0a97f7cd3e7cee2ffb44188300c37578cddd7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-12-02 19:58:30 +00:00
Friedemann Kleint
92cd3bfa2e macOS: Blacklist: tst_QPropertyAnimation::startWithoutStartValue()
Task-number: QTBUG-64108
Change-Id: Id60a9a1bfede9cbe90f378d131a331d726acfdae
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-12-01 09:54:00 +00:00
Friedemann Kleint
6d09db53f7 macOS: Blacklist tst_QPauseAnimation::noTimerUpdates()
Task-number: QTBUG-64107
Change-Id: Ie77d2d2525e79fb7e17f1a69d15ef40982f9242d
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-12-01 09:53:58 +00:00
Friedemann Kleint
bfef7d1224 tests/auto/auto.pro: Use correct null device for DBUS check
A mysterious file c:\dev\null appeared when running the auto tests on
Windows. Fix by using QMAKE_SYSTEM_NULL_DEVICE.
Amends 5f3529be32.

Change-Id: I0224a9ccd61c4f10b2ddb8f8d690e1849aa88d8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-01 09:53:07 +00:00
Friedemann Kleint
0ebf0cfb6f Blacklist tst_QSplitter::replaceWidget(visible, not collapsed) for Linux
The test is flaky on Linux.

Task-number: QTBUG-64639
Change-Id: Iec56ebce4f656f52187b34c8f655b137e41c3d17
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-12-01 09:53:01 +00:00
Friedemann Kleint
58b70c2f1a tst_QFileSystemModel: Stabilize readOnly(), sortPersistentIndex()
The tests start to show flakyness on Linux in 5.10 (rowCount() check
failing). This seems to point to a race condition between the files
showing up and the file system watchers of QFileSystemModel starting.

To fix this, close the file and wait until it shows up in the directory
before pointing the QFileSystemModel to it. The tests then no longer
rely on the file system watchers.

Change-Id: I39cffb4cacf6843e8e4180efb405345307c78dd8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-11-30 10:16:48 +00:00
Friedemann Kleint
bc9941db42 tst_QNetworkReply: Blacklist putToFtpWithInvalidCredentials for Windows
Task-number: QTBUG-62860
Change-Id: Ibf4d7de9eedc2236375ad10ca4bea08055c7ae00
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-29 13:55:35 +00:00
Marc Mutz
67391f0a57 Fix aliasing problem in QVector::removeAll()
Since removeAll() takes its argument by cref, if passing a reference
to an element of the container to removeAll(), the element may be
deleted (overwritten) by anyother value, leading to UB.

Add a test that actually happens to fail for me without the patch,
even though that might not be guaranteed (we may invoke UB).

Change-Id: If8c795113aeb515f4a9bdf1e072395b932295667
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-28 21:58:50 +00:00
Thiago Macieira
5f66f87181 Stop depending on test.macieira.org
We have had test.qt-project.org for close to 3 years now.

Change-Id: I71488efd29b645f7b228fffd14fadf4627288243
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-11-27 21:48:20 +00:00
Tor Arne Vestbø
fa2a653b3b Initialize QLoggingRegistry rules on first use
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: I1861e5366ea980dff2ffa753b137276c77278eee
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-25 10:01:35 +00:00
Thiago Macieira
ea18eec931 Merge "Merge remote-tracking branch 'origin/5.9.3' into 5.9" into refs/staging/5.9 2017-11-25 08:52:40 +00:00
Giuseppe D'Angelo
3587a25238 QFlags: support enum classes in setFlag()
Unary ~ is not defined for enum classes, so we need a cast.

Change-Id: I79d495ebcc24ab960da8dae3be08eb307a9de448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-24 18:23:34 +00:00
Mårten Nordheim
5a235da270 tst_QTcpSocket: fix disconnectWhileLookingUp
... and unblacklist it on Windows.

From what I can tell there is no particular reason why this test fails
other than that it is a little too slow sometimes (these things happen).

So, to fix the test I bumped the timeout, but to avoid the test running
for longer on every test-run it now also ends when the socket enters
the "Unconnected" state.

Previously it failed 171/500 times, and after this patch it failed
0/1000 times.

Change-Id: I4266bff6b91aaaf502ee66265d01c3a177706402
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-11-24 04:54:58 +00:00
Liang Qi
19378fa008 Merge remote-tracking branch 'origin/5.9.3' into 5.9
Change-Id: I9add7e07ff1b6a1cf52f59dbb8319f30e114e5fc
2017-11-23 09:47:49 +01:00
Stephen Kelly
a6d7f38791 QHeaderView: Simplify and fix layoutChange handling
A layoutChange indicates that anything can have moved to anywhere else,
including as a result purely of new items being added. It can also
indicate that items are removed.

The old code here incorrectly assumed that the section count remained
constant over this operation by setting the size of the oldSectionHidden
QBitArray - whose size is the size before the layoutChange operation -
and then calling setBit with model rows numbered after the layoutChange
operation.  As the two are not necessarily the same dimensions, this can
result in asserts from the setBit call.

Simplify the handling of layoutChanged entirely by clearing section
information, and using the QPersistentIndexes which indicate hidden
state to restore that state after re-population.

Task-number: QTBUG-53221
Change-Id: I3cda13e86b51b3029b37b647a48748fb604db252
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2017-11-22 21:24:56 +00:00
Kevin Funk
b71b7461b0 CMake: Set SKIP_AUTOMOC/AUTOUIC where needed
Make sure we don't run into warnings for CMake 3.10

Task-number: QTBUG-63442
Change-Id: Ida004705646f0c32fb4bf6006036d80b1f279fd7
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Sebastian Holtermann <sebholt@xwmw.org>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
2017-11-22 13:51:30 +00:00
Mårten Nordheim
c3a5c482ef Fix tst_QSslSocket::waitForConnectedEncryptedReadyRead
... and unblacklist it.

It was blacklisted some years ago because it was failing too often.
It was failing because the ssl socket had already received and decrypted
all the data it was going to get, meaning the waitForReadyRead call was
just going to block forever.

Change-Id: Ia540735177d4e1be8696f2d752f1d7813faecfe5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-22 13:50:09 +00:00
Andy Shaw
53f48fceee Start from the first visible item when doing a search
Since the first item in a treeview might be hidden, start from the
first visible item in the view when starting or wrapping round
during a keyboard search.

Task-number: QTBUG-63869
Change-Id: I202bea567c6d4484c3ffaf8a5f9af8ea2e13708d
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2017-11-22 13:49:52 +00:00
Timur Pocheptsov
0f3c9782e6 tst_QNetworkReply::ioHttpRedirectErrors - fix a flaky test
This test became a real pain recently. A close look at the test shows
several problems (strangely enough, the failure can never be
reproduced on real machines, only on VM - Ubuntu and RHEL 6.6).
There are several asserts that are firing from time to time here and
there. They show that the logic in test is broken/incorrect. QNAM can
open several connections to a host, our test then incorrectly resets
its 'client' data-member and bad things can later happen after
'bytesWrittenSlot' executed (and deleted a socket). For example,
I can reproduce this scenario in every second run:

1. incoming connection -> client = socket(descriptor), connect to
   client's readyRead (s1)
2. incoming connection -> client = socket(descriptor), connect to
   client's readyRead (s2)
QNAM sends a request on s1. We reply on s2 (which is already wrong)
and call client->deleteLater(), which resets client to nullptr.
If QNAM sends something else on s1, we hit assert(!client.isNull()).

To avoid this, whenever 'sender' in any slot is different from the
'client', we use the actual 'sender' to reply. Another problem is this
weird and rather cryptic waitForFinish which is not needed in this
particular test since we wait for reply error, not 'finished'.

As it happened before - it's not clear if these two problems
were the cause of guaranteed fails on CI - an integration failed
~10 times in a row in the same test (not happening anymore though).

Task-number: QTBUG-64569
Change-Id: Id9aa091290350c61fadf1c3c001e7c2e1b5ac8f4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-11-22 13:47:30 +00:00
Christian Ehrlicher
ba2f3a156e QTreeView: recalculate row heights in hide/showColumn()
When calling QTreeView::hideColumn() the row heights are not
recalculated. This can lead to rows which are unnecessarily high due to
hidden columns may contain large (e.g. multiline) content. The same
applies to showColumn() - there the row might be to small.
Hiding columns directly via QTreeView::header()->hideSection() is not
covered by this patch since QHeaderView has no way to inform about
newly shown/hidden sections.

Task-number: QTBUG-8376
Change-Id: I20b1198e56e403ab8cf649af76e5e2280821dd68
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-17 20:28:34 +00:00
Gabriel de Dietrich
f55a40ac03 Menurama: Fix custom application class constructor signature
Change-Id: I989b9205dde9280f97dedbaad47ef4a8d75004ac
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-17 13:30:40 +00:00
Svenn-Arne Dragly
ce08318a46 Add QThreadPool autotest to detect stale threads after tryTake
This test makes sure that we do not introduce a regression where the
threads exited the inner loop over the queue before the queue was
empty. This was triggered by calling tryTake at least maxThreadCount
times, which left the same number of null pointers in the queue
and caused the inner loop to exit too soon for all the threads.

Change-Id: I3a9d800149b88d09510ddc424667670b60f06a33
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-16 12:42:44 +00:00
Friedemann Kleint
f6c9f03128 tst_QNetworkReply: Blacklist putToFtp for Windows
Task-number: QTBUG-62860
Change-Id: I9cea1414ae3761284f5ac9fab9d0db03c239b65f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-15 21:39:54 +00:00
Mikkel Krautz
55f8d7dfe5 qsslsocket_mac: handle 'OrLater' SslProtocols in verifySessionProtocol()
The verifySessionProtocol() method in the SecureTransport backend did not
properly handle TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater.

This commit teaches verifySessionProtocol() about them.
It also adds TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater to the
protocolServerSide() test in tst_qsslsocket.

Backport from 5.10 to 5.9 (LTS).

Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 9c765522d1)
Change-Id: I58c53bdf43e0f19b4506f3696d793f657eb4dc6f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-15 21:06:49 +00:00
Richard Moe Gustavsen
7465329fe1 QAbstractButton: don't clear 'pressed' flag unless left button is released
As it stood, we would set 'pressed' to false regardless of which button that
was released. This would end up wrong if pressing the left button, and
at the same time, did a click with the right button. This would clear the
flag prematurely, and cause a release signal not to be emitted when later
releasing the left button.

tst_QAbstractButton: adding autotest

Adding tests to simulate the bug report's cases:
1) left press button
2) click right/middle key
3) move mouse out of button's boundary
4) test if the released() signal triggered properly

Taks-number: QTBUG-53244
Change-Id: Ifc0d5f52a917ac9cd2df5e86c0475abcda47e425
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-15 10:06:16 +00:00
Andy Shaw
3dab19ffed OCI: Match the constraints on the index_name column
When looking for the primary index, it is possible that the
constraint_name in the all_ind_columns table does not match that of the
index_name. Whereas the index_name will match in this case, so the query
should set the where clause on the index_name in both tables.

Task-number: QTBUG-64427
Change-Id: I1bf1fb580e620b9f75f2fde1ecf408842e377365
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-11-15 06:40:45 +00:00
Timur Pocheptsov
66bace390b tst_qnetworkreply::getFromUnreachableIp - fix win64 also
Looking at the failures in grafana it appears this test is also failing
on Windows 64. The same fix applies then, and we use Q_OS_WIN now.

Change-Id: Iafcfd6d1e747f3c816878cad072fbfae3aee19ca
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-15 04:50:18 +00:00
Thiago Macieira
4870282117 QSemaphore: fix regression when the timeout < 0
The issue was introduced by eaee1209f0, so
it affected only 5.9.2.

[ChangeLog][QtCore][QSemaphore] Fixed a regression that would make
tryAcquire() not to wait forever if the timeout was a negative
value. Note: new code is advised to only use -1 to indicate "forever",
as some other functions taking timeout periods do not accept other
values.

Task-number: QTBUG-64413
Change-Id: I57a1bd6e0c194530b732fffd14f58fce60d5dfc9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-14 11:07:30 +00:00
Oliver Wolff
579d0cb2be Fix tst_QFile::openDirectory for systems using builtin test data
To obtain "proper" directory behavior, we have to check against the
extracted "resources" directory instead of its qrc counterpart.

Change-Id: I4996ba74419945f78d356ad953a5b826ff663687
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-11-09 07:33:38 +00:00
Oliver Wolff
82c3c9d45d Fix tst_QFile::handle for systems using builtin test data
To obtain the file's handle, we need to obtain it from the extracted
test data instead of qrc.

Change-Id: I89c5c3f3a7da7e36205a439581a6d83efffdc07c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-11-09 07:33:37 +00:00
Oliver Wolff
bbc68dc815 Fix tst_QFile::useQFileInAFileHandler for systems using resources for test data
Resource files are extracted to m_dataDir in tst_QFile::initTestCase.
Instead of trying to access the file from the resource on systems that
use qrc for bundling the test data, we have to use the files that were
extracted at the beginning of the test.

Change-Id: I35453fbdeb27e317d1342ff1cb7bbea9cebea14d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-11-09 07:33:35 +00:00
Oliver Wolff
e27bd98137 qfile tests: Make sure files are writable before deleting them
On some platforms (like UWP) files that are copied during
qfile auto tests are not writable by default. The cleanup will fail for
these files if the permissions are not set accordingly.

Change-Id: Id925dcadfc6b505c87f1f55d5ea05e286b60a5a5
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-11-09 07:33:35 +00:00
Robert Szefner
429d5f0c5e Set correct datatype for column 'more_data' in PostgreSQL
Task-number: QTBUG-63861
Change-Id: Ice9e788841046482bf5c4653eb859d00bc6b1c59
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-11-08 23:19:39 +00:00
Timur Pocheptsov
39355daa40 tst_QNetworkReply::getFromUnreachableIp - fix a failing test
This patch works around Windows X86 on QEMU antics.

It appears on this platform the test behaves in some unpredictable manner:
- WSAConnect with 255.255.255.255 does not always immediately fail with
  some error, so socket engine waits for a connection timeout (30 s.),
  but the test itself
- only waits for 5 seconds and then tests that a request has finished with
  error, which is not true (we are still connecting).

To make it work - whenever we have bearermanager feature enabled, set
a connection timeout to something reasonable, not 30 s.
Since we try to connect to each address twice, make timeout 1.5 s
(so it's 3 s. in total and still is < 5 s.).

Task-number: QTBUG-64264
Change-Id: I1d40c140667fca8402ec9344e66d313b6df54256
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-08 13:28:51 +00:00
Friedemann Kleint
fad8f34033 Extend blacklisting in qnetworkreply
- Blacklist ioHttpRedirectPostPut for Windows
- Amend 84396a3f93:
  Keys need to be on subsequent lines

Task-number: QTBUG-62583
Change-Id: I6360ec7bd87de65a3294a0d22148f13579fcd292
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-07 19:45:18 +00:00
Timur Pocheptsov
d4b3ce9a28 qudpsocket.pro - fix dependencies
Similar to the problem found in QTcpSocket auto-test recently.
While the failure on CI looks differently (apparently, server process
starts but does not print anything), fixing the dependency does not
hurt and at least fixes the 'make check' scenario.

Change-Id: I8f29f3e492d22410533407a527f5fc8f664e7f5c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-11-07 09:23:38 +00:00
Timur Pocheptsov
28937559b1 tst_qxmlsimplereader::inputFromSocket - fix race condition(s)
This test was failing recently on Windows 7, mingw, x86. It's not
failing now and attempts to reproduce the failure on CI's VM were
unsuccessful. Anyway, just reading the code is enough to spot
race-conditions: two threads are accessing two shared boolean
variables without any protection.

It's unclear if these races were the reason why the test was failing,
but we fix them for good anyway. Also, a failure to start a thread
or to start listening on a TCP socket is not treated as XML-related
failure anymore and QSKIPped instead.

Change-Id: I5115ce6c33cafc91485f8cf6e7e268d954976556
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-06 19:14:41 +00:00
Christian Ehrlicher
b4f4c384d9 QHeaderView: Honor maximumSectionSize property during resizeSections()
Resizing a QTreeeView section with double click or
resizeColumnToContents() does not respect the maximumSectionSize when
the resize mode is Interactive or Fixed. Since the documentation of
maximumSectionSize states that it should honor this property for those
cases either the documentation or implementation is incorrect.
This patch fixes the latter.

Task-number: QTBUG-64036
Change-Id: Ic14c8e444d50b9c50a117efed19d0bca7ec1cf82
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-06 18:18:09 +00:00
Robert Szefner
0445065645 Run oraArrayBind() test only for Oracle DBMS
This test contains Oracle specific queries and will fail for other DBMS.
Currently it doesn't fail, because it is skipped for drivers that doesn't
support BatchOperations and only QOCI supports batch operations.

Change-Id: I8f1e7c7244726fa11c841023dec186553747a6b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-11-06 17:03:18 +00:00
Friedemann Kleint
eb5994df13 tst_QWidget::multipleToplevelFocusCheck(): Avoid overlapping
The test showed flakyness on Linux. It has been observed that its
windows overlap. Position the windows beside each other.

Change-Id: I4ff1b9cafaf753a6844b3dfabb576a07f74b396a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-11-06 14:39:18 +00:00
Friedemann Kleint
c8fa698e99 tst_QNetworkReply: Blacklist ioHttpRedirectPolicy for Linux
Task-number: QTBUG-62583
Change-Id: I9723a465f1d36aec823ce3459fd03b9492a3b778
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-06 13:12:29 +00:00
Tony Sarajärvi
b5b1e1036f Extend blacklisting in qnetworkreply
While removing insignificant flag in commit
38a0909d4e and blacklisting
autotests that still failed, qtbase builds didn't
verify VS2017. That broke qt5 builds which do build VS2017.

Task-number: QTBUG-64264
Change-Id: I5fdfa5dac6192f449a05146a9a422e428a710c84
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-11-05 16:03:09 +00:00
Gabriel de Dietrich
385589ef45 QCocoaMenu: Attach menu items when updating the menubar
Instead of waiting for the menu delegate to update each item,
we can attach an NSMenu to its NSMenuItem as soon as we update
the current window's menubar. This is safe to do because we
know that this is going to be the main menubar right after, so
we're not orphaning any NSMenuItem from its NSMenu at the wrong
moment.

By doing this, we also ensure that all menus from the active
menubar are reachable by the key-equivalent dispatching logic,
even before we display the actual menu.

This was shown in BigMenuCreator where, under the menubar's ASP
and SAP menus, all A*S submenus would be disabled. Furthermore,
on the same menus, SAP would show the same issue.

Added test in Menurama as well.

Change-Id: If6e7311072e6b53ad1cbced73623d1832aa0df8e
Task-number: QTBUG-57076
Task-number: QTBUG-63712
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-05 01:39:30 +00:00
Gatis Paeglis
ad36da8ff4 testlib: start sharing common helper functions
... by moving them in QTestPrivate namespace (qtesthelpers_p.h). This
header file is a convenient staging area for helper APIs, eventually
some could be moved to public QTest API.

This header file utilizes the same pattern as other qtestlib header
files - wrapping functions with QT_${LIBNAME}_LIB to automatically
enable certain APIs based on what is in the projects dependencies,
e.g. QT += widgets.

Change-Id: Ic0266429939c1f3788912ad8b84fc6e0d5edd68b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-04 20:11:22 +00:00
Gatis Paeglis
01f5f77c66 tests: skip tst_QMenuBar::check_cursorKeys* on Unity
This test is flaky on Unity due to regression introduced by QTBUG-39362.
Skip the test functions until QTBUG-39362 is resolved.

These test functions do not fail on Gnome and KDE, so the functionality
tested by check_cursorKeys* will be covered by other linux distributions
in CI.

Change-Id: Ifd1a7779a9728142424f4956dd6466c822ccde91
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-11-04 20:11:14 +00:00