Commit Graph

7784 Commits

Author SHA1 Message Date
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
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
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
Friedemann Kleint
254849b62a macOS: Blacklist tst_QSequentialAnimationGroup::groupWithZeroDurationAnimations()
Task-number: QTBUG-64109
Change-Id: Iebe5a07d108ba647baa74ded71b730c867bd1c41
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-11-03 21:15:08 +00:00
Friedemann Kleint
84396a3f93 tst_QNetworkReply: Blacklist ioHttpRedirectPostPut for Linux
Change-Id: I7db143bbd2e178e944f4cfc6c184850238f3bc8c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-03 21:13:35 +00:00
Thiago Macieira
484a186f50 QNativeSocketEngine/Win: fix getting the datagram destination
Looks like I never even tested this. There were two problems:
 1) when we asked for the recvmsg and sendmsg functions, we used the
    wrong variable (socketDescriptor was still -1)
 2) we extracted the destination addresses, but never set them in the
    QIpPacketHeader object

The added tests confirm that this works on Windows, Linux, Darwin,
FreeBSD. There also seems to be a problem, obtaining the destination
address on an IPv4 socket with a dual-stack sender (I can reproduce that
on FreeBSD, macOS and Windows, plus an old version of Linux).

Task-number: QTBUG-63605
Change-Id: I638cf58bfa7b4e5fb386fffd14ea732bddbc0c42
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-04 19:12:18 +00:00
Sami Nurmenniemi
ca0f05ebe2 Skip d-bus tests also on armv7
Both of the new toolchains (armv7 + arm64) have some problems with d-bus
tests. Skip them until the toolchain has been fixed.

Task-number: QTBUG-60263
Change-Id: Ic300f419635fb6b49b3ea7f48fa76c19088c88bd
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-11-04 18:42:36 +00:00
Elvis Angelaccio
a4f9cf2344 Disable window shortcuts if there is a window modal dialog
If a window is blocked by a WindowModal dialog, it should not be
possible to trigger window shortcuts on that window if it receives
a WindowActivate event.

