summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qtemporaryfile
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-09-09 13:07:26 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-09-17 17:30:14 +0200
commit7a4b586f4b8d1b73d1af3d24ff5112e4dc231ea6 (patch)
treefddc569efaeeb8147b80c0d7c3aae60f5c623fd7 /tests/auto/corelib/io/qtemporaryfile
parentd8fd2425fb37b5f745e385552b11dc4cdcffb5ff (diff)
Remove conditioning on Android embedded
It is no longer handled separately from Android. This effectively reverts commit 6d50f746fe05a7008b63818e77784dd0c99270a1 Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qtemporaryfile')
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp17
2 files changed, 11 insertions, 8 deletions
diff --git a/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt b/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
index f8419cee87..e7a1a65296 100644
--- a/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
+++ b/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
@@ -31,7 +31,7 @@ qt_internal_add_resource(tst_qtemporaryfile "qtemporaryfile"
## Scopes:
#####################################################################
-if(ANDROID AND NOT ANDROID_EMBEDDED)
+if(ANDROID)
# Resources:
set(android_testdata_resource_files
"resources/test.txt"
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index dcf3486449..9dc644e5f8 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2017 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@@ -51,7 +51,7 @@
# include <unistd.h> // close(2)
#endif
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
+#ifdef Q_OS_ANDROID
#include <QDirIterator>
#include <QStandardPaths>
#endif
@@ -107,13 +107,15 @@ void tst_QTemporaryFile::initTestCase()
QVERIFY(QDir("test-XXXXXX").exists() || QDir().mkdir("test-XXXXXX"));
QCoreApplication::setApplicationName("tst_qtemporaryfile");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
+#ifdef Q_OS_ANDROID
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
QFileInfo sourceFileInfo = it.nextFileInfo();
if (!sourceFileInfo.isDir()) {
- QFileInfo destinationFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1Char('/') + sourceFileInfo.filePath().mid(sourceDir.length()));
+ QFileInfo destinationFileInfo(
+ QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1Char('/')
+ + sourceFileInfo.filePath().mid(sourceDir.length()));
if (!destinationFileInfo.exists()) {
QVERIFY(QDir().mkpath(destinationFileInfo.path()));
@@ -380,7 +382,7 @@ void tst_QTemporaryFile::nonWritableCurrentDir()
ChdirOnReturn cor(QDir::currentPath());
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
+#ifdef Q_OS_ANDROID
QDir::setCurrent("/data");
#else
QDir::setCurrent("/home");
@@ -806,8 +808,9 @@ void tst_QTemporaryFile::createNativeFile_data()
QTest::addColumn<bool>("valid");
QTest::addColumn<QByteArray>("content");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
- const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/resources/test.txt");
+#ifdef Q_OS_ANDROID
+ const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ + QStringLiteral("/resources/test.txt");
#else
const QString nativeFilePath = QFINDTESTDATA("resources/test.txt");
#endif