Remove the traces of the discontinued android-no-sdk platform

Cleaning out the workarounds for the discontinued "Embedded Android"
platform of Boot2Qt.

Change-Id: I0ff9d770e82a43457fb7e5da0428f4597ead4038
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
bb10
Eirik Aavitsland 2016-03-18 10:49:43 +01:00 committed by aavit
parent 2a0ab43f18
commit 91f8c9cc70
54 changed files with 74 additions and 457 deletions

View File

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

View File

@ -1,156 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qeglfshooks.h"
#include <ui/DisplayInfo.h>
#include <ui/FramebufferNativeWindow.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/fb.h>
#include <sys/ioctl.h>
#if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1)
#include <gui/SurfaceComposerClient.h>
#else
#include <surfaceflinger/SurfaceComposerClient.h>
#endif
using namespace android;
QT_BEGIN_NAMESPACE
class QEglFSPandaHooks : public QEglFSHooks
{
public:
QEglFSPandaHooks();
virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format);
virtual bool filterConfig(EGLDisplay display, EGLConfig config) const;
virtual const char *fbDeviceName() const { return "/dev/graphics/fb0"; }
private:
EGLNativeWindowType createNativeWindowSurfaceFlinger(const QSize &size, const QSurfaceFormat &format);
EGLNativeWindowType createNativeWindowFramebuffer(const QSize &size, const QSurfaceFormat &format);
void ensureFramebufferNativeWindowCreated();
// androidy things
sp<android::SurfaceComposerClient> mSession;
sp<android::SurfaceControl> mControl;
sp<android::Surface> mAndroidSurface;
sp<android::FramebufferNativeWindow> mFramebufferNativeWindow;
EGLint mFramebufferVisualId;
bool mUseFramebuffer;
};
QEglFSPandaHooks::QEglFSPandaHooks()
: mFramebufferVisualId(EGL_DONT_CARE)
{
mUseFramebuffer = qgetenv("QT_QPA_EGLFS_NO_SURFACEFLINGER").toInt();
}
void QEglFSPandaHooks::ensureFramebufferNativeWindowCreated()
{
if (mFramebufferNativeWindow.get())
return;
mFramebufferNativeWindow = new FramebufferNativeWindow();
framebuffer_device_t const *fbDev = mFramebufferNativeWindow->getDevice();
if (!fbDev)
qFatal("Failed to get valid FramebufferNativeWindow, no way to create EGL surfaces");
ANativeWindow *window = mFramebufferNativeWindow.get();
window->query(window, NATIVE_WINDOW_FORMAT, &mFramebufferVisualId);
}
EGLNativeWindowType QEglFSPandaHooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
{
Q_UNUSED(window)
return mUseFramebuffer ? createNativeWindowFramebuffer(size, format) : createNativeWindowSurfaceFlinger(size, format);
}
EGLNativeWindowType QEglFSPandaHooks::createNativeWindowFramebuffer(const QSize &size, const QSurfaceFormat &)
{
Q_UNUSED(size);
ensureFramebufferNativeWindowCreated();
return mFramebufferNativeWindow.get();
}
EGLNativeWindowType QEglFSPandaHooks::createNativeWindowSurfaceFlinger(const QSize &size, const QSurfaceFormat &)
{
Q_UNUSED(size);
mSession = new SurfaceComposerClient();
DisplayInfo dinfo;
int status=0;
status = mSession->getDisplayInfo(0, &dinfo);
mControl = mSession->createSurface(
0, dinfo.w, dinfo.h, PIXEL_FORMAT_RGB_888);
SurfaceComposerClient::openGlobalTransaction();
mControl->setLayer(0x40000000);
// mControl->setAlpha(1);
SurfaceComposerClient::closeGlobalTransaction();
mAndroidSurface = mControl->getSurface();
EGLNativeWindowType eglWindow = mAndroidSurface.get();
return eglWindow;
}
bool QEglFSPandaHooks::filterConfig(EGLDisplay display, EGLConfig config) const
{
if (!mUseFramebuffer)
return true;
const_cast<QEglFSPandaHooks *>(this)->ensureFramebufferNativeWindowCreated();
if (mFramebufferVisualId == EGL_DONT_CARE)
return true;
EGLint nativeVisualId = 0;
eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &nativeVisualId);
return nativeVisualId == mFramebufferVisualId;
}
static QEglFSPandaHooks eglFSPandaHooks;
QEglFSHooks *platformHooks = &eglFSPandaHooks;
QT_END_NAMESPACE

