qt5base-lts/tests/auto
João Abecasis f4f729cb7b Atomic implementation of create file and obtain handle for Win/Symbian
Besides generating a unique name, createFileFromTemplate now also
acquires a file handle on all platforms. The file engine's native handle
is passed by reference and modified in place.

This fixes a long standing security issue on Windows.

On Windows and Symbian platforms we directly use the "native" file path
when processing the template and generating the unique name. Since the
native encoding is known, conversions at this point are safe.

Errors other than "file exists" are propagated to Q(Temporary)File,
and result in a failure in open(). The changes also unify error handling
and should give consistent behaviour across all platforms.

Worthy of note, there's a change in behaviour on Windows and Symbian:
fileNames returned by QTemporaryFile on Windows and Symbian are always
absolute after open has been called. This has to do with how
QFileSystemEntry::nativeFilePath works on these platforms. (Test was
updated to reflect change in behaviour.)

Reviewed-by: Gareth Stockwell
Reviewed-by: Shane Kearns
(cherry picked from commit ff9b69838ec146aeb43d4af8a03043f9c5f0454d)

Conflicts:

	tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp

Change-Id: Ibc9affb321ea4f4b193efc1f7336c9770b43d8df
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:18 +02:00
..
bic Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
compilerwarnings/data Remove uilib and QtUiTools from QtBase 2011-09-13 20:11:40 +02:00
corelib Atomic implementation of create file and obtain handle for Win/Symbian 2011-10-21 22:20:18 +02:00
dbus Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
gui Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
integrationtests Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
network Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
opengl Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
other Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
qmetaobjectbuilder add qmetaobjectbuilder to qtbase. 2011-10-11 07:02:14 +02:00
qobjectperformance Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qobjectrace Remove Symbian-specific code from tests. 2011-09-29 06:41:42 +02:00
qopengl Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
qscreen Move QTRY_VERIFY/QTRY_COMPARE into testlib. 2011-10-19 07:23:44 +02:00
qsslsocket_onDemandCertificates_member Remove Symbian-specific code from tests. 2011-09-29 06:41:42 +02:00
qsslsocket_onDemandCertificates_static Remove Symbian-specific code from tests. 2011-09-29 06:41:42 +02:00
qtransformedscreen Avoid building empty, inapplicable QWS tests. 2011-10-12 18:01:19 +02:00
qwindow Move QTRY_VERIFY/QTRY_COMPARE into testlib. 2011-10-19 07:23:44 +02:00
qwindowsurface Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
qwsembedwidget Avoid building empty, inapplicable QWS tests. 2011-10-12 18:01:19 +02:00
qwsinputmethod Avoid building empty, inapplicable QWS tests. 2011-10-12 18:01:19 +02:00
qwswindowsystem Avoid building empty, inapplicable QWS tests. 2011-10-12 18:01:19 +02:00
qx11info Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
sql Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
testlib Remove QTest::SkipMode from qtestlib API. 2011-10-21 01:20:29 +02:00
tools Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
utf8 Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
v8 Revert "Update V8" 2011-10-20 13:30:26 +02:00
widgets Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
xml Remove SkipMode parameter from QSKIP calls. 2011-10-21 01:20:29 +02:00
auto.pro Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
corelib.pro Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
gui.pro Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
host.pro Moved autotests in category 'tools' into new directory structure 2011-09-12 10:08:29 +02:00
network-settings.h Remove Symbian-specific code from tests. 2011-09-29 06:41:42 +02:00
network.pro Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
other.pro Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
platformquirks.h Remove last remnants of Maemo 5 from autotests 2011-10-06 01:28:01 +02:00
qtextbrowser.html Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
test.pl Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
v8.pro Make sure tests/auto/v8.pro doesn't clobber auto.pro 2011-08-31 01:17:39 +02:00