summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qtemporaryfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qtemporaryfile.cpp')
-rw-r--r--src/corelib/io/qtemporaryfile.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index c016a622c7..e6a160c3b2 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -219,17 +219,10 @@ static bool createFileFromTemplate(NativeFileHandle &file, QTemporaryFileName &t
const DWORD shareMode = (flags & QTemporaryFileEngine::Win32NonShared)
? 0u : (FILE_SHARE_READ | FILE_SHARE_WRITE);
-# ifndef Q_OS_WINRT
file = CreateFile((const wchar_t *)path.constData(),
GENERIC_READ | GENERIC_WRITE,
shareMode, NULL, CREATE_NEW,
FILE_ATTRIBUTE_NORMAL, NULL);
-# else // !Q_OS_WINRT
- file = CreateFile2((const wchar_t *)path.constData(),
- GENERIC_READ | GENERIC_WRITE,
- shareMode, CREATE_NEW,
- NULL);
-# endif // Q_OS_WINRT
if (file != INVALID_HANDLE_VALUE)
return true;
@@ -380,7 +373,7 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode)
return false;
}
-#if !defined(Q_OS_WIN) || defined(Q_OS_WINRT)
+#if !defined(Q_OS_WIN)
d->closeFileHandle = true;
#endif