Commit Graph

32992 Commits

Author SHA1 Message Date
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
Thiago Macieira
d674d227f7 qGlobalQHashSeed: initialize the seed before returning it
If you had never used QHash before, this function returned -1. That's
not useful if you're trying to implement your own QHash that uses Qt's
global seed.

Change-Id: Ib0e40a7a3ebc44329f23fffd14b2e875b970a55c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-04 19:11:41 +00:00
Friedemann Kleint
92c61b11c1 Windows: Use SM_CXSMICON instead of SM_CXICON for the tray icon size
Partially reverts b465fe7596.

Task-number: QTBUG-63447
Change-Id: Iaf8a54b59a054e33811f65f64322af3aa746885e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-11-04 19:04:37 +00:00
Friedemann Kleint
b4ac552561 Windows QPA: Pass on Url of non-filesystem directory items
Do not attempt to copy directory items, which will fail and result
in empty result lists. Amends 5865e582fd.

Task-number: QTBUG-57070
Task-number: QTBUG-63645
Change-Id: I59efce196b28099ec8aff5a802ef0a4d9a098453
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-11-04 19:04:21 +00:00
Friedemann Kleint
d366d6dfd3 Windows QPA: Restrict file dialog to file system items in Directory mode
Qt cannot handle places like 'Network', etc.

Task-number: QTBUG-63645
Change-Id: I53d0eedc2996af6a1ec3230e3d65a3e272aa3710
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-11-04 19:02:32 +00:00
Friedemann Kleint
851c226247 QFilesystemWatcher/Windows: Use event dispatcher of thread
Previously, the native event filter listening on removable drivers
was installed on QCoreApplication::eventDispatcher() which led to
a mismatch when launched from a non-GUI thread since
~QAbstractNativeEventFilter() removes itself from
QAbstractEventDispatcher::instance().
Amends 45580aa925,
e612fe8d47.

Task-number: QTBUG-64171
Change-Id: Icbe289bd585f124d66989d0cd574040b986e680c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-04 19:01:03 +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
Christian Ehrlicher
937ded010b QListView: make sure to respect grid size during dataChanged() handling
When the dataChanged() signal is handled by QIconModeViewBase, the size
of the items are recalculated. During this operation the optional
grid size is not taken into account which leads to a screwed up layout.
This patch adds the missing check similar it is done in
doStaticLayout()/doDynamicLayout().

