summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine_win.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2019-10-30 14:17:32 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2019-10-31 08:59:52 +0100
commit5b20f58c19fb7473785452a11187321a579cc7c1 (patch)
treec37b7cff4c41a8038b3a73f102382b83f5329738 /src/corelib/io/qfsfileengine_win.cpp
parentc3eb521a0f10112df6b61d2592351c4eef2e1f9b (diff)
Unify QFSFileEngine implementations on Windows and Unix
The functions for standard file system operations simply delegate to the static functions in QFileSystemEngine, which are then implemented separately for each platform. There is no need for the wrappers in QFSFileEngine to be separately implemented as well. The only noticeable difference between Unix and Windows versions was the clearing of the meta data in QFSFileEngine::remove, which was only done on Unix. This is now also done on Windows. As a fly-by fix, correct the (internal only) documentation about case sensitivity. Change-Id: I274b34d5407fdfff2e0a2157bb5220607740a92a Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/io/qfsfileengine_win.cpp')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 19cc3e6402..5b868cc447 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -443,66 +443,11 @@ bool QFSFileEnginePrivate::nativeIsSequential() const
#endif
}
-bool QFSFileEngine::remove()
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::removeFile(d->fileEntry, error);
- if (!ret)
- setError(QFile::RemoveError, error.toString());
- return ret;
-}
-
-bool QFSFileEngine::copy(const QString &copyName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::copyFile(d->fileEntry, QFileSystemEntry(copyName), error);
- if (!ret)
- setError(QFile::CopyError, error.toString());
- return ret;
-}
-
-bool QFSFileEngine::rename(const QString &newName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::renameFile(d->fileEntry, QFileSystemEntry(newName), error);
- if (!ret)
- setError(QFile::RenameError, error.toString());
- return ret;
-}
-
-bool QFSFileEngine::renameOverwrite(const QString &newName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::renameOverwriteFile(d->fileEntry, QFileSystemEntry(newName), error);
- if (!ret)
- setError(QFile::RenameError, error.toString());
- return ret;
-}
-
-bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) const
-{
- return QFileSystemEngine::createDirectory(QFileSystemEntry(name), createParentDirectories);
-}
-
-bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const
-{
- return QFileSystemEngine::removeDirectory(QFileSystemEntry(name), recurseParentDirectories);
-}
-
bool QFSFileEngine::caseSensitive() const
{
return false;
}
-bool QFSFileEngine::setCurrentPath(const QString &path)
-{
- return QFileSystemEngine::setCurrentPath(QFileSystemEntry(path));
-}
-
QString QFSFileEngine::currentPath(const QString &fileName)
{
#if !defined(Q_OS_WINRT)
@@ -530,21 +475,6 @@ QString QFSFileEngine::currentPath(const QString &fileName)
#endif // Q_OS_WINRT
}
-QString QFSFileEngine::homePath()
-{
- return QFileSystemEngine::homePath();
-}
-
-QString QFSFileEngine::rootPath()
-{
- return QFileSystemEngine::rootPath();
-}
-
-QString QFSFileEngine::tempPath()
-{
- return QFileSystemEngine::tempPath();
-}
-
#if !defined(Q_OS_WINRT)
// cf QStorageInfo::isReady
static inline bool isDriveReady(const wchar_t *path)