diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qfile.cpp | 14 | ||||
-rw-r--r-- | src/corelib/io/qprocess.cpp | 1 | ||||
-rw-r--r-- | src/corelib/serialization/qcborstream.cpp | 1 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index ef97d67653..37de4450cc 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -844,10 +844,16 @@ QFile::copy(const QString &newName) error = true; } } - if (!error && !out.rename(newName)) { - error = true; - close(); - d->setError(QFile::CopyError, tr("Cannot create %1 for output").arg(newName)); + + if (!error) { + // Sync to disk if possible. Ignore errors (e.g. not supported). + d->fileEngine->syncToDisk(); + + if (!out.rename(newName)) { + error = true; + close(); + d->setError(QFile::CopyError, tr("Cannot create %1 for output").arg(newName)); + } } #ifdef QT_NO_TEMPORARYFILE if (error) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index c7635cc7b4..642393955b 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -776,6 +776,7 @@ void QProcessPrivate::Channel::clear() /*! \class QProcess::CreateProcessArguments + \inmodule QtCore \note This struct is only available on the Windows platform. This struct is a representation of all parameters of the Windows API diff --git a/src/corelib/serialization/qcborstream.cpp b/src/corelib/serialization/qcborstream.cpp index 1392b4d8d6..078c14a32d 100644 --- a/src/corelib/serialization/qcborstream.cpp +++ b/src/corelib/serialization/qcborstream.cpp @@ -1456,6 +1456,7 @@ bool QCborStreamWriter::endMap() /*! \class QCborStreamReader::StringResult + \inmodule QtCore This class is returned by readString() and readByteArray(), with either the contents of the string that was read or an indication that the parsing is |