Merge remote-tracking branch 'origin/5.3' into dev
Conflicts: config.tests/arch/arch.cpp src/opengl/qgl_qpa.cpp src/widgets/kernel/qapplication.cpp Change-Id: I80b442a4c2c9632743a5b5c7319ff201ec5bc4fd
This commit is contained in:
commit
0936bc54f9
@ -74,6 +74,19 @@ else: ANDROID_ARCHITECTURE = arm
|
|||||||
NDK_TOOLCHAIN = $$NDK_TOOLCHAIN_PREFIX-$$NDK_TOOLCHAIN_VERSION
|
NDK_TOOLCHAIN = $$NDK_TOOLCHAIN_PREFIX-$$NDK_TOOLCHAIN_VERSION
|
||||||
NDK_TOOLCHAIN_PATH = $$NDK_ROOT/toolchains/$$NDK_TOOLCHAIN/prebuilt/$$NDK_HOST
|
NDK_TOOLCHAIN_PATH = $$NDK_ROOT/toolchains/$$NDK_TOOLCHAIN/prebuilt/$$NDK_HOST
|
||||||
|
|
||||||
|
|
||||||
|
ANDROID_SDK_ROOT = $$(ANDROID_SDK_ROOT)
|
||||||
|
isEmpty(ANDROID_SDK_ROOT): ANDROID_SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
|
||||||
|
|
||||||
|
ANDROID_SDK_BUILD_TOOLS_REVISION = $$(ANDROID_BUILD_TOOLS_REVISION)
|
||||||
|
isEmpty(ANDROID_SDK_BUILD_TOOLS_REVISION) {
|
||||||
|
SDK_BUILD_TOOLS_REVISIONS = $$files($$ANDROID_SDK_ROOT/build-tools/*)
|
||||||
|
for (REVISION, SDK_BUILD_TOOLS_REVISIONS) {
|
||||||
|
BASENAME = $$basename(REVISION)
|
||||||
|
greaterThan(BASENAME, $$ANDROID_SDK_BUILD_TOOLS_REVISION): ANDROID_SDK_BUILD_TOOLS_REVISION = $$BASENAME
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CONFIG += $$ANDROID_PLATFORM
|
CONFIG += $$ANDROID_PLATFORM
|
||||||
ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/
|
ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/
|
||||||
ANDROID_PLATFORM_PATH = $$ANDROID_PLATFORM_ROOT_PATH/usr
|
ANDROID_PLATFORM_PATH = $$ANDROID_PLATFORM_ROOT_PATH/usr
|
||||||
|
@ -10,9 +10,8 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-no-sdk {
|
|||||||
FILE_CONTENT += " \"qt\": $$emitString($$[QT_INSTALL_PREFIX]),"
|
FILE_CONTENT += " \"qt\": $$emitString($$[QT_INSTALL_PREFIX]),"
|
||||||
|
|
||||||
# Settings from mkspecs/environment
|
# Settings from mkspecs/environment
|
||||||
isEmpty(SDK_ROOT): SDK_ROOT = $$(ANDROID_SDK_ROOT)
|
FILE_CONTENT += " \"sdk\": $$emitString($$ANDROID_SDK_ROOT),"
|
||||||
isEmpty(SDK_ROOT): SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
|
FILE_CONTENT += " \"sdkBuildToolsRevision\": $$emitString($$ANDROID_SDK_BUILD_TOOLS_REVISION),"
|
||||||
FILE_CONTENT += " \"sdk\": $$emitString($$SDK_ROOT),"
|
|
||||||
|
|
||||||
isEmpty(NDK_ROOT): NDK_ROOT = $$(ANDROID_NDK_ROOT)
|
isEmpty(NDK_ROOT): NDK_ROOT = $$(ANDROID_NDK_ROOT)
|
||||||
isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
|
isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
|
||||||
|
@ -5,7 +5,9 @@ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
|
|||||||
exists($$DEVICE_PRI):include($$DEVICE_PRI)
|
exists($$DEVICE_PRI):include($$DEVICE_PRI)
|
||||||
unset(DEVICE_PRI)
|
unset(DEVICE_PRI)
|
||||||
|
|
||||||
isEmpty(CROSS_COMPILE) {
|
host_build {
|
||||||
|
CROSS_COMPILE =
|
||||||
|
} else: isEmpty(CROSS_COMPILE) {
|
||||||
#this variable can be persisted via qmake -set CROSS_COMPILE /foo
|
#this variable can be persisted via qmake -set CROSS_COMPILE /foo
|
||||||
CROSS_COMPILE = $$[CROSS_COMPILE]
|
CROSS_COMPILE = $$[CROSS_COMPILE]
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,10 @@
|
|||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
android {
|
android {
|
||||||
isEmpty(SDK_ROOT): SDK_ROOT = $$(ANDROID_SDK_ROOT)
|
|
||||||
isEmpty(SDK_ROOT): SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
|
|
||||||
|
|
||||||
API_VERSION_TO_USE = $$(ANDROID_API_VERSION)
|
API_VERSION_TO_USE = $$(ANDROID_API_VERSION)
|
||||||
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
|
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
|
||||||
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-10
|
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-10
|
||||||
|
|
||||||
isEmpty(BUILD_TOOLS_REVISION) {
|
ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
|
||||||
BUILD_TOOLS_REVISION = $$(ANDROID_BUILD_TOOLS_REVISION)
|
|
||||||
isEmpty(BUILD_TOOLS_REVISION) {
|
|
||||||
BUILD_TOOLS_REVISIONS = $$files($$SDK_ROOT/build-tools/*)
|
|
||||||
for (REVISION, BUILD_TOOLS_REVISIONS) {
|
|
||||||
BASENAME = $$basename(REVISION)
|
|
||||||
greaterThan(BASENAME, $$BUILD_TOOLS_REVISION): BUILD_TOOLS_REVISION = $$BASENAME
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ANDROID_JAR_FILE = $$SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
|
|
||||||
!exists($$ANDROID_JAR_FILE) {
|
!exists($$ANDROID_JAR_FILE) {
|
||||||
error("The Path $$ANDROID_JAR_FILE does not exist. Make sure the ANDROID_SDK_ROOT and ANDROID_API_VERSION environment variables are correctly set.")
|
error("The Path $$ANDROID_JAR_FILE does not exist. Make sure the ANDROID_SDK_ROOT and ANDROID_API_VERSION environment variables are correctly set.")
|
||||||
}
|
}
|
||||||
@ -69,12 +55,12 @@ android:!bundled_jar_file {
|
|||||||
# of the base sdk folder.
|
# of the base sdk folder.
|
||||||
# Doing it this way makes this logic more similar to the other platforms and
|
# Doing it this way makes this logic more similar to the other platforms and
|
||||||
# also means that our dx.bat is more like Google's dx.bat
|
# also means that our dx.bat is more like Google's dx.bat
|
||||||
DEX_BAT = $$SDK_ROOT/platform-tools/dx.bat
|
DEX_BAT = $$ANDROID_SDK_ROOT/platform-tools/dx.bat
|
||||||
!exists($$DEX_BAT): DEX_BAT = $$SDK_ROOT/build-tools/$$BUILD_TOOLS_REVISION/dx.bat
|
!exists($$DEX_BAT): DEX_BAT = $$ANDROID_SDK_ROOT/build-tools/$$ANDROID_SDK_BUILD_TOOLS_REVISION/dx.bat
|
||||||
DEX_CMD = $$PWD/data/android/dx $$DEX_BAT
|
DEX_CMD = $$PWD/data/android/dx $$DEX_BAT
|
||||||
} else {
|
} else {
|
||||||
DEX_CMD = $$SDK_ROOT/platform-tools/dx
|
DEX_CMD = $$ANDROID_SDK_ROOT/platform-tools/dx
|
||||||
!exists($$DEX_CMD): DEX_CMD = $$SDK_ROOT/build-tools/$$BUILD_TOOLS_REVISION/dx
|
!exists($$DEX_CMD): DEX_CMD = $$ANDROID_SDK_ROOT/build-tools/$$ANDROID_SDK_BUILD_TOOLS_REVISION/dx
|
||||||
!exists($$DEX_CMD): error("The path $$DEX_CMD does not exist. Please set the environment variable ANDROID_BUILD_TOOLS_REVISION to the revision of the build tools installed in your Android SDK.")
|
!exists($$DEX_CMD): error("The path $$DEX_CMD does not exist. Please set the environment variable ANDROID_BUILD_TOOLS_REVISION to the revision of the build tools installed in your Android SDK.")
|
||||||
}
|
}
|
||||||
QMAKE_LINK_SHLIB_CMD = $$DEX_CMD --dex --output $(TARGET) $$CLASS_DIR
|
QMAKE_LINK_SHLIB_CMD = $$DEX_CMD --dex --output $(TARGET) $$CLASS_DIR
|
||||||
|
@ -13,16 +13,11 @@
|
|||||||
*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef
|
*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef
|
||||||
|
|
||||||
# Other nice flags
|
# Other nice flags
|
||||||
*-g++*: QMAKE_CXXFLAGS += -Wnon-virtual-dtor -ansi -Wcast-align -Wchar-subscripts -Wpointer-arith -Wformat-security
|
*-g++*: QMAKE_CXXFLAGS += -Wnon-virtual-dtor -ansi -Wchar-subscripts -Wpointer-arith -Wformat-security
|
||||||
|
|
||||||
# Enable pedantic mode, but accept variadic macros and 'long long' usage.
|
# Enable pedantic mode, but accept variadic macros and 'long long' usage.
|
||||||
*-g++*: QMAKE_CXXFLAGS += -Wno-long-long -Wno-variadic-macros -pedantic-errors
|
*-g++*: QMAKE_CXXFLAGS += -Wno-long-long -Wno-variadic-macros -pedantic-errors
|
||||||
|
|
||||||
contains(QT_ARCH,arm)|contains(QT_ARCH,mips) {
|
|
||||||
# There are outstanding alignment issues in some container classes.
|
|
||||||
*-g++*:QMAKE_CXXFLAGS -= -Wcast-align
|
|
||||||
}
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += -DQT_NO_CAST_TO_ASCII \
|
QMAKE_CXXFLAGS += -DQT_NO_CAST_TO_ASCII \
|
||||||
-DQT_NO_CAST_FROM_ASCII \
|
-DQT_NO_CAST_FROM_ASCII \
|
||||||
-DQT_STRICT_ITERATORS \
|
-DQT_STRICT_ITERATORS \
|
||||||
|
@ -110,13 +110,19 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
|
|||||||
template <int size> template <typename T> inline
|
template <int size> template <typename T> inline
|
||||||
void QBasicAtomicOps<size>::acquireMemoryFence(const T &) Q_DECL_NOTHROW
|
void QBasicAtomicOps<size>::acquireMemoryFence(const T &) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
asm volatile ("sync 0x11" ::: "memory");
|
asm volatile (".set push\n"
|
||||||
|
".set mips32\n"
|
||||||
|
"sync 0x11\n"
|
||||||
|
".set pop\n" ::: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int size> template <typename T> inline
|
template <int size> template <typename T> inline
|
||||||
void QBasicAtomicOps<size>::releaseMemoryFence(const T &) Q_DECL_NOTHROW
|
void QBasicAtomicOps<size>::releaseMemoryFence(const T &) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
asm volatile ("sync 0x12" ::: "memory");
|
asm volatile (".set push\n"
|
||||||
|
".set mips32\n"
|
||||||
|
"sync 0x11\n"
|
||||||
|
".set pop\n" ::: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int size> template <typename T> inline
|
template <int size> template <typename T> inline
|
||||||
|
@ -73,6 +73,8 @@
|
|||||||
# define ARCH_PROCESSOR "s390"
|
# define ARCH_PROCESSOR "s390"
|
||||||
#elif defined(Q_PROCESSOR_SH)
|
#elif defined(Q_PROCESSOR_SH)
|
||||||
# define ARCH_PROCESSOR "sh"
|
# define ARCH_PROCESSOR "sh"
|
||||||
|
#elif defined(Q_PROCESSORS_SPARC_64)
|
||||||
|
# define ARCH_PROCESSOR "sparc64"
|
||||||
#elif defined(Q_PROCESSOR_SPARC_V9)
|
#elif defined(Q_PROCESSOR_SPARC_V9)
|
||||||
# define ARCH_PROCESSOR "sparcv9"
|
# define ARCH_PROCESSOR "sparcv9"
|
||||||
#elif defined(Q_PROCESSOR_SPARC)
|
#elif defined(Q_PROCESSOR_SPARC)
|
||||||
|
@ -68,8 +68,17 @@ enum GuardValues {
|
|||||||
// until the constructor returns ...
|
// until the constructor returns ...
|
||||||
// We better avoid these kind of problems by using our own locked implementation.
|
// We better avoid these kind of problems by using our own locked implementation.
|
||||||
|
|
||||||
|
#if defined(Q_OS_UNIX) && defined(Q_CC_INTEL)
|
||||||
|
// Work around Intel issue ID 6000058488:
|
||||||
|
// local statics inside an inline function inside an anonymous namespace are global
|
||||||
|
// symbols (this affects the IA-64 C++ ABI, so OS X and Linux only)
|
||||||
|
# define Q_GLOBAL_STATIC_INTERNAL_DECORATION Q_DECL_HIDDEN
|
||||||
|
#else
|
||||||
|
# define Q_GLOBAL_STATIC_INTERNAL_DECORATION Q_DECL_HIDDEN inline
|
||||||
|
#endif
|
||||||
|
|
||||||
#define Q_GLOBAL_STATIC_INTERNAL(ARGS) \
|
#define Q_GLOBAL_STATIC_INTERNAL(ARGS) \
|
||||||
Q_DECL_HIDDEN inline Type *innerFunction() \
|
Q_GLOBAL_STATIC_INTERNAL_DECORATION Type *innerFunction() \
|
||||||
{ \
|
{ \
|
||||||
struct HolderBase { \
|
struct HolderBase { \
|
||||||
~HolderBase() Q_DECL_NOTHROW \
|
~HolderBase() Q_DECL_NOTHROW \
|
||||||
|
@ -294,12 +294,15 @@
|
|||||||
SPARC is big-endian only prior to V9, while V9 is bi-endian with big-endian
|
SPARC is big-endian only prior to V9, while V9 is bi-endian with big-endian
|
||||||
as the default byte order. Assume all SPARC systems are big-endian.
|
as the default byte order. Assume all SPARC systems are big-endian.
|
||||||
*/
|
*/
|
||||||
// #elif defined(__sparc__)
|
#elif defined(__sparc__)
|
||||||
// # define Q_PROCESSOR_SPARC
|
# define Q_PROCESSOR_SPARC
|
||||||
// # if defined(__sparc_v9__)
|
# if defined(__sparc_v9__)
|
||||||
// # define Q_PROCESSOR_SPARC_V9
|
# define Q_PROCESSOR_SPARC_V9
|
||||||
// # endif
|
# endif
|
||||||
// # define Q_BYTE_ORDER Q_BIG_ENDIAN
|
# if defined(__sparc64__)
|
||||||
|
# define Q_PROCESSOR_SPARC_64
|
||||||
|
# endif
|
||||||
|
# define Q_BYTE_ORDER Q_BIG_ENDIAN
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -96,6 +96,10 @@
|
|||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_LIBRARY
|
||||||
|
#include <QtCore/QLibrary>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
# include "private/qcore_mac_p.h"
|
# include "private/qcore_mac_p.h"
|
||||||
#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||||
@ -1209,6 +1213,7 @@ void QGuiApplicationPrivate::init()
|
|||||||
QCoreApplicationPrivate::is_app_running = false; // Starting up.
|
QCoreApplicationPrivate::is_app_running = false; // Starting up.
|
||||||
|
|
||||||
bool doGrabUnderDebugger = false;
|
bool doGrabUnderDebugger = false;
|
||||||
|
bool loadTestability = false;
|
||||||
QList<QByteArray> pluginList;
|
QList<QByteArray> pluginList;
|
||||||
// Get command line params
|
// Get command line params
|
||||||
#ifndef QT_NO_SESSIONMANAGER
|
#ifndef QT_NO_SESSIONMANAGER
|
||||||
@ -1259,6 +1264,8 @@ void QGuiApplicationPrivate::init()
|
|||||||
is_session_restored = true;
|
is_session_restored = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
} else if (arg == "-testability") {
|
||||||
|
loadTestability = true;
|
||||||
} else {
|
} else {
|
||||||
argv[j++] = argv[i];
|
argv[j++] = argv[i];
|
||||||
}
|
}
|
||||||
@ -1319,6 +1326,22 @@ void QGuiApplicationPrivate::init()
|
|||||||
session_manager = new QSessionManager(q, session_id, session_key);
|
session_manager = new QSessionManager(q, session_id, session_key);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_LIBRARY
|
||||||
|
if (loadTestability) {
|
||||||
|
QLibrary testLib(QStringLiteral("qttestability"));
|
||||||
|
if (testLib.load()) {
|
||||||
|
typedef void (*TasInitialize)(void);
|
||||||
|
TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
|
||||||
|
if (initFunction) {
|
||||||
|
initFunction();
|
||||||
|
} else {
|
||||||
|
qCritical() << "Library qttestability resolve failed!";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
qCritical() << "Library qttestability load failed:" << testLib.errorString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // QT_NO_LIBRARY
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void qt_cleanupFontDatabase();
|
extern void qt_cleanupFontDatabase();
|
||||||
@ -1792,7 +1815,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
|
|||||||
}
|
}
|
||||||
if (doubleClick) {
|
if (doubleClick) {
|
||||||
mousePressButton = Qt::NoButton;
|
mousePressButton = Qt::NoButton;
|
||||||
if (!e->window.isNull()) { // QTBUG-36364, check if window closed in response to press
|
if (!e->window.isNull() || e->nullWindow) { // QTBUG-36364, check if window closed in response to press
|
||||||
const QEvent::Type doubleClickType = frameStrut ? QEvent::NonClientAreaMouseButtonDblClick : QEvent::MouseButtonDblClick;
|
const QEvent::Type doubleClickType = frameStrut ? QEvent::NonClientAreaMouseButtonDblClick : QEvent::MouseButtonDblClick;
|
||||||
QMouseEvent dblClickEvent(doubleClickType, localPoint, localPoint, globalPoint,
|
QMouseEvent dblClickEvent(doubleClickType, localPoint, localPoint, globalPoint,
|
||||||
button, buttons, e->modifiers);
|
button, buttons, e->modifiers);
|
||||||
|
@ -147,7 +147,7 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl,
|
|||||||
|
|
||||||
while (h--) {
|
while (h--) {
|
||||||
const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl);
|
const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl);
|
||||||
int srcx = basex;
|
quint32 srcx = basex;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
for (; x<w-7; x+=8) {
|
for (; x<w-7; x+=8) {
|
||||||
blender.write(&dst[x], src[srcx >> 16]); srcx += ix;
|
blender.write(&dst[x], src[srcx >> 16]); srcx += ix;
|
||||||
@ -258,7 +258,7 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl,
|
|||||||
|
|
||||||
while (h--) {
|
while (h--) {
|
||||||
const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl);
|
const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl);
|
||||||
int srcx = basex;
|
quint32 srcx = basex;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
for (; x<w; ++x) {
|
for (; x<w; ++x) {
|
||||||
blender.write(&dst[x], src[srcx >> 16]);
|
blender.write(&dst[x], src[srcx >> 16]);
|
||||||
|
@ -467,6 +467,7 @@ QGLFormat QGLFormat::fromSurfaceFormat(const QSurfaceFormat &format)
|
|||||||
retFormat.setStencil(true);
|
retFormat.setStencil(true);
|
||||||
retFormat.setStencilBufferSize(format.stencilBufferSize());
|
retFormat.setStencilBufferSize(format.stencilBufferSize());
|
||||||
}
|
}
|
||||||
|
retFormat.setSwapInterval(format.swapInterval());
|
||||||
retFormat.setDoubleBuffer(format.swapBehavior() != QSurfaceFormat::SingleBuffer);
|
retFormat.setDoubleBuffer(format.swapBehavior() != QSurfaceFormat::SingleBuffer);
|
||||||
retFormat.setStereo(format.stereo());
|
retFormat.setStereo(format.stereo());
|
||||||
retFormat.setVersion(format.majorVersion(), format.minorVersion());
|
retFormat.setVersion(format.majorVersion(), format.minorVersion());
|
||||||
@ -495,6 +496,7 @@ QSurfaceFormat QGLFormat::toSurfaceFormat(const QGLFormat &format)
|
|||||||
retFormat.setSamples(format.samples() == -1 ? 4 : format.samples());
|
retFormat.setSamples(format.samples() == -1 ? 4 : format.samples());
|
||||||
if (format.stencil())
|
if (format.stencil())
|
||||||
retFormat.setStencilBufferSize(format.stencilBufferSize() == -1 ? 1 : format.stencilBufferSize());
|
retFormat.setStencilBufferSize(format.stencilBufferSize() == -1 ? 1 : format.stencilBufferSize());
|
||||||
|
retFormat.setSwapInterval(format.swapInterval());
|
||||||
retFormat.setStereo(format.stereo());
|
retFormat.setStereo(format.stereo());
|
||||||
retFormat.setMajorVersion(format.majorVersion());
|
retFormat.setMajorVersion(format.majorVersion());
|
||||||
retFormat.setMinorVersion(format.minorVersion());
|
retFormat.setMinorVersion(format.minorVersion());
|
||||||
|
@ -245,9 +245,19 @@ void QCoreTextFontDatabase::populateFromDescriptor(CTFontDescriptorRef font)
|
|||||||
if (styles) {
|
if (styles) {
|
||||||
if (CFNumberRef weightValue = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontWeightTrait)) {
|
if (CFNumberRef weightValue = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontWeightTrait)) {
|
||||||
Q_ASSERT(CFNumberIsFloatType(weightValue));
|
Q_ASSERT(CFNumberIsFloatType(weightValue));
|
||||||
double d;
|
double normalizedWeight;
|
||||||
if (CFNumberGetValue(weightValue, kCFNumberDoubleType, &d))
|
if (CFNumberGetValue(weightValue, kCFNumberDoubleType, &normalizedWeight)) {
|
||||||
weight = (d > 0.0) ? QFont::Bold : QFont::Normal;
|
if (normalizedWeight >= 0.62)
|
||||||
|
weight = QFont::Black;
|
||||||
|
else if (normalizedWeight >= 0.4)
|
||||||
|
weight = QFont::Bold;
|
||||||
|
else if (normalizedWeight >= 0.3)
|
||||||
|
weight = QFont::DemiBold;
|
||||||
|
else if (normalizedWeight == 0.0)
|
||||||
|
weight = QFont::Normal;
|
||||||
|
else if (normalizedWeight <= -0.4)
|
||||||
|
weight = QFont::Light;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (CFNumberRef italic = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontSlantTrait)) {
|
if (CFNumberRef italic = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontSlantTrait)) {
|
||||||
Q_ASSERT(CFNumberIsFloatType(italic));
|
Q_ASSERT(CFNumberIsFloatType(italic));
|
||||||
|
@ -639,6 +639,7 @@ const QEvdevKeyboardMap::Mapping QEvdevKeyboardHandler::s_keymap_default[] = {
|
|||||||
{ KEY_MUTE, 0xffff, Qt::Key_VolumeMute, 0x00, 0x00, 0x0000 },
|
{ KEY_MUTE, 0xffff, Qt::Key_VolumeMute, 0x00, 0x00, 0x0000 },
|
||||||
{ KEY_VOLUMEDOWN, 0xffff, Qt::Key_VolumeDown, 0x00, 0x00, 0x0000 },
|
{ KEY_VOLUMEDOWN, 0xffff, Qt::Key_VolumeDown, 0x00, 0x00, 0x0000 },
|
||||||
{ KEY_VOLUMEUP, 0xffff, Qt::Key_VolumeUp, 0x00, 0x00, 0x0000 },
|
{ KEY_VOLUMEUP, 0xffff, Qt::Key_VolumeUp, 0x00, 0x00, 0x0000 },
|
||||||
|
{ KEY_POWER, 0xffff, Qt::Key_PowerOff, 0x00, 0x00, 0x0000 },
|
||||||
{ KEY_PAUSE, 0xffff, Qt::Key_Pause, 0x00, 0x00, 0x0000 },
|
{ KEY_PAUSE, 0xffff, Qt::Key_Pause, 0x00, 0x00, 0x0000 },
|
||||||
{ KEY_STOP, 0xffff, Qt::Key_Stop, 0x00, 0x00, 0x0000 },
|
{ KEY_STOP, 0xffff, Qt::Key_Stop, 0x00, 0x00, 0x0000 },
|
||||||
{ KEY_SETUP, 0xffff, Qt::Key_Settings, 0x00, 0x00, 0x0000 },
|
{ KEY_SETUP, 0xffff, Qt::Key_Settings, 0x00, 0x00, 0x0000 },
|
||||||
|
@ -545,7 +545,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
|||||||
|
|
||||||
// Try Xcursor first
|
// Try Xcursor first
|
||||||
#ifdef XCB_USE_XLIB
|
#ifdef XCB_USE_XLIB
|
||||||
if (cshape >= 0 && cshape < Qt::LastCursor) {
|
if (cshape >= 0 && cshape <= Qt::LastCursor) {
|
||||||
void *dpy = connection()->xlib_display();
|
void *dpy = connection()->xlib_display();
|
||||||
// special case for non-standard dnd-* cursors
|
// special case for non-standard dnd-* cursors
|
||||||
cursor = loadCursor(dpy, cshape);
|
cursor = loadCursor(dpy, cshape);
|
||||||
|
@ -146,6 +146,15 @@ void QFileInfoGatherer::fetchExtendedInformation(const QString &path, const QStr
|
|||||||
this->path.push(path);
|
this->path.push(path);
|
||||||
this->files.push(files);
|
this->files.push(files);
|
||||||
condition.wakeAll();
|
condition.wakeAll();
|
||||||
|
|
||||||
|
#ifndef QT_NO_FILESYSTEMWATCHER
|
||||||
|
if (files.isEmpty()
|
||||||
|
&& !path.isEmpty()
|
||||||
|
&& !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) {
|
||||||
|
if (!watcher->directories().contains(path))
|
||||||
|
watcher->addPath(path);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -269,16 +278,6 @@ static QString translateDriveName(const QFileInfo &drive)
|
|||||||
*/
|
*/
|
||||||
void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &files)
|
void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &files)
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_FILESYSTEMWATCHER
|
|
||||||
if (files.isEmpty()
|
|
||||||
&& !path.isEmpty()
|
|
||||||
&& !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) {
|
|
||||||
QMutexLocker locker(&mutex);
|
|
||||||
if (!watcher->directories().contains(path))
|
|
||||||
watcher->addPath(path);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// List drives
|
// List drives
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
#ifdef QT_BUILD_INTERNAL
|
#ifdef QT_BUILD_INTERNAL
|
||||||
|
@ -94,9 +94,6 @@
|
|||||||
#include "qgesture.h"
|
#include "qgesture.h"
|
||||||
#include "private/qgesturemanager_p.h"
|
#include "private/qgesturemanager_p.h"
|
||||||
#include <qpa/qplatformfontdatabase.h>
|
#include <qpa/qplatformfontdatabase.h>
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
#include "qlibrary.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <QtCore/qt_windows.h> // for qt_win_display_dc()
|
#include <QtCore/qt_windows.h> // for qt_win_display_dc()
|
||||||
@ -428,7 +425,6 @@ int qt_antialiasing_threshold = -1;
|
|||||||
QSize QApplicationPrivate::app_strut = QSize(0,0); // no default application strut
|
QSize QApplicationPrivate::app_strut = QSize(0,0); // no default application strut
|
||||||
int QApplicationPrivate::enabledAnimations = QPlatformTheme::GeneralUiEffect;
|
int QApplicationPrivate::enabledAnimations = QPlatformTheme::GeneralUiEffect;
|
||||||
bool QApplicationPrivate::widgetCount = false;
|
bool QApplicationPrivate::widgetCount = false;
|
||||||
bool QApplicationPrivate::load_testability = false;
|
|
||||||
#ifdef QT_KEYPAD_NAVIGATION
|
#ifdef QT_KEYPAD_NAVIGATION
|
||||||
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadTabOrder;
|
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadTabOrder;
|
||||||
QWidget *QApplicationPrivate::oldEditFocus = 0;
|
QWidget *QApplicationPrivate::oldEditFocus = 0;
|
||||||
@ -503,8 +499,6 @@ void QApplicationPrivate::process_cmdline()
|
|||||||
#endif
|
#endif
|
||||||
} else if (qstrcmp(arg, "-widgetcount") == 0) {
|
} else if (qstrcmp(arg, "-widgetcount") == 0) {
|
||||||
widgetCount = true;
|
widgetCount = true;
|
||||||
} else if (qstrcmp(arg, "-testability") == 0) {
|
|
||||||
load_testability = true;
|
|
||||||
} else {
|
} else {
|
||||||
argv[j++] = argv[i];
|
argv[j++] = argv[i];
|
||||||
}
|
}
|
||||||
@ -595,28 +589,11 @@ void QApplicationPrivate::construct()
|
|||||||
extern void qt_gui_eval_init(QCoreApplicationPrivate::Type);
|
extern void qt_gui_eval_init(QCoreApplicationPrivate::Type);
|
||||||
qt_gui_eval_init(application_type);
|
qt_gui_eval_init(application_type);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
// factory for accessible interfaces for widgets shipped with Qt
|
// factory for accessible interfaces for widgets shipped with Qt
|
||||||
QAccessible::installFactory(&qAccessibleFactory);
|
QAccessible::installFactory(&qAccessibleFactory);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
if(load_testability) {
|
|
||||||
QLibrary testLib(QLatin1String("qttestability"));
|
|
||||||
if (testLib.load()) {
|
|
||||||
typedef void (*TasInitialize)(void);
|
|
||||||
TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
|
|
||||||
if (initFunction) {
|
|
||||||
initFunction();
|
|
||||||
} else {
|
|
||||||
qCritical("Library qttestability resolve failed!");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
qCritical("Library qttestability load failed!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qt_init(QApplicationPrivate *priv, int type)
|
void qt_init(QApplicationPrivate *priv, int type)
|
||||||
|
@ -214,7 +214,6 @@ public:
|
|||||||
|
|
||||||
static int enabledAnimations; // Combination of QPlatformTheme::UiEffect
|
static int enabledAnimations; // Combination of QPlatformTheme::UiEffect
|
||||||
static bool widgetCount; // Coupled with -widgetcount switch
|
static bool widgetCount; // Coupled with -widgetcount switch
|
||||||
static bool load_testability; // Coupled with -testability switch
|
|
||||||
|
|
||||||
static void setSystemPalette(const QPalette &pal);
|
static void setSystemPalette(const QPalette &pal);
|
||||||
static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash);
|
static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash);
|
||||||
|
@ -273,7 +273,7 @@ void QTipLabel::hideTipImmediately()
|
|||||||
|
|
||||||
void QTipLabel::setTipRect(QWidget *w, const QRect &r)
|
void QTipLabel::setTipRect(QWidget *w, const QRect &r)
|
||||||
{
|
{
|
||||||
if (!rect.isNull() && !w)
|
if (!r.isNull() && !w)
|
||||||
qWarning("QToolTip::setTipRect: Cannot pass null widget if rect is set");
|
qWarning("QToolTip::setTipRect: Cannot pass null widget if rect is set");
|
||||||
else{
|
else{
|
||||||
widget = w;
|
widget = w;
|
||||||
|
@ -309,7 +309,7 @@ void QAbstractScrollAreaPrivate::init()
|
|||||||
q->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
|
q->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
|
||||||
q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
layoutChildren();
|
layoutChildren();
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_OS_OSX
|
||||||
# ifndef QT_NO_GESTURES
|
# ifndef QT_NO_GESTURES
|
||||||
viewport->grabGesture(Qt::PanGesture);
|
viewport->grabGesture(Qt::PanGesture);
|
||||||
# endif
|
# endif
|
||||||
|
@ -446,7 +446,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
|
|||||||
QVERIFY(!nestedWindow->maximizedButtonsWidget());
|
QVERIFY(!nestedWindow->maximizedButtonsWidget());
|
||||||
QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget());
|
QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget());
|
||||||
|
|
||||||
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
|
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) && !defined(Q_OS_QNX)
|
||||||
QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
|
QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
|
||||||
.arg(originalWindowTitle, window->widget()->windowTitle()));
|
.arg(originalWindowTitle, window->widget()->windowTitle()));
|
||||||
#endif
|
#endif
|
||||||
@ -689,8 +689,8 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove_data()
|
|||||||
QTest::addColumn<QSize>("workspaceSize");
|
QTest::addColumn<QSize>("workspaceSize");
|
||||||
QTest::addColumn<QSize>("windowSize");
|
QTest::addColumn<QSize>("windowSize");
|
||||||
|
|
||||||
QTest::newRow("normal mode") << true<< 20 << 20 << QSize(400, 400) << QSize(200, 200);
|
QTest::newRow("normal mode") << true<< 20 << 20 << QSize(400, 400) << QSize(240, 200);
|
||||||
QTest::newRow("rubberband mode") << false << 20 << 1 << QSize(400, 400) << QSize(200, 200);
|
QTest::newRow("rubberband mode") << false << 20 << 1 << QSize(400, 400) << QSize(240, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QMdiSubWindow::setOpaqueResizeAndMove()
|
void tst_QMdiSubWindow::setOpaqueResizeAndMove()
|
||||||
@ -781,7 +781,7 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove()
|
|||||||
// ### Remove this after mac style has been fixed
|
// ### Remove this after mac style has been fixed
|
||||||
height -= 4;
|
height -= 4;
|
||||||
#endif
|
#endif
|
||||||
QPoint mousePosition(window->width() / 2, height - 1);
|
QPoint mousePosition(window->width() / 3, height - 1);
|
||||||
sendMouseMove(window, mousePosition, Qt::NoButton);
|
sendMouseMove(window, mousePosition, Qt::NoButton);
|
||||||
sendMousePress(window, mousePosition);
|
sendMousePress(window, mousePosition);
|
||||||
|
|
||||||
@ -1523,6 +1523,9 @@ void tst_QMdiSubWindow::hideAndShow()
|
|||||||
|
|
||||||
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
|
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
|
||||||
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
|
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
|
||||||
|
#if defined Q_OS_QNX
|
||||||
|
QEXPECT_FAIL("", "QTBUG-38231", Abort);
|
||||||
|
#endif
|
||||||
QVERIFY(subWindow->maximizedButtonsWidget());
|
QVERIFY(subWindow->maximizedButtonsWidget());
|
||||||
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
|
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
|
||||||
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
|
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
|
||||||
@ -1747,6 +1750,9 @@ void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
|
|||||||
|
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
|
|
||||||
|
#if defined Q_OS_QNX
|
||||||
|
QEXPECT_FAIL("", "QTBUG-38231", Abort);
|
||||||
|
#endif
|
||||||
QVERIFY(subWindow->maximizedButtonsWidget());
|
QVERIFY(subWindow->maximizedButtonsWidget());
|
||||||
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
|
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
|
||||||
QCOMPARE(menuBar->cornerWidget(Qt::TopLeftCorner), subWindow->maximizedSystemMenuIconWidget());
|
QCOMPARE(menuBar->cornerWidget(Qt::TopLeftCorner), subWindow->maximizedSystemMenuIconWidget());
|
||||||
|
@ -3077,14 +3077,24 @@ void Configure::generateCachefile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Configure::addSysroot(QString *command)
|
||||||
|
{
|
||||||
|
const QString &sysroot = dictionary["CFG_SYSROOT"];
|
||||||
|
if (!sysroot.isEmpty() && dictionary["CFG_GCC_SYSROOT"] == "yes") {
|
||||||
|
command->append(" QMAKE_LFLAGS+=--sysroot=" + sysroot);
|
||||||
|
command->append(" QMAKE_CXXFLAGS+=--sysroot=" + sysroot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct ArchData {
|
struct ArchData {
|
||||||
|
bool isHost;
|
||||||
const char *qmakespec;
|
const char *qmakespec;
|
||||||
const char *key;
|
const char *key;
|
||||||
const char *subarchKey;
|
const char *subarchKey;
|
||||||
const char *type;
|
const char *type;
|
||||||
ArchData() {}
|
ArchData() {}
|
||||||
ArchData(const char *t, const char *qm, const char *k, const char *sak)
|
ArchData(bool h, const char *t, const char *qm, const char *k, const char *sak)
|
||||||
: qmakespec(qm), key(k), subarchKey(sak), type(t)
|
: isHost(h), qmakespec(qm), key(k), subarchKey(sak), type(t)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3110,8 +3120,8 @@ void Configure::detectArch()
|
|||||||
|
|
||||||
QVector<ArchData> qmakespecs;
|
QVector<ArchData> qmakespecs;
|
||||||
if (dictionary.contains("XQMAKESPEC"))
|
if (dictionary.contains("XQMAKESPEC"))
|
||||||
qmakespecs << ArchData("target", "XQMAKESPEC", "QT_ARCH", "QT_CPU_FEATURES");
|
qmakespecs << ArchData(false, "target", "XQMAKESPEC", "QT_ARCH", "QT_CPU_FEATURES");
|
||||||
qmakespecs << ArchData("host", "QMAKESPEC", "QT_HOST_ARCH", "QT_HOST_CPU_FEATURES");
|
qmakespecs << ArchData(true, "host", "QMAKESPEC", "QT_HOST_ARCH", "QT_HOST_CPU_FEATURES");
|
||||||
|
|
||||||
for (int i = 0; i < qmakespecs.count(); ++i) {
|
for (int i = 0; i < qmakespecs.count(); ++i) {
|
||||||
const ArchData &data = qmakespecs.at(i);
|
const ArchData &data = qmakespecs.at(i);
|
||||||
@ -3123,10 +3133,14 @@ void Configure::detectArch()
|
|||||||
QString command = QString("%1 -spec %2 %3")
|
QString command = QString("%1 -spec %2 %3")
|
||||||
.arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"),
|
.arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"),
|
||||||
QDir::toNativeSeparators(qmakespec),
|
QDir::toNativeSeparators(qmakespec),
|
||||||
QDir::toNativeSeparators(sourcePath + "/config.tests/arch/arch.pro"));
|
QDir::toNativeSeparators(sourcePath + "/config.tests/arch/arch"
|
||||||
|
+ (data.isHost ? "_host" : "") + ".pro"));
|
||||||
|
|
||||||
if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
|
if (!data.isHost) {
|
||||||
command.append(" QMAKE_LFLAGS+=/ENTRY:main");
|
if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
|
||||||
|
command.append(" QMAKE_LFLAGS+=/ENTRY:main");
|
||||||
|
addSysroot(&command);
|
||||||
|
}
|
||||||
|
|
||||||
int returnValue = 0;
|
int returnValue = 0;
|
||||||
Environment::execute(command, &returnValue);
|
Environment::execute(command, &returnValue);
|
||||||
@ -3233,6 +3247,7 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
|
|||||||
const QString qmakespec = dictionary["XQMAKESPEC"];
|
const QString qmakespec = dictionary["XQMAKESPEC"];
|
||||||
if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
|
if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
|
||||||
command.append(" QMAKE_LFLAGS+=/ENTRY:main");
|
command.append(" QMAKE_LFLAGS+=/ENTRY:main");
|
||||||
|
addSysroot(&command);
|
||||||
}
|
}
|
||||||
|
|
||||||
int code = 0;
|
int code = 0;
|
||||||
|
@ -162,6 +162,7 @@ private:
|
|||||||
void reloadCmdLine();
|
void reloadCmdLine();
|
||||||
void saveCmdLine();
|
void saveCmdLine();
|
||||||
|
|
||||||
|
void addSysroot(QString *command);
|
||||||
bool tryCompileProject(const QString &projectPath, const QString &extraOptions = QString());
|
bool tryCompileProject(const QString &projectPath, const QString &extraOptions = QString());
|
||||||
bool compilerSupportsFlag(const QString &compilerAndArgs);
|
bool compilerSupportsFlag(const QString &compilerAndArgs);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user