summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qabstractfileengine_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-07-12 18:41:35 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-08-09 05:19:23 +0000
commit9312ec54dbf8031f4d23c6fc400c1ca27e3f9d1f (patch)
tree09e4443fd5b5762ab1499404d9598c13fe7fc465 /src/corelib/io/qabstractfileengine_p.h
parent284fff12172095a899303d9b4fc06c7bf502c93d (diff)
Fix QAbstractFileEngine::clone misuse
QFile::copy was assuming that the target file was native and therefore it could simply take the file descriptor to clone. While that was not currently a problem, in theory it could be as we do have one writeable file engine besides QFSFileEngine (QWinRTFileEngine). By refactoring to take the parameter as a QAbstractFileEngine, we can ensure that the target file is a native file. Change-Id: Ib7a1737987bf4c4a8c51fffd14d0c048fd509025 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/io/qabstractfileengine_p.h')
-rw-r--r--src/corelib/io/qabstractfileengine_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qabstractfileengine_p.h b/src/corelib/io/qabstractfileengine_p.h
index c3f7619268..00c415b521 100644
--- a/src/corelib/io/qabstractfileengine_p.h
+++ b/src/corelib/io/qabstractfileengine_p.h
@@ -150,7 +150,7 @@ public:
virtual QDateTime fileTime(FileTime time) const;
virtual void setFileName(const QString &file);
virtual int handle() const;
- virtual bool clone(int sourceHandle);
+ virtual bool cloneTo(QAbstractFileEngine *target);
bool atEnd() const;
uchar *map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags);
bool unmap(uchar *ptr);