This currently happens if the blocked window gets clicked, because the
window becomes the active_window and then QApplication sends it a
WindowActivate event (this doesn't happen with application modal dialogs).

The correctWidgetContext() function calls QApplicationPrivate::tryModalHelper()
only if the shortcut context is ApplicationShortcut. This patch makes it
call even if the shortcut context is WindowShortcut.

Change-Id: Iff87d85bcae603a6a24128e0cedfa9d33b6485fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-04 17:41:17 +00:00
Timur Pocheptsov
b409cfa094 tst_QNetworkReply::ioHttpRedirectPolicy - blacklist for b2qt 64bit
This test fails often and seems to be flaky.

Task-number: QTBUG-62583
Change-Id: Id3af283c89e392634a7af6e11bd05775a4295798
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-10-30 11:12:05 +00:00
Timur Pocheptsov
1a64792652 tst_QTcpSocket::suddenRemoteDisconnect - fix flakyness
This test starts two processes - server and client - and requires
an external executable ('stressTest'). In .pro file we have SUBDIRS
containing both 'test' (test itself) and 'stressTest' (client/server app),
but there is no explicit dependency and as result we run the test before
we build 'stressTest' thus failing to start those processes. This patch makes
'test' dependent on 'stressTest'.

Task-number: QTBUG-36629
Change-Id: I286b08bcff86b9afc4bbee87a75e887527eaf5f2
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-10-30 11:10:10 +00:00
Friedemann Kleint
01c7b474f5 tst_QMenuBar: Port to QWindow-based mouse test API
Add some helpers to convert the coordinates and change the code to use the
QWindow-based mouse test API. Remove mouse presses on the second and third menu
from task256322_highlight() since moving the mouse is sufficient to switch
menus.
Remove blacklisting/skipping of macOS and offscreen.

Task-number: QTBUG-63988
Change-Id: If3e94170d11df369aec199d13d54d39382a78723
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-10-29 10:12:52 +00:00
Friedemann Kleint
38a0909d4e tst_qnetworkreply: Replace insignificant_test with blacklisting
Neither the exit crash of QTBUG-21102 nor the Windows failure of
QTBUG-24226 appear to be reproduceable.

Add verbose error reporting to getErrors() and blacklist
getErrors:ftp-host which has been found to fail with timeouts
on Linux and ioHttpRedirectMultipartPost.

Task-number: QTBUG-21102
Task-number: QTBUG-24226
Task-number: QTBUG-62860
Change-Id: I6b29f6184e83de8ffebf6ff0d80606512dca6419
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-10-29 10:12:17 +00:00
Friedemann Kleint
1c3dc8cfb8 tst_QFile::largeUncFileSupport(): Use QTRY_VERIFY() to open the file
Open failures due to sharing violations have been observed in Coin.

Change-Id: If7fbe01a454b3c343c0b87f73db50c28eae901c3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-10-27 20:02:58 +00:00
Friedemann Kleint
cd45d0f712 tst_QFile: Introduce StdioFileGuard
Guard the FILE * obtained by fopen() by a RAI class ensuring
the file is closed on destruction.

Change-Id: I9297f91ca2120238f3a44bad92bca5f920e01aa8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-10-27 20:02:53 +00:00
Gatis Paeglis
754b636053 tests: use QSKIP for temporarily disabled tests
Change-Id: Ib088e943668d00cbbd0e6e04ab7d565477b0cc51
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-10-27 11:37:26 +00:00
Gatis Paeglis
f239dbe60a tests: enforce Qt menubar in tst_QMenuBar::taskQTBUG56860_focus
... the same way other tests do in this file.

Change-Id: Ifcaee084bd20c55d6b9f7ddcf35daebce2a02e07
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-10-27 11:37:21 +00:00
Robert Szefner
d1422da264 Fix psql_schemas test
Ignore case when comparing table names in PostgreSQL

Task-number: QTBUG-63861
Change-Id: Iaf56dff11ee79f96fd3b136e1576f2578328ac79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-10-26 13:00:06 +00:00
Thiago Macieira
9574436666 QUrl: make sure setPort(nonnegative) is taken as part of authority
There were a couple of corner cases where doing setPort() would result
in QUrl thinking that an authority was not present. Since the full URL
parsing implies that a host is always present if the authority is
present, then we also imply that setting the port number makes the host
be present too.

Change-Id: I69f37f9304f24709a823fffd14e67c12da18d69f
Reviewed-by: David Faure <david.faure@kdab.com>
2017-10-26 04:46:04 +00:00
Friedemann Kleint
d020d3f4ed Stabilize tst_qaccessibility
Ensure windows are cleaned up. Add scaling where native coordinates
are used.

Task-number: QTQAINFRA-1440
Change-Id: Ie080ff780c687418f4dc5d71fd49112486b217e6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-10-24 16:43:56 +00:00
Maciej Czarnecki
3b8f828174 QWizard: Do not remove the Next button's shortcut
Currently on Windows, the Next button's shortcut doesn't work, because
QWizard overrides it with an empty key sequence.
The key sequence should be changed only if isVistaThemeEnabled() returns
true.

Task-number: QTBUG-46894
Change-Id: I54f26388b167973cc8065a867d9e771c1e6a2a72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-10-24 16:43:52 +00:00
Liang Qi
4f9b2cb026 Remove duplicate qnx from the platform file selector names
Update the QFileSelector tests for QNX.

Co-authored-by: James McDonnell <jmcdonnell@blackberry.com>
Change-Id: I68a8fde86725596323b539433287ac1a18fac1eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-10-24 16:43:39 +00:00
Mårten Nordheim
18f0a45964 Fix redirecting all the other methods for HTTP 307 and 308
c4cf90b1f7 made POST requests be
redirected properly, but this wasn't enough and should have included
every method/verb.

Change-Id: I37b12dc9fdffcbf2aadbd2360d4fc2584c024939
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-10-24 16:43:35 +00:00