View File

@ -1,183 +0,0 @@
ANDROID_BUILD_TOP=$$(ANDROID_BUILD_TOP)
isEmpty(ANDROID_BUILD_TOP) : error("$ANDROID_BUILD_TOP is empty. Forgot to run 'lunch'?")
ANDROID_PRODUCT_OUT=$$(ANDROID_PRODUCT_OUT)
isEmpty(ANDROID_PRODUCT_OUT) : error("$ANDROID_PRODUCT_OUT is empty. forgot to run 'lunch'?")
defineReplace(getAndroidBuildVar) {
thevar = $$1
r=$$system(cd $$ANDROID_BUILD_TOP && CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core make --no-print-directory -f build/core/config.mk dumpvar-$${thevar})
return($$r)
}
# .qmake.cache is not available at mkspec loading time.
# not caching those is horribly slow though
!exists($$PWD/android_build_vars) {
store_ANDROID_TOOLCHAIN_PREFIX = "ANDROID_TOOLCHAIN_PREFIX=$$getAndroidBuildVar(abs-TARGET_TOOLS_PREFIX)"
store_ANDROID_TARGET_CFLAGS = "ANDROID_TARGET_CFLAGS=$$getAndroidBuildVar(TARGET_GLOBAL_CFLAGS)"
store_ANDROID_TARGET_LDFLAGS = "ANDROID_TARGET_LDFLAGS=$$getAndroidBuildVar(TARGET_GLOBAL_LDFLAGS)"
store_ANDROID_TARGET_ARCH = "ANDROID_TARGET_ARCH=$$getAndroidBuildVar(TARGET_ARCH)"
store_ANDROID_VERSION = "ANDROID_VERSION=$$getAndroidBuildVar(PLATFORM_VERSION)"
write_file(android_build_vars, store_ANDROID_TOOLCHAIN_PREFIX)
write_file(android_build_vars, store_ANDROID_TARGET_CFLAGS, append)
write_file(android_build_vars, store_ANDROID_TARGET_LDFLAGS, append)
write_file(android_build_vars, store_ANDROID_TARGET_ARCH, append)
write_file(android_build_vars, store_ANDROID_VERSION, append)
}
info(using android build env from cache in $$PWD/android_build_vars . delete this file if you changed your build env )
exists($$PWD/android_build_vars) {
include($$PWD/android_build_vars)
}
ANDROID_VERSION_SPLIT = $$split(ANDROID_VERSION, ".")
ANDROID_VERSION_MAJOR = $$member(ANDROID_VERSION_SPLIT, 0)
ANDROID_VERSION_MINOR = $$member(ANDROID_VERSION_SPLIT, 1)
MAKEFILE_GENERATOR = UNIX
QMAKE_COMPILER = gcc
TARGET_PLATFORM = unix
TEMPLATE = app
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
CONFIG = qt warn_on release link_prl
QT = core gui
DEFINES += HAVE_ANDROID_OS Q_OS_ANDROID_NO_SDK
DEFINES += Q_ANDROID_VERSION_MAJOR=$$ANDROID_VERSION_MAJOR
DEFINES += Q_ANDROID_VERSION_MINOR=$$ANDROID_VERSION_MINOR
DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG QT_NO_EXCEPTIONS
#note: -DANDROID results in weird behaviour of math.h
DEFINES += ANDROID
QT_QPA_DEFAULT_PLATFORM = eglfs
EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_surfaceflinger.cpp
EGLFS_PLATFORM_HOOKS_LIBS += -lui -lgui -lutils -lcutils
QMAKE_CC = $${ANDROID_TOOLCHAIN_PREFIX}gcc
QMAKE_CFLAGS = $${ANDROID_TARGET_CFLAGS}
QMAKE_CFLAGS -= -Werror=non-virtual-dtor
QMAKE_CFLAGS -= -DNDEBUG
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF = -Wno-psabi
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CFLAGS_HIDESYMS =
QMAKE_CXX = $${ANDROID_TOOLCHAIN_PREFIX}g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_LINK
QMAKE_AR = $${ANDROID_TOOLCHAIN_PREFIX}ar cqs
QMAKE_OBJCOPY = $${ANDROID_TOOLCHAIN_PREFIX}objcopy
QMAKE_NM = $${ANDROID_TOOLCHAIN_PREFIX}nm -P
QMAKE_STRIP = $${ANDROID_TOOLCHAIN_PREFIX}strip
QMAKE_RANLIB = $${ANDROID_TOOLCHAIN_PREFIX}ranlib
QMAKE_INCDIR = $${ANDROID_BUILD_TOP} \
$${ANDROID_BUILD_TOP}/dalvik/libnativehelper/include/nativehelper \
$${ANDROID_BUILD_TOP}/bionic \
$${ANDROID_BUILD_TOP}/bionic/libc/include \
$${ANDROID_BUILD_TOP}/bionic/libc/kernel/arch-arm \
$${ANDROID_BUILD_TOP}/bionic/libc/kernel/common \
$${ANDROID_BUILD_TOP}/bionic/libc/private \
$${ANDROID_BUILD_TOP}/bionic/libm/include \
$${ANDROID_BUILD_TOP}/bionic/libm/include/arm \
$${ANDROID_BUILD_TOP}/bionic/libstdc++/include \
$${ANDROID_BUILD_TOP}/bionic/libthread_db/include \
$${ANDROID_BUILD_TOP}/dalvik/libnativehelper/include \
$${ANDROID_BUILD_TOP}/external/icu4c/common/ \
$${ANDROID_BUILD_TOP}/external/icu4c/i18n/ \
$${ANDROID_BUILD_TOP}/external/skia/include \
$${ANDROID_BUILD_TOP}/external/stlport/stlport \
$${ANDROID_BUILD_TOP}/frameworks/include \
$${ANDROID_BUILD_TOP}/frameworks/native/include \
$${ANDROID_BUILD_TOP}/frameworks/native/include/gui \
$${ANDROID_BUILD_TOP}/frameworks/native/opengl/include \
$${ANDROID_BUILD_TOP}/frameworks/base/include \
$${ANDROID_BUILD_TOP}/frameworks/base/native/include \
$${ANDROID_BUILD_TOP}/frameworks/base/opengl/include \
$${ANDROID_BUILD_TOP}/hardware/libhardware/include \
$${ANDROID_BUILD_TOP}/hardware/libhardware_legacy/include \
$${ANDROID_BUILD_TOP}/hardware/ril/include \
$${ANDROID_BUILD_TOP}/system/core/include \
$${ANDROID_BUILD_TOP}/system/core/include/arch/linux-arm/ \
$${ANDROID_PRODUCT_OUT}/obj/include
QMAKE_INCDIR += $${ANDROID_BUILD_TOP}/bionic/libc/arch-$${ANDROID_TARGET_ARCH}/include
QMAKE_LIBDIR = ${ANDROID_PRODUCT_OUT}/obj/lib
QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 =
QMAKE_INCDIR_OPENGL =
QMAKE_INCDIR_OPENGL_ES2 =
QMAKE_LIBDIR_OPENGL_ES2 =
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
QMAKE_LFLAGS = $${ANDROID_TARGET_LDFLAGS} \
-nostdlib \
-L${ANDROID_PRODUCT_OUT}/obj/lib \
-Wl,-rpath-link,${ANDROID_PRODUCT_OUT}/obj/lib
QMAKE_LFLAGS_PLUGIN = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xsc \
-Wl,-shared,-Bsymbolic
#apparantly this file is missing from some builds.
#it does work without, but this may change in future.
#QMAKE_LFLAGS_APP = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xs \
QMAKE_LFLAGS_APP = ${ANDROID_PRODUCT_OUT}/obj/lib/crtbegin_dynamic.o \
${ANDROID_PRODUCT_OUT}/obj/lib/crtend_android.o
QMAKE_LFLAGS_SHLIB = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xsc \
-Wl,-shared,-Bsymbolic \
${ANDROID_PRODUCT_OUT}/obj/lib/crtbegin_so.o \
${ANDROID_PRODUCT_OUT}/obj/lib/crtend_so.o
QMAKE_LFLAGS_SONAME =
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
QMAKE_LFLAGS_RPATH = -Wl,-rpath=
QMAKE_LIBS = -lstlport -lstdc++ -llog -lz -lm -ldl -lc -lgcc
QMAKE_LIBS_X11 =
QMAKE_LIBS_X11SM =
QMAKE_LIBS_QT_THREAD =
QMAKE_LIBS_QT_OPENGL =
QMAKE_LIBS_QTOPIA =
QMAKE_LIBS_THREAD =
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 $$QMAKE_LIBS
CONFIG += linux-android-9 android-9 linux-android android android-no-sdk android_app
load(qt_config)
# we don't support exceptions, but right now this has no effect
# you need to manually delete mkspecs/features/exceptions.prf
CONFIG -= exceptions
CONFIG += exceptions_off

