diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-06 00:11:52 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-06 00:11:52 +0100 |
commit | b86106387350f673a20d3b0a2413023f6205169b (patch) | |
tree | 2dfc079f1eecbbf9fde8733430a3a1e2f04d9a42 /src/corelib/io | |
parent | 88918abddeb323340c4a49dda035898a740373da (diff) | |
parent | 5e8ae03578ecd0538a774505f2f7e2fc626b0ab7 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 7 | ||||
-rw-r--r-- | src/corelib/io/qstandardpaths_win.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qurlquery.cpp | 1 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 1206b992e6..f0f3c935e6 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -128,7 +128,7 @@ void QFSFileEnginePrivate::init() #ifdef Q_OS_WIN fileAttrib = INVALID_FILE_ATTRIBUTES; fileHandle = INVALID_HANDLE_VALUE; - mapHandle = INVALID_HANDLE_VALUE; + mapHandle = NULL; #ifndef Q_OS_WINCE cachedFd = -1; #endif diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index fecfa7de2b..23ab507dad 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -921,7 +921,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, return 0; } - if (mapHandle == INVALID_HANDLE_VALUE) { + if (mapHandle == NULL) { // get handle to the file HANDLE handle = fileHandle; @@ -954,7 +954,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, // first create the file mapping handle DWORD protection = (openMode & QIODevice::WriteOnly) ? PAGE_READWRITE : PAGE_READONLY; mapHandle = ::CreateFileMapping(handle, 0, protection, 0, 0, 0); - if (mapHandle == INVALID_HANDLE_VALUE) { + if (mapHandle == NULL) { q->setError(QFile::PermissionsError, qt_error_string()); #ifdef Q_USE_DEPRECATED_MAP_API ::CloseHandle(handle); @@ -997,6 +997,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, } ::CloseHandle(mapHandle); + mapHandle = NULL; return 0; } @@ -1016,7 +1017,7 @@ bool QFSFileEnginePrivate::unmap(uchar *ptr) maps.remove(ptr); if (maps.isEmpty()) { ::CloseHandle(mapHandle); - mapHandle = INVALID_HANDLE_VALUE; + mapHandle = NULL; } return true; diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index 478db6c299..d4e0779381 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -160,10 +160,10 @@ QString QStandardPaths::writableLocation(StandardLocation type) // Although Microsoft has a Cache key it is a pointer to IE's cache, not a cache // location for everyone. Most applications seem to be using a // cache directory located in their AppData directory - return writableLocation(DataLocation) + QLatin1String("\\cache"); + return writableLocation(DataLocation) + QLatin1String("/cache"); case GenericCacheLocation: - return writableLocation(GenericDataLocation) + QLatin1String("\\cache"); + return writableLocation(GenericDataLocation) + QLatin1String("/cache"); case RuntimeLocation: case HomeLocation: diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp index 23c0b948e8..547084840f 100644 --- a/src/corelib/io/qurlquery.cpp +++ b/src/corelib/io/qurlquery.cpp @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE /*! \class QUrlQuery \inmodule QtCore + \since 5.0 \brief The QUrlQuery class provides a way to manipulate a key-value pairs in a URL's query. |