summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-07-30 15:52:48 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-07-30 15:53:07 +0200
commit87d15f2c1b5f890d5477c2979227a872e3ce207b (patch)
treeb88ad027d3c99ecc4c9e4fe462dab72a4a4a9c8d /src
parent3866c89dee50e3a1156097f3f866e280b327ba28 (diff)
parent3fed060b94ff04131de603d4d668ae7853e50a53 (diff)
Merge remote-tracking branch 'origin/stable' into 5.3
Diffstat (limited to 'src')
-rw-r--r--src/corelib/arch/qatomic_mips.h10
-rw-r--r--src/corelib/global/qprocessordetection.h15
-rw-r--r--src/gui/kernel/qguiapplication.cpp23
-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
9 files changed, 52 insertions, 45 deletions
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/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 f429ad2229..aeb6107f2f 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)
@@ -1187,6 +1191,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
@@ -1237,6 +1242,8 @@ void QGuiApplicationPrivate::init()
is_session_restored = true;
}
#endif
+ } else if (arg == "-testability") {
+ loadTestability = true;
} else {
argv[j++] = argv[i];
}
@@ -1297,6 +1304,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();
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 520fc2db67..04d398206b 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -92,9 +92,6 @@
#include "qgesture.h"
#include "private/qgesturemanager_p.h"
#include <qpa/qplatformfontdatabase.h>
-#ifndef QT_NO_LIBRARY
-#include "qlibrary.h"
-#endif
#include "qdatetime.h"
@@ -415,7 +412,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;
@@ -490,8 +486,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];
}
@@ -582,23 +576,6 @@ void QApplicationPrivate::construct()
extern void qt_gui_eval_init(QCoreApplicationPrivate::Type);
qt_gui_eval_init(application_type);
#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
}
#ifndef QT_NO_STATEMACHINE
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 e1e933cdd8..98e715fc62 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