summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix the spurious socket notifications under WindowsAlex Trotsenko2015-09-101-0/+73
| | | | | | | | | | | | | | | | | | | | | | | To handle network events, QEventDispatcherWin32 uses I/O model based on notifications through the window message queue. Having successfully posted notification of a particular event to an application window, no further messages for that network event will be posted to the application window until the application makes the function call that implicitly re-enables notification of that network event. With these semantics, an application need not read all available data in response to an FD_READ message: a single recv in response to each FD_READ message is appropriate. If an application issues multiple recv calls in response to a single FD_READ, it can receive multiple FD_READ messages (including spurious). To solve this issue, this patch always disables the notifier after getting a notification, and re-enables it only when the message queue is empty. Task-number: QTBUG-46552 Change-Id: I05df67032911cd1f5927fa7912f7864bfbf8711e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* QUdpSocket: avoid infinite read notifier blockingAlex Trotsenko2015-09-101-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | There was a small amount of time between the last readDatagram() call and disabling a read notifier in case the socket had a pending datagram. If a new datagram arrived in this period, this qualified as absence of a datagram reader. Do not change the read notifier state because it is disabled on canReadNotification() entry and always enabled by the datagram reader. Thanks to Peter Seiderer, who investigated the same: "Querying hasPendingDatagrams() for enabling/disabling setReadNotificationEnabled() is racy (a new datagram could arrive after readDatagam() is called and before hasPendingDatagrams() is checked). But for unbuffered sockets the ReadNotification is already disabled before the readReady signal is emitted and should be re-enabled when calling read() or readDatagram() from the user." However, this patch does not completely solve the problem under Windows, as the socket notifier may emit spurious notifications. Task-number: QTBUG-46552 Change-Id: If7295d53ae2c788c39e86303502f38135c4d6180 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_QGuiApplication for embedded platforms using eglfs QPAPasi Petäjäjärvi2015-09-102-5/+16
| | | | | | | | Disable input and cursor for QGuiApplication instances used in autotest to initialize it properly. Change-Id: I78dc9b776269c082c20f244a51f858289129275d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* tst_QProcess_and_GuiEventLoop: Added flag QT_NO_PROCESSTuomas Heimonen2015-09-091-2/+5
| | | | | | Change-Id: I895b9c12de8734c20ec87ac30a9a9cca8f4242d7 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMimeDatabase: warn instead of asserting on bad magic.David Faure2015-09-046-37/+91
| | | | | | | | | | | | | | | An invalid mime magic definition could lead to an assert. Replaced with a qWarning. Move all checking to the QMimeMagicRule constructor, and do keep invalid rules since they are need to parse child rules. Unit test added, with QTest::ignoreMessage when using the XML backend (there's no warning from update-mime-database when using the cache). Also make it easier to add more shared mime info files for tests. Task-number: QTBUG-44319 Done-with: Eike Ziller <eike.ziller@theqtcompany.com> Change-Id: Ie39a160a106b650cdcee88778fa7eff9e932a988 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Another fix of cosmetic QPainter::drawPolyline()Eirik Aavitsland2015-09-011-1/+2
| | | | | | | | | | At the edge of the view, a line segment could end up as not producing any pixels even if not clipped by the floating-point clip routine. Make sure the starting point for the next line is still updated correctly for any significant segment lengths. Change-Id: I381a4efb81ce6006f3da4c67abf279aea79e4663 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Ensure sendPostedEvents() can be called independentlyJan Arve Saether2015-09-013-0/+281
| | | | | | | | | | | | | | | | | | | If Qt is not running its own event loop (e.g. if Qt is a plugin running in a non-Qt host application with its own event loop, a call to sendPostedEvents() should process all events by default, and not depend on the flags passed to the last call to processEvents() We also modify sendPostedEvents() to call its base implementation instead of directly calling QCoreApplication::sendPostedEvents(). (The behavior of the base implementation is the same, so no behavior change there). This also adds a test for QWindow event handling without Qts event loop is running. This is a black box test, just to ensure that basic functionality is working. It can be extended later. Task-number: QTBUG-45956 Change-Id: I7d688c0c6dec5f133fb495f07526debdde5389af Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Avoid overflow in QTime::addSecs with too big a number of secondsThiago Macieira2015-08-191-0/+2
| | | | | | | | | | QDateTime::addSecs needs to do something similar, but not identical because it needs the number of days too. And then there are daylight savings transitions... Task-number: QTBUG-47717 Change-Id: I7de033f80b0e4431b7f1ffff13f976f4f5e5a059 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* QRegularExpression: fix matching over QStringRefsGiuseppe D'Angelo2015-08-182-15/+372
| | | | | | | | | | | | | | | | | | | | | | | Playing with the offset argument of pcre_exec is not equivalent to adjusting the pointer to the subject string. In particular, PCRE can go behind the offset to check for lookbehinds or "transition" metacharacters (\b, \B, etc.). This made the code that deals with QStringRefs not matching in behavior with the corresponding code dealing with QStrings. For instance, QString subject("Miss"); QRegularExpression re("(?<=M)iss"); re.match(subject.mid(1)); // doesn't match re.match(subject.midRef(1)); // matches!!! Instead, actually adjust the pointer to the subject string so that the behavior is identical. A broken test that relied on the equivalence is also removed. Change-Id: If96333241ef59621d7f5a6a170ebd0a186844874 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Handle action events in QLineEditIconButton.Friedemann Kleint2015-08-181-3/+41
| | | | | | | | | Ensure QAction::setVisible() is handled and reposition if visibility changes. Task-number: QTBUG-39660 Change-Id: I14f0659aedc8dc89ddef3159d3a500b40b1563ff Reviewed-by: David Faure <david.faure@kdab.com>
* Open menu on the third click on QMenuBar on X11Alexander Volkov2015-08-171-4/+7
| | | | | | | | | | | | | | | We don't replay mouse events after closing popups on X11. This leads to the bug when the menu doesn't show after clicking three times on the menu bar. It can be fixed by reverting 78d7192338e2cbba0c9b53c429d35b9437b7e1cd, but then we need an alternative fix for QTBUG-32807 on Windows. So don't replay mouse events for the menu bar on all platforms. Change-Id: I3db8e24a6de6f35b0a17dffac6a131f1cad42e6d Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* tst_qprocess cleanupJoerg Bornemann2015-08-171-17/+15
| | | | | | | | Give setStandardOutputFile2 a sensible name, move it to where it belongs and remove bogus Q_OS_WINCE ifdef. Change-Id: I5c843e8b6cb626979966f3e61f7a7c720173bb28 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* fix assertion in QProcess/WinJoerg Bornemann2015-08-171-3/+28
| | | | | | | | | | | | | Do not call bytesAvailableInChannel if the source pipe end is invalid. This is the case when redirecting channels on Windows. The assertions in bytesAvailableInChannel were triggered whenever an output process or output file was set and waitForBytesWritten was called. Task-number: QTBUG-45548 Change-Id: I225dfea2c5e27e122f75008a3a06d425554e00fe Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* WinRT: Skip unsupported multicast UDP socket testsOliver Wolff2015-08-171-0/+18
| | | | | Change-Id: I69f756ad829569060ae9931748b940842d23a6ea Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* tst_qudpsocket: Do not crash if no testserver address could be foundOliver Wolff2015-08-171-2/+14
| | | | | Change-Id: Ica61974b20b848997c8ab101abde4b536814ba83 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* QMimeDatabase: adapt to changes in shared-mime-info 1.3David Faure2015-08-162-3/+4
| | | | | | | | | The generated xml file is now lowercase. This was changed in shared-mime-info 3805d0bcf2. It led to runtime warnings "No file found for ...", which helped notice the bug. Change-Id: I31f0fc7f0fe8a098c3f79c0bcbeeb1909d2cc05a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess: Ensure that the stdin buffer is cleared on start()Thiago Macieira2015-08-154-0/+169
| | | | | | | | | | | | | | The buffer may have been left dirty if we were unable to write all the data to the child process in the previous run. So ensure we clear it before starting a new one. We already did that for stdout and stderr, for some reason. Task-number: QTBUG-44517 Change-Id: I1a800c709d3543699131ffff13c419da3bbffacf Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QMimeProvider: Do not crash when globPatterns is empty.Milian Wolff2015-08-124-0/+23
| | | | | Change-Id: I351a533a1f03ac2e7bdec876b657a80fac60b2ed Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Oswald Buddenhagen2015-08-121-4/+5
|\
| * Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-07-171-4/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/manifest-meta.qdocconf src/corelib/global/qnamespace.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qtools_p.h src/sql/drivers/psql/qsql_psql.cpp Change-Id: I23a15ac84e03ad61d865e3df872b013eb0752949
| | * Network: Fix up previous corruption patchMarkus Goetz2015-07-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix-up for cff39fba10ffc10ee4dcfdc66ff6528eb26462d3. That patch lead to some internal state issues that lead to the QTBUG-47048 or to QNetworkReply objects erroring with "Connection Closed" when the server closed the Keep-Alive connection. This patch changes the QNAM socket slot connections to be DirectConnection. We don't close the socket anymore in slots where it is anyway in a closed state afterwards. This prevents event/stack recursions. We also flush QSslSocket/QTcpSocket receive buffers when receiving a disconnect so that the developer always gets the full decrypted data from the buffers. [ChangeLog][QtNetwork] Fix HTTP issues with "Unknown Error" and "Connection Closed" [ChangeLog][QtNetwork][Sockets] Read OS/encrypted read buffers when connection closed by server. Change-Id: Ib4d6a2d0d988317e3a5356f36e8dbcee4590beed Task-number: QTBUG-47048 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | tst_qmimedatabase: check that QFile::remove() worked.David Faure2015-08-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | It failed on Windows due to readonly files copied from the resource, until adding a setPermission call. Change-Id: I1d42b53763583aca73d011e0f2bbf061ef6aa891 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | QMimeDatabase: Run more tests on non-XDG/shared-mime-info platformsEike Ziller2015-08-116-25/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows and OS X, where QStandardPaths does not use XDG_DATA_DIRS/ _HOME and shared-mime-info is not installed, the tests that require additional shared mime info xml files were never run. Mend that by using QStandardPaths' test mode instead of setting XDG_DATA_HOME. Change-Id: I53b75c293c41c4dac63986dcb88972c2b54d5428 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Extend QNetworkReply test exclusion on OS XSimon Hausmann2015-08-101-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is very flakey in 5.5 integrations and the OS X CI machines have notorious problems with networking stability. So the previously listed tests are not really at fault, it's an infrastructure problem, that we choose to ignore for the time being. Change-Id: I7fbfa7b3778daa6b5e60d95b822847c92927122f Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Make tst_accessibility's characterRect match ↵Tor Arne Vestbø2015-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QAccessibleTextWidget::characterRect The former didn't account for ascent and descent. Change-Id: If741f22f7e79ac3c13e58f2966358010d9f9ec81 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | Change how QDebug escapes QStrings in the outputThiago Macieira2015-08-064-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Important Behavior Changes] QDebug output for QStrings changed compared to Qt 5.5.0 to more closely match the output of previous Qt versions. Like Qt 5.5.0, QDebug will escape non-printable characters, the backslash and quote characters, but will no longer escape the printable characters. Task-number: QTBUG-47316 Change-Id: I52dd43c12685407bb9a6ffff13f62ef68cbc80c5 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | | Seed the random number generator before using QTemporaryDirThiago Macieira2015-08-062-1/+14
| | | | | | | | | | | | | | | | | | | | | Otherwise, on some systems (Windows), we'll always create the same dirs. Change-Id: Id3d5c7bf4d4c45069621ffff13f79ba91e0f974b Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* | | QLoggingCategory: fix default severity in Q_LOGGING_CATEGORY macroAlex Merry2015-08-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QLoggingCategory] Fixed behavior of default severity passed to constructor or Q_LOGGING_CATEGORY with regards to QtInfoMsg, which was previously treated as being more severe than QtFatalMsg. This is because the code was using the numeric value of QtMsgType as a proxy for severity (via the <= operator), but the value of QtInfoMsg is greater than QtFatalMsg. Instead, the severity ordering must be dealt with explicitly. Change-Id: I5f178afc735221b00cb67c2cea4fa964bd9079ce Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | | Don't expose qt_setQtEnableTestFont(bool) by defaultKonstantin Ritt2015-07-313-33/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | Build it only in -developer-build mode for tests that might depend on exact-matching font behavior. Return earlier to avoid doing any useless job. Change-Id: I966ee5689f03403e45f4c957b63e3113f0467803 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | ssl: add test certificates with DSA and EC keysJeremy Lainé2015-07-3012-5/+103
| | | | | | | | | | | | | | | | | | | | | | | | The QSslCertificate tests only covered certificates with RSA keys, this extends the test coverage to DSA and EC keys. Change-Id: Ibee26f449cf6c1d97cbac6b511972eb44d6f0bd2 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | QLineEdit should inherit the input methods from QComboBox.BogDan Vatra2015-07-301-0/+9
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-39088 Change-Id: I4dfe9a052c20a4cb0a9d6b0d3337cb5095a3694f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | consistently handle empty program string in QProcess::start overloadsJoerg Bornemann2015-07-301-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All overloads of QProcess::start will now check whether the program string is empty and in that case - set error to FailedToStart, - set errorString to "No program defined", - emit error. Until now only one of the three overloads behaved like this. As a side effect, start(QString(), QStringList()) will not crash on Windows anymore. Task-number: QTBUG-47404 Change-Id: I2f93657204fe3643b1d74a74817843c05fc4a96b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | | Fix typo in test results report for androidSamuel Gaist2015-07-281-1/+1
| | | | | | | | | | | | | | | Change-Id: Ibb2319b1e96ce34d4c61c8504b7700a78462c56c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | ssl: fix comment typo in QSslSocket testsJeremy Lainé2015-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The comment about non-OpenSSL backends not reproting a specific error for self-signed certificates contained a typo, this fixes it. Change-Id: I3010981d5d87d68ebf5e984c003b8bbbfb019b96 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | | ssl: fix QNAM self-signed certificate test for non-OpenSSL backendsJeremy Lainé2015-07-281-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Non-OpenSSL backends are not able to report a specific error code for self-signed certificates. Change-Id: I56bf130335b2afa65cf2bd5248a40ac0e32f74c2 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Fix compilation error while instantiating operator<< explicitlyOlivier Goffart2015-07-261-0/+9
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-47375 Change-Id: Ibd260de88c174c1aa3833a56b153b8b74d337338 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QTimeZone: Convert fractional timezones properly.Cesar Garcia Naranjo2015-07-211-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QTimeZone] Fixed a wrong timezone conversion when the POSIX timezone rule contains a fractional timezone (e.g. VET4:30). Task-number: QTBUG-47037 Change-Id: I5d9052929bbcde174614ccf07c329264603e6431 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | tst_qmimedatabase.cpp: Set write permission on files extracted from resources.Friedemann Kleint2015-07-211-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set QFileDevice::WriteUser on all files extracted from resources. These are read-only, which is preserved by QFile::copy(). This caused the deletion of the temporary directory to fail on Windows. Change-Id: Id99de9160471c38bcec68025c89cfabbe209bdbe Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Autotest: rename sub tests from "test" to something meaningfulThiago Macieira2015-07-188-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, if I open tests/auto/dbus/dbus.pro in Qt Creator, it shows me "test", "test2", "test3", "test4" and it's very hard to know which test is which. Change-Id: Iee8cbc07c4434ce9b560ffff13d0654696c025b7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | tst_QUdpSocket: send two bytes in a datagramThiago Macieira2015-07-171-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm getting an error with WSARecvFrom in nativeBytesAvailable() and I don't know why. The number of bytes obtained is correct and the test works for 2 bytes, so let's use that. The Windows nativeBytesAvailable() function has a comment saying that WSAIoctl sometimes indicates 1 byte available when there's a pending error notification, so that function proceeds to do a WSARecvFrom to peek the number of bytes. Somehow that function in this test is getting a SOCKET_ERROR I can't explain. Change-Id: Ic5b19e556e572a72a9df9a405b1fee3b7efb8b24 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Add test for invalid exif dataRainer Keller2015-07-172-0/+8
| | | | | | | | | | | | Task-number: QTBUG-46870 Change-Id: Idfde92ca12336c6432798b4517e244c2f5a5ba4d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | QDir::removeRecursively(): Retry file deletion with write permission set.Friedemann Kleint2015-07-172-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | On Windows, having read-only files in a directory can cause removal to fail. When file deletion fails, check on the permissions, set write permissions and retry. Split apart code paths by OS in tst_QDir::removeRecursivelyFailure(); deletion of the read-only directory on UNIX should still fail. Change-Id: I36e54be5229a7b552e90fd5f42722b868fa0b6ee Reviewed-by: David Faure <david.faure@kdab.com>
* | Stabilize tst_QListView::batchedMode().Friedemann Kleint2015-07-171-33/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test showed failures on OS X: FAIL! : tst_QListView::batchedMode() Compared values are not the same Actual (ba.size()): 2 Expected (3) : 3 Loc: [tst_qlistview.cpp(848)] Use QTRY_COMPARE() to count the number of visible indexes with a helper function instead of using hard-coded timeouts. Item 3 appears with a little delay on OS X. Change-Id: I2fb2ff5ebdf9dbe85bdc79401375ad6f47b7b12b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Stabilize tst_QApplication::touchEventPropagation().Friedemann Kleint2015-07-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test checks whether a child window receives mouse events synthesizes from touch. Enlarge the child window so that it fully covers the parent and move the touch point a bit inside so that it is not affected by window manager positioning issues. Use QTRY_VERIFY. FAIL! : tst_QApplication::touchEventPropagation() 'widget.seenMouseEvent' returned FALSE. () Loc: [/work/build/qt/qtbase/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp(2107)] Change-Id: Ic08e68b1e547cc7148cd8994464fdc2a14ac507b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Stabilize tst_QTouchEvent::touchBeginWithGraphicsWidget().Friedemann Kleint2015-07-161-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test sends touch events to the root item at the top left corner which fails if the views starts to scroll. Make the view sufficiently large to prevent scrolling and align at top left. FAIL! : tst_QTouchEvent::touchBeginWithGraphicsWidget() Compared values are not the same Actual (((root->touchBeginCounter))): 0 Expected (1) : 1 Loc: [/work/build/qt/qtbase/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp(1471)] Change-Id: I357322ccc809ddb5cb587febf3c75cbe497e59d8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Disable thread-safe statics for MSVC 2015: they're brokenThiago Macieira2015-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | An object that throws in its constructor cannot be reentered. This violates both C++11 and C++98. It's also a regression from MSVC 2013. The unit test is renamed to indicate what it really does, as opposed to a misleading name that was probably a "thinko" on my part. Task-number: QTBUG-47224 Change-Id: Ib306f8f647014b399b87ffff13f132436d0578ef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Set the state of QTemporaryFileEngine properly prior to reopeningThiago Macieira2015-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | QTemporaryFileEngine does not store the pattern, so it needs to get it again from QTemporaryFilePrivate prior to reopening the file. It's possible to lose the pattern when remove() is called on the object. Task-number: QTBUG-46156 Change-Id: I66a35ce5f88941f29aa6ffff13dfc7f83d4fa3a2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | QVarLengthArray: Unit-test that clear() preserves capacitySérgio Martins2015-07-081-0/+16
| | | | | | | | | | Change-Id: Ib2b798b93ce9a1b77bca09b2a8c27a568ebf8670 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Fix the remainingTime() result after the first activation of a QTimerThiago Macieira2015-07-081-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, t->timeout was updated only once, at creation time, so the timer would always show as "overdue" after the first activation. The timer is updated to indicate the full remaining time during the slot activation, which is the behavior of the Unix and Glib dispatchers. Task-number: QTBUG-46940 Change-Id: I255870833a024a36adf6ffff13ecadb021c4358c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Test QAction::autoRepeatFrederik Gladhorn2015-07-071-0/+38
| | | | | | | | | | | | | | | | Sending several key presses with repeat=true should trigger the action several times, unless autoRepeat is set to false. Change-Id: I6469bbd78a608a87852554882c1632ce34422662 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>