summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkspecs/android-g++/qmake.conf13
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf5
-rw-r--r--mkspecs/features/device_config.prf4
-rw-r--r--mkspecs/features/java.prf24
-rw-r--r--mkspecs/features/qt_headersclean.prf7
-rw-r--r--src/corelib/arch/qatomic_mips.h10
-rw-r--r--src/corelib/global/archdetect.cpp2
-rw-r--r--src/corelib/global/qglobalstatic.h11
-rw-r--r--src/corelib/global/qprocessordetection.h15
-rw-r--r--src/gui/kernel/qguiapplication.cpp25
-rw-r--r--src/gui/painting/qblendfunctions_p.h4
-rw-r--r--src/opengl/qgl.cpp2
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm16
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboard_defaultmap_p.h1
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp2
-rw-r--r--src/widgets/dialogs/qfileinfogatherer.cpp19
-rw-r--r--src/widgets/kernel/qapplication.cpp23
-rw-r--r--src/widgets/kernel/qapplication_p.h1
-rw-r--r--src/widgets/kernel/qtooltip.cpp2
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp14
-rw-r--r--tools/configure/configureapp.cpp29
-rw-r--r--tools/configure/configureapp.h1
23 files changed, 140 insertions, 92 deletions
diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf
index 78b484fdb5..e510c2d93c 100644
--- a/mkspecs/android-g++/qmake.conf
+++ b/mkspecs/android-g++/qmake.conf
@@ -74,6 +74,19 @@ else: ANDROID_ARCHITECTURE = arm
NDK_TOOLCHAIN = $$NDK_TOOLCHAIN_PREFIX-$$NDK_TOOLCHAIN_VERSION
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
ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/
ANDROID_PLATFORM_PATH = $$ANDROID_PLATFORM_ROOT_PATH/usr
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index 39f151f65d..54d887d088 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -10,9 +10,8 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-no-sdk {
FILE_CONTENT += " \"qt\": $$emitString($$[QT_INSTALL_PREFIX]),"
# Settings from mkspecs/environment
- isEmpty(SDK_ROOT): SDK_ROOT = $$(ANDROID_SDK_ROOT)
- isEmpty(SDK_ROOT): SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
- FILE_CONTENT += " \"sdk\": $$emitString($$SDK_ROOT),"
+ FILE_CONTENT += " \"sdk\": $$emitString($$ANDROID_SDK_ROOT),"
+ FILE_CONTENT += " \"sdkBuildToolsRevision\": $$emitString($$ANDROID_SDK_BUILD_TOOLS_REVISION),"
isEmpty(NDK_ROOT): NDK_ROOT = $$(ANDROID_NDK_ROOT)
isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf
index cb1de0b947..1de64b8821 100644
--- a/mkspecs/features/device_config.prf
+++ b/mkspecs/features/device_config.prf
@@ -5,7 +5,9 @@ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
exists($$DEVICE_PRI):include($$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
CROSS_COMPILE = $$[CROSS_COMPILE]
}
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf
index 790724cec9..1c55b8974e 100644
--- a/mkspecs/features/java.prf
+++ b/mkspecs/features/java.prf
@@ -1,24 +1,10 @@
TEMPLATE = lib
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)
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-10
- isEmpty(BUILD_TOOLS_REVISION) {
- 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
+ ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
!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.")
}
@@ -69,12 +55,12 @@ android:!bundled_jar_file {
# of the base sdk folder.
# 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
- DEX_BAT = $$SDK_ROOT/platform-tools/dx.bat
- !exists($$DEX_BAT): DEX_BAT = $$SDK_ROOT/build-tools/$$BUILD_TOOLS_REVISION/dx.bat
+ DEX_BAT = $$ANDROID_SDK_ROOT/platform-tools/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
} else {
- DEX_CMD = $$SDK_ROOT/platform-tools/dx
- !exists($$DEX_CMD): DEX_CMD = $$SDK_ROOT/build-tools/$$BUILD_TOOLS_REVISION/dx
+ DEX_CMD = $$ANDROID_SDK_ROOT/platform-tools/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.")
}
QMAKE_LINK_SHLIB_CMD = $$DEX_CMD --dex --output $(TARGET) $$CLASS_DIR
diff --git a/mkspecs/features/qt_headersclean.prf b/mkspecs/features/qt_headersclean.prf
index ab0a722628..0650adfe5e 100644
--- a/mkspecs/features/qt_headersclean.prf
+++ b/mkspecs/features/qt_headersclean.prf
@@ -13,16 +13,11 @@
*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef
# 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.
*-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 \
-DQT_NO_CAST_FROM_ASCII \
-DQT_STRICT_ITERATORS \
diff --git a/src/corelib/arch/qatomic_mips.h b/src/corelib/arch/qatomic_mips.h
index 463612212b..7bfe16a450 100644
--- a/src/corelib/arch/qatomic_mips.h
+++ b/src/corelib/arch/qatomic_mips.h
@@ -110,13 +110,19 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
template <int size> template <typename T> inline
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
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
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp
index 9540e391ba..e35595e727 100644
--- a/src/corelib/global/archdetect.cpp
+++ b/src/corelib/global/archdetect.cpp
@@ -73,6 +73,8 @@
# define ARCH_PROCESSOR "s390"
#elif defined(Q_PROCESSOR_SH)
# define ARCH_PROCESSOR "sh"
+#elif defined(Q_PROCESSORS_SPARC_64)
+# define ARCH_PROCESSOR "sparc64"
#elif defined(Q_PROCESSOR_SPARC_V9)
# define ARCH_PROCESSOR "sparcv9"
#elif defined(Q_PROCESSOR_SPARC)
diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h
index e9330a4b9e..31e2e634a8 100644
--- a/src/corelib/global/qglobalstatic.h
+++ b/src/corelib/global/qglobalstatic.h
@@ -68,8 +68,17 @@ enum GuardValues {
// until the constructor returns ...
// 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) \
- Q_DECL_HIDDEN inline Type *innerFunction() \
+ Q_GLOBAL_STATIC_INTERNAL_DECORATION Type *innerFunction() \
{ \
struct HolderBase { \
~HolderBase() Q_DECL_NOTHROW \
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index 384df8fd54..c9fb728593 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -294,12 +294,15 @@
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.
*/
-// #elif defined(__sparc__)
-// # define Q_PROCESSOR_SPARC
-// # if defined(__sparc_v9__)
-// # define Q_PROCESSOR_SPARC_V9
-// # endif
-// # define Q_BYTE_ORDER Q_BIG_ENDIAN
+#elif defined(__sparc__)
+# define Q_PROCESSOR_SPARC
+# if defined(__sparc_v9__)
+# define Q_PROCESSOR_SPARC_V9
+# endif
+# if defined(__sparc64__)
+# define Q_PROCESSOR_SPARC_64
+# endif
+# define Q_BYTE_ORDER Q_BIG_ENDIAN
#endif
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 68e87a024f..831ebd19c0 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -96,6 +96,10 @@
#include <QtGui/QClipboard>
#endif
+#ifndef QT_NO_LIBRARY
+#include <QtCore/QLibrary>
+#endif
+
#if defined(Q_OS_MAC)
# include "private/qcore_mac_p.h"
#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
@@ -1209,6 +1213,7 @@ void QGuiApplicationPrivate::init()
QCoreApplicationPrivate::is_app_running = false; // Starting up.
bool doGrabUnderDebugger = false;
+ bool loadTestability = false;
QList<QByteArray> pluginList;
// Get command line params
#ifndef QT_NO_SESSIONMANAGER
@@ -1259,6 +1264,8 @@ void QGuiApplicationPrivate::init()
is_session_restored = true;
}
#endif
+ } else if (arg == "-testability") {
+ loadTestability = true;
} else {
argv[j++] = argv[i];
}
@@ -1319,6 +1326,22 @@ void QGuiApplicationPrivate::init()
session_manager = new QSessionManager(q, session_id, session_key);
#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();
@@ -1792,7 +1815,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
}
if (doubleClick) {
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;
QMouseEvent dblClickEvent(doubleClickType, localPoint, localPoint, globalPoint,
button, buttons, e->modifiers);
diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h
index 98e9e10bd8..e08c74ab88 100644
--- a/src/gui/painting/qblendfunctions_p.h
+++ b/src/gui/painting/qblendfunctions_p.h
@@ -147,7 +147,7 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl,
while (h--) {
const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl);
- int srcx = basex;
+ quint32 srcx = basex;
int x = 0;
for (; x<w-7; x+=8) {
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--) {
const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl);
- int srcx = basex;
+ quint32 srcx = basex;
int x = 0;
for (; x<w; ++x) {
blender.write(&dst[x], src[srcx >> 16]);
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 30e55592c5..1ca9f83501 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -467,6 +467,7 @@ QGLFormat QGLFormat::fromSurfaceFormat(const QSurfaceFormat &format)
retFormat.setStencil(true);
retFormat.setStencilBufferSize(format.stencilBufferSize());
}
+ retFormat.setSwapInterval(format.swapInterval());
retFormat.setDoubleBuffer(format.swapBehavior() != QSurfaceFormat::SingleBuffer);
retFormat.setStereo(format.stereo());
retFormat.setVersion(format.majorVersion(), format.minorVersion());
@@ -495,6 +496,7 @@ QSurfaceFormat QGLFormat::toSurfaceFormat(const QGLFormat &format)
retFormat.setSamples(format.samples() == -1 ? 4 : format.samples());
if (format.stencil())
retFormat.setStencilBufferSize(format.stencilBufferSize() == -1 ? 1 : format.stencilBufferSize());
+ retFormat.setSwapInterval(format.swapInterval());
retFormat.setStereo(format.stereo());
retFormat.setMajorVersion(format.majorVersion());
retFormat.setMinorVersion(format.minorVersion());
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index c0643444e2..7ae72cc446 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -245,9 +245,19 @@ void QCoreTextFontDatabase::populateFromDescriptor(CTFontDescriptorRef font)
if (styles) {
if (CFNumberRef weightValue = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontWeightTrait)) {
Q_ASSERT(CFNumberIsFloatType(weightValue));
- double d;
- if (CFNumberGetValue(weightValue, kCFNumberDoubleType, &d))
- weight = (d > 0.0) ? QFont::Bold : QFont::Normal;
+ double normalizedWeight;
+ if (CFNumberGetValue(weightValue, kCFNumberDoubleType, &normalizedWeight)) {
+ 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)) {
Q_ASSERT(CFNumberIsFloatType(italic));
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboard_defaultmap_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboard_defaultmap_p.h
index 3f656668aa..5e919ebeb7 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboard_defaultmap_p.h
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboard_defaultmap_p.h
@@ -639,6 +639,7 @@ const QEvdevKeyboardMap::Mapping QEvdevKeyboardHandler::s_keymap_default[] = {
{ KEY_MUTE, 0xffff, Qt::Key_VolumeMute, 0x00, 0x00, 0x0000 },
{ KEY_VOLUMEDOWN, 0xffff, Qt::Key_VolumeDown, 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_STOP, 0xffff, Qt::Key_Stop, 0x00, 0x00, 0x0000 },
{ KEY_SETUP, 0xffff, Qt::Key_Settings, 0x00, 0x00, 0x0000 },
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index ce9e445ba2..6dbac90e0c 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -545,7 +545,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
// Try Xcursor first
#ifdef XCB_USE_XLIB
- if (cshape >= 0 && cshape < Qt::LastCursor) {
+ if (cshape >= 0 && cshape <= Qt::LastCursor) {
void *dpy = connection()->xlib_display();
// special case for non-standard dnd-* cursors
cursor = loadCursor(dpy, cshape);
diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp
index b08cc798e5..41b0b30eeb 100644
--- a/src/widgets/dialogs/qfileinfogatherer.cpp
+++ b/src/widgets/dialogs/qfileinfogatherer.cpp
@@ -146,6 +146,15 @@ void QFileInfoGatherer::fetchExtendedInformation(const QString &path, const QStr
this->path.push(path);
this->files.push(files);
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)
{
-#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
if (path.isEmpty()) {
#ifdef QT_BUILD_INTERNAL
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 9913b225fc..2b90971398 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -94,9 +94,6 @@
#include "qgesture.h"
#include "private/qgesturemanager_p.h"
#include <qpa/qplatformfontdatabase.h>
-#ifndef QT_NO_LIBRARY
-#include "qlibrary.h"
-#endif
#ifdef Q_OS_WIN
#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
int QApplicationPrivate::enabledAnimations = QPlatformTheme::GeneralUiEffect;
bool QApplicationPrivate::widgetCount = false;
-bool QApplicationPrivate::load_testability = false;
#ifdef QT_KEYPAD_NAVIGATION
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadTabOrder;
QWidget *QApplicationPrivate::oldEditFocus = 0;
@@ -503,8 +499,6 @@ void QApplicationPrivate::process_cmdline()
#endif
} else if (qstrcmp(arg, "-widgetcount") == 0) {
widgetCount = true;
- } else if (qstrcmp(arg, "-testability") == 0) {
- load_testability = true;
} else {
argv[j++] = argv[i];
}
@@ -595,28 +589,11 @@ void QApplicationPrivate::construct()
extern void qt_gui_eval_init(QCoreApplicationPrivate::Type);
qt_gui_eval_init(application_type);
#endif
-
#ifndef QT_NO_ACCESSIBILITY
// factory for accessible interfaces for widgets shipped with Qt
QAccessible::installFactory(&qAccessibleFactory);
#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)
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index d5efb62dda..29142470a7 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -214,7 +214,6 @@ public:
static int enabledAnimations; // Combination of QPlatformTheme::UiEffect
static bool widgetCount; // Coupled with -widgetcount switch
- static bool load_testability; // Coupled with -testability switch
static void setSystemPalette(const QPalette &pal);
static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash);
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index 2b43fd7f6d..16fb41e1fc 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -273,7 +273,7 @@ void QTipLabel::hideTipImmediately()
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");
else{
widget = w;
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index e830ac3c76..1b48441993 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -309,7 +309,7 @@ void QAbstractScrollAreaPrivate::init()
q->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
layoutChildren();
-#ifndef Q_WS_MAC
+#ifndef Q_OS_OSX
# ifndef QT_NO_GESTURES
viewport->grabGesture(Qt::PanGesture);
# endif
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index 60fd946d52..4b327c9ba8 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -446,7 +446,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
QVERIFY(!nestedWindow->maximizedButtonsWidget());
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]")
.arg(originalWindowTitle, window->widget()->windowTitle()));
#endif
@@ -689,8 +689,8 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove_data()
QTest::addColumn<QSize>("workspaceSize");
QTest::addColumn<QSize>("windowSize");
- QTest::newRow("normal mode") << true<< 20 << 20 << QSize(400, 400) << QSize(200, 200);
- QTest::newRow("rubberband mode") << false << 20 << 1 << 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(240, 200);
}
void tst_QMdiSubWindow::setOpaqueResizeAndMove()
@@ -781,7 +781,7 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove()
// ### Remove this after mac style has been fixed
height -= 4;
#endif
- QPoint mousePosition(window->width() / 2, height - 1);
+ QPoint mousePosition(window->width() / 3, height - 1);
sendMouseMove(window, mousePosition, Qt::NoButton);
sendMousePress(window, mousePosition);
@@ -1523,6 +1523,9 @@ void tst_QMdiSubWindow::hideAndShow()
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
+#if defined Q_OS_QNX
+ QEXPECT_FAIL("", "QTBUG-38231", Abort);
+#endif
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
@@ -1747,6 +1750,9 @@ void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
qApp->processEvents();
+#if defined Q_OS_QNX
+ QEXPECT_FAIL("", "QTBUG-38231", Abort);
+#endif
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopLeftCorner), subWindow->maximizedSystemMenuIconWidget());
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 679362aa68..f8715ef32e 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -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 {
+ bool isHost;
const char *qmakespec;
const char *key;
const char *subarchKey;
const char *type;
ArchData() {}
- ArchData(const char *t, const char *qm, const char *k, const char *sak)
- : qmakespec(qm), key(k), subarchKey(sak), type(t)
+ ArchData(bool h, const char *t, const char *qm, const char *k, const char *sak)
+ : isHost(h), qmakespec(qm), key(k), subarchKey(sak), type(t)
{}
};
@@ -3110,8 +3120,8 @@ void Configure::detectArch()
QVector<ArchData> qmakespecs;
if (dictionary.contains("XQMAKESPEC"))
- qmakespecs << ArchData("target", "XQMAKESPEC", "QT_ARCH", "QT_CPU_FEATURES");
- qmakespecs << ArchData("host", "QMAKESPEC", "QT_HOST_ARCH", "QT_HOST_CPU_FEATURES");
+ qmakespecs << ArchData(false, "target", "XQMAKESPEC", "QT_ARCH", "QT_CPU_FEATURES");
+ qmakespecs << ArchData(true, "host", "QMAKESPEC", "QT_HOST_ARCH", "QT_HOST_CPU_FEATURES");
for (int i = 0; i < qmakespecs.count(); ++i) {
const ArchData &data = qmakespecs.at(i);
@@ -3123,10 +3133,14 @@ void Configure::detectArch()
QString command = QString("%1 -spec %2 %3")
.arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"),
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"))
- command.append(" QMAKE_LFLAGS+=/ENTRY:main");
+ if (!data.isHost) {
+ if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
+ command.append(" QMAKE_LFLAGS+=/ENTRY:main");
+ addSysroot(&command);
+ }
int returnValue = 0;
Environment::execute(command, &returnValue);
@@ -3233,6 +3247,7 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
const QString qmakespec = dictionary["XQMAKESPEC"];
if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
command.append(" QMAKE_LFLAGS+=/ENTRY:main");
+ addSysroot(&command);
}
int code = 0;
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index 71ef210e89..38b3e37799 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -162,6 +162,7 @@ private:
void reloadCmdLine();
void saveCmdLine();
+ void addSysroot(QString *command);
bool tryCompileProject(const QString &projectPath, const QString &extraOptions = QString());
bool compilerSupportsFlag(const QString &compilerAndArgs);