Task-number: QTBUG-45427
Change-Id: Iba7adb44b1510c511a69c289ccb4f168992a6871
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-04 18:23:46 +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
Christian Ehrlicher
8f1277da8c QStorageInfo: Properly decode labels from /dev/disk/by-label
udev encodes the labels for /dev/disk/by-label/ with ID_LABEL_FS_ENC
which is done with blkid_encode_string(). This function encodes some
unsafe 1-byte utf-8 characters as hex (e.g. '\' or ' ')

Task-number: QTBUG-61420
Change-Id: If82f4381d348acf9008b79ec5ac7c55e6d3819de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-04 17:31:49 +00:00
Andy Shaw
acdb334032 Fix dragging inside a modal window when a QShapedPixmapWindow is used
A regression was introduced with a3d59c7c7f
which caused dragging to fail within a modal dialog on the XCB platform.
By adding an exception for the QShapedPixmapWindow, which is the window
used for the drag, we can allow that to continue to work whilst blocking
to the other newly created windows.

Task-number: QTBUG-63846
Change-Id: I7c7f365f30fcf5f04f50dc1a7fff7a09e6e5ed6c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-10-30 11:15:13 +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
9f0dda29d5 Windows QPA: Restrict warning about geometry failure
Print warning only for visible windows or in debug mode.

Task-number: QTBUG-63661
Change-Id: I742c86afcb40455074a6de753b0b1ce6a11d55af
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-10-27 20:03:10 +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
Alex Trotsenko
e8d2e831a4 QSslSocket::waitForDisconnected(): flush write buffer before waiting
Otherwise, the plain socket might be blocked indefinitely on waiting for
socket activity.

This issue is tested by tst_QSslSocket::disconnectFromHostWhenConnected()
which was unstable in CI.

Task-number: QTBUG-64016
Change-Id: I6a1a111dea4d1d1adaf55e6a90c0c5f995a270af
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-10-27 19:22:23 +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
Joerg Bornemann
70b0c127f0 Fix private includes in qhttp2protocolhandler_p.h
This file could not be included by user code in an installed Qt.

Change-Id: Id222d56dda9ef47d010ab947efa01bf63ecac050
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-10-27 06:39:15 +00:00
Mårten Nordheim
0bd4b194d1 Replace unneeded nullptr-checks with ASSERTS
The manager and managerPrivate member variables are set in the
constructor and never changed after that.

Change-Id: I7cc2fd2eb3f50bdc529ed29485e74bf9c016b0c0
Coverity-Id: 185272
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-10-27 03:54:18 +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
Kai Koehne
870423f98b Freetype: Also list BDF, PCF, ZLIB licenses
These are third party licenses that are part of
freetype.

Change-Id: I8c54feb6b5537ccfb0d0a4ffc24bc830c3c530e4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-10-26 12:16:11 +00:00
Kai Koehne
a1d62e61cb Synthesize LICENSE.txt for FreeType documentation
The LICENSE.txt we showed so far only mentioned the two mutual
licenses (FTL and GPLv2), whithout actually spelling them out.
This is required though.

[ChangeLog][Third-Party Code] Improve documentation about
Freetype 2 licenses.

Change-Id: I3af84b732aff58b12218cb7e8bb8e8de00c86307
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-10-26 12:16:07 +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
Eirik Aavitsland
4e339a5ac1 Doc: QImageReader assumes exclusive control over its device
Make an explicit mention of the fact that modifying a device while it
is being held by a QImageReader is undefined.

Task-number: QTBUG-61121
Change-Id: Ie0a016255c2614c5b8b415c8cd9602169153c8f8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-10-25 09:19:29 +00:00
Frederik Gladhorn
7a26582807 Make sure that QAccessibleWindowContainer::childCount is valid
When embedding foreign windows, we won't be able to return a valid child
accessible interface, so do not report it at all.
Supporting foreign windows properly is platform specific and something
to consider, but at least we shouldn't crash.

Task-number: QTBUG-63451
Change-Id: I19350cf97dc8d0c3f3052411eba0eee5f750dbab
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-10-25 09:19:24 +00:00
Friedemann Kleint
5eb508a317 Fix clazy-strict-iterators
Change-Id: I9276a85f0a8061b2636687cf694b8ed1abaa18b8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-10-25 09:19:19 +00:00
Jan Arve Sæther
ecd183455b Refactor childIdListForAccessibleObject
It has several problems:

1. It could potentially create an intArray with uninitialized elements.
   This could happen because the index for getting interfaces were the
   same as the storage index.  This was not correct, because they could
   diverge if iface->child() returned an invalid interface.

2. The count of accessible child elements could change while iterating.
   This could cause out-of-bounds condition when calling
   SetIntArrayRegion as described in QTBUG-45855. Instead now, we call
   SetIntArrayRegion only once, after we have gathered all the child
   interface ids.

Task-number: QTBUG-45855
Change-Id: I77e813158df5f563d04931ac4e296e3fc2a16e67
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-10-25 09:19:16 +00:00
Oliver Wolff
5ec02f7792 winrt: Fix compilation with -no-pch
Task-number: QTBUG-63210
Change-Id: Icdd4fcee67e3b386b86a131c302424b53b18e565
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-10-25 09:19:12 +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
Olivier Goffart
abcf558e49 moc: Restore compatibility with Qt 5.7's -b option
In Qt 5.7, it was possible to call moc "-bfoo.h" or "-b foo.h" and it had the
same effect. With the port to QCommandLineOption, we broke the -b option as it
was not annotated as a short option.
(Regression in a7e3c17e75)

Task-number: QTBUG-63706
Change-Id: I161d0f1a4e65d129063b5e8431802257677da19d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-10-24 16:43:47 +00:00
Gabriel de Dietrich
37a1478787 Cocoa QPA: Code clean up, make some bits more readable
Change-Id: I7f37c1b0f7f72a79bb2ac5828ba54111a90a0a00
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-10-24 16:43:43 +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
Yulong Bai
7e7683cabb QAction: fix ::setData() always emits changed()
QAction::setData() always emits changed() even without actual data change.
Original code lacks a guard to check if the data changes.
According to http://doc.qt.io/qt-4.8/signalsandslots.html,
adding guard also benefits to prevent infinite looping in case
of cyclic connections.

Task-number: QTBUG-62006
Change-Id: I776369b668082f9f02e4502a36b1ae234ee7e079
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-10-24 16:43:30 +00:00
Andy Shaw
7944423bfa Add clarifying documentation for QLayout::removeWidget()
Change-Id: I6c256c6c5cdfed6ceb45758d708fdc8f74d2939f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-10-24 12:23:21 +00:00
Eirik Aavitsland
7c5475f1c0 Doc: add hint about QMimeDatabase to QImageReader::canRead()
Task-number: QTBUG-63568
Change-Id: I5b700138487dbebfc8cbe70eb3a076efceafb361
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-10-24 12:23:15 +00:00
Gabriel de Dietrich
0261c22d41 Add menu creation manual test
We have found that there are three important operations
when it comes to menu creation and putting it up in the
native menubar:

    * Adding the action to its parent menu
    * Setting the submenu as the action's menu
    * Populating the actual submenu

This application tests all possible permutations for these
three operations, starting from the menubar and down two
more menu levels.

Two command-line options allow, first, to create a late
menubar that will replace the original menubar from the main
window form (--new-menubar) with, second, the option of
creating it parentless (--no-parent) before setting it as
the new main window menubar.

While mostly interesting for platforms supporting QPA menus
and menubars, this could be useful as a trivial check for
QMenu and QMenuBar in a pure QWidget environment.

As of today, the application shows at least three issues on
macOS which will be fixed in upcoming patches.

Change-Id: Id3c1e0f346c6fe27ab4656ff045b88a0a8623740
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-10-24 09:17:49 +00:00
Sami Nurmenniemi
9c58dd1588 Blacklist and skip failing tests for Boot2Qt / 64 bit arm
Task-number: QTBUG-60263
Change-Id: I05978915b5bb7ae31069e8e9ae1dc273e483ddb0
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-10-21 09:31:01 +00:00
Błażej Szczygieł
8aadfbc657 xcb: Convert synthetic mouse enter event position to native pixels
Mouse position is converted from native pixels later, so we must
provide native pixels for "QWindowSystemInterface::handleEnterEvent".

Amends 7091be1b79

Task-number: QTBUG-63865
Change-Id: I813c171f2fc1d321af702ac30eb5f2e4232e97c4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-10-20 08:06:03 +00:00
Friedemann Kleint
571b11d41c Windows QPA: Fix build with -no-feature-tabletevent
Guard #include by QT_CONFIG.

Task-number: QTBUG-63874
Change-Id: I33f4a4c4fbdae3d25874ee9cdc3f1c7e1ab783e3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-10-20 08:05:57 +00:00
Friedemann Kleint
dcc8aa8f4e Windows/Direct2D QPA: Fix build with -no-accessibility
Task-number: QTBUG-63876
Change-Id: Ib9216977dd495e05d032e679c2f23ffe6a6953a6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-10-20 08:00:56 +00:00
Oliver Wolff
c05268222c winrt: Fully initialize CREATEFILE2_EXTENDED_PARAMETERS struct
Not properly initializing all members of the extended parameter struct
will cause an "invalid handle specified" exception on use.

Task-number: QTBUG-63883
Change-Id: Ic3a58df864c9e29ccbadc04bd71c18c8ef34374c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-10-20 07:46:52 +00:00
Gabriel de Dietrich
c99d8532c8 QCocoaSystemTrayIcon: Remove unused classes
Both QNSMenu and QSystemTrayIconQMenu aren't referenced anywhere
else, including within qcocoasystemtrayicon.mm, since the QPA
backend was added.

Change-Id: I632c1b230226b2d08afce7f0f0019e9f7c030ba5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-10-20 03:22:16 +00:00