View File

@ -1,40 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../../common/android/qplatformdefs.h"

View File

@ -79,7 +79,7 @@
# include <envLib.h>
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
#include <private/qjni_p.h>
#endif
@ -2731,10 +2731,8 @@ QString QSysInfo::productVersion()
// fall through
// Android should not fall through to the Unix code
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#elif defined(Q_OS_ANDROID)
return QJNIObjectPrivate::getStaticObjectField("android/os/Build$VERSION", "RELEASE", "Ljava/lang/String;").toString();
#elif defined(Q_OS_ANDROID) // Q_OS_ANDROID_NO_SDK
// TBD
#elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
QUnixOSVersion unixOsVersion;
findUnixOsVersion(unixOsVersion);
@ -3423,7 +3421,7 @@ typedef uint SeedStorageType;
typedef QThreadStorage<SeedStorageType *> SeedStorage;
Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#elif defined(Q_OS_ANDROID)
typedef QThreadStorage<QJNIObjectPrivate> AndroidRandomStorage;
Q_GLOBAL_STATIC(AndroidRandomStorage, randomTLS)
#endif
@ -3459,7 +3457,7 @@ void qsrand(uint seed)
//global static object, fallback to srand(seed)
srand(seed);
}
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#elif defined(Q_OS_ANDROID)
if (randomTLS->hasLocalData()) {
randomTLS->localData().callMethod<void>("setSeed", "(J)V", jlong(seed));
return;
@ -3515,7 +3513,7 @@ int qrand()
//global static object, fallback to rand()
return rand();
}
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#elif defined(Q_OS_ANDROID)
AndroidRandomStorage *randomStorage = randomTLS();
if (!randomStorage)
return rand();

