summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* testlib: start sharing common helper functionsGatis Paeglis2017-11-042-1/+114
| | | | | | | | | | | | | | ... 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>
* QNativeSocketEngine/Win: fix getting the datagram destinationThiago Macieira2017-11-041-9/+11
| | | | | | | | | | | | | | | | | 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>
* qGlobalQHashSeed: initialize the seed before returning itThiago Macieira2017-11-041-0/+1
| | | | | | | | | 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>
* Windows: Use SM_CXSMICON instead of SM_CXICON for the tray icon sizeFriedemann Kleint2017-11-041-3/+2
| | | | | | | | Partially reverts b465fe759695bb7e1de693c3d4d20acfd2c49779. Task-number: QTBUG-63447 Change-Id: Iaf8a54b59a054e33811f65f64322af3aa746885e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Pass on Url of non-filesystem directory itemsFriedemann Kleint2017-11-041-1/+1
| | | | | | | | | | Do not attempt to copy directory items, which will fail and result in empty result lists. Amends 5865e582fd537fff530c13301e5229a7b4ed21c7. Task-number: QTBUG-57070 Task-number: QTBUG-63645 Change-Id: I59efce196b28099ec8aff5a802ef0a4d9a098453 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Restrict file dialog to file system items in Directory modeFriedemann Kleint2017-11-041-1/+5
| | | | | | | | Qt cannot handle places like 'Network', etc. Task-number: QTBUG-63645 Change-Id: I53d0eedc2996af6a1ec3230e3d65a3e272aa3710 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QFilesystemWatcher/Windows: Use event dispatcher of threadFriedemann Kleint2017-11-041-2/+2
| | | | | | | | | | | | | | 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 45580aa92557caa4f3f5be783573ddb80602e494, e612fe8d47bc0fe762668617a5189117ad1aee15. Task-number: QTBUG-64171 Change-Id: Icbe289bd585f124d66989d0cd574040b986e680c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QListView: make sure to respect grid size during dataChanged() handlingChristian Ehrlicher2017-11-041-3/+12
| | | | | | | | | | | | 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>
* Disable window shortcuts if there is a window modal dialogElvis Angelaccio2017-11-041-1/+1
| | | | | | | | | | | | | | | | | 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>
* QStorageInfo: Properly decode labels from /dev/disk/by-labelChristian Ehrlicher2017-11-041-1/+33
| | | | | | | | | | 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>
* Fix dragging inside a modal window when a QShapedPixmapWindow is usedAndy Shaw2017-10-301-1/+4
| | | | | | | | | | | | A regression was introduced with a3d59c7c7f675b0a4e128efeb781aa1c2f7db4c0 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>
* Windows QPA: Restrict warning about geometry failureFriedemann Kleint2017-10-271-1/+2
| | | | | | | | 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>
* QSslSocket::waitForDisconnected(): flush write buffer before waitingAlex Trotsenko2017-10-271-1/+13
| | | | | | | | | | | | | 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>
* Fix private includes in qhttp2protocolhandler_p.hJoerg Bornemann2017-10-271-5/+5
| | | | | | | This file could not be included by user code in an installed Qt. Change-Id: Id222d56dda9ef47d010ab947efa01bf63ecac050 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Replace unneeded nullptr-checks with ASSERTSMårten Nordheim2017-10-271-36/+36
| | | | | | | | | | 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>
* Freetype: Also list BDF, PCF, ZLIB licensesKai Koehne2017-10-264-13/+139
| | | | | | | | These are third party licenses that are part of freetype. Change-Id: I8c54feb6b5537ccfb0d0a4ffc24bc830c3c530e4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Synthesize LICENSE.txt for FreeType documentationKai Koehne2017-10-262-2/+553
| | | | | | | | | | | | 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>
* QUrl: make sure setPort(nonnegative) is taken as part of authorityThiago Macieira2017-10-261-8/+6
| | | | | | | | | | | 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>
* Doc: QImageReader assumes exclusive control over its deviceEirik Aavitsland2017-10-251-0/+5
| | | | | | | | | 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>
* Make sure that QAccessibleWindowContainer::childCount is validFrederik Gladhorn2017-10-251-1/+1
| | | | | | | | | | | 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>
* Fix clazy-strict-iteratorsFriedemann Kleint2017-10-255-6/+6
| | | | | Change-Id: I9276a85f0a8061b2636687cf694b8ed1abaa18b8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Refactor childIdListForAccessibleObjectJan Arve Sæther2017-10-251-7/+7
| | | | | | | | | | | | | | | | | | | 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>
* winrt: Fix compilation with -no-pchOliver Wolff2017-10-251-0/+1
| | | | | | | Task-number: QTBUG-63210 Change-Id: Icdd4fcee67e3b386b86a131c302424b53b18e565 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QWizard: Do not remove the Next button's shortcutMaciej Czarnecki2017-10-241-2/+2
| | | | | | | | | | | 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>
* moc: Restore compatibility with Qt 5.7's -b optionOlivier Goffart2017-10-241-0/+1
| | | | | | | | | | | | 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 a7e3c17e755881aa3169a2bb662338bbd2c67512) Task-number: QTBUG-63706 Change-Id: I161d0f1a4e65d129063b5e8431802257677da19d Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cocoa QPA: Code clean up, make some bits more readableGabriel de Dietrich2017-10-244-21/+22
| | | | | | Change-Id: I7f37c1b0f7f72a79bb2ac5828ba54111a90a0a00 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove duplicate qnx from the platform file selector namesLiang Qi2017-10-241-3/+3
| | | | | | | | 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>
* Fix redirecting all the other methods for HTTP 307 and 308Mårten Nordheim2017-10-241-6/+4
| | | | | | | | | | c4cf90b1f739c47383672de3d66b1d9d5427f5db 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>
* QAction: fix ::setData() always emits changed()Yulong Bai2017-10-241-0/+2
| | | | | | | | | | | | 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>
* Add clarifying documentation for QLayout::removeWidget()Andy Shaw2017-10-241-1/+2
| | | | | Change-Id: I6c256c6c5cdfed6ceb45758d708fdc8f74d2939f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: add hint about QMimeDatabase to QImageReader::canRead()Eirik Aavitsland2017-10-241-1/+4
| | | | | | Task-number: QTBUG-63568 Change-Id: I5b700138487dbebfc8cbe70eb3a076efceafb361 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* xcb: Convert synthetic mouse enter event position to native pixelsBłażej Szczygieł2017-10-201-1/+3
| | | | | | | | | | | Mouse position is converted from native pixels later, so we must provide native pixels for "QWindowSystemInterface::handleEnterEvent". Amends 7091be1b7999d93fe2126042161dcd1d8fd20026 Task-number: QTBUG-63865 Change-Id: I813c171f2fc1d321af702ac30eb5f2e4232e97c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix build with -no-feature-tableteventFriedemann Kleint2017-10-201-1/+3
| | | | | | | | Guard #include by QT_CONFIG. Task-number: QTBUG-63874 Change-Id: I33f4a4c4fbdae3d25874ee9cdc3f1c7e1ab783e3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows/Direct2D QPA: Fix build with -no-accessibilityFriedemann Kleint2017-10-202-2/+6
| | | | | | Task-number: QTBUG-63876 Change-Id: Ib9216977dd495e05d032e679c2f23ffe6a6953a6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* winrt: Fully initialize CREATEFILE2_EXTENDED_PARAMETERS structOliver Wolff2017-10-201-0/+3
| | | | | | | | | 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>
* QCocoaSystemTrayIcon: Remove unused classesGabriel de Dietrich2017-10-201-31/+0
| | | | | | | | | 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>
* iOS: add support for adding mimetypes other than text on the clipboardRichard Moe Gustavsen2017-10-191-1/+13
| | | | | | | | | | | | | | | | | | A QVariant can only be converted to a QByteArray if it has user type QMetaType::QByteArray or QMetaType::QString. The way it stood, we always tried to convert the mime data to a QByteArray, and then put the result into a QVariant. This would fail if the mime data contained e.g a QPixmap. This patch will inspect what kind of data the QMimeData contains, and convert it to a QVariant using the expected API. Backport of 6d3c483 Task-number: QTBUG-57428 Task-number: QTBUG-63660 Change-Id: I09b4a94aef7b52773e1a79c468ead71b36dfbfc5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix cookie path matching for empty url pathMårten Nordheim2017-10-191-1/+1
| | | | | | | | | | The path wouldn't match if the cookie's path was root ('/') and the URLs path was empty. Change-Id: I6dcd10f1fdf4f48f14e50f1b169cbdfda7005849 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Cocoa QPA: Remove usage of OBJECTIVE_SOURCESGabriel de Dietrich2017-10-191-6/+5
| | | | | Change-Id: I5924ab0ddb442624f5aeeef023428be228348707 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QTableGenerator: Fix handling of illegal characters in fromBase8 againRobert Loehning2017-10-191-1/+1
| | | | | Change-Id: Iaee19f71e5b74b0d43b628739039ca3c2be60cd0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTabletEvent: Add doc note about Windows driversFriedemann Kleint2017-10-181-0/+7
| | | | | | | | | | Recent drivers no longer contain wintab32.dll, point out a version that still has it. Change-Id: I4125a0af3c11ab739f8006b91f58899aeed54458 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* network: add a QT_CONFIG(bearermanagement) guardLiang Qi2017-10-182-0/+4
| | | | | | | | | | | for QNetworkReplyHttpImplPrivate::startWaitForSession(). This amends 8a39384e907e830c907f73009f498c486b22bd20. Task-number: QTBUG-63847 Change-Id: Ic20a4ac3ab97ed25010e0679810ef64c3ff42c05 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix redirecting POST for HTTP 307 and 308Mårten Nordheim2017-10-173-2/+15
| | | | | | | | | | All POST requests that were redirected would previously turn into GET requests. This does not follow the standard for HTTP codes 307 and 308. Task-number: QTBUG-63142 Change-Id: Ibd25a9566066e589670a9bc34e5dc5111f8139d5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Open a session during redirects when neededMårten Nordheim2017-10-172-21/+59
| | | | | | | | | | | | | | In some cases when a session isn't needed (i.e. for localhost), the session is not opened at all. If a program (e.g. our tests) redirects from localhost to a different system (e.g. the qt network test servers, or the internet) it will wait for a session forever. So, we need to check if a session is needed for the redirect-target and then open one. It is usually opened in QNetworkReplyHttpImplPrivate::_q_startOperation Change-Id: Id3b78182a3fb3f63f0235ecb1fb665df8bd0c4ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNAM (redirects) - clear 'raw' headers before sending the next requestTimur Pocheptsov2017-10-171-0/+1
| | | | | | | | | | | | We already cleared 'cookedHeaders', which is a QHash for 'known headers' (enumerators as keys instead of strings), now do the same for 'rawHeaders'- not to end up with some weird mix of headers from all possible redirect responses and the final response. Task-number: QTBUG-61300 Change-Id: Ifd6655c4167840bb00d29446d36ce65ba2d5491a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: State that qDebug and friends are thread-safeKai Koehne2017-10-172-0/+12
| | | | | | | | | | There's a common misconception that qDebug and friends are not thread-safe, so let's explicitly state this. Change-Id: I48d4ab8983017a9f2e7c9932a49ed573baa22929 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android Accessibility: protect from accessing invalid interfacesFrederik Gladhorn2017-10-171-8/+12
| | | | | | | | | | | I am not sure if this is going to help, but it is required that the bridge checks that the interfaces it accesses are valid, since that protects from accessing them when they are in the destructor. This should be done, whether it fixes the issue or not. Task-number: QTBUG-45855 Change-Id: I2b96999ca4043f8b33607c864d1d178695d03192 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Windows QPA: Fix reporting of TabletLeaveProximity eventsFriedemann Kleint2017-10-171-6/+16
| | | | | | | | | Move the check for totalPacks below; it prevents leave notifications from being handled. Task-number: QTBUG-53628 Change-Id: I2436c51308803337e6d48ef958e03123283d4a1d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QShortcut: Fall back to cross platform code in absence of QPA menuGabriel de Dietrich2017-10-171-1/+3
| | | | | | | | | | | On macOS, absence of a QPA menu means that we should be using our own internal logic since there's no entity on the QCocoaMenuDelegate to take care of the shortcuts. Change-Id: I35ed8f0b55445f61d0528709d4debb636a502002 Task-number: QTBUG-61039 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* ANGLE: Fix compilation with MinGWOrgad Shaneh2017-10-161-1/+1
| | | | | | | /X is transformed into X:. Pass arguments with dash instead. Change-Id: Ib69ce73d9b8e54f4ea4b17fdb0ca43c85977717d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>