summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | windowflags test: Don't assume window states can not be compoundTor Arne Vestbø2017-02-093-88/+43
| | | | | | | | | | | | | | | | | | The controls need to reflect the facts that e.g. maximized and fullscreen can both be set at the same time, the same way a window can be minimized and fullscreen. Change-Id: I7f3e354a5efaefb9f51e6b1f24fa35980fe35899 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | windowflags test: Don't hide windows unconditionally when applying new stateTor Arne Vestbø2017-02-091-5/+5
| | | | | | | | | | | | | | | | Makes operations like minimizing a window happen "behind the scenes" because the window is hidden during the state change. Change-Id: I01a00661e57f2dcfa6aef78ee0cfa36fbed1bb03 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Jani Heikkinen2017-02-0912-14/+247
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-0812-14/+247
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/win32-icc/qmake.conf Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
| | * QStringMatcher: fix setCaseSensitivity() on a non-QString-backed matcherMarc Mutz2017-02-071-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a non-QString-backed mode (via the (QChar*, int) ctor) was added for Qt 4.5, the author forgot to adjust the setCaseSensitivity() function. It still uses q_pattern instead of (p.uc, p.len) as the pattern for which to create the skip-table. Since there is no setPattern() overload for this mode, the correctness of the matcher is not harmed by this, but its performance degrades to that of a linear scan: the skip-table, being filled from an empty pattern, will be all-zeros, sending bm_find() into the 'possible match' case at every character. Since matching is still correct, but slow, it's not possible to write a test for this. I did, however, leave my attempts in the auto-test, for when we add QStringView overloads of setPattern() which will then be able to expose the bug. Change-Id: I7b803e8624b0352a0a974900affbbfc0c260d93b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Fix result handling in QDialog::doneSamuel Gaist2017-02-071-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setData method of an item view would get an incorrect value of a QDialog's result. This patch changes the order of functions called to fix that. [ChangeLog][QtWidgets][QDialog] Fixed a bug where accessing the result of QDialog's result could yield an incorrect value in some situation like using it as a delegate for item views. Task-number: QTBUG-6018 Task-number: QTBUG-12156 Task-number: QTBUG-14430 Change-Id: I6ee4b6e8cacf6a806631c05c6c5dbcff925df65e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * QInputDialog: prevent crash in static get*() functions when parent gets deletedMarc Mutz2017-02-062-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As explained in https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0 creating dialogs on the stack is a bad idea if the application or the dialog's parent window can be closed by means other than user interaction (such as a timer or an IPC call). Since we cannot know whether Qt is used to build such an application, we must assume it is, create the dialog on the heap, and monitor its lifetime with a QPointer. Instead of using manual resource management, add a minimal implementation of QAutoPointer, and use that in all static get*() functions. Task-number: QTBUG-54693 Change-Id: I6157dca18608e02be1ea2c2defbc31641defc9d1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: David Faure <david.faure@kdab.com>
| | * Reset QFileDevicePrivate::cachedSize on file closeAleksey Lysenko2017-02-061-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QFile object is reused, the atEnd() method may return incorrect values. The reason for this is that QFileDevicePrivate::cachedSize is not cleared. Setting cachedSize = 0 in the close() method fixes this issue. Task-number: QTBUG-57698 Change-Id: I828a2cf844e98d581098f2c781fa47d2cd3275ce Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Use a precise timer in tst_QTimer::remainingTimeThiago Macieira2017-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | At 200 ms, the error on first firing could be 10 ms. Task-number: QTBUG-58519 Change-Id: Ifaee7464122d402991b6fffd14a02a4ce782f11f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Fix data corruption when reading byte arrays from QSettingsThierry Bastian2017-02-033-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS, the code that read the plist is using QByteArray::fromRawCFData. When we return the data directly we need to detach the QByteArray so that it does not point CFData's data that will get deallocated just after the call. Task-number: QTBUG-58531 Change-Id: If829a304b986c99c8fc2aeeb992f2d539a4eef3a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * tst_qurl: add test for fromUserInput(3 args) using "." as working dirDavid Faure2017-02-021-1/+4
| | | | | | | | | | | | | | | | | | | | | As used in recent qtdeclarative commits, so better make sure it keeps working. Change-Id: I6d0ceda76201e3e7f75661cb6449e1ff32329126 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QVariant: don't do fuzzy comparisons with NaN and infinitiesThiago Macieira2017-01-311-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a test that tested this, but was wrong. [ChangeLog][QtCore][QVariant] Fixed a bug that caused wrong results for comparisons of QVariants containing either NaN or infinite numbers. Task-number: QTBUG-56073 Change-Id: I33dc971f005a4848bb8ffffd1475d29d00dd1b7f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QtGui/painting benchmark test: Fix Clang warning about uninitialized valueFriedemann Kleint2017-01-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | benchmarktests.h:323:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized] benchmarktests.h:371:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized] benchmarktests.h:417:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized] Change-Id: Ica496e3baa19e0701c64222ce8ab92ec94178db7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Read the .ini file back in text modeThiago Macieira2017-01-311-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because on Windows, the .ini files are saved with CRLF, but the files in the Qt resource are just LF (.gitattributes makes them so). Task-number: QTBUG-25446 Change-Id: I5eab0d9620bd1ba675b0a87c554f62cef0f98fcc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Diaglib: Exclude Win32 window dump functions for WinRTFriedemann Kleint2017-02-081-1/+1
|/ / | | | | | | | | Change-Id: I1323b2212266b3cd7a355c6c022e3f2d2822f210 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | QRasterPlatformPixmap::createPixmapForImage(): preserve DPRFriedemann Kleint2017-02-061-0/+14
| | | | | | | | | | | | | | | | | | | | Remove the line setting the DPR from the source; the image is moved. Task-number: QTBUG-58653 Task-number: QTBUG-58645 Change-Id: I2de94681459dba1d69dee06da44617fb9fa35bcc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Accept error margin in QGlyphRun/QStaticText test for decorationsEskil Abrahamsen Blomfeldt2017-02-022-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calculating the width of a text for drawing decorations on top, we use the effective advance of the whole text after it has been through the shaper. However, in the case of QStaticText and QGlyphRun, there is shortcut: Since we only have the glyph indexes and position of each glyph, we use the position + advance of the right-most glyph to find the right-most edge of the decoration. For this, however, we use the advance of the glyph *out of context* of the rest of the string, because the whole idea is to avoid doing the shaping of the string with every draw call. In some rare cases, the advance of the right-most character, in the context of the string, is different from the advance of the standalone glyph. Now, one way of fixing this would be to store the width of the text in QStaticText and QGlyphRun, but since it is a very rare artifact which is barely visible, I have opted to just work around it in the test instead, the workaround being to force integer metrics so that we don't get the small 0.2 pixel error. Task-number: QTBUG-55217 Change-Id: I8d16d52f2ef27275cabb7d3865aeeaa31617ba3d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Adjust some tests to pass with latest HB-NG changesKonstantin Ritt2017-02-021-7/+9
| | | | | | | | | | | | | | | | Recent HB changed the way of handling ZWJ/ZWNJ to be more in par with other engines. Change-Id: I8abacd195e4b247c8fa6d91ef1086e74da0a1efb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Fix tst_QFontMetrics::elidedMultiLengthF with some fontsEskil Abrahamsen Blomfeldt2017-02-021-6/+6
| | | | | | | | | | | | | | | | The QFontMetricsF version of the test should not truncate the returned values, as the results may then be wrong. Change-Id: I17f97f846bb723709e695e8866e437d6888d275b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix tst_QTextScriptEngine::thaiWithZWJ() on OpenSUSEEskil Abrahamsen Blomfeldt2017-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | OpenSUSE has a bitmap font called "Waree" while the test is created for the TrueType font which is available on Ubuntu. The style names are different, so we can use that to check that we have the right one. Change-Id: I808d0d1ecde9f10ed7730dc76ab3818490002ba9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'gerrit/dev' into HEADOswald Buddenhagen2017-02-0150-362/+1146
|\ \
| * | New qfloat16 classGlen Mabey2017-01-313-0/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This constitutes a fairly complete submission of an entirely new floating point type which conforms to IEEE 754 as a 16-bit storage class. Conversion between qfloat16 and float is currently performed through a sequence of lookup tables. Global-level functions qRound(), qRound64(), qFuzzyCompare(), qFuzzyIsNull(), and qIsNull() each with a qfloat16 parameter have been included for completeness. [ChangeLog][QtCore] Added new qfloat16 class. Change-Id: Ia52eb27846965c14f8140c00faf5ba33c9443976 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | tst_qvariant: fix comparison ambiguity for QMetaEnum valueGlen Mabey2017-01-311-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under certain circumstances, VS2015 reported ambiguous options in using the operator>(Enum,int) operator. This change adds a static_cast<qint64> to remove any ambiguity. In the process of testing this change, a gap in the existing logic was identified: the handling (just in the test code) of large negative enum values. Consequently, and additional test case was added, and additional if-conditions were added to account for that case. Change-Id: Ife2c471ba4caa4b9a0107722042114e58145c4d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix 2 clang warningsErik Verbruggen2017-01-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first one was already suppressed for GCC, so also do that for clang: /Users/erik/dev/qt5-dev/qtbase/tests/auto/corelib/tools/qstring/tst_qstring.cpp:1076:16: warning: format string is not a string literal (potentially insecure) [-Wformat-security] a.sprintf( zero ); ^~~~ /Users/erik/dev/qt5-dev/qtbase/tests/auto/corelib/tools/qstring/tst_qstring.cpp:1076:16: note: treat the string as an argument to avoid this a.sprintf( zero ); ^ "%s", The second one could also occur with other compilers, so fix it in a generic way. /Users/erik/dev/qt5-dev/qtbase/tests/auto/corelib/tools/qstring/tst_qstring.cpp:6382:5: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] string.repeated(3); ^~~~~~~~~~~~~~~ ~ 2 warnings generated. Change-Id: Id999179e795580a37b5be673ee54d6fa1a006dd7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-3013-38/+86
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network-chat/peermanager.cpp src/widgets/util/qsystemtrayicon.cpp src/widgets/util/qsystemtrayicon_qpa.cpp src/widgets/util/qsystemtrayicon_win.cpp src/widgets/util/qsystemtrayicon_x11.cpp Change-Id: I1c026df83818c0ccaf956980370e7522960627db
| | * Accept all formatting characters as valid inputEskil Abrahamsen Blomfeldt2017-01-261-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 7896ae052ad2c0c6ae2ebfc64cc2f525185198a8. The previous change focused only on ZWJ and ZWNJ, but there are many other formatting characters that we need to support and that may be rejected by the German keyboard-hack. This opens up for all characters in the Other_Format category. Task-number: QTBUG-58364 Change-Id: Idd967a9ae5b12060c851f6030b7e019508561696 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Plug leaks in tests/auto/dbusMarc Mutz2017-01-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tst_QDBusMetaObject::types(), hold a QMetaObject obtained from QDBusMetaObject::createMetaObject() in a QScopedPointer instead of leaking it. Use correct return value type. This fixes the remaining errors in GCC 6.1 Linux ASan runs of tests/auto/dbus. Change-Id: I1df7f8e42d45f40ecf381fe7b684a8ab5ebee675 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Plug remaining memleaks in tests/auto/widgets/itemviewsMarc Mutz2017-01-263-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... on Linux AMD64 builds. Pass QObject parents to QObjects otherwise leaked. Change-Id: Ia4f0ad2fdc4ef62a3d35a2cfca74965f79692da3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Plug memleaks in tst_QHeaderViewMarc Mutz2017-01-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The char* returned from QTest::toString() calls must be manually delete[]ed. Change-Id: Iad078e8741e3e97693b1a417693f414b3fb3ec09 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Plug memleaks in tst_QTreeViewMarc Mutz2017-01-261-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | Forgot to delete QAIMs without parent. Change-Id: I9c914e841123ee250fb977c45a84870463288d9b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * tst_QTreeWidget: plug memleaksMarc Mutz2017-01-261-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Taken QTreeWidgetItems need to be deleted, as do items created without a parent, and widgets without parent. Change-Id: I7ffa69903af9a1b92ba308f9f9416aec1d6d975f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Plug memleaks in tst_QAbstractItemViewMarc Mutz2017-01-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Styles need to be deleted manually... Change-Id: Ic4193d22a57801127e994062cade7cb9ef6f34d8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QVariant of nullptr should always be nullAllan Sandfeld Jensen2017-01-251-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implements isNull for QVariants of a nullptr so they always return true to isNull(), instead of depending on how they were constructed. Task-number: QTBUG-58296 Change-Id: Ibddec795cdadedef7e17d22c265c29e752d8f99f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Improve QTest::qWait() precision and switch to QDeadlineTimerAllan Sandfeld Jensen2017-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not wait up to the timeout ms after already having waited several times. At the same time upgrade to using the QDeadlineTimer which is designed for this purpose. Change-Id: Iaf5e4f4655605d5143ce91040c6eb6706752e504 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Stabilize tst_QPropertyAnimation::noStartValue()Friedemann Kleint2017-01-251-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the qWait() and introduce a QTRY_COMPARE() checking for the end value first. Task-number: QTBUG-58402 Change-Id: I2d3758178de5f67881008f28c406076ad27c4a90 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| | * Cocoa: fix crash regression in qt_mac_create_nsimage()Oleg Yadrov2017-01-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regression was introduced in d8857f21ac264. The original change was meant to fix support for SVG icons, but failed to take into account a valid QIcon with no sizes, but which is also unable to create a pixmap for the requested size. Task-number: QTBUG-58344 Change-Id: I7ac1dbfaf6e3dab8581fe4b33c814e2517fcdba8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>