summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Fix tests for platforms without process supportMaurice Kalinowski2016-03-013-1/+7
| | | | | Change-Id: I2d1cefdb5ff574635a75b54499efc392aba84434 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Fix crash in QProcess::waitForFinished on WindowsJoerg Bornemann2016-02-291-0/+33
| | | | | | | | | | | | | | | | | | | Suppose the user connects QProcess::readyReadStandardOutput with a slot that calls QCoreApplication::processEvents. Assume the event loop did not handle events between QProcess::start and QProcess::waitForFinished. The process writes to stdout and exits. QProcessPrivate::waitForFinished calls drainOutputPipes which calls QWindowsPipeWriter::waitForReadyRead. This in turn will trigger _q_processDied via the readyRead signal and processEvents. _q_processDied will delete the pid object and set pid to null. After drainOutputPipes returns, _q_processDied is called again but it must not be called if pid is already destroyed. Prevent calling _q_processDied if pid is null. Task-number: QTBUG-48697 Change-Id: Iee047938ee1529057a1a43d71f4e882750903c7e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove superfluous Windows CE special cases from tst_qprocess.cppJoerg Bornemann2016-02-291-29/+6
| | | | | | | | | | | Use default timeouts for wait functions. The increased timeouts will only have an effect if the tests fail. Print process errors if the process could not be started, while we're at it. Contract consecutive "#ifndef Q_OS_WINCE" blocks. Change-Id: I6324e4c5b91b89ebb2580635b88705bbda922907 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Remove a mis-placed QSKIP().Edward Welbourne2016-02-261-2/+0
| | | | | | | | It made us skip the rest of the test, not just the small set of sub-tests that were conditioned by the if () in whose else it sat. Change-Id: I5e914e0aeb9d5ba44b21966d071aaccbc590365d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Remove legacy from tst_qprocess.cppJoerg Bornemann2016-02-241-8/+0
| | | | | | | | | The windows.h include is not needed, the enums are properly known to the metaobject system nowadays, and qprocess_p.h already has a QT_NO_PROCESS guard. Change-Id: I6bbdce19f097feb8260c51a29425279049aa0192 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* tst_QProcess: Transform loop into additional test rowsJoerg Bornemann2016-02-241-9/+18
| | | | | | | | | | Do not use a loop to execute similar but separate tests in tst_QProcess::softExitInSlots. Use separate test rows with distinguishable data tags instead. This way we can deduce from CI output which part of this test failed. Change-Id: Ic9bc996f2ced11b2bb1c33c1970e64937d860976 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Update testdataMaurice Kalinowski2016-02-172-2/+2
| | | | | | | | Some entries were not updated and tests failed to succeed on platforms which need to deploy content/testdata. Change-Id: Ieb2b44c375b04cbaaecc1fb2303cc2478b86a100 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Fix usage of testdataMaurice Kalinowski2016-02-171-0/+9
| | | | | | | | testdata needs to be deployed to temp and current directory needs to be set to that directory for the test to succeed. Change-Id: I2dd023af9073d90afbb4ad60fcfb50bb1af4e159 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Disable tests which connect to localhostMaurice Kalinowski2016-02-162-0/+12
| | | | | | | | | WinRT does not allow do connect to the localhost due to security constraints and sandboxing. Hence we need to disable those currently. Change-Id: Idb8c71397a41e5fa5bad9d618dba1bb389e71b9c Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Autotest: Enable make check on rhel 7.1Simo Fält2016-02-111-0/+2
| | | | | | | | Blacklisting all tests, which were failing locally. Task-number: QTQAINFRA-949 Change-Id: I40c25ab0155b8977596d61297ab252a546515f87 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
* Cleanup testcase for platforms without QProcess support.Maurice Kalinowski2016-02-091-0/+2
| | | | | Change-Id: Ib56c90262605ad975772f6b26c6232020e308ca6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* winrt: cleanup testcasesMaurice Kalinowski2016-01-298-2/+28
| | | | | | | | | | | | | | | | We have to make sure that the plugins to be tested are located inside the virtual sandbox / relative to the application binary. Launching via winrtrunner, a test can find those plugins then. It is not possible to those via TESTDATA and extract them to temp, as LoadPackagedLibrary only loads inside the sandbox. Unfortunately this also implies that running those tests inside Visual Studio will fail, as Visual Studio copies the virtual sandbox to another location missing the plugins. For automated testing this should not matter though. Change-Id: I70f5ef2d56b3cf526b731fd885f12583c8f6e103 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Don't let a good day cause date-time parser to forget a conflict.Edward Welbourne2016-01-291-1/+3
| | | | | | | | | | | | Setting conflicts to isSet & DaySection cleared it if we hadn't seen the day stipulated, even if there had been a conflict (e.g. over year) before we hit the day-of-week that didn't match the (unset, so defaulting to) 1st of the month. Explicitly test for conflict and only set conflicts (to true) if there is a conflict. Added regression test. Change-Id: I7363eb66a8bb808d341738d14969039834f50db8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Add DST-change test for a date derived via .toLocalTime().Edward Welbourne2016-01-261-0/+24
| | | | | | | | | Uses a time derived via .toUTC() to ensure the .toLocalTime() comes out at the time we expect. Task-number: QTBUG-49008 Change-Id: I2005127929c7eab1b7a3cbaba8d21df8c9585d17 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Test .addDays() and .addMonths() are sensible around DST changes.Edward Welbourne2016-01-261-2/+40
| | | | | | Task-number: QTBUG-49008 Change-Id: Ie3bf9dfeb67c96b18320e18c14b9680f03cb98e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Autotest: make tst_QDateTime pass when LC_TIME != en_USThiago Macieira2016-01-221-9/+6
| | | | | | | | | | | QDateTime::toString for Qt::TextDate unconditionally uses the system locale (because QDate::shortDayName and QDate::shortMonthName do). Setting the default QLocale has no effect. If you ask me, those two QDate methods are buggy, but they are documented that way. Change-Id: I408dcb81ba654c929f25ffff1427366b04da5a43 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* winrt: msvc2015: refactor file handlingMaurice Kalinowski2016-01-2120-29/+171
| | | | | | | | | | | msvc2015 reintroduced a couple of functions from the win32 API towards WinRT. Enable usage of those and simplify the file system engine. Furthermore update the autotests. Change-Id: I9eafffba0ddfd05917c184c4a6b9e166f86d71d9 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Jani Heikkinen2016-01-216-60/+98
|\
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-196-60/+98
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
| | * Fix UB in tst_QObject::disconnectDoesNotLeakFunctor()Marc Mutz2016-01-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CountedStruct is passed a GetSenderObject object, it will attempt to call a member on it from within its own destructor. That works usually quite well, but in this test case, which tests for function object leaks when a connection is torn down because the sender object is destroyed, the destruction of the CountedStruct happens when all connections are severed in ~QObject. At that point, what used to be a GetSenderObject instance no longer is one and the call into one of its member functions invokes undefined behavior. Fix by making QObject::sender() public by a using declaration instead of a wrapper function. Found by UBSan: tests/auto/corelib/kernel/qobject/tst_qobject.cpp:6007:104: runtime error: member call on address 0x7ffc6e7538b0 which does not point to an object of type 'GetSenderObject' 0x7ffc6e7538b0: note: object is of type 'QObject' Change-Id: Ia973140037b3c1b5a670a8a3949d09b956f40349 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix UB in tst_QSharedPointer::basics()Marc Mutz2016-01-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binding a reference to the nullptr is undefined behavior. Just skip that particular test when 'ptr' is null. Found by UBSan: tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp:258:32: runtime error: reference binding to null pointer of type 'struct Data' Change-Id: I125588b9d269a6f76716d660d03142f409513885 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix UB in tst_QObject::noDeclarativeParentChangedOnDestruction()Marc Mutz2016-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QObjectPrivate::declarativeData is set, it is in various places in Qt expected to point to a QAbstractDeclarativeDataImpl, from which ownedByQml1 is unconditionally read. In noDeclarativeParentChangedOnDestruction(), the declarativeData pointer is, however, set to a local QAbstractDeclarativeData instance, which, being an empty class, has size 1 and alignment 1. Depending on the compiler's idea of bit field order, this code either read uninitialized data from the dummy object, or else some random stack memory outside any (valid) object. What caught UBSan's attention, though, was the difference in alignment between the two classes: src/corelib/kernel/qobject.cpp:917:9: runtime error: member access within misaligned address 0x7fffc9cf706f for type 'struct QAbstractDeclarativeDataImpl', which requires 4 byte alignment Fix by providing a properly initialized object of the correct type. Change-Id: Iae83a949ee5a7bc98df13e35ea614c063085fa13 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Fix UB in tst_QMetaTypeMarc Mutz2016-01-061-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't pass around meta-type IDs in QMetaType::Type variables. It leads to reading values from an enum variable that are invalid. Fix by passing the IDs around as int. Found by UBSan: tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp:408:5: runtime error: load of value 4028, which is not a valid value for type 'Type' Change-Id: Idd106ee3d7960fe3d8fefc0fc5830fc22d38a513 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix UB in tst_QIODevice::getSetCheck()Marc Mutz2016-01-061-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reinterpret cast from a QTcpSocket → QAbstractSocket → QIODevice to MyIODevice → QIODevice was undefined. Fix by simply instantiating a MyIODevice, which must then inherit from QTcpSocket, of course. Instead of fixing the class name in the overridden setOpenMode() method, simply make the base class' implementation public with a using declaration. Found by UBSan: qtbase/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp:84:22: runtime error: member call on address 0x7ffcca2d23f0 which does not point to an object of type 'MyIODevice' 0x7ffcca2d23f0: note: object is of type 'QTcpSocket' Change-Id: I939b3548949b9b5765df4a6cc81875e169fd69dd Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QStateMachine: fix ignore high-priority events.Masaru Ueki2016-01-051-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a high-priority event is posted in overrided 'QStateMachine::beginSelectTransitions', the event may be remained in event queue, and be not dispatched until another event posted. Change-Id: Ifda288d9c00ac7985e426b9cc02bda382ebaac35 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
| | * Fix utf8->utf16 BOM/ZWNBSP decoding.Erik Verbruggen2015-12-211-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the byte sequence for a BOM occurs in the middle of a utf8 stream, it is a ZWNBSP. When a ZWNBSP occurs in the middle of a utf8 character sequence, and the SIMD conversion does some work (meaning: the length is at least 16 characters long), it would not recognize the fact some charactes were already decoded. So the conversion would then strip the ZWNBSP out, thinking it's a BOM. The non-SIMD conversion did not have this problem: the very first character conversion would already set the headerdone flag. Change-Id: I39aacf607e2e068107106254021a8042d164f628 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Expand springForward_data() to cover a few more time-zones.Edward Welbourne2016-01-201-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | The important one is EET, for the benefit of our CI system; but other European zones and the USA's coastal zones likely have enough hackers in them to make this worth checking. Change-Id: Idcc703bce29808e1a0a6279680cc8d3cbed38dac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Be fussier about setting tst_QDateTime's globals.Edward Welbourne2016-01-201-14/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time zones change on the whim of politicians. Consequently, we can seem to be in CET/CEST or on UTC (because we tested sample dates when our zone coincided) when we aren't (i.e. we're in a materially different zone at the time probed by some particular test). Make the initialization of the globals that test this more robust against governmental meddling and document the unfixable problem with Algeria: a DST transition *on the epoch*. Change-Id: I17c5c81d339b80af12f4ffab367e28052dd6c2fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Nomenclature corrections relating to CET.Edward Welbourne2016-01-201-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several European time zones; the only one relevant to the tests here is CET. They won't work with WET, GMT or EET. So name them and related variables for CET, not for Europe. CET's summer-time isn't called CST; and the (existing) spring forward test works only in CET/CEST, not elsewhere in Europe. Change-Id: I55c7544bf792de7495700b749b935ec534831d8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix toDisplayString(QUrl::PreferLocalFile) on WinKevin Funk2016-01-201-0/+25
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using QUrl::PreferLocalFile we do want to strip the leading slash, as toLocalFile() would do as well. Behavior change by means of an example: QUrl url(QUrl::fromLocalFile("C:/file.txt") url.toLocalFile() --> "C:/file.txt" Before: url.toDisplayString(QUrl::PreferLocalFile) --> "/C:/file.txt" After: url.toDisplayString(QUrl::PreferLocalFile) --> "C:/file.txt" Task-number: QTBUG-41729 Change-Id: I7d425541f6077ebcf3fcf46feeb7e0f03a0d7fe2 Reviewed-by: Dominik Haumann <dhaumann@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | [Android]: Java uses some deprecated locale codes so account for theseAndy Shaw2016-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | There are three deprecated language codes that Java still uses for the locale so we need to account for these inside QLocale by mapping them to the right language. Task-number: QTBUG-49632 Change-Id: Ib66b3f2763e085f7384228f2490b048bb56be259 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Don't pretend we know what DST to use for an offset date.Edward Welbourne2016-01-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QDateTime::addDate() and friends sanitize their end-state, they were using the DST status of their start-state (if known) to control it. This lead to misguided results and, in particular, inconsistent results given that a raw-constructed QDateTime comes into being ignorant of its DST, while a .toLocalTime() one knows its DST. Furthermore, the code to do this was triplicated, tricky and poorly explained. So pull it out into a local static function and explain what it's doing, and why, more clearly and only once. Task-number: QTBUG-49008 Change-Id: Ia4bb3c5e9267fff8bb963ea705267998218ed623 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Revert "QString: preserve embedded NULs when converting from QByteArray"Marc Mutz2016-01-121-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit e486d69133178ccce7c75cf48201ab28efb20e44. It broke too many users, even though all of them deserved to be broken. The new functionality will be provided by differently-named functions, where possible (problem: equality operators). I did not revert the fix for the off-by-one error in tst_qtextdocumentfragment.cpp. I also didn't revert the change in the inequality relational operators, since for all strings s1, s2 and s2' where s2' is s2 truncated at the first NUL, s1 < s2 ⟺ s1 < s2' (since NUL < c for any c != 0), and, trivially, for ≤, >, ≥, too. This does not hold for = and ≠, of course, since "foo\0bar" ≠ "foo". [ChangeLog][Important Behavior Changes][EDITORIAL] Reverted: All conversions from QByteArray to QString now preserve embedded NULs... Change-Id: If4b47048b39ae5be6ed08e6d91809626a67ea7f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make DST-transition test more general.Edward Welbourne2016-01-111-17/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Widen its interval (to work in more TZs) and test spring as well as autumn. Anywhere that does have a DST transition probably has it between August and December; and there's no benefit to using a narrow window. There's also no sense skipping the test if we don't know there's a DST transition: the test should still work, it just won't be testing anything (about DST transitions). Combine date and time checks into date-time checks, so that, when one of them fails, QCOMPARE lets us know how the other changed, too. Task-number: QTBUG-49008 Change-Id: I145b939ffef0dd0b54fd0e3cdf72a159c57ec00b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QVariant: make sure two floating points compare equal if they are equalThiago Macieira2016-01-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Not just fuzzily equal. The fuzzy comparison fails for infinities, since the expression p1 - p2 where p1 = p2 = infinity is NaN. And NaN comparisons are always false. As a nice side-effect, we don't do the more expensive computation of a multiplication if the two numbers really are equal. Task-number: QTBUG-50036 Change-Id: I11f559ef75544c50b3f8ffff1420cec7c7273295 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QDate: fix calculation of the week number for the last days of 2020Thiago Macieira2016-01-091-10/+31
| | | | | | | | | | | | | | | | | | | | Off-by-one error: we should have calculated whether the current year is leap, not the next year. This affected any 53-week leap years. Task-number: QTBUG-50273 Change-Id: I134ce5db2f82468585ffffff14264cb9f12998fd Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Blacklist failing tst_QFile tests (OS X)Timur Pocheptsov2016-01-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | openStandardStreamsFileDescriptors and openStandardStreamsBufferedStreams fail on OS X: lseek somehow works on sequential streams (standard streams) but QFile has pos() == 0 (since it's sequential). Change-Id: I6a6161c012a91de189f59c533880fb8fe7a66d37 Task-number: QTBUG-49841 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
* | QMimeDatabase: follow symlinks when checking for FIFO etc.David Faure2015-12-292-0/+28
| | | | | | | | | | | | | | | | | | This was documented, but not what the code did. Task-number: QTBUG-48529 Change-Id: I4849778c61dcae13be27c62b24717693c0c07d78 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_collections: "explicit instantiation of 'NS::QList' must occur in ↵Marc Mutz2015-12-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | namespace 'NS'" Probably correct. The question is just why this code has survived for so many years. Change-Id: Iaf01850476f9b066243abebb9ee6c5928d7ada19 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | tst_QTemporaryDir::nonWritableCurrentDir: Add a check for write protection.Friedemann Kleint2015-12-221-6/+13
| | | | | | | | | | | | | | | | /home has been observed to be writable on some CI machines. Add checks verifying existence and correct permissions. Change-Id: Ie0f952e20d0d8eb0b57234eea2e2ecb78f5a7b58 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Fix QJsonValue::fromVariant() if the variant contains a json objectLars Knoll2015-12-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | If the variant contains a known json type (value, array, object or document), simply unwrap those. In the case of the json document wrap the contained object/array into a QJsonValue. This should be the expected behavior, and makes more sense than returning a null QJsonValue. Task-number: QTBUG-41234 Change-Id: Id084fc11220d51aaf78b7694fd0ebef1411f5c51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUrl: revert path-normalization in setPath().David Faure2015-12-221-11/+43
| | | | | | | | | | | | | | | | | | | | | | | | Path normalization should happen only when NormalizePathSegments is set. Use a less intrusive fix for the setPath("//path") issue that commit aba336c2b4ad8 was about. This allows fromLocalFile("/tmp/.") to keep the "/." at the end, which is useful for appending to the path later on (e.g. to get "/tmp/.hidden") Change-Id: Ibc3d4d3276c1d3aaee1774e21e24d01af38fa880 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QStandardPaths: warn if $XDG_RUNTIME_DIR doesn't existDavid Faure2015-12-221-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | If the environment variable is set, but points to a non-existing directory, the user would get a warning about chmod failing. Better be clear and warn about the fact that the directory itself doesn't exist. Also warn if $XDG_RUNTIME_DIR points to a file rather than a directory. Task-number: QTBUG-48771 Change-Id: If84e72d768528ea4b80260afbbc18709b7b738a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Stabilize tst_qtimeline::resumeJędrzej Nowacki2015-12-211-5/+4
| | | | | | | | | | Change-Id: Ife0ce27c680196ed1fe3d037ea0367e511560c96 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Speedup tst_qtimeline::finishedJędrzej Nowacki2015-12-211-2/+1
| | | | | | | | | | Change-Id: Id9ae42663d8830365d4dcfab92b48621eb1b409f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Get rid of qWait in tst_qtimeline::restart to make it less flakyJędrzej Nowacki2015-12-211-6/+3
| | | | | | | | | | Change-Id: Iba3a9e5dce6bd7ff6e241fae738cfc51386f0c75 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Improve tst_qtimeline::valueJędrzej Nowacki2015-12-211-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The test was improved by: - Use QCOMPARE instead of QVERIFY - Use QTRY_ macro instead arbitrary qWait - Use longer time line The test executes faster and it should be less vulnerable to an unreliable timer. Change-Id: I92675015a6251b47eaf20b0fc916f3a36b52d783 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Improve tst_qtimeline::currentFrameJędrzej Nowacki2015-12-211-7/+4
| | | | | | | | | | | | | | The test run faster and it less vulnerable to an inaccurate time. Change-Id: I19475095395dcf1e6d47fdbba5eeffabab1fc7b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Improve tst_qtimeline::currentTimeJędrzej Nowacki2015-12-211-17/+13
| | | | | | | | | | | | | | Now the test is less fragile to time and it executes 4s faster Change-Id: Id3eb8ed2c03317e7d2f2c3cd17f889a8d8e7e5b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Make tst_qtimeline::range less prune to timing errorsJędrzej Nowacki2015-12-211-18/+9
| | | | | | | | | | Change-Id: I5fd84c58250a9dfa237fcb7fca4da50c35a9f57e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>