From 91f8c9cc70bbfb752811cd29945fb37ff863d524 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Fri, 18 Mar 2016 10:49:43 +0100 Subject: 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 Reviewed-by: Oswald Buddenhagen --- .../android/android_deployment_settings.prf | 2 +- .../android-g++/qeglfshooks_surfaceflinger.cpp | 156 ------------------ mkspecs/unsupported/android-g++/qmake.conf | 183 --------------------- mkspecs/unsupported/android-g++/qplatformdefs.h | 40 ----- src/corelib/global/qglobal.cpp | 12 +- src/corelib/io/io.pri | 2 +- src/corelib/kernel/kernel.pri | 2 +- src/corelib/kernel/qcoreapplication.cpp | 2 +- src/corelib/tools/qsimd_p.h | 2 +- src/gui/kernel/qguiapplication.cpp | 4 +- src/network/ssl/qsslsocket_openssl.cpp | 2 - src/network/ssl/qsslsocket_p.h | 2 +- src/network/ssl/ssl.pri | 2 +- src/plugins/bearer/bearer.pro | 2 +- src/plugins/platforms/eglfs/qeglfsintegration.cpp | 10 +- src/plugins/platforms/eglfs/qeglfswindow.cpp | 2 +- .../platforms/linuxfb/qlinuxfbintegration.cpp | 6 +- src/plugins/platforms/platforms.pro | 2 +- src/src.pro | 2 +- tests/auto/corelib/io/qdatastream/qdatastream.pro | 2 +- tests/auto/corelib/io/qdir/qdir.pro | 2 +- tests/auto/corelib/io/qdir/tst_qdir.cpp | 6 +- .../corelib/io/qdiriterator/tst_qdiriterator.cpp | 2 +- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 4 +- .../qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 2 +- tests/auto/corelib/io/qiodevice/qiodevice.pro | 2 +- tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp | 2 +- tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp | 2 +- .../io/qloggingregistry/qloggingregistry.pro | 2 +- .../corelib/io/qresourceengine/qresourceengine.pro | 2 +- .../io/qresourceengine/tst_qresourceengine.cpp | 6 +- .../corelib/io/qtemporarydir/tst_qtemporarydir.cpp | 2 +- .../corelib/io/qtemporaryfile/qtemporaryfile.pro | 2 +- .../io/qtemporaryfile/tst_qtemporaryfile.cpp | 8 +- .../corelib/kernel/qtranslator/qtranslator.pro | 2 +- .../corelib/kernel/qtranslator/tst_qtranslator.cpp | 2 +- tests/auto/corelib/tools/qbytearray/qbytearray.pro | 2 +- tests/auto/corelib/tools/qchar/qchar.pro | 2 +- .../auto/corelib/tools/qcollator/tst_qcollator.cpp | 2 +- .../qcommandlineparser/tst_qcommandlineparser.cpp | 6 +- .../qcryptographichash/qcryptographichash.pro | 2 +- .../qtextboundaryfinder/qtextboundaryfinder.pro | 2 +- tests/auto/gui/image/qimage/qimage.pro | 2 +- tests/auto/gui/image/qimagereader/qimagereader.pro | 2 +- tests/auto/gui/image/qimagewriter/qimagewriter.pro | 2 +- tests/auto/gui/painting/qpainter/qpainter.pro | 2 +- .../tst_qprocess_and_guieventloop.cpp | 2 +- .../auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp | 2 +- .../qgraphicsscene/tst_qgraphicsscene.cpp | 6 +- .../auto/widgets/itemviews/qdirmodel/qdirmodel.pro | 2 +- .../widgets/itemviews/qdirmodel/tst_qdirmodel.cpp | 4 +- tests/auto/widgets/kernel/qlayout/qlayout.pro | 2 +- tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp | 2 +- tests/auto/widgets/styles/qstyle/qstyle.pro | 2 +- 54 files changed, 74 insertions(+), 457 deletions(-) delete mode 100644 mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp delete mode 100644 mkspecs/unsupported/android-g++/qmake.conf delete mode 100644 mkspecs/unsupported/android-g++/qplatformdefs.h diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf index 54d887d088..ce5696a33c 100644 --- a/mkspecs/features/android/android_deployment_settings.prf +++ b/mkspecs/features/android/android_deployment_settings.prf @@ -1,4 +1,4 @@ -contains(TEMPLATE, ".*app"):!build_pass:!android-no-sdk { +contains(TEMPLATE, ".*app"):!build_pass: { defineReplace(emitString) { return("\"$$replace(1, \\\\, \\\\)\"") diff --git a/mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp b/mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp deleted file mode 100644 index 3978bbc9e2..0000000000 --- a/mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp +++ /dev/null @@ -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 -#include -#include -#include -#include -#include - -#if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1) -#include -#else -#include -#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 mSession; - sp mControl; - sp mAndroidSurface; - - sp 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(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 diff --git a/mkspecs/unsupported/android-g++/qmake.conf b/mkspecs/unsupported/android-g++/qmake.conf deleted file mode 100644 index e52137d7c5..0000000000 --- a/mkspecs/unsupported/android-g++/qmake.conf +++ /dev/null @@ -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 - diff --git a/mkspecs/unsupported/android-g++/qplatformdefs.h b/mkspecs/unsupported/android-g++/qplatformdefs.h deleted file mode 100644 index 93757a8e17..0000000000 --- a/mkspecs/unsupported/android-g++/qplatformdefs.h +++ /dev/null @@ -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" diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index def7ecdeee..bf6db53040 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -79,7 +79,7 @@ # include #endif -#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK) +#if defined(Q_OS_ANDROID) #include #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 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 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("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(); diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index f53dc53f85..06674e9a3f 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -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 diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri index adcc9c5581..8c16e10c27 100644 --- a/src/corelib/kernel/kernel.pri +++ b/src/corelib/kernel/kernel.pri @@ -194,7 +194,7 @@ qqnx_pps { kernel/qppsobjectprivate_p.h } -android:!android-no-sdk { +android { SOURCES += \ kernel/qjnionload.cpp \ kernel/qjnihelpers.cpp \ diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 6ccc7b729b..879e218e09 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -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//exe symlink first which points to // the absolute path of the executable QFileInfo pfi(QString::fromLatin1("/proc/%1/exe").arg(getpid())); diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 1a795a670d..a4fe8e67f8 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -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 diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 31b30c6e5a..ec1e771b90 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -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); diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index b86b69cad4..b092dde0c9 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -729,14 +729,12 @@ QList QSslSocketPrivate::systemCaCertificates() directories << ministroPath; nameFilters << QLatin1String("*.der"); platformEncodingFormat = QSsl::Der; -# ifndef Q_OS_ANDROID_NO_SDK if (ministroPath.isEmpty()) { QList 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); diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h index 018da2ffdb..5d4d52cd6d 100644 --- a/src/network/ssl/qsslsocket_p.h +++ b/src/network/ssl/qsslsocket_p.h @@ -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 fetchSslCertificateData(); #endif diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri index 2173bf6ccc..c70664ef9b 100644 --- a/src/network/ssl/ssl.pri +++ b/src/network/ssl/ssl.pri @@ -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: diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro index 61e6f46ebc..cc590cc545 100644 --- a/src/plugins/bearer/bearer.pro +++ b/src/plugins/bearer/bearer.pro @@ -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 diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp index 88b4692c80..29e3c5e560 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp @@ -74,13 +74,13 @@ #include #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 #include #include #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 #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(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 diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp index 2c386e2aea..556d3942cd 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp @@ -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."); diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp index 2b361a1a0f..685f231756 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp @@ -56,13 +56,13 @@ #include #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 #include #include #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 #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 diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro index eba16f90ed..cb3764f5df 100644 --- a/src/plugins/platforms/platforms.pro +++ b/src/plugins/platforms/platforms.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -android:!android-no-sdk: SUBDIRS += android +android: SUBDIRS += android SUBDIRS += minimal diff --git a/src/src.pro b/src/src.pro index 167133859b..4a165a2dab 100644 --- a/src/src.pro +++ b/src/src.pro @@ -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 \ diff --git a/tests/auto/corelib/io/qdatastream/qdatastream.pro b/tests/auto/corelib/io/qdatastream/qdatastream.pro index 961e1933de..291b3eb611 100644 --- a/tests/auto/corelib/io/qdatastream/qdatastream.pro +++ b/tests/auto/corelib/io/qdatastream/qdatastream.pro @@ -5,7 +5,7 @@ SOURCES = tst_qdatastream.cpp TESTDATA += datastream.q42 -android: !android-no-sdk { +android { RESOURCES += \ testdata.qrc } diff --git a/tests/auto/corelib/io/qdir/qdir.pro b/tests/auto/corelib/io/qdir/qdir.pro index e8f5d1079a..e5739f7e0a 100644 --- a/tests/auto/corelib/io/qdir/qdir.pro +++ b/tests/auto/corelib/io/qdir/qdir.pro @@ -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 } diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index 5046f5abf4..703e9c5b07 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -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/.."); diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp index 9727ccb407..0fbce74055 100644 --- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp @@ -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); diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index 4362bace8c..8d62a38e6b 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -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"; diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 5c9de8abb9..187f72d095 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -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 } diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro index 78f5b5e75d..945022a289 100644 --- a/tests/auto/corelib/io/qiodevice/qiodevice.pro +++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro @@ -6,7 +6,7 @@ SOURCES = tst_qiodevice.cpp TESTDATA += tst_qiodevice.cpp MOC_DIR=tmp -android:!android-no-sdk: { +android { RESOURCES += \ android_testdata.qrc } diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp index 8d5a4055b8..30eaa5aab9 100644 --- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp @@ -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 diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp index 851c104c6a..00b82cb377 100644 --- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp +++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp @@ -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"); diff --git a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro index a311173c0e..321420c2df 100644 --- a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro +++ b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro @@ -8,7 +8,7 @@ SOURCES += tst_qloggingregistry.cpp OTHER_FILES += qtlogging.ini TESTDATA += qtlogging.ini -android:!android-no-sdk: { +android { RESOURCES += \ android_testdata.qrc } diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro index e8b82b4df7..a39de3c4d5 100644 --- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro +++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro @@ -17,6 +17,6 @@ TESTDATA += \ testqrc/* GENERATED_TESTDATA = $${runtime_resource.target} -android:!android-no-sdk { +android { RESOURCES += android_testdata.qrc } diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp index 5c51e69add..561ab193c6 100644 --- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp @@ -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 diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp index 410f512a77..72a57c5905 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -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"; diff --git a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro index 8f250e4568..a89e5c66ff 100644 --- a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro +++ b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro @@ -5,6 +5,6 @@ SOURCES = tst_qtemporaryfile.cpp TESTDATA += tst_qtemporaryfile.cpp RESOURCES += qtemporaryfile.qrc -android:!android-no-sdk { +android { RESOURCES += android_testdata.qrc } diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index 53c64166c4..9645ca9ba2 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -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("valid"); QTest::addColumn("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"); diff --git a/tests/auto/corelib/kernel/qtranslator/qtranslator.pro b/tests/auto/corelib/kernel/qtranslator/qtranslator.pro index 63189e5562..e673278920 100644 --- a/tests/auto/corelib/kernel/qtranslator/qtranslator.pro +++ b/tests/auto/corelib/kernel/qtranslator/qtranslator.pro @@ -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 diff --git a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp index 59ea484355..66971af7b4 100644 --- a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp +++ b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp @@ -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()) { diff --git a/tests/auto/corelib/tools/qbytearray/qbytearray.pro b/tests/auto/corelib/tools/qbytearray/qbytearray.pro index a4501611d6..f59cdf3524 100644 --- a/tests/auto/corelib/tools/qbytearray/qbytearray.pro +++ b/tests/auto/corelib/tools/qbytearray/qbytearray.pro @@ -10,7 +10,7 @@ mac { LIBS += -framework Foundation } -android: !android-no-sdk { +android { RESOURCES += \ android_testdata.qrc } diff --git a/tests/auto/corelib/tools/qchar/qchar.pro b/tests/auto/corelib/tools/qchar/qchar.pro index 771e4290b8..012e591298 100644 --- a/tests/auto/corelib/tools/qchar/qchar.pro +++ b/tests/auto/corelib/tools/qchar/qchar.pro @@ -5,7 +5,7 @@ SOURCES = tst_qchar.cpp TESTDATA += data/NormalizationTest.txt -android: !android-no-sdk { +android { RESOURCES += \ testdata.qrc } diff --git a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp index f2f1038dc2..d09910fd5c 100644 --- a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp +++ b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp @@ -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 diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp index f3f335cb92..9552152136 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp @@ -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); diff --git a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro index 15a57c692e..7fead5938b 100644 --- a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro +++ b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro @@ -5,7 +5,7 @@ SOURCES = tst_qcryptographichash.cpp TESTDATA += data/* -android: !android-no-sdk { +android { RESOURCES += \ testdata.qrc } diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro b/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro index 9d26ec1fd5..8e0216b175 100644 --- a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro +++ b/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro @@ -5,7 +5,7 @@ SOURCES = tst_qtextboundaryfinder.cpp TESTDATA += data -android: !android-no-sdk { +android { RESOURCES += \ testdata.qrc } diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro index d32e84c0d7..36d64a275f 100644 --- a/tests/auto/gui/image/qimage/qimage.pro +++ b/tests/auto/gui/image/qimage/qimage.pro @@ -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/* diff --git a/tests/auto/gui/image/qimagereader/qimagereader.pro b/tests/auto/gui/image/qimagereader/qimagereader.pro index 2ab06abe83..3d35bf59da 100644 --- a/tests/auto/gui/image/qimagereader/qimagereader.pro +++ b/tests/auto/gui/image/qimagereader/qimagereader.pro @@ -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 } diff --git a/tests/auto/gui/image/qimagewriter/qimagewriter.pro b/tests/auto/gui/image/qimagewriter/qimagewriter.pro index 31184bffdb..34adedd187 100644 --- a/tests/auto/gui/image/qimagewriter/qimagewriter.pro +++ b/tests/auto/gui/image/qimagewriter/qimagewriter.pro @@ -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/* diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro index d4f1d43a74..0d3899ee92 100644 --- a/tests/auto/gui/painting/qpainter/qpainter.pro +++ b/tests/auto/gui/painting/qpainter/qpainter.pro @@ -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 } diff --git a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp index 4b4e456882..1fcb77c51b 100644 --- a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp +++ b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp @@ -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 diff --git a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp index 5ee015ac64..78d0372ac0 100644 --- a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp +++ b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp @@ -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"))); diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp index 0ae69ea59f..a346bb9d1f 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp @@ -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 diff --git a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro index f1bc968b88..5190598701 100644 --- a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro +++ b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro @@ -19,7 +19,7 @@ android|wince { DEFINES += SRCDIR=\\\"$$PWD/\\\" } -android: !android-no-sdk { +android { RESOURCES += \ testdata.qrc } diff --git a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp index e3a2d3cc99..06019d4555 100644 --- a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp +++ b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp @@ -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 diff --git a/tests/auto/widgets/kernel/qlayout/qlayout.pro b/tests/auto/widgets/kernel/qlayout/qlayout.pro index 8bdbde9282..2213767950 100644 --- a/tests/auto/widgets/kernel/qlayout/qlayout.pro +++ b/tests/auto/widgets/kernel/qlayout/qlayout.pro @@ -12,7 +12,7 @@ wince* { TESTDATA += baseline/* } -android: !android-no-sdk { +android { RESOURCES += \ testdata.qrc } diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp index d687c646ff..47fc002196 100644 --- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp +++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp @@ -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 diff --git a/tests/auto/widgets/styles/qstyle/qstyle.pro b/tests/auto/widgets/styles/qstyle/qstyle.pro index 4d7473f068..50445b9a45 100644 --- a/tests/auto/widgets/styles/qstyle/qstyle.pro +++ b/tests/auto/widgets/styles/qstyle/qstyle.pro @@ -9,7 +9,7 @@ wince* { DEPLOYMENT += addPixmap } -android: !android-no-sdk { +android { RESOURCES += \ testdata.qrc } -- cgit v1.2.3