summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * Make the factoryloader test compile without library supportUlf Hermann2017-02-222-0/+4
| | | | | | | | | | | | | | | | | | We define QT_STATICPLUGIN for the plugins in this case, so that they define the factory functions needed to link them directly into the test. Change-Id: I0f2de7bf6bec5a6d53ec9ad92536817c1221b7d5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * use regular configure mechanism for openssl library referencesOswald Buddenhagen2017-02-222-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | don't attempt to hand-craft a library export any more. instead, use the configure system's built-in mechanism, and refer to it via QMAKE_USE. this also allows us to rely on transitive dependencies in the autotest. as a side effect, this makes the openssl-linked feature imply the openssl one. Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Make sure to use C locale during time tests that assume itEdward Welbourne2017-02-203-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some format and parse tests for time and date-time depended on locale but had test data for the C locale (so fail if the test-environment has, e.g., LANG=de_DE@utf8). So impose the C locale (until Qt 6). The date-time test did *some* attempts at fixing for locale, but failed to handle am/pm; and we do have "### Qt 6" comments in Q(Date|Time)+::fromString indicating that we intend to switch these methods to use the C locale by default (which shall fix this once and for all). So rip out the incomplete localization now and test we work properly at least when the locale used *is* C. Add a comment to the matching QDate test to rip out its (presently adequate) matching code once we do get to Qt 6 and make fromString() use the C locale. QDateTimeParser uses systemLocale(), which is initialized the first time it gets accessed; so we need to frob the locale *early*; doing so in the test-class constructor is about as early as we conveniently can; and seems to work (while doing it in individual tests does not). (There is no point rolling back at the end; the QSystemLocale global has been set up by then, so the roll-back would merely leave the global out of sync with setlocale() and the environment.) Task-number: QTBUG-58728 Change-Id: Ifa6778a80276050a099387a6dab15a1096be7561 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QMimeDatabase: fix matching of filenames with different length when lowercaseDavid Faure2017-02-171-0/+1
| | | | | | | | | | | | | | | | | | AİİA.pdf takes 8 QChars, but after lowercasing it takes 10, so the code cannot assume the length to be the same. Task-number: QTBUG-58822 Change-Id: Id6fbb99f6afd08ee420099cd66372732d7598d9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Adapt to the C++ SIC introduced by P0012: noexcept overloadingEric Lemanissier2017-02-174-0/+184
| | | | | | | | | | | | | | | | see 5a1b4832a2 for more detail Task-number: QTBUG-58142 Change-Id: I51851ea9b4fe7b8eeadc452bc3dbb1ea00026d29 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QVarLengthArray: fix appending an already-contained itemMarc Mutz2017-02-171-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the lvalue QVector::append() overload, when we reallocate, we need to take a copy of the function's argument because the reference will get stale upon reallocation. Add a test. [ChangeLog][QtCore][QVarLengthArray] Fixed a bug involving appending an item already in the container to the container again. Change-Id: I06eeed6cb383dd5924e47a302bb3d1666d04c8e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QDir::mkpath: don't try to mkdir in automount filesystemsThiago Macieira2017-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automount filesystems like /home on many operating systems (QNX and OpenIndiana, at least) don't like if you try to mkdir in them, even if the file path already exists. OpenIndiana even gives you an ENOSYS error. So instead, let's try to mkdir our target, if we fail because of ENOENT, we try to create the parent, then try again. Task-number: QTBUG-58390 Change-Id: Ibe5b1b60c6ea47e19612fffd149cce81589b0acd Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | QNAM - rename Redirect*s*Nnn to RedirectNnnTimur Pocheptsov2017-02-231-35/+35
| | | | | | | | | | | | | | As discussed in API code-review. Change-Id: Ib54cfd43d5bef8c7d99a7fb3b09a9d16dc1dc1dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | add tst_QWidget::tabletTracking autotestShawn Rutledge2017-02-231-0/+106
| | | | | | | | | | | | | | | | Ensure that tablet moves are delivered iff tabletTracking is true. Task-number: QTBUG-26116 Change-Id: Iaa360e181f0c6484cfbde6fa5365f2f0dc77433a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Unexport QTimeZonePrivateMarc Mutz2017-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | It's only used in the autotests, and it private API, so downgrade from Q_CORE_EXPORT to Q_AUTOTEST_EXPORT. Fix a use of QTimeZonePrivate functions unprotected by QT_BUILD_INTERNAL in tst_qtimezone.cpp. Change-Id: I70eaea06f8fcf2983aeafb6894c3a5d2a4b272a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSizePolicy: make (Policy,Policy) ctor constexprMarc Mutz2017-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, that ctor also takes a ControlType argument (defaulted), and calls the non-constexpr, non-inline function setControlType(). In order to make at least the two-arg version constexpr, I added a use of the ternary operator to check for type == DefaultType, making all calls of the ctor that use type == DefaultType constexpr. For init'ing an aggregate type without ctor in the ctor-init-list, I needed to require uniform initialization, too. C++11-style constexpr cannot call void functions, so I needed to extract the transformation part of setControlType() into a new function that returns the result instead of storing it directly. Saves a surprising 2K in QtWidgets text size on GCC 4.9, AMD64 Linux stripped release builds. Change-Id: Ib4adf5fd6e54d5345dbfe1c298554278faf13c58 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QThreadPool: supersede cancel() with tryTake()Marc Mutz2017-02-221-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cancel() function added in 5b11e43e for Qt 5.5 suffers from a number of problems: First, if runnable->autoDelete() is true, then the function suffers from the ABA problem (see documentation written for trytake()). Second, if runnable->autoDelete() is false, due to cancel() throwing away crucial information instead of returning it, the caller cannot know whether the runnable was canceled (and thus has to be deleted), wasn't found or is currently executing (and thus mustn't be deleted), or has finished executing (and can be used to extract the result). Deprecate this dangerous API and replace it with the much more useful Private::stealRunnable(), promoted to public API and renamed to tryTake() for consistency with the rest of Qt. Described the various caveats in the function's documentation. [ChangeLog][QtCore][QThreadPool] The cancel() function suffers from several subtle issues and has been replaced with a new tryTake() function. Change-Id: I93125935614087efa24b3e3969dd6718aeabaa4f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QTypeInfo: don't treat enums and (extended) integral types as complexMarc Mutz2017-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We fully specialize QTypeInfo for most C++ built-in types, but enums and extended integral types (like GCC's int128_t) were not covered. Now that we depend on <type_traits>, we can stop pessimizing enums and extended integral types in QVector and QVLA by defaulting QTypeInfo::isComplex to true for such types. Fix a test that checked that enums were complex types. This should have been a XFAIL test. Enums are not complex types. Change-Id: Ibb0fb38cc83e980a428b5573d1db5666593418ae Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | windowflags: Update preview info when window state changesTor Arne Vestbø2017-02-202-20/+28
| | | | | | | | | | Change-Id: I072939cdff0bd58779d9c163cb23e8176f3bc84a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | windowflags: Improve compound states handlingTor Arne Vestbø2017-02-191-2/+2
| | | | | | | | | | Change-Id: Iab5df40b69cf9c0e11f0e495a6b27af9c05fbd94 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Widgets: Update micro focus in QLineEdit and friendsJarkko Koivikko2017-02-175-1/+218
| | | | | | | | | | | | | | | | | | | | | | | | QLineEdit, QAbstractSpinBox and QComboBox did not notify micro focus changes to the input context. In particular, the updates were missed during pre-edit stage. This change adds the missing bindings to QWidget::updateMicroFocus(). Change-Id: I9a7fff962f46dbabd8fb02836c206bace115793b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-1617-36/+96816
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
| * Package transient zone setting in test to ensure restore on failEdward Welbourne2017-02-151-13/+25
| | | | | | | | | | | | | | | | | | | | | | tst_QDateTime::operator_insert_extract() was setting the time-zone and taking care to restore it at the end of the test; however, if the test were to fail, the restore would be skipped. Package the zone-setting and restore in a class instance, so that premature return can't bypass the restore. Change-Id: I3df63260da17e481ef4d0d107d9f0fdea3e147e7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * tst_QThreadPool: don't deadlock when a cancel() test failsMarc Mutz2017-02-151-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We keep the runnables from finishing by having them block on a QSemaphore::acquire() call inside run(). If we fail a test that precedes the call to sem.release() further into the test, the early return will cause the thread pool to be destroyed, which will then attempt to wait for the runnables to finished, which, in turn wait for the semaphore to be released. -> dead lock Fix by introducing a RAII object to release the semaphore with a sufficiently large number to unblock all runnables. That number will in some situations be too large, but that does not matter. Change-Id: I1ec7e29b37bc36309e93e6e30708cc7db3c9579c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Wait for runnables to start up in tst_QThreadPool::cancel()Marc Mutz2017-02-151-3/+10
| | | | | | | | | | | | | | | | | | | | In order to get reproducible runs of the test, we need to wait in the main thread until all runnables have started executing. Otherwise, what the cancel() loop below actually does will vary from run to run. Change-Id: Ib912b0943e7bbd55c9480ae6fd4011ba20ac457e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_QThreadPool: simplify cancel()Marc Mutz2017-02-151-5/+8
| | | | | | | | | | | | | | | | | | | | Instead of allocating a statically-sized array on the heap, use an automatic C array instead. Replace some magic numbers with named constants. Change-Id: I17d29a76a67c4a413453ac26a5dee8cd54a8a37d Reviewed-by: David Faure <david.faure@kdab.com>
| * Fix UB (data race) in tst_QThreadPool::cancel()Marc Mutz2017-02-151-10/+17
| | | | | | | | | | | | | | | | | | | | Manipulating a simple int from multiple threads is a data race, thus undefined behavior. Fix by using QAtomicInt and atomic operations instead. Change-Id: I5418bc260da57fe353a71b8e5c7c1c97adbe7597 Reviewed-by: David Faure <david.faure@kdab.com>
| * 50 ms isn't enough for the CI, so increase to 100 msThiago Macieira2017-02-151-4/+4
| | | | | | | | | | | | | | | | | | | | This should reduce the failure rate. We're still doing qSleep of the same amount of time, but we now only fail if the slip is over 100 ms. Task-number: QTBUG-58713 Change-Id: I536c32a88bff44dab37afffd14a1afdf0b2e522a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * tst_QMimeDatabase: increase timeoutMarc Mutz2017-02-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | The runUpdateMimeDatabase() call was timing out on the CI due to running out of the default 30s timeout for QProcess::waitForFinished() (on my machine, that call takes less than 0.5s, reliably...). Increase to two minutes. Change-Id: I61b2e060ea9c2508b853847ba7040ad499e0084c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| * tst_QSemaphore: avoid deadlock on test failuresMarc Mutz2017-02-141-2/+4
| | | | | | | | | | | | | | | | | | | | When one of the QCOMPAREs in Consumer::run() fails, the consumer returns early, leaving the producer deadlocked in a QSemaphore's acquire() call. Change these to tryAcquire() with a large timeout, so the producer, too, eventually leaves run(). Change-Id: I7421d43305decd4754e09c8e092363594d1be06b Reviewed-by: David Faure <david.faure@kdab.com>
| * Blacklist tst_QTimer::remainingTime() on Windows and macOSFriedemann Kleint2017-02-141-0/+3
| | | | | | | | | | | | | | Task-number: QTBUG-58519 Change-Id: Ib03aa0bdeaa9ed0dc2f0d92aa11d07ffcdc2bc26 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Binary compatibility files for QtBase (5.8.0)Milla Pohjanheimo2017-02-1411-0/+96721
| | | | | | | | | | | | | | Added BC files for QtBase for Qt 5.8.0 Change-Id: I36d5453b8cfb5d34511a9b6196d4dc83d5c9f9f6 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | QString(Ref): make toLatin1()/toLocal8Bit() null handling consistentMarc Mutz2017-02-152-5/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Systematic testing in tst_QStringApiSymmetry revealed a bug in QStringRef::toLatin1(): a null input did not result in a null output, but an empty one. This is fixed, for consistency with QString::toLatin1(), and QString(Ref)::toUtf8(), which behaved correctly already. The same bug was found in QString(Ref)::toLocal8Bit(), which is particularly hideous, as it's documented to fall back to toLatin1(), which preserves null inputs. Fixed, too. [ChangeLog][QtCore][QString] toLocal8Bit() now preserves nullness of the input QString (outputs null QByteArray). [ChangeLog][QtCore][QStringRef] toLocal8Bit() and toLatin1() now preserve nullness of the input QStringRef (output null QByteArrays). Change-Id: I7026211922c287e03d07e89edbad2987aa646e51 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Fix http2 auto-testTimur Pocheptsov2017-02-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After it started to fail (somehow it's only OpenSUSE 42.1) again and again and after a quick re-evaluation it appears the logic testing SETTINGS|ACK is incorrect. We (client side) start by sending the preface and then continue to send our request(s). The other side (server) starts from sending its SETTINGS frame. These settings must be ACKed, but apparently it can happen, that server receives a requests and sends a reply before it receives SETTINGS|ACK, resulting in replyFinished (replyFinishedWithError) signal and event loop stopping. As a result - QVERIFY(serverGotSettingsACK) fails. Task-number: QTBUG-58758 Change-Id: I8184cf459b2b88f70c646171e0115c184237fad1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | tst_qlocale::macDefaultLocale - remove flaky/incorrect testTimur Pocheptsov2017-02-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | currencySymbol == "$" does not mean negative currency values will be formatted as "($value)". With all locales I have on my mac machines (10.11/10.12) the result is different from what this test expects. Also, the results are very different for different locales. Apparently, we never saw this problem before since in our CI "macs" we never have US Dollar/en_US selected in System Preferences. Task-number: QTBUG-58784 Change-Id: Ic2c3a3172bf1e715e99092ddee8f461b216d995a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-145-13/+47
|\| | | | | | | Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
| * Blacklist tst_QWaitCondition::wakeOne() on WindowsMarc Mutz2017-02-141-0/+2
| | | | | | | | | | | | | | | | | | This test was determined to be flaky on the CI. Task-number: QTBUG-58741 Change-Id: I43196d3a27f726fb96b427f5071e726b571a0404 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| * Fix QLibrary::isLibrary on Apple platformsFilipe Azevedo2017-02-121-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add proper support for 'so' and 'bundle' suffixes. Qt wrongly assumes .so libraries are not versioned on Apple platforms, which is wrong. Also, the shared library .bundle which is what Apple recommends instead of .so, are also versioned (not to be confound with the different Core Foundation bundles, which are directory hierarchy). For more info, see http://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm. Especially the part that reads: "Loadable modules, called bundles in Mac OS X, have the file type MH_BUNDLE. Most Unix-based software ports usually produce bundles with a .so extension, for the sake of consistency across platforms. Although Apple recommends giving bundles a .bundle extension, it isn't mandatory." Task-number: QTBUG-50446 Change-Id: Iacd5136397a12d65d83821434f332eb602550b4b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Revert "Add tests for QCollatorSortKey"Thiago Macieira2017-02-122-44/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b0c1e07d648caf585d2be12cf3d18eb42b86f721. The unit tests it introduced trigger errors with the macOS and Win32 implementations, which means the there's something seriously wrong with either the API, our implementation or the tests. Revert for now until this gets fixed. Blacklisting was also the wrong tool to use. The tests should have used QEXPECT_FAIL. Change-Id: Ida20c6bbe0c019835a22464535029585e8e1e367 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Add tests for QCollatorSortKeyMarc Mutz2017-02-112-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | There weren't any, at all. Testing on the CI showed that the implementation is broken on macOS, and, to a lesser extent, on Windows, so blacklist the failing tests until the implementation can be fixed. No need to hold back testing the other implementations. Task-number: QTBUG-58737 Change-Id: I9ae16ab778dbe2e95a6ca5e0bae00df4bad65cb2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Improve QIODevice::peek() performance on buffered devicesAlex Trotsenko2017-02-091-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 5.7, QIODevice::peek() implementation is based on transaction mechanism. While technically it's correct, seeking backward on a buffered random-access device clears the internal buffer that affects the performance of reading. To solve the problem, this patch implements peek mode directly inside the reading procedure. Task-number: QTBUG-56032 Change-Id: Ic5269f76e44c491a0309e13aba87fa7cf7b9259f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Blacklist tst_QElapsedTimer::elapsed() on WindowsMarc Mutz2017-02-091-0/+2
| | | | | | | | | | | | | | | | This test was determined to be flaky on the CI. Task-number: QTBUG-58713 Change-Id: Ie6e6a69b8ea625e3a3102c88d52f1f0fbec242aa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QFormLayout: take the correct row in takeRow()Marc Mutz2017-02-081-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't even try to understand what the old code was trying to do; once you're told by a user that the code is wrong, you see that it is. Fixed by just using the row as passed to takeRow() instead of trying to do some storage-index calculations. The m_matrix indexing operator does it all for us. Added a test that checks that the expected field widget gets returned. Fixed expected test data that was wrong, and just checking that the implementation behaves as implemented, instead of as documented. Amends change 8fbae648db3bc51bafacfe1f88e40561d357e60a. [ChangeLog][QtWidget][QFormLayout] The functions takeRow() and removeRow(), new in 5.8.0, now take and remove the correct row. Task-number: QTBUG-58693 Task-number: QTBUG-15990 Change-Id: I7185ccbc6c03e2579741cad5c0c821d3ed165474 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Don't create platform window for QWindows when calling setVisible(false)Tor Arne Vestbø2017-02-131-0/+11
| | | | | | | | | | | | | | We can defer the creation until the window is shown. Change-Id: I3d5b45ae59ee0925996cf12cd46dd574c8c6ef95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Blacklist tst_QSemaphore::tryAcquireWithTimeout(0.2s) on WindowsMarc Mutz2017-02-101-0/+2
| | | | | | | | | | | | | | | | | | This test was determined to be flaky on the CI, depite attempts to stabilize it (b750a3786f42395f0cddd8ed8f92a2bcfda1b270). Task-number: QTBUG-58745 Change-Id: I933199cd537002699906147d172bb797f1dc90c1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | moc: error out when the Q_PLUGIN_METADATA file can't be openedOlivier Goffart2017-02-101-0/+16
| | | | | | | | | | | | Task-number: QTBUG-56045 Change-Id: Ib058791036a2728dcd6215009a4ff206278bed14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>