Warning, /graphics/krita/3rdparty/ext_qt/0042-Android-Disable-QTemporaryFile-usage-in-QFile-copy.patch is written in an unsupported language. File is not indexed.
0001 From cbe612b0365f34a55f3f5a059154e8af80537eec Mon Sep 17 00:00:00 2001 0002 From: Sharaf Zaman <shzam@sdf.org> 0003 Date: Thu, 26 Aug 2021 12:13:16 +0000 0004 Subject: [PATCH 42/46] Android: Disable QTemporaryFile usage in QFile::copy 0005 0006 QTemporaryFile only works with certain types of file engine and 0007 Android's Content File engine is not one of them. 0008 --- 0009 src/corelib/io/qfile.cpp | 4 ++-- 0010 1 file changed, 2 insertions(+), 2 deletions(-) 0011 0012 diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp 0013 index 1fb9af576c..1fe3be8b29 100644 0014 --- a/src/corelib/io/qfile.cpp 0015 +++ b/src/corelib/io/qfile.cpp 0016 @@ -793,7 +793,7 @@ QFile::copy(const QString &newName) 0017 d->setError(QFile::CopyError, tr("Cannot open %1 for input").arg(d->fileName)); 0018 } else { 0019 QString fileTemplate = QLatin1String("%1/qt_temp.XXXXXX"); 0020 -#ifdef QT_NO_TEMPORARYFILE 0021 +#if defined(QT_NO_TEMPORARYFILE) || defined(Q_OS_ANDROID) 0022 QFile out(fileTemplate.arg(QFileInfo(newName).path())); 0023 if (!out.open(QIODevice::ReadWrite)) 0024 error = true; 0025 @@ -843,7 +843,7 @@ QFile::copy(const QString &newName) 0026 d->setError(QFile::CopyError, tr("Cannot create %1 for output").arg(newName)); 0027 } 0028 } 0029 -#ifdef QT_NO_TEMPORARYFILE 0030 +#if defined(QT_NO_TEMPORARYFILE) || defined(Q_OS_ANDROID) 0031 if (error) 0032 out.remove(); 0033 #else 0034 -- 0035 2.33.0 0036