From d5078161aadac7bb36862d8eb0d6d8c27eb58c60 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 22 Feb 2017 12:46:59 +0100 Subject: Speed up QFile::copy on Linux file systems that support cloning Originally inherited from Btrfs, recent Linux kernels have a system call that allows cloning the contents of a file from another one if the underlying file system supports it. Change-Id: I9df66b65faef99f3bbed8a88fb6b6009baeef32e Reviewed-by: Thiago Macieira --- src/corelib/io/qabstractfileengine.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/corelib/io/qabstractfileengine.cpp') diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp index 9606ec68e9c..5f1f7e381e0 100644 --- a/src/corelib/io/qabstractfileengine.cpp +++ b/src/corelib/io/qabstractfileengine.cpp @@ -831,6 +831,19 @@ bool QAbstractFileEngine::unmap(uchar *address) return extension(UnMapExtension, &options); } +/*! + \since 5.10 + + Copies the contents from the file specified by \a sourceHandle to this file + by cloning it. + Returns \c true on success; otherwise, \c false is returned. + */ +bool QAbstractFileEngine::clone(int sourceHandle) +{ + Q_UNUSED(sourceHandle); + return false; +} + /*! \since 4.3 \class QAbstractFileEngineIterator -- cgit v1.2.3