From 9312ec54dbf8031f4d23c6fc400c1ca27e3f9d1f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 12 Jul 2017 18:41:35 -0700 Subject: 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 Reviewed-by: Lars Knoll --- src/corelib/io/qfsfileengine_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qfsfileengine_p.h') diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h index f352fcd475..1f34dfc2be 100644 --- a/src/corelib/io/qfsfileengine_p.h +++ b/src/corelib/io/qfsfileengine_p.h @@ -110,7 +110,7 @@ public: qint64 read(char *data, qint64 maxlen) Q_DECL_OVERRIDE; qint64 readLine(char *data, qint64 maxlen) Q_DECL_OVERRIDE; qint64 write(const char *data, qint64 len) Q_DECL_OVERRIDE; - bool clone(int sourceHandle) override; + bool cloneTo(QAbstractFileEngine *target) override; bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0) Q_DECL_OVERRIDE; bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE; -- cgit v1.2.3