View File

@ -160,7 +160,7 @@ win32 {
} else:ios {
LIBS += -framework MobileCoreServices
}
} else:android:!android-no-sdk {
} else:android {
SOURCES += \
io/qstandardpaths_android.cpp \
io/qstorageinfo_unix.cpp

View File

@ -194,7 +194,7 @@ qqnx_pps {
kernel/qppsobjectprivate_p.h
}
android:!android-no-sdk {
android {
SOURCES += \
kernel/qjnionload.cpp \
kernel/qjnihelpers.cpp \

View File

@ -2146,7 +2146,7 @@ QString QCoreApplication::applicationFilePath()
}
#endif
#if defined( Q_OS_UNIX )
# if defined(Q_OS_LINUX) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
# if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
// Try looking for a /proc/<pid>/exe symlink first which points to
// the absolute path of the executable
QFileInfo pfi(QString::fromLatin1("/proc/%1/exe").arg(getpid()));

View File

@ -175,7 +175,7 @@
// SSE intrinsics
#define QT_FUNCTION_TARGET_STRING_SSE2 "sse2"
#if defined(__SSE2__) || (defined(QT_COMPILER_SUPPORTS_SSE2) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS))
#if defined(QT_LINUXBASE) || defined(Q_OS_ANDROID_NO_SDK)
#if defined(QT_LINUXBASE)
/// this is an evil hack - the posix_memalign declaration in LSB
/// is wrong - see http://bugs.linuxbase.org/show_bug.cgi?id=2431
# define posix_memalign _lsb_hack_posix_memalign

View File

@ -1994,7 +1994,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_NO_SDK)
#if defined(Q_OS_ANDROID)
|| e->key == Qt::Key_Back || e->key == Qt::Key_Menu
#endif
) {
@ -2020,7 +2020,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_NO_SDK)
#if defined(Q_OS_ANDROID)
else
ev.setAccepted(false);

