f4f729cb7b
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> |
||
---|---|---|
.. | ||
bic | ||
compilerwarnings/data | ||
corelib | ||
dbus | ||
gui | ||
guiapplauncher | ||
integrationtests | ||
network | ||
opengl | ||
other | ||
qmetaobjectbuilder | ||
qobjectperformance | ||
qobjectrace | ||
qopengl | ||
qscreen | ||
qsslsocket_onDemandCertificates_member | ||
qsslsocket_onDemandCertificates_static | ||
qtransformedscreen | ||
qwindow | ||
qwindowsurface | ||
qwsembedwidget | ||
qwsinputmethod | ||
qwswindowsystem | ||
qx11info | ||
sql | ||
testlib | ||
tools | ||
utf8 | ||
v8 | ||
widgets | ||
xml | ||
auto.pro | ||
corelib.pro | ||
gui.pro | ||
host.pro | ||
network-settings.h | ||
network.pro | ||
other.pro | ||
platformquirks.h | ||
qtextbrowser.html | ||
test.pl | ||
v8.pro |