summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | QStringView: add constructor from pointer pairMarc Mutz2017-05-161-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is often more natural than (ptr, len), and I need it in the implementation of QStringView::trimmed(). Change-Id: I1d99b5ddaf76eee0582150b0233ef6ce9c37d25d Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Simplify code by factoring out brush transformation for gradientsEirik Aavitsland2017-05-153-0/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emulation of non-logical coordinate mode gradients was implemented by essentially 3 x 2 repetitions of the same manipulation of the QBrush transform. Avoid the code duplication by extracting a common method. Add lancelot test scripts that excersizes these code paths. Change-Id: I7baa921923231ef9e83e443dba996b82b32ad1e7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | QMacStyle: Replace QAquaWidgetSize with WidgetSizePolicyGabriel de Dietrich2017-05-152-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | No need to have two enums for the exact same purpose. qmacstyle auto-test updated as well. Change-Id: Ia601648191e39c0cbbaa7477143441005ae063c2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devFrederik Gladhorn2017-05-1111-445/+498
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.9' into devFrederik Gladhorn2017-05-1011-445/+498
| |\| | | | | | | | | | | | | | Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
| | * | Stabilize tst_QApplication::touchEventPropagationFrederik Gladhorn2017-05-102-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI metrics show that this test was flaky ~38 time in 3 days. The problem is old: after we get a surface, a window manager can still decide to re-position the window. The fix is to simply send the touch event in a position where it is sure to hit the window (usually the offset is the title bar height). The blacklisting seems to not have worked, I could reproduce the failure on a linux/xcb machine. Change-Id: I5229fe020ba75c984fd3b6c322ad00d769707573 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Fix missing handling of columns when merging selection rangesFilippo Cucchetto2017-05-091-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two bugs: 1) Two ranges should not be merged if they are of different columns. The old code would have merged (0,0) with (1, 1). Tranforming a selection of just two indexes in a rectangle of four indexes. 2) The QItemSelectionRange appended had wrong column and worked only for indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1) so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)). This QItemSelectionRange is invalid because topLeft columns is greater than bottomRight column. The fix take in consideration the bottomRight column. Task-number: QTBUG-58871 Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| | * | Skip failing autotests with b2qt toolchainTeemu Holappa2017-05-095-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-59966 Change-Id: I36d114107187db22841ebfeff8fa8175daff6d03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | QObject: turn the narrowing test into static_assertsGiuseppe D'Angelo2017-05-081-435/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conditions checked are compile-time conditions anyhow. Simplify or strenghten a few conditions while at it. Change-Id: If07f2aedca4c3632d852a8fdb2b3f7eb55a96c93 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
| | * | tst_qmessagehandler: fix qMessagePattern for arm with optimizations onSami Nurmenniemi2017-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backtrace logging tests were not passing for arm when -O2 option was used. Set "-fno-inline" on for the app whose backtrace is to be inspected. Task-number: QTBUG-59966 Change-Id: Id1bbf78c31dc524357a30c7d39c239689621b155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * | Remove some more register keywordsMarc Mutz2017-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They're deprecated since C++11 and removed in C++17. Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Make QWindow::setVisible() work for widgetsMorten Johan Sørvig2017-05-111-0/+16
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget has its own setVisible() code that needs to be run in order to correctly transition widget visibility. It is desirable to be able to show and hide (native) widgets also from the QWindow side, for example from the platform plugin, or from generic QWindow handling code in QtGui. Add a new virtual QWindowPrivate::setVisible() and move the QWindow visibility implementation there. Subclasses can now override this function to add custom code. Make QWidgetPrivate::show/hide_sys() call the QWindowPrivate setVisible implementation instead of the QWindow setVisible public API. Change-Id: I082f174b100659e1221d5898b490f8a9f498abdf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QMimeType: add Q_GADGETAlberto Mardegan2017-05-081-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMimeType class can be quite useful to graphical QML applications, especially on the desktop. [ChangeLog][QtCore][QMimeType] Add Q_GADGET, so that QML applications can make use of QMimeType's properties and methods. Change-Id: I03e6e82062558a72f5b97e65bbddfc4b7470e735 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jeremy Katz <jeremy@panix.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-0743-107/+860
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * | QHash/QMultiHash: fix operator==Giuseppe D'Angelo2017-05-051-2/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing QHash::operator== does not work when the same keys appear in different order between the two hashes being compared. However, relying on iteration order on a QHash is (as usual) a bad idea and one should never do it. Task-number: QTBUG-60395 Change-Id: Ifb39a6779230e26bbd6fdba82ccc0247b9cdc6ed Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Enable tst_qaccessibilitymacFrederik Gladhorn2017-05-043-36/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The test was disabled because it was checking if we had the right permissions. It does seem as if the permissions do not matter as long as everything is in process though. As seen by the regression in fafdb171e0c317ee8f871dc7b504d3713d5860eb it's important to run the test. This regression would have been caught. Change-Id: Ia1938e683badd1de2657aa6dc8a3b3bbe430e8c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * Introducing multiscreen-menus manual testGabriel de Dietrich2017-05-036-1/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have been noticing several menu popup sizing issues in the presence of multiple, heterogenous displays. Most remarkably, we'd often pick the primary display's geometry when computing the menu's size hint. This results in usability issues if the primary display is smaller than the display onto which the menu popup is being displayed. This manual test covers menu bar, context and push button menus. Torn-off menus are also enabled. We turn off the use of native menu bars to cover a few more cases. Change-Id: I29658ebdc56e41aa1bf99d06d96aed6bfb5461b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * QIconLoaderEngine: Fix actualSize() for no-entryPalo Kisa2017-05-031-0/+1
| | | | | | | | | | | | | | | | | | Return an empty size if no suitable entry found to avoid mismatch with the returned pixmap()'s size (the QIconEngine::actualSize() returns the originally requested size). Change-Id: Ia278719a54392b62c5f9fc0529476baba5cd7df0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Improve suppression of spurious socket notifications under WindowsAlex Trotsenko2017-05-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were still two cases where spurious notifications would be possible: - user calls hasPendingDatagrams()/pendingDatagramSize() on UDP socket somewhere outside the slot connected to readyRead() signal (::WSARecvFrom posts FD_READ notification, even if a notification for incoming datagram already exists in the message queue); - a socket was registered to receive several types of event and WM_QT_ACTIVATENOTIFIERS message is located between the different events for this socket in the queue. Provided patch ensures that the message queue is synchronized with the Qt event processing mechanism and adds a way to detect spurious notifications inside the window procedure. Task-number: QTBUG-58214 Change-Id: I49609dace601f300de09875ff1653617efabd72f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Peter Seiderer <ps.report@gmx.net>
| * QWindowsPipeReader: fix possible invalid invocation of ReadFileEx()Alex Trotsenko2017-05-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | If the user calls QLocalSocket::setReadBufferSize() with a value less than the current size of the pipe buffer, startAsyncRead() would call ReadFileEx() with invalid parameters: ReadFileEx(handle, nullptr, some_big_value, ...); Change-Id: I3d153e3ec34f8038dc001c1c896aeceb666a8979 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Windows: Fix tst_QFileDialog2::completionOnLevelAfterRoot()Friedemann Kleint2017-04-291-1/+1
| | | | | | | | | | | | | | | | Change the check for the unambiguous match to be case insensitive. Task-number: QTBUG-60466 Change-Id: Iaa019cc803a56b015f45309fb1b3a7a8a3d82ee4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix test build with ICC: QFlags does not auto cast to uintThiago Macieira2017-04-281-9/+9
| | | | | | | | | | | | | | | | | | | | I don't know why. tst_qflags.cpp(114): error: no instance of function template "verifyConstExpr" matches the argument list argument types are: (Qt::MouseButton) tst_qflags.cpp(91): note: this candidate was rejected because there is a type mismatch after argument substitution Change-Id: I84e363d735b443cb9beefffd14b9581d77933cb8 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| * Fix return of empty paths with multiple points on intersectionsAllan Sandfeld Jensen2017-04-281-0/+255
| | | | | | | | | | | | | | | | | | | | The intersection algorithm for intersection with rects, might return one edge of the rect even if that edge does not intersect with the path. To deal with that we collapse paths with empty bounding rects to the empty path. Task-number: QTBUG-60024 Change-Id: I3e305983c66548e772d7d7ce3de99d715edbdd1b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Revert "Blacklist tst_QSslSocket::protocolServerSide on OS X 10.11"Timur Pocheptsov2017-04-271-2/+0
| | | | | | | | | | | | | | | | | | This reverts commit 96c27f0dfa72f7800c85af10c00e0dababdc3fbf. We now use a custom keychain that should fix the original problem with the test. Change-Id: I52e4105f34a46ad7080750d9a62480ebe3a56e68 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QMenu: Display the menu title on the torn-off menu's title barGabriel de Dietrich2017-04-262-1/+17
| | | | | | | | | | | | Change-Id: If16e262a6c8b39dff517cc105cf55686d4c22582 Task-number: QTBUG-11693 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Revert "tst_qsslsocket::protocolServeSide - fix for macOS 10.11"Timur Pocheptsov2017-04-261-16/+2
| | | | | | | | | | | | | | | | The fix is outdated - the tests it was fixing - pass on 10.11. Change-Id: I8b42c1d3d2f1279382b15c20587dcc93cf1b6b40 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Fix tst_QLineEdit for offscreen and minimal platformsSami Nurmenniemi2017-04-261-11/+27
| | | | | | | | | | | | | | | | | | Unselecting with offscreen and minimal platforms behave similarly as in Windows and QNX. If left or right key is used for unselecting, cursor position is changed. Change-Id: I022cd2fec80ad1875fec983e1e3536a105e18bb2 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
| * Fix tests that assume system files are owned by root for qemuSami Nurmenniemi2017-04-266-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QEMU is provided sysroot with QEMU_LD_PREFIX, it opens files from there. If their owner is the current user, testing their access rights based on assumption that they are root fails. Skip the tests in that case similarly as is already done when the tests are run as root. This fixes following tests: - tst_QTemporaryDir::nonWritableCurrentDir - tst_QNetworkReply::getErrors(file-permissions) - tst_qstandardpaths::testCustomRuntimeDirectory Task-number: QTBUG-59966 Change-Id: I972ce37b4b5a7747cdd732a8e4a737ef09cbc6a5 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix tst_QWindow modal dialog tests for offscreen and minimal platformsSami Nurmenniemi2017-04-261-0/+16
| | | | | | | | | | | | | | | | Changed testing of focus of modal dialogs to match behavior on offscreen and minimal platforms. Change-Id: Ife3ea41b4b78df2e64c8d8e740332914b1e5a67c Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
| * Fix tst_QWidget for platform "offscreen"Sami Nurmenniemi2017-04-262-1/+13
| | | | | | | | | | | | | | | | | | Some features are not implemented by "offscreen" platform. Skip tests failing because of that. Some failing cases are also already skipped or blacklisted on "xcb" platform. Change-Id: I17269169379c270bd7d6f2ddda03ad9b114a71ce Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
| * QUrl: fix IDN conversion when the ACE form is invalidThiago Macieira2017-04-251-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We guarded against the Unicode form being invalid and did not produce an encoded form. But we did not guard against proper Punycode sequences that decode to forms that had not passed the proper Nameprep stage. So check for that and, if it fails, just keep the label in the form we found it in (it's valid STD3 anyway). [ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names that look like Internationalized Domain Names to become corrupt in decoded forms of QUrl, notably toString() and toDisplayString(). Task-number: QTBUG-60364 Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Blacklist tst_MacGui autotest in macOS 10.11Tony Sarajärvi2017-04-241-0/+2
| | | | | | | | | | | | Task-number: QTBUG-60385 Change-Id: I6e692ff55d26b9070343d612e2f872091d5c343d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * QUrl: fix IDN whitelist checking when the TLD is in UnicodeThiago Macieira2017-04-241-0/+8
| | | | | | | | | | | | | | | | | | | | The whitelist is kept in ACE form, so if the TLD came in Unicode, we need to run ToASCII before we can check the whitelist. This is slightly inefficient because we'll run the same operation later in this domain. Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
| * Rename macos blacklisting to osxTony Sarajärvi2017-04-241-1/+1
| | | | | | | | | | Change-Id: I7e370ad8e1e2cb87188e149c96681e4c18abaa4f Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Blacklist tst_qsemaphore on macOS 10.12Tony Sarajärvi2017-04-241-0/+1
| | | | | | | | | | | | Task-number: QTBUG-58745 Change-Id: I085a2ac60cc24c287140788a88512657238a2c4b Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Deprecate QCoreApplication::flush()Gatis Paeglis2017-04-225-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as it has outlived its original purpose: Qt3 implementation on X11: void QApplication::flush() { flushX(); } void QApplication::flushX() { if (appDpy) XFlush( appDpy ); } Qt4 implementation on X11: Did nothing when QApplication::flush() was called (the flush() overrides in {unix,glib} event dispatchers with empty bodies). In Qt5 this function somehow has been repurposed (inconsistently) to do what QCoreApplication::sendPostedEvents already does: QAbstractEventDispatcher::flush() = 0; => QCocoaEventDispatcher::flush() {} => QEventDispatcherCoreFoundation::flush() {} => QIOSEventDispatcher (does not override ::flush()) => QEventDispatcherGlib::flush() {} => QPAEventDispatcherGlib (does not override ::flush()) => QEventDispatcherUNIX::flush() {} => QUnixEventDispatcherQPA (when QT_NO_GLIB=true) ::flush() { if (qApp) qApp->sendPostedEvents(); }) ==> QAndroidEventDispatcher (does not override ::flush()) => QEventDispatcherWin32::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWin32::flush(); } => QWindowsGuiEventDispatcher (does not override ::flush()) => QWindowsDirect2DEventDispatcher (does not override ::flush()) => QEventDispatcherWinRT::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWinRT::flush(); } => QWinRTEventDispatcher (qminimaleglintegration.cpp) (does not override ::flush()) => QWinRTEventDispatcher (qwinrteventdispatcher.h) (does not override ::flush()) Whatever this function was doing on macOS in Qt3 and Qt4 also has been dropped in Qt5. It appears that the other event dispatchers in Qt5 that have overrides for flush() have simply copy-pasted this logic. Clearly the documentation of QCoreApplication::flush() is outdated and has nothing to do with the actual implementation in Qt5. This function is rarely used in Qt5 sources. It should be safe to remove the calls to QCoreApplication::flush() from Qt source code, as this function has been doing nothing on most platforms anyways. Repurposing it even broke handling of posted events (see QTBUG-48717). [ChangeLog][QtCore][Event loop] QCoreApplication::flush() is now deprecated. Use QCoreApplication::processEvents() and QCoreApplication::sendPostedEvents() instead. Task-number: QTBUG-33489 Task-number: QTBUG-48717 Change-Id: Icc7347ff203024b7153ea74be6bf527dd07ce821 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
| * Fix QMetaMethod::invoke and automatic type registrationOlivier Goffart2017-04-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was simply not working for two reasons: - The index passed to QMetaObject::metacall was not right (there was an offset because of the return type) - If the registration succeeded, the arguments were not even initialized. The tests in tst_moc always called QMetaMethod::parameterType before calling invoke, which was properly registering the type. So this was not seen in the tests before. [ChangeLog][QtCore][QMetaMethod] Fixed crash in invoke() with QueuedConnection and types whose metatype gets automatically registered. Task-number: QTBUG-60185 Change-Id: I4247628484214fba0a8acc1813ed8f112f59c888 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QLoggingRegistry: remove rules vectorMarc Mutz2017-04-211-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It only contained a concatenation of the individual rule sets, probably to fix their order in a central place, as well as simplifying iteration in defaultCategoryFilter(). Fix these two issues differently, but introducing a RuleSet enum that lists rule sets in the order in which they should be applied by defaultCategoryFilter(), and turn individual rule sets vectors into a C array of vectors. This enables two nested loops in defaultCategoryFilter to replace the one loop over 'rules'. Apart from building up 'rules' in updateRules(), this was the only access to that member. That leaves updateRules() with just the task of running defaultCategoryFilter() on the new rule sets. Consequently, a call to updateRules() can now replace the identical loop in installFilter(). Performance should not suffer. Iterating over a fixed-size array of vectors is hardly any slower than iterating over a single vector, and while the construction of 'rules' was probably a one-off task in most programs, this way of keeping the rules also saves memory because rules are not kept in two different vectors. It is also more maintainable, of course. Change-Id: Ibc132d096c8137dd02b034752646212e51208637 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Skip tst_QMdiArea::setViewport on macOS due to flakey failures in CITor Arne Vestbø2017-04-201-0/+4
| | | | | | | | | | | | Task-number: QTBUG-58520 Change-Id: I582c190de45e85e2dfb397289720c655ec8d781c Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Fix tst_QTcpServer for QEMUSami Nurmenniemi2017-04-201-0/+53
| | | | | | | | | | | | | | | | | | QEMU does not support all syscalls needed for tcp socket testing. Skipped tests that can't pass on QEMU. Task-number: QTBUG-59966 Change-Id: Ib6d12d0fc4c913a0222e13db57f0864b7fdf21ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Implement key-value iteratorSamuel Gaist2017-05-052-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements an iterator that returns a pair containing both the key and the value of an entry in QHash/QMap. [ChangeLog][QtCore][Containers] Added an stl-like iterator to go through QHash/QMap returning both the key and the value of the element pointed to. That lets QHash/QMap interoperate better with stl's algorithms like std::set_union. Change-Id: Idbf8a8581510b3493648c34ab04c556de9fa4aa7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Enable c++17 in the QStringApiSymmetry testMarc Mutz2017-05-051-0/+1
| | | | | | | | | | | | | | Because it's the correct thing to do. Change-Id: I1d9fb482ffed6f4c36b4bc25d05cabcd07d87a78 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | tst_qscopedpointer: Actually test what test name says it should testTor Arne Vestbø2017-05-031-1/+1
| | | | | | | | | | Change-Id: Idda6e34c4438d1695f8268426fe923ad51ff6d10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_QStringApiSymmetry: add checks for trimmed()Marc Mutz2017-05-031-0/+68
| | | | | | | | | | | | | | | | All good (now). Change-Id: I666773856a239826e646398a943e7df30bd81671 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | tst_qstringapisymmetry: also check potential rvalue overloads of transformationsMarc Mutz2017-05-031-14/+59
| | | | | | | | | | | | | | | | | | | | | | | | For transformations, regardless of whether they're currently overloaded on rvalue-this or not, check the results of calls to const lvalues as well as mutable rvalues. Use the new mixed-type QCOMPARE more. Change-Id: Ibaa436cd88b40e5c0823c3bbe5b04a9964e7e987 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add a few std::move in functions accepting slotsOlivier Goffart2017-04-291-2/+9
| | | | | | | | | | | | | | | | This allows the use of move-only function objects Task-number: QTBUG-60339 Change-Id: If3595fca338cf7f3039eb566cc02e4e73cd04c86 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Support move-only function objects in QObject::connectOlivier Goffart2017-04-291-0/+42
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QObject] Added connect() support for move-only function objects. Task-number: QTBUG-60339 Change-Id: Iae5e48432bb64517b0607b0c2ba23931957f432e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QLatin1String: add startsWith()/endsWith()Marc Mutz2017-04-281-1/+23
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QLatin1String] Added startsWith(), endsWith(). Change-Id: I7f75a5a1f0409f4b9d3e41b73f4fb5d137572b09 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QStringView: add startsWith(), endsWith()Marc Mutz2017-04-281-1/+23
| | | | | | | | | | Change-Id: I72aef9236daedc3013c62d3f1d737159f85572b8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QString/Ref: add startsWith/endsWith(QStringView) overloadsMarc Mutz2017-04-281-1/+9
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QString/QStringRef] Added startsWith(), endsWith() overloads taking QStringView. Change-Id: Ice6332492d19fd7477d5ac43ecbf6b70175b23ca Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>