View File

@ -729,14 +729,12 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
directories << ministroPath;
nameFilters << QLatin1String("*.der");
platformEncodingFormat = QSsl::Der;
# ifndef Q_OS_ANDROID_NO_SDK
if (ministroPath.isEmpty()) {
QList<QByteArray> certificateData = fetchSslCertificateData();
for (int i = 0; i < certificateData.size(); ++i) {
systemCerts.append(QSslCertificate::fromData(certificateData.at(i), QSsl::Der));
}
} else
# endif //Q_OS_ANDROID_NO_SDK
# endif //Q_OS_ANDROID
{
currentDir.setNameFilters(nameFilters);

View File

@ -209,7 +209,7 @@ public:
private:
static bool ensureLibraryLoaded();
static void ensureCiphersAndCertsLoaded();
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
static QList<QByteArray> fetchSslCertificateData();
#endif

View File

@ -65,7 +65,7 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
darwin:SOURCES += ssl/qsslsocket_mac_shared.cpp
android:!android-no-sdk: SOURCES += ssl/qsslsocket_openssl_android.cpp
android: SOURCES += ssl/qsslsocket_openssl_android.cpp
# Add optional SSL libs
# Static linking of OpenSSL with msvc:

View File

@ -10,6 +10,6 @@ win32:SUBDIRS += generic
win32:!wince:!winrt: SUBDIRS += nativewifi
mac:contains(QT_CONFIG, corewlan):SUBDIRS += corewlan
mac:SUBDIRS += generic
android:!android-no-sdk:SUBDIRS += android
android:SUBDIRS += android
isEmpty(SUBDIRS):SUBDIRS = generic

View File

@ -74,13 +74,13 @@
#include <QtPlatformSupport/private/qlibinputhandler_p.h>
#endif
#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#if !defined(QT_NO_EVDEV) && !defined(Q_OS_ANDROID)
#include <QtPlatformSupport/private/qevdevmousemanager_p.h>
#include <QtPlatformSupport/private/qevdevkeyboardmanager_p.h>
#include <QtPlatformSupport/private/qevdevtouchmanager_p.h>
#endif
#if !defined(QT_NO_TSLIB) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#if !defined(QT_NO_TSLIB) && !defined(Q_OS_ANDROID)
#include <QtPlatformSupport/private/qtslib_p.h>
#endif
@ -388,7 +388,7 @@ QPlatformNativeInterface::NativeResourceForContextFunction QEglFSIntegration::na
QFunctionPointer QEglFSIntegration::platformFunction(const QByteArray &function) const
{
#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#if !defined(QT_NO_EVDEV) && !defined(Q_OS_ANDROID)
if (function == QEglFSFunctions::loadKeymapTypeIdentifier())
return QFunctionPointer(loadKeymapStatic);
#else
@ -400,7 +400,7 @@ QFunctionPointer QEglFSIntegration::platformFunction(const QByteArray &function)
void QEglFSIntegration::loadKeymapStatic(const QString &filename)
{
#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#if !defined(QT_NO_EVDEV) && !defined(Q_OS_ANDROID)
QEglFSIntegration *self = static_cast<QEglFSIntegration *>(QGuiApplicationPrivate::platformIntegration());
if (self->m_kbdMgr)
self->m_kbdMgr->loadKeymap(filename);
@ -420,7 +420,7 @@ void QEglFSIntegration::createInputHandlers()
}
#endif
#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#if !defined(QT_NO_EVDEV) && !defined(Q_OS_ANDROID)
m_kbdMgr = new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString() /* spec */, this);
new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString() /* spec */, this);
#ifndef QT_NO_TSLIB

View File

@ -109,7 +109,7 @@ 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_NO_SDK)
#if !defined(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.");

View File

