summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * QLockFile: Don't deadlock if the lock file has a mtime in the futureOlivier Goffart2017-03-101-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | Stale Lock files in the future can happen in some situations. For exemple two computers with different clocks access the same file system. It could be that one of the timestamp is totaly off (several years into the future). [ChangeLog][QtCore][QLockFile] Fixed a deadlock occurring if a corrupted lock file's modification time is in the future. Change-Id: I8dac98a0e898c76bcef67f8c195e126c996b6add Reviewed-by: David Faure <david.faure@kdab.com>
* | Diaglib: Output DPI and scale factorsFriedemann Kleint2017-03-212-2/+8
| | | | | | | | | | | | | | Also pass options to formatWindow(). Change-Id: Ifa506331ea010087bfd7ab8bd3f7dda531f142a8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Diaglib: Fix WinRT exclusionFriedemann Kleint2017-03-201-1/+1
| | | | | | | | | | | | | | Amends change 8deeb6777dc2744a6b8e0c374f92ddcc8c004827. Change-Id: If403871b1fb117a3f8042e0e2397e6d521d17beb Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | QMap, QHash: make key_iterator satisfy the DefaultConstructible conceptAnton Kudryavtsev2017-03-202-0/+8
| | | | | | | | | | Change-Id: Ifc3f481ddb902b26c217516412c93a4a39a32b1c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Set default fbo redirect correctly for QOpenGLWidget viewportsLaszlo Agocs2017-03-181-0/+7
| | | | | | | | | | | | Task-number: QTBUG-59318 Change-Id: Icf2ea4e5ebdeec31750edc8b34a9b9f6bfb64744 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Blacklist also tst_QSemaphore::tryAcquireWithTimeout(2s)Marc Mutz2017-03-171-0/+2
| | | | | | | | | | | | | | | | It has started failing recently on the CI, too. Task-number: QTBUG-58745 Change-Id: I4c8834917e6455d00c300549ed448b06da75d5bc Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | Make QFile::open fail when using an invalid file nameJesus Fernandez2017-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the bug in QFile which allowed opening a file with reserved characters in its name. If the name is a long file path, CreateFile opens a file with a truncated name instead of failing, so we have to catch reserved characters ourselves. [ChangeLog][Windows] Fixed a bug that caused QFile to create files with truncated names if the file name was invalid. Now, QFile::open correctly fails to create such files. Task-number: QTBUG-57023 Change-Id: I01d5a7132054cecdfa839d0b8de06460039248a3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add lancelot test to exercise tiled non-ARGB32PM bilinear filteringAllan Sandfeld Jensen2017-03-162-6/+15
| | | | | | | | | | | | | | | | | | No test were hitting the code path for tiled non-ARGB32PM bilinear filtered scaling. In part because we were only using brushes in pixmap mode which are always converted to RGB32 or ARGB32PM. Change-Id: Ib466567f31ce6ee894acdf484d44b3af62dad6fc Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Skip tst_MacNativeEvents::testChildDialogInFrontOfModalParent()Tor Arne Vestbø2017-03-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closing the dialog at the end of the test ends the modal session via QCocoaEventDispatcherPrivate::endModalSession(), but the actual ending of the session is deferred to cleanupModalSessions(), and that is never called. The result is that QCocoaWindow::setVisible of the window in testKeyPressOnToplevel and following tests ends up calling [m_nsWindow orderFront:nil]; instead of [m_nsWindow makeKeyAndOrderFront:nil];, leaving the window inactive and the tests failing. Task-number: QTBUG-58474 Change-Id: If66b2e201f658b627c2ec50a562938f59a5037ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | tst_QObject: Test if the new connect style works with multiple inheritanceOlivier Goffart2017-03-141-0/+108
| | | | | | | | | | Change-Id: I638630ef84a3aee98688dac000efd3dfa7472175 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTabletEvent manual test: add quit shortcutShawn Rutledge2017-03-142-1/+4
| | | | | | | | | | Change-Id: I73012ec2d02856e5bbbc27d269f89b3918dd7c2d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QTabletEvent manual test: show keyboard modifiersShawn Rutledge2017-03-142-0/+22
| | | | | | | | | | | | Task-number: QTBUG-59415 Change-Id: Ibb7ebc29797712535d82c6eb02c78dc28ad4131d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-03-1360-320/+474
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-1360-320/+474
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | * Stop trying to discover the system timer resolution on WindowsThiago Macieira2017-03-081-51/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's take the beginning of the description: WaitForSingleObjectEx can be up to 16 milliseconds early. This is proven by the fact that there are tests doing: wait(waitTime); QVERIFY(timer.elapsed() >= waitTime - systemTimersResolution); and failing. Task-number: QTBUG-59337 Change-Id: Iae839f6a131a4f0784bffffd14a9a79523d69d94 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Don't call releaseKey a second time if the insertion failsAndy Shaw2017-03-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the insertion into the cache fails then it will delete the entry for us which already calls releaseKey(). So we should not call it a second time. Task-number: QTBUG-58259 Change-Id: I816c6f29ef97fe3a245f145c4faf1e0649f72dc5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix UB in QFutureInterface: invalid casts from ResultStoreBase to ResultStore<>Olivier Goffart2017-03-062-80/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ResultStore never actually exists, only ResutStoreBase does. So casting to ResultStore<T> and calling its member functions is UB. Put the type dependent function as template member functions within ResultStoreBase and so we don't need QtPrivate::ResultStore anymore. Same goes for the iterator. Change-Id: I739b9d234ba2238977863df77fde3a4471a9abd2 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Fix building of various examples and tools with -no-feature-processUlf Hermann2017-03-062-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | We should not check for platforms, but rather for features. Also, if dbus is available it doesn't automatically mean that QProcess is. Change-Id: I27ef5863fcb107cca1aa47abba95b734962adc33 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-069-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * tst_QVersionNumber: fix Clang warning about superfluous moveMarc Mutz2017-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parameters passed by value, like local function variables, are subject to NRVO/return-by-move already, so adding std::move, even disguised as qMove(), makes Clang warn about a pessimizing move. Change-Id: I7d59bfee4cf7ecddee0874ee489367044c702643 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Make QLocale consistent about special handling of the C localeEdward Welbourne2017-03-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLocale::matchingLocales() simply created each locale using the basic data, without (unless the matching conditions stipulated Language C) applying number-options hacks that it applies everywhere else, when creating the C locale. Thus the C locale in its returned list (if it wasn't the only entry) ended up with the default number options, without omiting separators in numbers. Thus QLocale::c() didn't actually appear as an entry in the list. Discovered while investigating QTBUG-58947. Added a dumb autotest that checks various ways of getting the C locale do actually give us equal locale objects. Fixed matchingLocales() to apply the same hack as is used elsewhere for the C locale. Change-Id: I263f31da623052b63171f5b5a83c65802383df21 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QMenu: make wide submenu appear on the same screen with its parent menuOleg Yadrov2017-03-041-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a multi-display system wide submenu might either appear on wrong screen or not appear at all (depending on the specific display configuration). Task-number: QTBUG-56917 Change-Id: I40013b0bee340a01ae1c08a5e074afa63da4dbfd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
| | * Wide QMenu: fix size and positionOleg Yadrov2017-03-041-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes 2 issues related to wide menus: 1) Menu took on full screen height when menu width was larger than screen width; 2) On a multi-display system wide menu might appear on wrong monitor (not the one where show event was triggered). The idea is we limit parent menu and all its submenus within the screen where it was opened. Note that this patch fixes only geometry-related issues and there are also some style flaws which need to be addressed (for example, currently the text does not elide if it doesn’t fit to the menu’s width). Task-number: QTBUG-56917 Change-Id: I7e9ff4a48bf03060d76e34d33a13ad6cc890c133 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| | * QDialogButtonGroup: Fix removal of deleted buttonsOlivier Goffart2017-03-021-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the destroyed() signal is emitted from ~QObject, it is not allowed to use static_cast to a QAbstractButton on that pointer anymore. And the qobject_cast will also fail which will keep a dangling pointer in the hash. Change-Id: If0d22fcc30cde87e771e70914c3afb04ea207289 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * tst_utf8: Fix one of the overlong sequences to be what we meantThiago Macieira2017-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C0 to DF take one continuation byte; E0 to EF take two. It's invalid UTF-8 anyway, but at least this is what the test row meant: overlong sequence with 3 bytes of what should have been two. This updates the comment to match the character that we were actually testing. Change-Id: I85a8bd6da2c44f52b4e3fffd14a75df2600487aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Fix parsing of day-of-week names that start with another nameThiago Macieira2017-02-281-0/+50
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-59159 Change-Id: I95c9e502ccc74af3bcf0fffd14a69e0cd27ce96b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Make it possible to specify the RCC data version formatSimon Hausmann2017-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit d20773824529d191e7b483b505107dce6c1b1c3d we unconditionally write version two, but it seems useful to allow users to specify the version explicitly. Change-Id: I81d3de3d7f87318653f89bf10e3618becd8329d6 Task-number: QTBUG-58769 Reviewed-by: hjk <hjk@qt.io>
| | * Properly use the "process" featureUlf Hermann2017-02-2741-176/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * QDateTime: Fix clearing the ShortData flag in setMSecsSinceEpochThiago Macieira2017-02-241-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike setTimeSpec, this forgot to clear the bit when detaching. So it's possible that some further use of the flags could incorrectly conclude that the data was short and then proceed to corrupt the pointer. The example from QTBUG-59061 caused this because toUTC() -> toTimeSpec() calls setMSecsSinceEpoch which left the bit set; then addDays() calls setDateTime(), which calls checkValidDateTime() and that corrupted the pointer. This problem was more visible on 32-bit systems because no QDateTime was short (except for default constructed ones), but it can happen on 64-bit with sufficiently large dates. Task-number: QTBUG-59061 Change-Id: Ibc5c715fda334a75bd2efffd14a562a375a4e69b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | moc: Support signals that return movable-only typeOlivier Goffart2017-03-131-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By adding std::move where it makes sense. This is not only good for move-only types, but for any type which can be moved as it saves copies of the return value in any case. [ChangeLog][moc] Move-only types are now supported as return types of signals and slots. Change-Id: Idc9453af993e7574a6bddd4a87210eddd3da48a9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | moc: put the QPrivateSignal argument in the arg arrayOlivier Goffart2017-03-131-0/+15
|/ / | | | | | | | | | | | | | | Even if it is normaly not used, templated code might still try to access it Task-number: QTBUG-59414 Change-Id: I9f7aadd714843059c8f89cdac48c60a3e2ca7294 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Deprecate QString::nullMarc Mutz2017-03-128-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a Qt 3 compatibility vehicle, and as such inherits the now-alien property to distinguish empty and null strings. Particularly worrisome is the following asymmetry: QString("") == QString::null // false QString("") == QString(QString::null) // true Instead of fixing this behavior, recognize that people might use it as a weird way to call isNull(), albeit one that once was idiomatic, and simply deprecate everything that deals with QString::null. [ChangeLog][QtCore][QString] QString::null is now deprecated. When used to construct a QString, use QString() instead. When used to compare to a QString, replace with QString::isNull(). Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* | Reintroduce a directed QMetaType::typeName arrayThiago Macieira2017-03-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit fb376e0fcc8d2d0a1731a588bfc6497d05e090e6 removed an array that facilitated returning the names of built-in types, to avoid the jump tables from the switch statement. This commit brings it back but makes the array a compile-time constant string offset table. The array is created by way of a set of C++11 constexpr functions, so we require that compiler feature. I've tested that MSVC 2015 does support it as well as the ICC 17 when masquerading as MSVC 2015, so I've enabled for that too. The only compiler left out is MSVC 2013. If we didn't need to support MSVC 2015, this could have been written more simply with C++14 relaxed constexpr. This also adds unit tests to confirm that QMetaType::typeName() does return null when we said it would. We're testing QMetaType::User-1 (which we'll likely never use) and QMetaType::LastWidgetsType-1 to select something inside the range of the built-in types. Task-number: QTBUG-58851 Change-Id: I4139d5f93dcb4b429ae9fffd14a33982891e2ac1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QMacStyle: update QTabBar styleOleg Yadrov2017-03-083-1/+159
| | | | | | | | | | | | Task-number: QTBUG-58266 Change-Id: I135e4dae44e2e97d73b7c7c97d8e682bcf459d75 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | moc: Add support for C++17 nested namespaces (N4230)Olivier Goffart2017-03-083-1/+86
| | | | | | | | | | | | | | [ChangeLog][moc] Added Support for C++17 nested namespaces Change-Id: Ib83fc5bf48f66546fa97b49710582fbf9c984503 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | moc: Fix parsing of digit separatorOlivier Goffart2017-03-081-0/+4
| | | | | | | | | | | | | | | | | | [ChangeLog][moc] Fixed parsing errors in presence of C++14 digit separators. Task-number: QTBUG-59351 Change-Id: Iea38ea7388853d84b819c2beb78a59371f57bf7d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Make uic handle -no-feature-shortcutPaul Olav Tvete2017-03-063-3/+11
| | | | | | | | | | Change-Id: I0f8c9fdc8b0fe573443cfc126f21e473544ddcba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Increase timeout of tst_QProcess::softExitInSlots even moreJoerg Bornemann2017-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | Commit eab7efd1 increased the timeout for this test, but apparently 10 seconds are still not enough. Set the timeout to a minute. Task-number: QTBUG-59075 Change-Id: Iebab8e5c73c4858ca90063a82aedfbb2546a62cc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Revert "Add expandingListItems property to QListView"Marc Mutz2017-03-031-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a4c25c020554527aa9ff9b533afabffef46be131. The API is too limited in scope, and a good name is hard to find, as evidenced in the API review discussion preceding Qt 5.9 beta. This API will hopefully return as something like setItemAlignment(). [ChangeLog][QtWidgets][QListView] EDIT: REMOVE: Added expandingListItems property. Conflicts: tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: I397acd8a7a6c716e2d3c96eee45a276eb6d4f9dd Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
* | Fix DPI of QWidget with parent on a different screenOlivier Goffart2017-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a floating QWidget has a parent on a different screen, its DPI was still inherited from the parent instead of taken from the screen. The only reason we did was in case there is a customDpi set. (customDpi is a private thing that is only used in designer to change the appearance of the previewed widget) So instead of recursing into QWidget::metric for each ancestor, just use a for loop to find if one parent has a customDpi. If no customDpi is found, then return the DPI of the right screen. Task-number: QTBUG-58959 Task-number: QTBUG-48242 Change-Id: Ie6e9e48cdd10234994c0919ba3aea9b0cdb52494 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | ppm/pgm image formats: fix reading 16bit and limited rangeEirik Aavitsland2017-03-021-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | The color values of ppm and pgm images can be either 8 or 16 bits. They can also be scaled to a smaller max value, and they can be expressed either binary or ascii. For some of these permutations, Qt's image handler lacked implementation or would decode the wrong color value. This commit fixes that. Task-number: QTBUG-18262 Task-number: QTBUG-35990 Change-Id: I7cf11c2366244f3a9b31c1a565a81e2658bc6a51 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Widgets: Replace LGPL21 with LGPL license headerKai Koehne2017-02-281-14/+20
| | | | | | | | | | | | | | Also use canonical contact url. Change-Id: I59ed3d09d2fee877a577a00e7e1cb09782d26512 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Network: Use canonical license headersKai Koehne2017-02-283-35/+19
| | | | | | | | | | | | | | | | | | Replace outdated LGPL21 with LGPL license header. Use GPL-EXCEPT for all autotests. Also use canonical contact url. Change-Id: I6e5cc8a4285569c4f862730a980f492b8a933a72 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | QSizePolicy: inline toControlTypeFieldValue()Marc Mutz2017-02-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation now uses the relaxed-constexpr qCountTrailingZeroBits() function from QtAlgorithms, making the QSizePolicy(Policy, Policy, ControlType) constructor constexpr on C++14 compilers. The explicit check for DefaultType remains to keep the constructor C++11-constexpr when called with just (Policy, Policy). Extend the constExpr tests a bit. Change-Id: I59690f0921d9bdee08e3615d0d1f4a9b92870c32 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Make QPlatformSurface events work with QWindowContainerLaszlo Agocs2017-02-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Embeddeding a QWindow via QWidget::createWindowContainer() fails to deliver the SurfaceAboutToBeDestroyed event. This breaks any OpenGL or Vulkan based QWindow that releases resources upon this event, and is particularly critical with Vulkan where the only way to do properly ordered swapchain - surface cleanup is via this event. In the non-embedded case close() eventually ends up in an explicit destroy() in QWindow. In the embedded case destroy() only gets called from ~QWindow. This then silently breaks since the subclass' reimplemented event() virtual is not getting called anymore. To remedy the problem, simply add an explicit destroy() to QWindowContainer. Task-number: QTBUG-55166 Change-Id: I1671e8f4d39f6c44e19eca7b9387f55fe3788294 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-2416-52/+313
|\| | | | | | | | | | | | | Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
| * QUrl::fromUserInput(with cwd) fix handling of files with trailing spacesDavid Faure2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | The call to trimmed() makes sense for URLs typed in a browser's location bar, but its use in every code path made it impossible to open a file with a trailing space in command-line tools that uses fromUserInput(cwd) to handle command-line arguments, as recommended. For instance kde-open5 "file.txt " would fail. Change-Id: Ie61182684521d91f077d3e76f95b7240965ab405 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_qurl: use temp dir and create our own files for testingDavid Faure2017-02-231-15/+32
| | | | | | | | | | | | | | This allows to test specific filenames without polluting the current dir. Change-Id: Ieb99019a2e37e30f294d85c5d80af1de1b919019 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_qurl: replace all QDir::currentPath() calls with local variableDavid Faure2017-02-231-18/+19
| | | | | | | | | | Change-Id: I70e4547ba87292c29dfab59950aa1214be8015a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QTextFormatCollection: replace copy ctor and op= with clear()David Faure2017-02-231-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operator=, which was only used for clearing, wasn't clearing the hash. This led to a mismatch between the vector and the hash (given that the hash points into the vector). Spotted by interrupting kmail in gdb, and it was in this code iterating over a 2000 entries hash (the first vector entries not matching the hash, this code keep appending new entries for the same formats). This fixes QTBUG-8862 again, the initial fix having been accidentally reverted in 467b15a. Change-Id: Ia34b3d002a0199e1930431a4bbdb2ec981ed4ffc Task-number: QTBUG-8862 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>