summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qtemporarydir
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-092-12/+3
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| * testlib: start sharing common helper functionsGatis Paeglis2017-11-042-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by moving them in QTestPrivate namespace (qtesthelpers_p.h). This header file is a convenient staging area for helper APIs, eventually some could be moved to public QTest API. This header file utilizes the same pattern as other qtestlib header files - wrapping functions with QT_${LIBNAME}_LIB to automatically enable certain APIs based on what is in the projects dependencies, e.g. QT += widgets. Change-Id: Ic0266429939c1f3788912ad8b84fc6e0d5edd68b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Long live QTemporaryFileName!Thiago Macieira2017-08-041-15/+17
|/ | | | | | | | | | | So we can use it in QTemporaryFile, QTemporaryDir and QFile::rename() [ChangeLog][QtCore][QTemporaryDir] The class now supports the "XXXXXX" replacement token anywhere in the template, not just at the end. This behavior is similar to what QTemporaryFile supports. Change-Id: I1eba2b016de74620bfc8fffd14ccb645729de170 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix tests that assume system files are owned by root for qemuSami Nurmenniemi2017-04-262-0/+10
| | | | | | | | | | | | | | | | | If QEMU is provided sysroot with QEMU_LD_PREFIX, it opens files from there. If their owner is the current user, testing their access rights based on assumption that they are root fails. Skip the tests in that case similarly as is already done when the tests are run as root. This fixes following tests: - tst_QTemporaryDir::nonWritableCurrentDir - tst_QNetworkReply::getErrors(file-permissions) - tst_qstandardpaths::testCustomRuntimeDirectory Task-number: QTBUG-59966 Change-Id: I972ce37b4b5a7747cdd732a8e4a737ef09cbc6a5 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a convenience function QTemporaryDir::filePath()Alexander Volkov2016-09-051-0/+25
| | | | | | | | | | | It allows to write more readable code: QString filePath = tmpDir.filePath(fileName); instead of QString filePath = tmpDir.path() + QLatin1Char('/') + fileName; Change-Id: I85aa54fd365e3bdd3ca41018ead7ed8741352b16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-011-0/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| * Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-261-0/+41
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
| | * Fix QTemporaryDir to handle Unicode characters on WindowsFriedemann Kleint2016-07-201-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For platforms not providing mkdtemp(), QTemporaryDir relied on an implementation of q_mkdtemp() operating on char *, converting back and forth using QFile::encodeName()/decodeName() when passing the name to QFileSystemEngine. This caused failures on Windows (which uses "System"/Latin1 encoding) for names containing characters outside the Latin1 space. Reimplement q_mkdtemp() to operate on QString, which avoids the conversions altogether and also enables the use of larger character spaces for the pattern. Add tests. Task-number: QTBUG-54810 Change-Id: Ie4323ad73b5beb8a1b8ab81425f73d03c626d58a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-051-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| * | Remove the traces of the discontinued android-no-sdk platformEirik Aavitsland2016-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning out the workarounds for the discontinued "Embedded Android" platform of Boot2Qt. Change-Id: I0ff9d770e82a43457fb7e5da0428f4597ead4038 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QtCore: Remove Windows CE.Friedemann Kleint2016-03-301-2/+2
|/ / | | | | | | | | | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * winrt: msvc2015: refactor file handlingMaurice Kalinowski2016-01-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-6/+13
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * 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>
* | Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-011-1/+0
|/ | | | | Change-Id: I1955320e7639760b4383a53f37a506c8055933ef Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Add QTemporaryDir::errorString()Thiago Macieira2015-07-171-1/+7
| | | | | | | | | | | [ChangeLog][QtCore][QTemporaryDir] Added errorString() method that returns the string explaining why creating the temporary directory failed. Change-Id: Ib306f8f647014b399b87ffff13f0a1f3c89e0a2c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QDir::removeRecursively(): Retry file deletion with write permission set.Friedemann Kleint2015-07-171-0/+2
| | | | | | | | | | | | 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>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QTemporaryDir: Remove directories on failureEskil Abrahamsen Blomfeldt2015-01-221-0/+14
| | | | | | | | | | | | | | When creating a temporary directory but failing to set its permissions, we need to remove the directory we created to avoid leaving 256 empty, unused directories in the destination folder. This happens on Android if you try creating a QTemporaryDir in the download path on the sdcard. Task-number: QTBUG-43352 Change-Id: Ic88fb7572f1abd65e5c7d8882b59c95f4b22ed72 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: Fix QTemporaryDir/File::nonWritableCurrentDir() testsEskil Abrahamsen Blomfeldt2014-12-221-0/+4
| | | | | | | | The /home path doesn't exist on Android, so it doesn't work as a non-writable current dir. Instead we use /data on Android. Change-Id: Ib779f60822da1bef421a16a00c1030245a8c5b90 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* WinRT: Fix various test compilationsAndrew Knight2013-10-021-2/+2
| | | | | | | | | | | | | - Remove irrelevant test subdirs via .pro files - Follow WinCE codepaths where applicable - Replace unsupported Win32 APIs with WinRT equivalents This does not aim to fix any failures in the tests themselves; it only makes them compile. Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Let QTemporaryDir::stressTest() run in temporary directory.Friedemann Kleint2013-06-121-4/+5
| | | | | | | Task-number: QTBUG-31618 Change-Id: I60aaa4f57710816cd0e22ea9b097c7e85466fd0c Reviewed-by: David Faure (KDE) <faure@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Removed CONFIG+=parallel_test from suspected parallel-unsafe testsRohan McGovern2012-05-221-2/+0
| | | | | | | | These tests have failed a parallel stress test and may contribute to instability in test runs. Change-Id: I2c4456ad7d3846c2262a0ba714ab8f0c9a05c597 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Compilation fix: missing includes for geteuid()Marc Mutz2012-02-171-0/+4
| | | | | | Change-Id: I054b8c9a398b5e192c2e005a39cba19bb4930966 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added check to qtemporarydir unittest to check and skip if rootKurt Korbatits2012-01-171-0/+3
| | | | | | | | | | - nonWritableCurrentDir() function not valid test when run as root on unix platform so add skip. Change-Id: I0c5ee685d3bdeaf3d5d2e0bb93ba7d7796fd1028 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixes for tst_QTemporary(File|Dir)::nonWritableCurrentDirJoão Abecasis2011-12-091-3/+2
| | | | | | | | - Check path/fileName is empty upon failure, variable was unused - Use /home instead of /, as / is writable by admins on Mac Change-Id: I705471fda8b73843e98b30eb52aa0a73634ec075 Reviewed-by: David Faure <faure@kde.org>
* Improve/cleanup qtemporarydir (and qtemporaryfile) unit testsDavid Faure2011-12-081-73/+23
| | | | | | | To follow the comments in the review by João Abecasis. Change-Id: Ie566705d3b4071b8628d269246aadcde4866f34f Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix QTemporaryDir unittest on Mac OS XDavid Faure2011-12-081-7/+9
| | | | | | | | | mkdtemp(10*X) replaces all 10 chars on Mac, while on linux it only replaces the last 6. Adjusted the too-strict tests to allow for both possibilities. Change-Id: Ie6d57bd4947254ad7a39e75ac0e8881cebeaa428 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-061-3/+0
| | | | | | | | | These comments were mostly empty or inaccurate. Appropriate naming of tests and appropriate placement of tests within the directory tree provide more reliable indicators of what is being tested. Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* New class QTemporaryDir.David Faure2011-12-022-0/+478
As discussed on qt5-feedback / development lists. Change-Id: If1733369d12daa29054776ec2cbd78e63679768e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>