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) { defineReplace(emitString) {
return("\"$$clean_path($$1)\"") 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 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 SOURCES
time/qtimezoneprivate_android.cpp 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 SOURCES
time/qtimezoneprivate_tz.cpp 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 SOURCES
time/qtimezoneprivate_icu.cpp 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 SOURCES
time/qtimezoneprivate_icu.cpp 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 SOURCES
time/qtimezoneprivate_win.cpp time/qtimezoneprivate_win.cpp
) )
@ -979,7 +979,7 @@ qt_internal_extend_target(Core CONDITION UNIX AND NOT APPLE
kernel/qelapsedtimer_unix.cpp kernel/qelapsedtimer_unix.cpp
) )
qt_internal_extend_target(Core CONDITION ANDROID AND NOT ANDROID_EMBEDDED qt_internal_extend_target(Core CONDITION ANDROID
SOURCES SOURCES
io/qstandardpaths_android.cpp io/qstandardpaths_android.cpp
io/qstorageinfo_unix.cpp io/qstorageinfo_unix.cpp
@ -990,7 +990,7 @@ qt_internal_extend_target(Core CONDITION ANDROID AND NOT ANDROID_EMBEDDED
platform/android/qandroidnativeinterface.cpp 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 SOURCES
io/qstandardpaths_haiku.cpp io/qstandardpaths_haiku.cpp
io/qstorageinfo_unix.cpp io/qstorageinfo_unix.cpp
@ -998,7 +998,7 @@ qt_internal_extend_target(Core CONDITION HAIKU AND (ANDROID_EMBEDDED OR NOT ANDR
be 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 SOURCES
io/qstandardpaths_unix.cpp io/qstandardpaths_unix.cpp
io/qstorageinfo_unix.cpp io/qstorageinfo_unix.cpp

View File

@ -79,7 +79,7 @@
# include <envLib.h> # include <envLib.h>
#endif #endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
#include <qjniobject.h> #include <qjniobject.h>
#endif #endif
@ -2408,7 +2408,7 @@ static bool findUnixOsVersion(QUnixOSVersion &v)
# endif // USE_ETC_OS_RELEASE # endif // USE_ETC_OS_RELEASE
#endif // Q_OS_UNIX #endif // Q_OS_UNIX
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
static const char *osVer_helper(QOperatingSystemVersion) static const char *osVer_helper(QOperatingSystemVersion)
{ {
/* Data: /* Data:
@ -2875,7 +2875,7 @@ QString QSysInfo::productVersion()
*/ */
QString QSysInfo::prettyProductName() 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 auto version = QOperatingSystemVersion::current();
const int majorVersion = version.majorVersion(); const int majorVersion = version.majorVersion();
const QString versionString = QString::number(majorVersion) + QLatin1Char('.') 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) 2016 Olivier Goffart <ogoffart@woboq.com>
** Copyright (C) 2018 Intel Corporation. ** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
@ -1632,7 +1632,7 @@ static bool syslog_default_message_handler(QtMsgType type, const QMessageLogCont
} }
#endif #endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
static bool android_default_message_handler(QtMsgType type, static bool android_default_message_handler(QtMsgType type,
const QMessageLogContext &context, const QMessageLogContext &context,
const QString &message) const QString &message)
@ -1775,7 +1775,7 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con
handledStderr |= systemd_default_message_handler(type, context, message); handledStderr |= systemd_default_message_handler(type, context, message);
# elif QT_CONFIG(syslog) # elif QT_CONFIG(syslog)
handledStderr |= syslog_default_message_handler(type, context, message); 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); handledStderr |= android_default_message_handler(type, context, message);
# elif defined(QT_USE_APPLE_UNIFIED_LOGGING) # elif defined(QT_USE_APPLE_UNIFIED_LOGGING)
handledStderr |= AppleUnifiedLogger::messageHandler(type, context, message); handledStderr |= AppleUnifiedLogger::messageHandler(type, context, message);

View File

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

View File

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

View File

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

View File

@ -42,7 +42,7 @@
#include <QtCore/QScopedPointer> #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> #include <jni.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

View File

@ -42,7 +42,7 @@
#include <QtCore/qsharedpointer.h> #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 <jni.h>
#include <QtCore/qjnienvironment.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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the QtCore module of the Qt Toolkit. ** This file is part of the QtCore module of the Qt Toolkit.
@ -37,7 +38,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include "qtimezone.h" #include "qtimezone.h"
#include "qtimezoneprivate_p.h" #include "qtimezoneprivate_p.h"
@ -62,9 +62,9 @@ static QTimeZonePrivate *newBackendTimeZone()
#else #else
#if defined Q_OS_MAC #if defined Q_OS_MAC
return new QMacTimeZonePrivate(); return new QMacTimeZonePrivate();
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #elif defined(Q_OS_ANDROID)
return new QAndroidTimeZonePrivate(); return new QAndroidTimeZonePrivate();
#elif defined(Q_OS_UNIX) || defined(Q_OS_ANDROID_EMBEDDED) #elif defined(Q_OS_UNIX)
return new QTzTimeZonePrivate(); return new QTzTimeZonePrivate();
#elif QT_CONFIG(icu) #elif QT_CONFIG(icu)
return new QIcuTimeZonePrivate(); return new QIcuTimeZonePrivate();
@ -89,9 +89,9 @@ static QTimeZonePrivate *newBackendTimeZone(const QByteArray &ianaId)
#else #else
#if defined Q_OS_MAC #if defined Q_OS_MAC
return new QMacTimeZonePrivate(ianaId); return new QMacTimeZonePrivate(ianaId);
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #elif defined(Q_OS_ANDROID)
return new QAndroidTimeZonePrivate(ianaId); return new QAndroidTimeZonePrivate(ianaId);
#elif defined(Q_OS_UNIX) || defined(Q_OS_ANDROID_EMBEDDED) #elif defined(Q_OS_UNIX)
return new QTzTimeZonePrivate(ianaId); return new QTzTimeZonePrivate(ianaId);
#elif QT_CONFIG(icu) #elif QT_CONFIG(icu)
return new QIcuTimeZonePrivate(ianaId); 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 // Private only method for use by QDateTime to convert local msecs to epoch msecs
QTimeZonePrivate::Data QTimeZonePrivate::dataForLocalTime(qint64 forLocalMSecs, int hint) const 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 // 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" // transitions in the future; we need it to mean "has ever had a transition"
// though, so can't trust it here. // though, so can't trust it here.
@ -610,7 +610,7 @@ bool QTimeZonePrivate::isValidId(const QByteArray &ianaId)
// Somewhat slack hand-rolled version: // Somewhat slack hand-rolled version:
const int MinSectionLength = 1; 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. // Android has its own naming of zones.
// "Canada/East-Saskatchewan" has a 17-character second component. // "Canada/East-Saskatchewan" has a 17-character second component.
const int MaxSectionLength = 17; const int MaxSectionLength = 17;

View File

@ -69,7 +69,7 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSTimeZone);
#include <qt_windows.h> #include <qt_windows.h>
#endif // Q_OS_WIN #endif // Q_OS_WIN
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
#include <QJniObject> #include <QJniObject>
#endif #endif
@ -273,7 +273,7 @@ private:
}; };
#endif #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 struct QTzTransitionTime
{ {
qint64 atMSecsSinceEpoch; qint64 atMSecsSinceEpoch;
@ -462,7 +462,7 @@ private:
}; };
#endif // Q_OS_WIN #endif // Q_OS_WIN
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
class QAndroidTimeZonePrivate final : public QTimeZonePrivate class QAndroidTimeZonePrivate final : public QTimeZonePrivate
{ {
public: 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. ** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
@ -2338,7 +2338,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
QWindow *window = e->window.data(); QWindow *window = e->window.data();
modifier_buttons = e->modifiers; modifier_buttons = e->modifiers;
if (e->nullWindow() 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 || e->key == Qt::Key_Back || e->key == Qt::Key_Menu
#endif #endif
) { ) {
@ -2374,7 +2374,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
if (window && !window->d_func()->blockedByModalWindow) if (window && !window->d_func()->blockedByModalWindow)
QGuiApplication::sendSpontaneousEvent(window, &ev); QGuiApplication::sendSpontaneousEvent(window, &ev);
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
else else
ev.setAccepted(false); 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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the QtGui module of the Qt Toolkit. ** This file is part of the QtGui module of the Qt Toolkit.
@ -44,7 +44,7 @@
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
#include <QtCore/qdebug.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> #include <QtCore/private/qjnihelpers_p.h>
#endif #endif
#ifndef Q_OS_WIN #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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the QtGui module of the Qt Toolkit. ** 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. // 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")) if (extensionMatcher.match("GL_IMG_texture_format_BGRA8888") || extensionMatcher.match("GL_EXT_texture_format_BGRA8888"))
extensions |= QOpenGLExtensions::BGRATextureFormat; extensions |= QOpenGLExtensions::BGRATextureFormat;
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
QString *deviceName = QString *deviceName =
static_cast<QString *>(QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("AndroidDeviceName")); static_cast<QString *>(QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("AndroidDeviceName"));
static bool wrongfullyReportsBgra8888Support = deviceName != 0 static bool wrongfullyReportsBgra8888Support = deviceName != 0

View File

@ -1,6 +1,6 @@
# Generated from platforms.pro. # Generated from platforms.pro.
if(ANDROID AND NOT ANDROID_EMBEDDED) if(ANDROID)
add_subdirectory(android) add_subdirectory(android)
endif() endif()
if(NOT ANDROID AND NOT WASM) 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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the plugins of the Qt Toolkit. ** This file is part of the plugins of the Qt Toolkit.
@ -111,11 +111,11 @@ void QEglFSWindow::create()
QOpenGLCompositor *compositor = QOpenGLCompositor::instance(); QOpenGLCompositor *compositor = QOpenGLCompositor::instance();
if (screen->primarySurface() != EGL_NO_SURFACE) { if (screen->primarySurface() != EGL_NO_SURFACE) {
if (Q_UNLIKELY(!isRaster() || !compositor->targetWindow())) { 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. // We can have either a single OpenGL window or multiple raster windows.
// Other combinations cannot work. // Other combinations cannot work.
qFatal("EGLFS: OpenGL windows cannot be mixed with others."); qFatal("EGLFS: OpenGL windows cannot be mixed with others.");
#endif # endif
return; return;
} }
m_format = compositor->targetWindow()->format(); m_format = compositor->targetWindow()->format();

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2017 Intel Corporation. ** Copyright (C) 2017 Intel Corporation.
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -232,20 +232,21 @@ private:
Q_DECLARE_METATYPE(tst_QDir::UncHandling) Q_DECLARE_METATYPE(tst_QDir::UncHandling)
tst_QDir::tst_QDir() tst_QDir::tst_QDir()
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
: m_dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)) : m_dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
#elif !defined(BUILTIN_TESTDATA) #elif !defined(BUILTIN_TESTDATA)
: m_dataPath(QFileInfo(QFINDTESTDATA("testData")).absolutePath()) : m_dataPath(QFileInfo(QFINDTESTDATA("testData")).absolutePath())
#endif #endif
{ {
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
QString resourceSourcePath = QStringLiteral(":/android_testdata/"); QString resourceSourcePath = QStringLiteral(":/android_testdata/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories); QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
while (it.hasNext()) { while (it.hasNext()) {
QFileInfo fileInfo = it.nextFileInfo(); QFileInfo fileInfo = it.nextFileInfo();
if (!fileInfo.isDir()) { 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); QFileInfo destinationFileInfo(destination);
if (!destinationFileInfo.exists()) { if (!destinationFileInfo.exists()) {
QDir().mkpath(destinationFileInfo.path()); 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. //need a path in the root directory that is unlikely to be a symbolic link.
#if defined (Q_OS_WIN) #if defined (Q_OS_WIN)
QString pathinroot("c:/windows/.."); QString pathinroot("c:/windows/..");
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #elif defined(Q_OS_ANDROID)
QString pathinroot("/system/.."); QString pathinroot("/system/..");
#elif defined(Q_OS_HAIKU) #elif defined(Q_OS_HAIKU)
QString pathinroot("/boot/.."); 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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -45,7 +45,7 @@
# include "../../../network-settings.h" # include "../../../network-settings.h"
#endif #endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
#include <QStandardPaths> #include <QStandardPaths>
#endif #endif
@ -122,7 +122,7 @@ private:
void tst_QDirIterator::initTestCase() 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 testdata_dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
QString resourceSourcePath = QStringLiteral(":/testdata"); QString resourceSourcePath = QStringLiteral(":/testdata");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories); QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
@ -130,7 +130,8 @@ void tst_QDirIterator::initTestCase()
QFileInfo fileInfo = it.nextFileInfo(); QFileInfo fileInfo = it.nextFileInfo();
if (!fileInfo.isDir()) { 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); QFileInfo destinationFileInfo(destination);
if (!destinationFileInfo.exists()) { if (!destinationFileInfo.exists()) {
QDir().mkpath(destinationFileInfo.path()); 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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** 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 QCOMPARE(fileInfo.birthTime(), birthTime); // mustn't have changed
QVERIFY(readTime.isValid()); 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; noAccessTime = true;
#elif defined(Q_OS_WIN) #elif defined(Q_OS_WIN)
//In Vista the last-access timestamp is not updated when the file is accessed/touched (by default). //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() void tst_QFileInfo::isExecutable()
{ {
QString appPath = QCoreApplication::applicationDirPath(); QString appPath = QCoreApplication::applicationDirPath();
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
appPath += "/libtst_qfileinfo.so"; appPath += "/libtst_qfileinfo.so";
#else #else
appPath += "/tst_qfileinfo"; 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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -41,7 +41,7 @@
#include <windows.h> #include <windows.h>
#endif #endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
#include <QStandardPaths> #include <QStandardPaths>
#endif #endif
@ -104,7 +104,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
m_tempDirPattern += QLatin1Char('/'); m_tempDirPattern += QLatin1Char('/');
m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX"); 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)); QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
#endif #endif
} }

View File

@ -21,7 +21,7 @@ qt_internal_add_test(tst_qiodevice
## Scopes: ## Scopes:
##################################################################### #####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED) if(ANDROID)
# Resources: # Resources:
set(android_testdata_resource_files set(android_testdata_resource_files
"tst_qiodevice.cpp" "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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -70,7 +70,7 @@ private:
void tst_QIODevice::initTestCase() 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() QVERIFY(QFileInfo(QStringLiteral("./tst_qiodevice.cpp")).exists()
|| QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp"))); || QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp")));
#endif #endif

View File

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

View File

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

View File

@ -31,7 +31,7 @@ qt_internal_add_test(tst_qresourceengine
qt_add_resources(additional_sources testqrc/test.qrc) qt_add_resources(additional_sources testqrc/test.qrc)
target_sources(tst_qresourceengine PRIVATE ${additional_sources}) target_sources(tst_qresourceengine PRIVATE ${additional_sources})
if(ANDROID AND NOT ANDROID_EMBEDDED) if(ANDROID)
qt_add_resources(additional_sources android_testdata.qrc) qt_add_resources(additional_sources android_testdata.qrc)
target_sources(tst_qresourceengine PRIVATE ${additional_sources}) target_sources(tst_qresourceengine PRIVATE ${additional_sources})
endif() 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. ** Copyright (C) 2019 Intel Corporation.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
@ -40,8 +40,10 @@ class tst_QResourceEngine: public QObject
public: public:
tst_QResourceEngine() tst_QResourceEngine()
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
: m_runtimeResourceRcc(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/runtime_resource.rcc")).absoluteFilePath()) : m_runtimeResourceRcc(
QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ QStringLiteral("/runtime_resource.rcc")).absoluteFilePath())
#else #else
: m_runtimeResourceRcc(QFINDTESTDATA("runtime_resource.rcc")) : m_runtimeResourceRcc(QFINDTESTDATA("runtime_resource.rcc"))
#endif #endif
@ -71,7 +73,7 @@ private:
void tst_QResourceEngine::initTestCase() void tst_QResourceEngine::initTestCase()
{ {
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
QString sourcePath(QStringLiteral(":/android_testdata/")); QString sourcePath(QStringLiteral(":/android_testdata/"));
QString dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)); QString dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
@ -79,7 +81,8 @@ void tst_QResourceEngine::initTestCase()
while (it.hasNext()) { while (it.hasNext()) {
QFileInfo fileInfo = it.nextFileInfo(); QFileInfo fileInfo = it.nextFileInfo();
if (!fileInfo.isDir()) { if (!fileInfo.isDir()) {
QString destination(dataPath + QLatin1Char('/') + fileInfo.filePath().mid(sourcePath.length())); QString destination(dataPath + QLatin1Char('/')
+ fileInfo.filePath().mid(sourcePath.length()));
QFileInfo destinationFileInfo(destination); QFileInfo destinationFileInfo(destination);
if (!destinationFileInfo.exists()) { if (!destinationFileInfo.exists()) {
QVERIFY(QDir().mkpath(destinationFileInfo.path())); QVERIFY(QDir().mkpath(destinationFileInfo.path()));
@ -186,7 +189,7 @@ void tst_QResourceEngine::checkStructure_data()
QStringList rootContents; QStringList rootContents;
rootContents << QLatin1String("aliasdir") rootContents << QLatin1String("aliasdir")
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
<< QLatin1String("android_testdata") << QLatin1String("android_testdata")
#endif #endif
<< QLatin1String("otherdir") << 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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -312,7 +312,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
{ {
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) # ifdef Q_OS_ANDROID
const char nonWritableDir[] = "/data"; const char nonWritableDir[] = "/data";
# else # else
const char nonWritableDir[] = "/home"; const char nonWritableDir[] = "/home";

View File

@ -31,7 +31,7 @@ qt_internal_add_resource(tst_qtemporaryfile "qtemporaryfile"
## Scopes: ## Scopes:
##################################################################### #####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED) if(ANDROID)
# Resources: # Resources:
set(android_testdata_resource_files set(android_testdata_resource_files
"resources/test.txt" "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. ** Copyright (C) 2017 Intel Corporation.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
@ -51,7 +51,7 @@
# include <unistd.h> // close(2) # include <unistd.h> // close(2)
#endif #endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
#include <QDirIterator> #include <QDirIterator>
#include <QStandardPaths> #include <QStandardPaths>
#endif #endif
@ -107,13 +107,15 @@ void tst_QTemporaryFile::initTestCase()
QVERIFY(QDir("test-XXXXXX").exists() || QDir().mkdir("test-XXXXXX")); QVERIFY(QDir("test-XXXXXX").exists() || QDir().mkdir("test-XXXXXX"));
QCoreApplication::setApplicationName("tst_qtemporaryfile"); QCoreApplication::setApplicationName("tst_qtemporaryfile");
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
QString sourceDir(":/android_testdata/"); QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories); QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) { while (it.hasNext()) {
QFileInfo sourceFileInfo = it.nextFileInfo(); QFileInfo sourceFileInfo = it.nextFileInfo();
if (!sourceFileInfo.isDir()) { 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()) { if (!destinationFileInfo.exists()) {
QVERIFY(QDir().mkpath(destinationFileInfo.path())); QVERIFY(QDir().mkpath(destinationFileInfo.path()));
@ -380,7 +382,7 @@ void tst_QTemporaryFile::nonWritableCurrentDir()
ChdirOnReturn cor(QDir::currentPath()); ChdirOnReturn cor(QDir::currentPath());
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
QDir::setCurrent("/data"); QDir::setCurrent("/data");
#else #else
QDir::setCurrent("/home"); QDir::setCurrent("/home");
@ -806,8 +808,9 @@ void tst_QTemporaryFile::createNativeFile_data()
QTest::addColumn<bool>("valid"); QTest::addColumn<bool>("valid");
QTest::addColumn<QByteArray>("content"); QTest::addColumn<QByteArray>("content");
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/resources/test.txt"); const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ QStringLiteral("/resources/test.txt");
#else #else
const QString nativeFilePath = QFINDTESTDATA("resources/test.txt"); const QString nativeFilePath = QFINDTESTDATA("resources/test.txt");
#endif #endif

View File

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

View File

@ -28,7 +28,7 @@ qt_internal_add_resource(tst_qtranslator "qtranslator"
## Scopes: ## Scopes:
##################################################################### #####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED) if(ANDROID)
# Resources: # Resources:
set(android_testdata_resource_files set(android_testdata_resource_files
"dependencies_la.qm" "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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -34,7 +34,7 @@
#include <qfile.h> #include <qfile.h>
#include <qtemporarydir.h> #include <qtemporarydir.h>
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
#include <QDirIterator> #include <QDirIterator>
#endif #endif

View File

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

View File

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

View File

@ -18,7 +18,7 @@ qt_internal_add_test(tst_qchar
## Scopes: ## Scopes:
##################################################################### #####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED) if(ANDROID)
# Resources: # Resources:
set(testdata_resource_files set(testdata_resource_files
"data/NormalizationTest.txt" "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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** 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, // posix implementation supports only C and default locale,
// so update it for Android build // so update it for Android build
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
c3.setLocale(QLocale()); c3.setLocale(QLocale());
#endif #endif
QCollatorSortKey key1 = c3.sortKey("test"); QCollatorSortKey key1 = c3.sortKey("test");
@ -111,7 +111,7 @@ void tst_QCollator::moveSemantics()
// test QCollatorSortKey move assignment // test QCollatorSortKey move assignment
// posix implementation supports only C and default locale, // posix implementation supports only C and default locale,
// so update it for Android build // so update it for Android build
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) #ifdef Q_OS_ANDROID
c1.setLocale(QLocale()); c1.setLocale(QLocale());
#endif #endif
QCollatorSortKey key1 = c1.sortKey("1"); QCollatorSortKey key1 = c1.sortKey("1");
@ -281,7 +281,7 @@ void tst_QCollator::compare()
return compared < 0 ? -1 : compared > 0 ? 1 : 0; 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()) if (collator.locale() != QLocale())
QSKIP("Posix implementation of collation only supports default locale"); QSKIP("Posix implementation of collation only supports default locale");
#endif #endif

View File

@ -16,7 +16,7 @@ qt_internal_add_test(tst_qtextboundaryfinder
## Scopes: ## Scopes:
##################################################################### #####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED) if(ANDROID)
# Resources: # Resources:
set(testdata_resource_files set(testdata_resource_files
"data/GraphemeBreakTest.txt" "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 // Parts separated by '/', each part min 1 and max of 14 chars
TESTSET("empty", "", false); TESTSET("empty", "", false);
TESTSET("minimal", "m", true); 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("maximal", "East-Saskatchewan", true); // Android actually uses this
TESTSET("too long", "North-Saskatchewan", false); // ... but thankfully not this. TESTSET("too long", "North-Saskatchewan", false); // ... but thankfully not this.
#else #else
@ -934,7 +934,7 @@ void tst_QTimeZone::isValidId_data()
QTest::newRow("a,z alone") << QByteArray("a,z") << false; QTest::newRow("a,z alone") << QByteArray("a,z") << false;
QTest::newRow("/z alone") << QByteArray("/z") << false; QTest::newRow("/z alone") << QByteArray("/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("long alone") << QByteArray("12345678901234567") << true;
QTest::newRow("over-long alone") << QByteArray("123456789012345678") << false; QTest::newRow("over-long alone") << QByteArray("123456789012345678") << false;
#else #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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -555,10 +556,9 @@ void tst_QCommandLineParser::testVersionOption()
{ {
#if !QT_CONFIG(process) #if !QT_CONFIG(process)
QSKIP("This test requires QProcess support"); QSKIP("This test requires QProcess support");
#else #elif defined(Q_OS_ANDROID)
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Deploying executable applications to file system on Android not supported."); QSKIP("Deploying executable applications to file system on Android not supported.");
#endif #else
QCoreApplication app(empty_argc, empty_argv); QCoreApplication app(empty_argc, empty_argv);
QProcess process; QProcess process;
@ -623,10 +623,9 @@ void tst_QCommandLineParser::testHelpOption()
{ {
#if !QT_CONFIG(process) #if !QT_CONFIG(process)
QSKIP("This test requires QProcess support"); QSKIP("This test requires QProcess support");
#else #elif defined(Q_OS_ANDROID)
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Deploying executable applications to file system on Android not supported."); QSKIP("Deploying executable applications to file system on Android not supported.");
#endif #else
QFETCH(QCommandLineParser::SingleDashWordOptionMode, parsingMode); QFETCH(QCommandLineParser::SingleDashWordOptionMode, parsingMode);
QFETCH(QString, expectedHelpOutput); QFETCH(QString, expectedHelpOutput);
@ -671,7 +670,7 @@ void tst_QCommandLineParser::testQuoteEscaping()
{ {
#if !QT_CONFIG(process) #if !QT_CONFIG(process)
QSKIP("This test requires QProcess support"); 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."); QSKIP("Deploying executable applications to file system on Android not supported.");
#else #else
QCoreApplication app(empty_argc, empty_argv); QCoreApplication app(empty_argc, empty_argv);
@ -697,7 +696,7 @@ void tst_QCommandLineParser::testUnknownOption()
{ {
#if !QT_CONFIG(process) #if !QT_CONFIG(process)
QSKIP("This test requires QProcess support"); 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."); QSKIP("Deploying executable applications to file system on Android not supported.");
#else #else
QCoreApplication app(empty_argc, empty_argv); QCoreApplication app(empty_argc, empty_argv);
@ -748,7 +747,7 @@ void tst_QCommandLineParser::testHelpAll()
#if !QT_CONFIG(process) #if !QT_CONFIG(process)
QSKIP("This test requires QProcess support"); QSKIP("This test requires QProcess support");
#else #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."); QSKIP("Deploying executable applications to file system on Android not supported.");
#endif #endif
@ -772,10 +771,9 @@ void tst_QCommandLineParser::testVeryLongOptionNames()
{ {
#if !QT_CONFIG(process) #if !QT_CONFIG(process)
QSKIP("This test requires QProcess support"); QSKIP("This test requires QProcess support");
#else #elif defined(Q_OS_ANDROID)
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Deploying executable applications to file system on Android not supported."); QSKIP("Deploying executable applications to file system on Android not supported.");
#endif #else
QCoreApplication app(empty_argc, empty_argv); QCoreApplication app(empty_argc, empty_argv);
QProcess process; QProcess process;

View File

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

View File

@ -64,7 +64,7 @@ void tst_QHashSeed::initTestCase()
void tst_QHashSeed::environmentVariable_data() 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."); QSKIP("This test needs a helper binary, so is excluded from this platform.");
#endif #endif

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation. ** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
@ -41,7 +42,7 @@ private slots:
void tst_QProcess_and_GuiEventLoop::waitForAndEventLoop() 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"); QSKIP("Not supported on Android");
#else #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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -93,7 +93,7 @@ void tst_QSidebar::addUrls()
QAbstractItemModel *model = qsidebar.model(); QAbstractItemModel *model = qsidebar.model();
QDir testDir = QDir::home(); 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 // temp and home is the same directory on Android
testDir.mkdir(QStringLiteral("test")); testDir.mkdir(QStringLiteral("test"));
QVERIFY(testDir.cd(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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -2697,7 +2697,7 @@ void tst_QGraphicsScene::render()
void tst_QGraphicsScene::renderItemsWithNegativeWidthOrHeight() 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"); QSKIP("Test only works on platforms with resizable windows");
#endif #endif
QGraphicsScene scene(0, 0, m_testSize.width(), m_testSize.height()); QGraphicsScene scene(0, 0, m_testSize.width(), m_testSize.height());
@ -2777,7 +2777,7 @@ protected:
void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations() 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)"); QSKIP("Test fails on some Android devices (QTBUG-44430)");
#endif #endif
@ -4058,12 +4058,11 @@ void tst_QGraphicsScene::polishItems2()
void tst_QGraphicsScene::isActive() void tst_QGraphicsScene::isActive()
{ {
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation)) #ifdef Q_OS_ANDROID
QSKIP("Window activation is not supported");
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Fails on Android (QTBUG-44430)"); QSKIP("Fails on Android (QTBUG-44430)");
#endif #endif
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
QSKIP("Window activation is not supported");
QGraphicsScene scene1; QGraphicsScene scene1;
QVERIFY(!scene1.isActive()); QVERIFY(!scene1.isActive());

View File

@ -24,7 +24,7 @@ qt_internal_add_test(tst_qlayout
## Scopes: ## Scopes:
##################################################################### #####################################################################
if(ANDROID AND NOT ANDROID_EMBEDDED) if(ANDROID)
# Resources: # Resources:
set(testdata_resource_files set(testdata_resource_files
"baseline/smartmaxsize" "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/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the test suite of the Qt Toolkit. ** This file is part of the test suite of the Qt Toolkit.
@ -355,7 +355,7 @@ void tst_QLayout::adjustSizeShouldMakeSureLayoutIsActivated()
void tst_QLayout::testRetainSizeWhenHidden() 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()"); QSKIP("Test does not work on platforms which default to showMaximized()");
#endif #endif

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
############################################################################# #############################################################################
## ##
## Copyright (C) 2019 The Qt Company Ltd. ## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/ ## Contact: https://www.qt.io/licensing/
## ##
## This file is part of the plugins of the Qt Toolkit. ## This file is part of the plugins of the Qt Toolkit.
@ -108,7 +108,7 @@ def _recursive_simplify(expr):
# windowses = ('WIN32', 'WINRT') # windowses = ('WIN32', 'WINRT')
apples = ("MACOS", "UIKIT", "IOS", "TVOS", "WATCHOS") apples = ("MACOS", "UIKIT", "IOS", "TVOS", "WATCHOS")
bsds = ("FREEBSD", "OPENBSD", "NETBSD") bsds = ("FREEBSD", "OPENBSD", "NETBSD")
androids = ("ANDROID", "ANDROID_EMBEDDED") androids = ("ANDROID",)
unixes = ( unixes = (
"APPLE", "APPLE",
*apples, *apples,
@ -140,7 +140,7 @@ def _recursive_simplify(expr):
expr = _simplify_flavors_in_condition("APPLE", apples, expr) expr = _simplify_flavors_in_condition("APPLE", apples, expr)
expr = _simplify_flavors_in_condition("BSD", bsds, expr) expr = _simplify_flavors_in_condition("BSD", bsds, expr)
expr = _simplify_flavors_in_condition("UNIX", unixes, 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: # Simplify families of OSes against other families:
expr = _simplify_os_families(expr, ("WIN32", "WINRT"), unixes) 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/ ## Contact: https://www.qt.io/licensing/
## ##
## This file is part of the plugins of the Qt Toolkit. ## This file is part of the plugins of the Qt Toolkit.
@ -761,7 +761,6 @@ platform_mapping = {
"hpux": "HPUX", "hpux": "HPUX",
"nacl": "NACL", "nacl": "NACL",
"android": "ANDROID", "android": "ANDROID",
"android-embedded": "ANDROID_EMBEDDED",
"uikit": "UIKIT", "uikit": "UIKIT",
"tvos": "TVOS", "tvos": "TVOS",
"watchos": "WATCHOS", "watchos": "WATCHOS",

View File

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

View File

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

View File

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

View File

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