summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qsavefile
Commit message (Collapse)AuthorAgeFilesLines
* Support Alternate Data Streams in QSaveFileThiago Macieira2017-08-041-0/+60
| | | | | | | | | | | | | | | | We can't use MoveFile to do atomic commits on an ADS, so QSaveFile needs to detect when the target name is ADS and then use the direct fallback mode. [ChangeLog][QtCore][QSaveFile] Saving to Alternate Data Streams on NTFS on Windows is now possible, but requires setDirectWriteFallback(true). Task-number: QTBUG-47379 Change-Id: I81480fdb578d4d43b3fcfffd14d4bc062ae1750d Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Updated license headersJani Heikkinen2016-01-211-16/+11
| | | | | | | | | | | | | 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 devLiang Qi2015-10-141-11/+11
|\ | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
| * Tests: Always verify whether QTemporaryDir/File creation succeeded.Friedemann Kleint2015-09-281-11/+11
| | | | | | | | | | | | | | | | | | | | | | Use QVERIFY2() with QTemporaryDir/File::errorString() consistently. Attempt to catch issues like the below warning and follow-up issues. QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa" (Access is denied.) Task-number: QTBUG-47370 Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-1/+1
|/ | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QSaveFile: Fix permissions on creationKai Koehne2015-04-081-0/+8
| | | | | | | | | | | | | | | | | | | | QSaveFile is intended to be a replacement for QFile, and should use the same permissions for newly created files. QTemporaryFile however creates new files with 0600 mask by default. Fix this by making the mode_t argument QTemporaryFileEngine uses configurable, and using 0666 for QSaveFile (like we do in QFile). [ChangeLog][Important behavior changes] Files created by QSaveFile do now have the same rights as files created by QFile. This also fixes a regression in QSettings: In the Qt 5.4 series, new files created by QSettings were only readable by the current user. Task-number: QTBUG-44086 Change-Id: Ie1cc20e9f25c6e72e1bc9176490c419c27c5fc82 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | 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>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QSaveFile: error out in open when the file is a directoryOlivier Goffart2014-06-041-0/+25
| | | | | Change-Id: Ifb1697fedf6dd28fe317282c8b4824f34ec61981 Reviewed-by: David Faure <david.faure@kdab.com>
* QSaveFile: follow symbolic linksOlivier Goffart2014-05-301-0/+114
| | | | | | | | | [ChangeLog][QtCore][QSaveFile] Now follows symbolic links while writing to a link instead of replacing the link with the contents. Change-Id: I5afd519cb9f96ae68fa4c23c33a18de75671a301 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Skip some qsavefile auto testsBernd Weimer2014-05-191-3/+14
| | | | | | | Some of the QSaveFile tests are not applicable with root privileges. Change-Id: I1a22906c0b14acf144f1849719152dfe9d79f426 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix temporary directory leak in tst_qsavefile.Friedemann Kleint2013-10-011-45/+24
| | | | | | | Task-number: QTBUG-33769 Change-Id: I5177f09df22fd2b9b0d9eca4301c383c600d5ab8 Reviewed-by: David Faure <david.faure@kdab.com>
* tst_qsavefile: Check temporary dir and output open errors.Friedemann Kleint2013-09-301-12/+27
| | | | | Change-Id: Id28306ad414050a37b7779525f36edc3e15281b5 Reviewed-by: David Faure <david.faure@kdab.com>
* QSaveFile: allow saving to a writable file in a non-writable directoryDavid Faure2013-04-051-9/+76
| | | | | | | | | | The only way to make this possible is to disable the atomic-rename-from-temp-file behavior. This is not done by default, but only if the application allows this to happen. https://bugs.kde.org/show_bug.cgi?id=312415 Change-Id: I71ce54ae1f7f50ab5e8379f04c0ede74ebe3136d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSaveFile autotest: restore permissions using RAIIDavid Faure2013-01-171-8/+25
| | | | | | | So that the QTemporaryDir can happen even on error. Change-Id: I728d49eac8bd65e1919fd314a95387949e134de0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSaveFile: test the case of an existing, but readonly, target file.David Faure2013-01-171-2/+23
| | | | | Change-Id: I296d9c2598b8c72e2fd3e6ec80a615364b7eddeb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add class QSaveFile.David Faure2013-01-172-0/+239
This QIODevice uses a temporary file for writing, so that in case of write errors, the writing operation is canceled, without losing any existing file. It also avoids having a partially-written file visible by other processes, at the final destination. Change-Id: I9482df45751cb890b1b6f1382ec2eea3eb980627 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>