@ -56,13 +56,13 @@
#include <QtPlatformSupport/private/qlibinputhandler_p.h>
#endif
#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#if !defined(QT_NO_EVDEV) && !defined(Q_OS_ANDROID)
#include <QtPlatformSupport/private/qevdevmousemanager_p.h>
#include <QtPlatformSupport/private/qevdevkeyboardmanager_p.h>
#include <QtPlatformSupport/private/qevdevtouchmanager_p.h>
#endif
#if !defined(QT_NO_TSLIB) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#if !defined(QT_NO_TSLIB) && !defined(Q_OS_ANDROID)
#include <QtPlatformSupport/private/qtslib_p.h>
#endif
@ -147,7 +147,7 @@ void QLinuxFbIntegration::createInputHandlers()
}
#endif
#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#if !defined(QT_NO_EVDEV) && !defined(Q_OS_ANDROID)
new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString(), this);
new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString(), this);
#ifndef QT_NO_TSLIB

View File

@ -1,6 +1,6 @@
TEMPLATE = subdirs
android:!android-no-sdk: SUBDIRS += android
android: SUBDIRS += android
SUBDIRS += minimal

View File

@ -184,7 +184,7 @@ SUBDIRS += src_plugins
nacl: SUBDIRS -= src_network src_testlib
android:!android-no-sdk: SUBDIRS += src_android
android: SUBDIRS += src_android
TR_EXCLUDE = \
src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic src_tools_qlalr \

View File

