summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qabstractfileengine.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-29 12:55:54 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-07-18 15:51:35 +0000
commitad3b41a06d9ba7219c79b5548c5b11698787288d (patch)
tree557d65faed341e73d8fded4dede9ba70a1c1496e /src/corelib/io/qabstractfileengine.cpp
parentf9bfc8b91cd8ea755808751ab6268e37ffd6c17a (diff)
QFile::rename: use the open file's ID, instead of using the file name
To do that, we needed to add virtual id() in QAbstractFileEngine and override it in QFSFileEngine. It might be useful to return other types of IDs for the other file engines, but this commit does not attempt that just yet. Change-Id: I1eba2b016de74620bfc8fffd14ccafe0762b3c38 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qabstractfileengine.cpp')
-rw-r--r--src/corelib/io/qabstractfileengine.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index 9606ec68e9..89727673d3 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -678,6 +678,17 @@ bool QAbstractFileEngine::setPermissions(uint perms)
}
/*!
+ \since 5.9
+
+ Return an identifier that (hopefully) uniquely identifies this file in the
+ system. Returns an invalid QByteArray() if that cannot be calculated.
+*/
+QByteArray QAbstractFileEngine::id() const
+{
+ return QByteArray();
+}
+
+/*!
Return the file engine's current file name in the format
specified by \a file.