Remove conditioning on Android embedded

It is no longer handled separately from Android.
This effectively reverts commit 6d50f746fe

Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Edward Welbourne 2021-09-09 13:07:26 +02:00
parent d8fd2425fb
commit 7a4b586f4b
60 changed files with 156 additions and 154 deletions

View File

@ -1,4 +1,4 @@
contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
contains(TEMPLATE, ".*app"):!build_pass {
defineReplace(emitString) {
return("\"$$clean_path($$1)\"")

View File

@ -855,27 +855,27 @@ qt_internal_extend_target(Core CONDITION APPLE AND QT_FEATURE_timezone AND NOT N
time/qtimezoneprivate_mac.mm
)
qt_internal_extend_target(Core CONDITION ANDROID AND QT_FEATURE_timezone AND NOT ANDROID_EMBEDDED AND (NACL OR NOT APPLE)
qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND ANDROID AND (NACL OR NOT APPLE)
SOURCES
time/qtimezoneprivate_android.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND UNIX AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE)
qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND UNIX AND NOT ANDROID AND (NACL OR NOT APPLE)
SOURCES
time/qtimezoneprivate_tz.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND UNIX AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE)
qt_internal_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND UNIX AND NOT ANDROID AND (NACL OR NOT APPLE)
SOURCES
time/qtimezoneprivate_icu.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND WIN32 AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE)
qt_internal_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND WIN32 AND NOT ANDROID AND (NACL OR NOT APPLE)
SOURCES
time/qtimezoneprivate_icu.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND WIN32 AND NOT QT_FEATURE_icu AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE)
qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND WIN32 AND NOT QT_FEATURE_icu AND NOT ANDROID AND (NACL OR NOT APPLE)
SOURCES
time/qtimezoneprivate_win.cpp
)
@ -979,7 +979,7 @@ qt_internal_extend_target(Core CONDITION UNIX AND NOT APPLE
kernel/qelapsedtimer_unix.cpp
)
qt_internal_extend_target(Core CONDITION ANDROID AND NOT ANDROID_EMBEDDED
qt_internal_extend_target(Core CONDITION ANDROID
SOURCES
io/qstandardpaths_android.cpp
io/qstorageinfo_unix.cpp
@ -990,7 +990,7 @@ qt_internal_extend_target(Core CONDITION ANDROID AND NOT ANDROID_EMBEDDED
platform/android/qandroidnativeinterface.cpp
)
qt_internal_extend_target(Core CONDITION HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID)
qt_internal_extend_target(Core CONDITION HAIKU AND NOT ANDROID
SOURCES
io/qstandardpaths_haiku.cpp
io/qstorageinfo_unix.cpp
@ -998,7 +998,7 @@ qt_internal_extend_target(Core CONDITION HAIKU AND (ANDROID_EMBEDDED OR NOT ANDR
be
)
qt_internal_extend_target(Core CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID)
qt_internal_extend_target(Core CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND NOT ANDROID
SOURCES
io/qstandardpaths_unix.cpp
io/qstorageinfo_unix.cpp

View File

@ -79,7 +79,7 @@
# include <envLib.h>
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
#include <qjniobject.h>
#endif
@ -2408,7 +2408,7 @@ static bool findUnixOsVersion(QUnixOSVersion &v)
# endif // USE_ETC_OS_RELEASE
#endif // Q_OS_UNIX
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
static const char *osVer_helper(QOperatingSystemVersion)
{
/* Data:
@ -2875,7 +2875,7 @@ QString QSysInfo::productVersion()
*/
QString QSysInfo::prettyProductName()
{
#if (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)) || defined(Q_OS_DARWIN) || defined(Q_OS_WIN)
#if defined(Q_OS_ANDROID) || defined(Q_OS_DARWIN) || defined(Q_OS_WIN)
const auto version = QOperatingSystemVersion::current();
const int majorVersion = version.majorVersion();
const QString versionString = QString::number(majorVersion) + QLatin1Char('.')

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
@ -1632,7 +1632,7 @@ static bool syslog_default_message_handler(QtMsgType type, const QMessageLogCont
}
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
static bool android_default_message_handler(QtMsgType type,
const QMessageLogContext &context,
const QString &message)
@ -1775,7 +1775,7 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con
handledStderr |= systemd_default_message_handler(type, context, message);
# elif QT_CONFIG(syslog)
handledStderr |= syslog_default_message_handler(type, context, message);
# elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
# elif defined(Q_OS_ANDROID)
handledStderr |= android_default_message_handler(type, context, message);
# elif defined(QT_USE_APPLE_UNIFIED_LOGGING)
handledStderr |= AppleUnifiedLogger::messageHandler(type, context, message);

View File

@ -49,7 +49,7 @@
#include <qversionnumber.h>
#include <qdebug.h>
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
#include <QJniObject>
#endif
@ -156,7 +156,7 @@ QOperatingSystemVersion QOperatingSystemVersion::current()
{
QOperatingSystemVersion version;
version.m_os = currentType();
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
#ifndef QT_BOOTSTRAPPED
const QVersionNumber v = QVersionNumber::fromString(QJniObject::getStaticObjectField(
"android/os/Build$VERSION", "RELEASE", "Ljava/lang/String;").toString());

View File

@ -94,7 +94,7 @@
#endif
#endif // QT_NO_QOBJECT
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#if defined(Q_OS_ANDROID)
#include <QtCore/qjniobject.h>
#endif
@ -177,10 +177,10 @@ QString QCoreApplicationPrivate::appName() const
QString QCoreApplicationPrivate::appVersion() const
{
QString applicationVersion;
#ifndef QT_BOOTSTRAPPED
# ifdef Q_OS_DARWIN
#ifdef QT_BOOTSTRAPPED
#elif defined(Q_OS_DARWIN)
applicationVersion = infoDictionaryStringProperty(QStringLiteral("CFBundleVersion"));
# elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
QJniObject context(QNativeInterface::QAndroidApplication::context());
if (context.isValid()) {
QJniObject pm = context.callObjectMethod(
@ -198,11 +198,10 @@ QString QCoreApplicationPrivate::appVersion() const
}
}
}
# endif
#endif
return applicationVersion;
}
#endif
#endif // !Q_OS_WIN
QString *QCoreApplicationPrivate::cachedApplicationFilePath = nullptr;
@ -2315,7 +2314,7 @@ QString QCoreApplication::applicationDirPath()
#if !defined(Q_OS_WIN) && !defined(Q_OS_DARWIN) // qcoreapplication_win.cpp or qcoreapplication_mac.cpp
static QString qAppFileName()
{
# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
# if defined(Q_OS_ANDROID)
// the actual process on Android is the Java VM, so this doesn't help us
return QString();
# elif defined(Q_OS_LINUX)

View File

@ -49,7 +49,7 @@
#include <QtCore/qvariant.h>
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#if defined(Q_OS_ANDROID)
class _jobject;
typedef _jobject* jobject;
#endif
@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
namespace QNativeInterface
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) || defined(Q_CLANG_QDOC)
#if defined(Q_OS_ANDROID) || defined(Q_CLANG_QDOC)
struct Q_CORE_EXPORT QAndroidApplication
{
QT_DECLARE_NATIVE_INTERFACE(QAndroidApplication, 1, QCoreApplication)

View File

@ -42,7 +42,7 @@
#include <QtCore/QScopedPointer>
#if defined(Q_QDOC) || (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED))
#if defined(Q_QDOC) || defined(Q_OS_ANDROID)
#include <jni.h>
QT_BEGIN_NAMESPACE

View File

@ -42,7 +42,7 @@
#include <QtCore/qsharedpointer.h>
#if defined(Q_QDOC) || (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED))
#if defined(Q_QDOC) || defined(Q_OS_ANDROID)
#include <jni.h>
#include <QtCore/qjnienvironment.h>

View File

@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2020 John Layt <jlayt@kde.org>
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2013 John Layt <jlayt@kde.org>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -37,7 +38,6 @@
**
****************************************************************************/
#include "qtimezone.h"
#include "qtimezoneprivate_p.h"
@ -62,9 +62,9 @@ static QTimeZonePrivate *newBackendTimeZone()
#else
#if defined Q_OS_MAC
return new QMacTimeZonePrivate();
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
return new QAndroidTimeZonePrivate();
#elif defined(Q_OS_UNIX) || defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_UNIX)
return new QTzTimeZonePrivate();
#elif QT_CONFIG(icu)
return new QIcuTimeZonePrivate();
@ -89,9 +89,9 @@ static QTimeZonePrivate *newBackendTimeZone(const QByteArray &ianaId)
#else
#if defined Q_OS_MAC
return new QMacTimeZonePrivate(ianaId);
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
return new QAndroidTimeZonePrivate(ianaId);
#elif defined(Q_OS_UNIX) || defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_UNIX)
return new QTzTimeZonePrivate(ianaId);
#elif QT_CONFIG(icu)
return new QIcuTimeZonePrivate(ianaId);

View File

@ -205,7 +205,7 @@ QTimeZonePrivate::Data QTimeZonePrivate::data(qint64 forMSecsSinceEpoch) const
// Private only method for use by QDateTime to convert local msecs to epoch msecs
QTimeZonePrivate::Data QTimeZonePrivate::dataForLocalTime(qint64 forLocalMSecs, int hint) const
{
#if !defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_EMBEDDED)
#ifndef Q_OS_ANDROID
// The Android back-end's hasDaylightTime() is only true for zones with
// transitions in the future; we need it to mean "has ever had a transition"
// though, so can't trust it here.
@ -610,7 +610,7 @@ bool QTimeZonePrivate::isValidId(const QByteArray &ianaId)
// Somewhat slack hand-rolled version:
const int MinSectionLength = 1;
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
// Android has its own naming of zones.
// "Canada/East-Saskatchewan" has a 17-character second component.
const int MaxSectionLength = 17;

View File

@ -69,7 +69,7 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSTimeZone);
#include <qt_windows.h>
#endif // Q_OS_WIN
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
#include <QJniObject>
#endif
@ -273,7 +273,7 @@ private:
};
#endif
#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_EMBEDDED))
#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID)
struct QTzTransitionTime
{
qint64 atMSecsSinceEpoch;
@ -462,7 +462,7 @@ private:
};
#endif // Q_OS_WIN
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
class QAndroidTimeZonePrivate final : public QTimeZonePrivate
{
public:

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@ -2338,7 +2338,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
QWindow *window = e->window.data();
modifier_buttons = e->modifiers;
if (e->nullWindow()
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
|| e->key == Qt::Key_Back || e->key == Qt::Key_Menu
#endif
) {
@ -2374,7 +2374,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
if (window && !window->d_func()->blockedByModalWindow)
QGuiApplication::sendSpontaneousEvent(window, &ev);
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
else
ev.setAccepted(false);

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@ -44,7 +44,7 @@
#include <QtGui/qopenglcontext.h>
#include <QtCore/qdebug.h>
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
#include <QtCore/private/qjnihelpers_p.h>
#endif
#ifndef Q_OS_WIN

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@ -422,7 +422,7 @@ static int qt_gl_resolve_extensions()
// We don't match GL_APPLE_texture_format_BGRA8888 here because it has different semantics.
if (extensionMatcher.match("GL_IMG_texture_format_BGRA8888") || extensionMatcher.match("GL_EXT_texture_format_BGRA8888"))
extensions |= QOpenGLExtensions::BGRATextureFormat;
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QString *deviceName =
static_cast<QString *>(QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("AndroidDeviceName"));
static bool wrongfullyReportsBgra8888Support = deviceName != 0

View File

@ -1,6 +1,6 @@
# Generated from platforms.pro.
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
add_subdirectory(android)
endif()
if(NOT ANDROID AND NOT WASM)

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@ -111,11 +111,11 @@ void QEglFSWindow::create()
QOpenGLCompositor *compositor = QOpenGLCompositor::instance();
if (screen->primarySurface() != EGL_NO_SURFACE) {
if (Q_UNLIKELY(!isRaster() || !compositor->targetWindow())) {
#if !defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_EMBEDDED)
# ifndef Q_OS_ANDROID
// We can have either a single OpenGL window or multiple raster windows.
// Other combinations cannot work.
qFatal("EGLFS: OpenGL windows cannot be mixed with others.");
#endif
# endif
return;
}
m_format = compositor->targetWindow()->format();

View File

@ -35,7 +35,7 @@ qt_internal_extend_target(QTlsBackendOpenSSLPlugin CONDITION APPLE
${FWSecurity}
)
qt_internal_extend_target(QTlsBackendOpenSSLPlugin CONDITION ANDROID AND NOT ANDROID_EMBEDDED
qt_internal_extend_target(QTlsBackendOpenSSLPlugin CONDITION ANDROID
SOURCES
qsslsocket_openssl_android.cpp
)

View File

@ -368,7 +368,7 @@ QTlsPrivate::X509Certificate *QTlsBackendOpenSSL::createCertificate() const
namespace QTlsPrivate {
// TLSTODO: remove.
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QList<QByteArray> fetchSslCertificateData();
#endif

View File

@ -45,7 +45,7 @@ qt_internal_extend_target(tst_qdir CONDITION CONFIG___contains___builtin_testdat
BUILTIN_TESTDATA
)
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(android_testdata_resource_files
"entrylist/directory/dummy"

View File

@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2017 Intel Corporation.
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -232,20 +232,21 @@ private:
Q_DECLARE_METATYPE(tst_QDir::UncHandling)
tst_QDir::tst_QDir()
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
: m_dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
#elif !defined(BUILTIN_TESTDATA)
: m_dataPath(QFileInfo(QFINDTESTDATA("testData")).absolutePath())
#endif
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QString resourceSourcePath = QStringLiteral(":/android_testdata/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
while (it.hasNext()) {
QFileInfo fileInfo = it.nextFileInfo();
if (!fileInfo.isDir()) {
QString destination = m_dataPath + QLatin1Char('/') + fileInfo.filePath().mid(resourceSourcePath.length());
QString destination = m_dataPath + QLatin1Char('/')
+ fileInfo.filePath().mid(resourceSourcePath.length());
QFileInfo destinationFileInfo(destination);
if (!destinationFileInfo.exists()) {
QDir().mkpath(destinationFileInfo.path());
@ -2217,7 +2218,7 @@ void tst_QDir::equalityOperator_data()
//need a path in the root directory that is unlikely to be a symbolic link.
#if defined (Q_OS_WIN)
QString pathinroot("c:/windows/..");
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
QString pathinroot("/system/..");
#elif defined(Q_OS_HAIKU)
QString pathinroot("/boot/..");

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -45,7 +45,7 @@
# include "../../../network-settings.h"
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
#include <QStandardPaths>
#endif
@ -122,7 +122,7 @@ private:
void tst_QDirIterator::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QString testdata_dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
QString resourceSourcePath = QStringLiteral(":/testdata");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
@ -130,7 +130,8 @@ void tst_QDirIterator::initTestCase()
QFileInfo fileInfo = it.nextFileInfo();
if (!fileInfo.isDir()) {
QString destination = testdata_dir + QLatin1Char('/') + fileInfo.filePath().mid(resourceSourcePath.length());
QString destination = testdata_dir + QLatin1Char('/')
+ fileInfo.filePath().mid(resourceSourcePath.length());
QFileInfo destinationFileInfo(destination);
if (!destinationFileInfo.exists()) {
QDir().mkpath(destinationFileInfo.path());

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -1201,7 +1201,7 @@ void tst_QFileInfo::fileTimes()
QCOMPARE(fileInfo.birthTime(), birthTime); // mustn't have changed
QVERIFY(readTime.isValid());
#if defined(Q_OS_QNX) || (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED))
#if defined(Q_OS_QNX) || defined(Q_OS_ANDROID)
noAccessTime = true;
#elif defined(Q_OS_WIN)
//In Vista the last-access timestamp is not updated when the file is accessed/touched (by default).
@ -1877,7 +1877,7 @@ void tst_QFileInfo::isWritable()
void tst_QFileInfo::isExecutable()
{
QString appPath = QCoreApplication::applicationDirPath();
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
appPath += "/libtst_qfileinfo.so";
#else
appPath += "/tst_qfileinfo";

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -41,7 +41,7 @@
#include <windows.h>
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
#include <QStandardPaths>
#endif
@ -104,7 +104,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
m_tempDirPattern += QLatin1Char('/');
m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX");
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
#endif
}

View File

@ -21,7 +21,7 @@ qt_internal_add_test(tst_qiodevice
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(android_testdata_resource_files
"tst_qiodevice.cpp"

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -70,7 +70,7 @@ private:
void tst_QIODevice::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QVERIFY(QFileInfo(QStringLiteral("./tst_qiodevice.cpp")).exists()
|| QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp")));
#endif

View File

@ -1,5 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2013 David Faure <faure+bluesystems@kde.org>
** Contact: https://www.qt.io/licensing/
**
@ -83,7 +84,7 @@ public:
void tst_QLockFile::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QSKIP("This test requires deploying and running external console applications");
#elif !QT_CONFIG(process)
QSKIP("This test requires QProcess support");

View File

@ -21,7 +21,7 @@ qt_internal_add_test(tst_qloggingregistry
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(android_testdata_resource_files
"qtlogging.ini"

View File

@ -31,7 +31,7 @@ qt_internal_add_test(tst_qresourceengine
qt_add_resources(additional_sources testqrc/test.qrc)
target_sources(tst_qresourceengine PRIVATE ${additional_sources})
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
qt_add_resources(additional_sources android_testdata.qrc)
target_sources(tst_qresourceengine PRIVATE ${additional_sources})
endif()

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2019 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@ -40,8 +40,10 @@ class tst_QResourceEngine: public QObject
public:
tst_QResourceEngine()
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
: m_runtimeResourceRcc(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/runtime_resource.rcc")).absoluteFilePath())
#ifdef Q_OS_ANDROID
: m_runtimeResourceRcc(
QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ QStringLiteral("/runtime_resource.rcc")).absoluteFilePath())
#else
: m_runtimeResourceRcc(QFINDTESTDATA("runtime_resource.rcc"))
#endif
@ -71,7 +73,7 @@ private:
void tst_QResourceEngine::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QString sourcePath(QStringLiteral(":/android_testdata/"));
QString dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
@ -79,7 +81,8 @@ void tst_QResourceEngine::initTestCase()
while (it.hasNext()) {
QFileInfo fileInfo = it.nextFileInfo();
if (!fileInfo.isDir()) {
QString destination(dataPath + QLatin1Char('/') + fileInfo.filePath().mid(sourcePath.length()));
QString destination(dataPath + QLatin1Char('/')
+ fileInfo.filePath().mid(sourcePath.length()));
QFileInfo destinationFileInfo(destination);
if (!destinationFileInfo.exists()) {
QVERIFY(QDir().mkpath(destinationFileInfo.path()));
@ -186,7 +189,7 @@ void tst_QResourceEngine::checkStructure_data()
QStringList rootContents;
rootContents << QLatin1String("aliasdir")
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
<< QLatin1String("android_testdata")
#endif
<< QLatin1String("otherdir")

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -312,7 +312,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
# ifdef Q_OS_ANDROID
const char nonWritableDir[] = "/data";
# else
const char nonWritableDir[] = "/home";

View File

@ -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"

View File

@ -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

View File

@ -45,7 +45,7 @@ endif()
if(QT_FEATURE_private_tests)
add_subdirectory(qproperty)
endif()
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
add_subdirectory(qjnienvironment)
add_subdirectory(qjniobject)
endif()

View File

@ -28,7 +28,7 @@ qt_internal_add_resource(tst_qtranslator "qtranslator"
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(android_testdata_resource_files
"dependencies_la.qm"

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -34,7 +34,7 @@
#include <qfile.h>
#include <qtemporarydir.h>
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
#include <QDirIterator>
#endif

View File

@ -18,7 +18,7 @@ qt_internal_add_test(tst_qdatastream
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(testdata_resource_files
"datastream.q42"

View File

@ -25,7 +25,7 @@ qt_internal_extend_target(tst_qbytearray CONDITION APPLE
${FWFoundation}
)
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(android_testdata_resource_files
"rfc3252.txt"

View File

@ -18,7 +18,7 @@ qt_internal_add_test(tst_qchar
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(testdata_resource_files
"data/NormalizationTest.txt"

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -76,7 +76,7 @@ void tst_QCollator::basics()
// posix implementation supports only C and default locale,
// so update it for Android build
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
c3.setLocale(QLocale());
#endif
QCollatorSortKey key1 = c3.sortKey("test");
@ -111,7 +111,7 @@ void tst_QCollator::moveSemantics()
// test QCollatorSortKey move assignment
// posix implementation supports only C and default locale,
// so update it for Android build
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
c1.setLocale(QLocale());
#endif
QCollatorSortKey key1 = c1.sortKey("1");
@ -281,7 +281,7 @@ void tst_QCollator::compare()
return compared < 0 ? -1 : compared > 0 ? 1 : 0;
};
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
if (collator.locale() != QLocale())
QSKIP("Posix implementation of collation only supports default locale");
#endif

View File

@ -16,7 +16,7 @@ qt_internal_add_test(tst_qtextboundaryfinder
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(testdata_resource_files
"data/GraphemeBreakTest.txt"

View File

@ -863,7 +863,7 @@ void tst_QTimeZone::isValidId_data()
// Parts separated by '/', each part min 1 and max of 14 chars
TESTSET("empty", "", false);
TESTSET("minimal", "m", true);
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
TESTSET("maximal", "East-Saskatchewan", true); // Android actually uses this
TESTSET("too long", "North-Saskatchewan", false); // ... but thankfully not this.
#else
@ -934,7 +934,7 @@ void tst_QTimeZone::isValidId_data()
QTest::newRow("a,z alone") << QByteArray("a,z") << false;
QTest::newRow("/z alone") << QByteArray("/z") << false;
QTest::newRow("-z alone") << QByteArray("-z") << false;
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QTest::newRow("long alone") << QByteArray("12345678901234567") << true;
QTest::newRow("over-long alone") << QByteArray("123456789012345678") << false;
#else

View File

@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 David Faure <faure@kde.org>
** Copyright (C) 2021 David Faure <faure@kde.org>
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -555,10 +556,9 @@ void tst_QCommandLineParser::testVersionOption()
{
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#else
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
#else
QCoreApplication app(empty_argc, empty_argv);
QProcess process;
@ -623,10 +623,9 @@ void tst_QCommandLineParser::testHelpOption()
{
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#else
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
#else
QFETCH(QCommandLineParser::SingleDashWordOptionMode, parsingMode);
QFETCH(QString, expectedHelpOutput);
@ -671,7 +670,7 @@ void tst_QCommandLineParser::testQuoteEscaping()
{
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#else
QCoreApplication app(empty_argc, empty_argv);
@ -697,7 +696,7 @@ void tst_QCommandLineParser::testUnknownOption()
{
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#else
QCoreApplication app(empty_argc, empty_argv);
@ -748,7 +747,7 @@ void tst_QCommandLineParser::testHelpAll()
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#else
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@ -772,10 +771,9 @@ void tst_QCommandLineParser::testVeryLongOptionNames()
{
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#else
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#elif defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
#else
QCoreApplication app(empty_argc, empty_argv);
QProcess process;

View File

@ -19,7 +19,7 @@ qt_internal_add_test(tst_qcryptographichash
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(testdata_resource_files
"data/2c1517dad3678f03917f15849b052fd5.md5"

View File

@ -64,7 +64,7 @@ void tst_QHashSeed::initTestCase()
void tst_QHashSeed::environmentVariable_data()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QSKIP("This test needs a helper binary, so is excluded from this platform.");
#endif

View File

@ -23,7 +23,7 @@ qt_internal_add_test(tst_qimage
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(qimage_resource_files
"images/image.bmp"

View File

@ -49,7 +49,7 @@ qt_internal_add_resource(tst_qimagereader "qmake_immediate"
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(android_testdata_resource_files
"images/kollada-noext"

View File

@ -24,7 +24,7 @@ qt_internal_add_test(tst_qimagewriter
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(qimagewriter_resource_files
"images/YCbCr_cmyk.jpg"

View File

@ -42,7 +42,7 @@ qt_internal_extend_target(tst_qpainter CONDITION TARGET Qt::Widgets
Qt::WidgetsPrivate
)
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(testdata_resource_files
"drawEllipse/10x10SizeAt0x0.png"

View File

@ -1,5 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@ -41,7 +42,7 @@ private slots:
void tst_QProcess_and_GuiEventLoop::waitForAndEventLoop()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QSKIP("Not supported on Android");
#else

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -93,7 +93,7 @@ void tst_QSidebar::addUrls()
QAbstractItemModel *model = qsidebar.model();
QDir testDir = QDir::home();
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
// temp and home is the same directory on Android
testDir.mkdir(QStringLiteral("test"));
QVERIFY(testDir.cd(QStringLiteral("test")));

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -2697,7 +2697,7 @@ void tst_QGraphicsScene::render()
void tst_QGraphicsScene::renderItemsWithNegativeWidthOrHeight()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QSKIP("Test only works on platforms with resizable windows");
#endif
QGraphicsScene scene(0, 0, m_testSize.width(), m_testSize.height());
@ -2777,7 +2777,7 @@ protected:
void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QSKIP("Test fails on some Android devices (QTBUG-44430)");
#endif
@ -4058,12 +4058,11 @@ void tst_QGraphicsScene::polishItems2()
void tst_QGraphicsScene::isActive()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
QSKIP("Window activation is not supported");
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#ifdef Q_OS_ANDROID
QSKIP("Fails on Android (QTBUG-44430)");
#endif
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
QSKIP("Window activation is not supported");
QGraphicsScene scene1;
QVERIFY(!scene1.isActive());

View File

@ -24,7 +24,7 @@ qt_internal_add_test(tst_qlayout
## Scopes:
#####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED)
if(ANDROID)
# Resources:
set(testdata_resource_files
"baseline/smartmaxsize"

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@ -355,7 +355,7 @@ void tst_QLayout::adjustSizeShouldMakeSureLayoutIsActivated()
void tst_QLayout::testRetainSizeWhenHidden()
{
#if (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED))
#ifdef Q_OS_ANDROID
QSKIP("Test does not work on platforms which default to showMaximized()");
#endif

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
#############################################################################
##
## Copyright (C) 2019 The Qt Company Ltd.
## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the plugins of the Qt Toolkit.
@ -108,7 +108,7 @@ def _recursive_simplify(expr):
# windowses = ('WIN32', 'WINRT')
apples = ("MACOS", "UIKIT", "IOS", "TVOS", "WATCHOS")
bsds = ("FREEBSD", "OPENBSD", "NETBSD")
androids = ("ANDROID", "ANDROID_EMBEDDED")
androids = ("ANDROID",)
unixes = (
"APPLE",
*apples,
@ -140,7 +140,7 @@ def _recursive_simplify(expr):
expr = _simplify_flavors_in_condition("APPLE", apples, expr)
expr = _simplify_flavors_in_condition("BSD", bsds, expr)
expr = _simplify_flavors_in_condition("UNIX", unixes, expr)
expr = _simplify_flavors_in_condition("ANDROID", ("ANDROID_EMBEDDED",), expr)
expr = _simplify_flavors_in_condition("ANDROID", (), expr)
# Simplify families of OSes against other families:
expr = _simplify_os_families(expr, ("WIN32", "WINRT"), unixes)

View File

@ -1,6 +1,6 @@
#############################################################################
##
## Copyright (C) 2018 The Qt Company Ltd.
## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the plugins of the Qt Toolkit.
@ -761,7 +761,6 @@ platform_mapping = {
"hpux": "HPUX",
"nacl": "NACL",
"android": "ANDROID",
"android-embedded": "ANDROID_EMBEDDED",
"uikit": "UIKIT",
"tvos": "TVOS",
"watchos": "WATCHOS",

View File

@ -7,7 +7,7 @@ win32 {
} else:unix {
mac {
OBJECTIVE_SOURCES += io/qstandardpaths_mac.mm
} else:android:!android-embedded {
} else:android {
SOURCES += io/qstandardpaths_android.cpp
} else:haiku {
SOURCES += io/qstandardpaths_haiku.cpp

View File

@ -182,5 +182,4 @@ def test_simplify_complex_false():
def test_simplify_android_not_apple():
validate_simplify('ANDROID AND NOT ANDROID_EMBEDDED AND NOT MACOS',
'ANDROID AND NOT ANDROID_EMBEDDED')
validate_simplify('ANDROID AND NOT MACOS', 'ANDROID')

View File

@ -239,7 +239,7 @@ def test_realworld_standardpaths():
# android / else:
(cond4, if_branch4, else_branch4) = evaluate_condition(else_branch3[0])
assert cond4 == 'android && !android-embedded'
assert cond4 == 'android'
assert len(if_branch4) == 1
validate_op('SOURCES', '+=', ['io/qstandardpaths_android.cpp'], if_branch4[0])
assert len(else_branch4) == 1

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
#############################################################################
##
## Copyright (C) 2018 The Qt Company Ltd.
## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the plugins of the Qt Toolkit.
@ -306,12 +306,10 @@ def test_qstandardpaths_scopes():
# mac {
# OBJECTIVE_SOURCES += io/qstandardpaths_mac.mm
scope7 = _new_scope(parent_scope=scope6, condition='MACOS', SOURCES='qsp_mac.mm')
# } else:android:!android-embedded {
# } else:android {
# SOURCES += io/qstandardpaths_android.cpp
scope8 = _new_scope(parent_scope=scope6, condition='else')
scope9 = _new_scope(parent_scope=scope8,
condition='ANDROID AND NOT ANDROID_EMBEDDED',
SOURCES='qsp_android.cpp')
scope9 = _new_scope(parent_scope=scope8, condition='ANDROID', SOURCES='qsp_android.cpp')
# } else:haiku {
# SOURCES += io/qstandardpaths_haiku.cpp
scope10 = _new_scope(parent_scope=scope8, condition='else')
@ -332,10 +330,10 @@ def test_qstandardpaths_scopes():
assert scope6.total_condition == 'UNIX'
assert scope7.total_condition == 'MACOS'
assert scope8.total_condition == 'UNIX AND NOT MACOS'
assert scope9.total_condition == 'ANDROID AND NOT ANDROID_EMBEDDED'
assert scope10.total_condition == 'UNIX AND NOT MACOS AND (ANDROID_EMBEDDED OR NOT ANDROID)'
assert scope11.total_condition == 'HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID)'
assert scope12.total_condition == 'UNIX AND NOT MACOS AND NOT HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID)'
assert scope9.total_condition == 'ANDROID'
assert scope10.total_condition == 'UNIX AND NOT MACOS AND NOT ANDROID'
assert scope11.total_condition == 'HAIKU AND NOT ANDROID'
assert scope12.total_condition == 'UNIX AND NOT MACOS AND NOT HAIKU AND NOT ANDROID'
def test_recursive_expansion():
scope = _new_scope(A='Foo',B='$$A/Bar')