@ -5,7 +5,7 @@ SOURCES = tst_qdatastream.cpp
TESTDATA += datastream.q42
android: !android-no-sdk {
android {
RESOURCES += \
testdata.qrc
}

View File

@ -8,7 +8,7 @@ TESTDATA += testdir testData searchdir resources entrylist types tst_qdir.cpp
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
android:!android-no-sdk {
android {
RESOURCES += android_testdata.qrc
}

View File

@ -222,13 +222,13 @@ private:
Q_DECLARE_METATYPE(tst_QDir::UncHandling)
tst_QDir::tst_QDir()
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(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_NO_SDK)
#if defined(Q_OS_ANDROID)
QString resourceSourcePath = QStringLiteral(":/android_testdata/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
while (it.hasNext()) {
@ -2140,7 +2140,7 @@ void tst_QDir::equalityOperator_data()
QString pathinroot(QDir::rootPath() + QLatin1String("assets/.."));
#elif defined (Q_OS_WIN)
QString pathinroot("c:/windows/..");
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#elif defined(Q_OS_ANDROID)
QString pathinroot("/system/..");
#elif defined(Q_OS_HAIKU)
QString pathinroot("/boot/..");

View File

@ -118,7 +118,7 @@ private:
void tst_QDirIterator::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QString testdata_dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
QString resourceSourcePath = QStringLiteral(":/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);

View File

@ -1199,7 +1199,7 @@ void tst_QFileInfo::fileTimes()
QEXPECT_FAIL("", "WinRT does not allow timestamp handling change in the filesystem due to sandboxing", Continue);
#elif defined(Q_OS_QNX)
QEXPECT_FAIL("", "QNX uses the noatime filesystem option", Continue);
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#elif defined(Q_OS_ANDROID)
if (fileInfo.lastRead() <= beforeRead)
QEXPECT_FAIL("", "Android may use relatime or noatime on mounts", Continue);
#endif
@ -1654,7 +1654,7 @@ void tst_QFileInfo::isWritable()
void tst_QFileInfo::isExecutable()
{
QString appPath = QCoreApplication::applicationDirPath();
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
appPath += "/libtst_qfileinfo.so";
#else
appPath += "/tst_qfileinfo";

View File

@ -87,7 +87,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX");
#endif // QT_NO_FILESYSTEMWATCHER
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
#endif
}

View File

@ -6,7 +6,7 @@ SOURCES = tst_qiodevice.cpp
TESTDATA += tst_qiodevice.cpp
MOC_DIR=tmp
android:!android-no-sdk: {
android {
RESOURCES += \
android_testdata.qrc
}

View File

@ -66,7 +66,7 @@ private:
void tst_QIODevice::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QVERIFY(QFileInfo(QStringLiteral("./tst_qiodevice.cpp")).exists()
|| QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp")));
#endif

View File

@ -70,7 +70,7 @@ public:
void tst_QLockFile::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QSKIP("This test requires deploying and running external console applications");
#elif defined(QT_NO_PROCESS)
QSKIP("This test requires QProcess support");

View File

@ -8,7 +8,7 @@ SOURCES += tst_qloggingregistry.cpp
OTHER_FILES += qtlogging.ini
TESTDATA += qtlogging.ini
android:!android-no-sdk: {
android {
RESOURCES += \
android_testdata.qrc
}

View File

@ -17,6 +17,6 @@ TESTDATA += \
testqrc/*
GENERATED_TESTDATA = $${runtime_resource.target}
android:!android-no-sdk {
android {
RESOURCES += android_testdata.qrc
}

View File

@ -36,7 +36,7 @@ class tst_QResourceEngine: public QObject
public:
tst_QResourceEngine()
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
: m_runtimeResourceRcc(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/runtime_resource.rcc")).absoluteFilePath())
#else
: m_runtimeResourceRcc(QFINDTESTDATA("runtime_resource.rcc"))
@ -63,7 +63,7 @@ private:
void tst_QResourceEngine::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QString sourcePath(QStringLiteral(":/android_testdata/"));
QString dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
@ -120,7 +120,7 @@ void tst_QResourceEngine::checkStructure_data()
<< QLatin1String("test")
<< QLatin1String("withoutslashes");
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
rootContents.insert(1, QLatin1String("android_testdata"));
#endif

View File

@ -230,7 +230,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
# if defined(Q_OS_ANDROID)
const char nonWritableDir[] = "/data";
# else
const char nonWritableDir[] = "/home";

View File

@ -5,6 +5,6 @@ SOURCES = tst_qtemporaryfile.cpp
TESTDATA += tst_qtemporaryfile.cpp
RESOURCES += qtemporaryfile.qrc
android:!android-no-sdk {
android {
RESOURCES += android_testdata.qrc
}

View File

@ -93,7 +93,7 @@ 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_NO_SDK)
#if defined(Q_OS_ANDROID)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
@ -290,7 +290,7 @@ void tst_QTemporaryFile::nonWritableCurrentDir()
ChdirOnReturn cor(QDir::currentPath());
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QDir::setCurrent("/data");
#else
QDir::setCurrent("/home");
@ -466,7 +466,7 @@ void tst_QTemporaryFile::renameFdLeak()
{
#ifdef Q_OS_UNIX
# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
# if defined(Q_OS_ANDROID)
ChdirOnReturn cor(QDir::currentPath());
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
# endif
@ -675,7 +675,7 @@ void tst_QTemporaryFile::createNativeFile_data()
QTest::addColumn<bool>("valid");
QTest::addColumn<QByteArray>("content");
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/resources/test.txt");
#else
const QString nativeFilePath = QFINDTESTDATA("resources/test.txt");

View File

@ -4,6 +4,6 @@ QT = core testlib
SOURCES = tst_qtranslator.cpp
RESOURCES += qtranslator.qrc
android:!android-no-sdk: RESOURCES += android_testdata.qrc
android: RESOURCES += android_testdata.qrc
else: TESTDATA += dependencies_la.qm hellotr_la.qm msgfmt_from_po.qm

View File

@ -64,7 +64,7 @@ tst_QTranslator::tst_QTranslator()
void tst_QTranslator::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {

View File

@ -10,7 +10,7 @@ mac {
LIBS += -framework Foundation
}
android: !android-no-sdk {
android {
RESOURCES += \
android_testdata.qrc
}

View File

@ -5,7 +5,7 @@ SOURCES = tst_qchar.cpp
TESTDATA += data/NormalizationTest.txt
android: !android-no-sdk {
android {
RESOURCES += \
testdata.qrc
}

View File

@ -165,7 +165,7 @@ void tst_QCollator::compare()
QCollator collator(locale);
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
if (collator.locale() != QLocale())
QSKIP("Posix implementation of collation only supports default locale");
#endif

View File

@ -504,7 +504,7 @@ void tst_QCommandLineParser::testVersionOption()
#ifdef Q_OS_WINCE
QSKIP("Reading and writing to a process is not supported on Qt/CE");
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@ -573,7 +573,7 @@ void tst_QCommandLineParser::testHelpOption()
#ifdef Q_OS_WINCE
QSKIP("Reading and writing to a process is not supported on Qt/CE");
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@ -620,7 +620,7 @@ void tst_QCommandLineParser::testQuoteEscaping()
{
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#elif defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#else
QCoreApplication app(empty_argc, empty_argv);

View File

@ -5,7 +5,7 @@ SOURCES = tst_qcryptographichash.cpp
TESTDATA += data/*
android: !android-no-sdk {
android {
RESOURCES += \
testdata.qrc
}

View File

@ -5,7 +5,7 @@ SOURCES = tst_qtextboundaryfinder.cpp
TESTDATA += data
android: !android-no-sdk {
android {
RESOURCES += \
testdata.qrc
}

View File

@ -5,6 +5,6 @@ SOURCES += tst_qimage.cpp
QT += core-private gui-private testlib
contains(QT_CONFIG, c++11): CONFIG += c++11
android:!android-no-sdk:RESOURCES+=qimage.qrc
android: RESOURCES+=qimage.qrc
TESTDATA += images/*

View File

@ -5,7 +5,7 @@ MOC_DIR=tmp
QT += core-private gui-private network testlib
RESOURCES += qimagereader.qrc
android: !android-no-sdk {
android {
RESOURCES += android_testdata.qrc
}

View File

@ -3,5 +3,5 @@ TARGET = tst_qimagewriter
QT += testlib
SOURCES += tst_qimagewriter.cpp
MOC_DIR=tmp
android:!android-no-sdk:RESOURCES+= qimagewriter.qrc
android: RESOURCES+= qimagewriter.qrc
TESTDATA += images/*

View File

@ -9,7 +9,7 @@ SOURCES += tst_qpainter.cpp
TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \
task217400.png
android: !android-no-sdk {
android {
RESOURCES += \
testdata.qrc
}

View File

@ -42,7 +42,7 @@ void tst_QProcess_and_GuiEventLoop::waitForAndEventLoop()
{
#if defined(QT_NO_PROCESS)
QSKIP("QProcess not supported");
#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#elif defined(Q_OS_ANDROID)
QSKIP("Not supported on Android");
#else

View File

@ -84,7 +84,7 @@ void tst_QSidebar::addUrls()
QAbstractItemModel *model = qsidebar.model();
QDir testDir = QDir::home();
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
// temp and home is the same directory on Android
testDir.mkdir(QStringLiteral("test"));
QVERIFY(testDir.cd(QStringLiteral("test")));

View File

@ -2675,7 +2675,7 @@ void tst_QGraphicsScene::render()
void tst_QGraphicsScene::renderItemsWithNegativeWidthOrHeight()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QSKIP("Test only works on platforms with resizable windows");
#endif
@ -2754,7 +2754,7 @@ protected:
void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QSKIP("Test fails on some Android devices (QTBUG-44430)");
#endif
@ -4027,7 +4027,7 @@ void tst_QGraphicsScene::polishItems2()
void tst_QGraphicsScene::isActive()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QSKIP("Fails on Android (QTBUG-44430)");
#endif

View File

@ -19,7 +19,7 @@ android|wince {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
android: !android-no-sdk {
android {
RESOURCES += \
testdata.qrc
}

View File

@ -111,7 +111,7 @@ void tst_QDirModel::getSetCheck()
void tst_QDirModel::initTestCase()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QString dataPath = SRCDIR;
QString resourceSourcePath = QStringLiteral(":/android_testdata");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
@ -613,7 +613,7 @@ void tst_QDirModel::task196768_sorting()
view.setSortingEnabled(true);
index2 = model.index(path);
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QEXPECT_FAIL("", "QTBUG-43818", Continue);
#endif

View File

@ -12,7 +12,7 @@ wince* {
TESTDATA += baseline/*
}
android: !android-no-sdk {
android {
RESOURCES += \
testdata.qrc
}

View File

@ -341,7 +341,7 @@ void tst_QLayout::adjustSizeShouldMakeSureLayoutIsActivated()
void tst_QLayout::testRetainSizeWhenHidden()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
#if defined(Q_OS_ANDROID)
QSKIP("Test does not work on platforms which default to showMaximized()");
#endif

View File

@ -9,7 +9,7 @@ wince* {
DEPLOYMENT += addPixmap
}
android: !android-no-sdk {
android {
RESOURCES += \
testdata.qrc
}