From dd91f8d46dbdf62cc276bc204425c4ae106d913e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?= Date: Fri, 14 Mar 2014 19:33:54 -0300 Subject: Enable sparc detection. It has been working in Debian for some time. It also adds detection for 64bits Sparc. Change-Id: Ie4fc0f58b37672b79191ebe51de0caf2eaf8a1d9 Reviewed-by: Thiago Macieira --- src/corelib/global/qprocessordetection.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.3 From 60b6b28c213a420ee40e254ff1823876098e0a04 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sun, 10 Nov 2013 23:20:46 +0100 Subject: Support MIPS atomic on pre-MIPS32 architectures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The atomic functions on MIPS are based on the sync opcode with an immediate argument, which is something introduced in the MIPS32 instruction set. This prevent to use Qt on pre-MIPS32 CPU, like the Loongson 2 CPU. However some of the pre-MIPS32 CPUs interprets the sync opcode with and immediate argument as a sync opcode without argument (which is a stronger ordering than with the argument), and for the others the kernel emulates it. It is therefore fine to use the current MIPS atomic functions on pre-MIPS32 CPU. This patch allows that by temporarily changing the instruction set to MIPS32 around the sync instruction, so that binutils doesn't choke on it. Change-Id: I9cc984bd55b5f172736ce9e638a6f4e271b79fe7 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer Reviewed-by: Thiago Macieira --- src/corelib/arch/qatomic_mips.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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 struct QAtomicOps : QBasicAtomicOps template template inline void QBasicAtomicOps::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 template inline void QBasicAtomicOps::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 template inline -- cgit v1.2.3 From 5f7ea1a41aa9e299130f335b0023b9026de841c5 Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Fri, 6 Jun 2014 13:29:03 +0200 Subject: Fix QFileInfoGatherer threading issue QFileInfoGatherer has a QFileSystemWatcher member that lives in the same thread as the QFileInfoGatherer object. If only the poller engine is available for the file system watcher, the engine will only be created when addPaths() is called. However the latter was called from anohter thread (the QFileInfoGatherer thread). Hence the QPollingFileSystemWatcherEngine had its parent in a different thread and worse, this thread didn't have an event loop needed for the QTimer used in the poller engine. This fixes tst_qfilesystemmodel on platforms that only support the polling file system watcher engine. Task-Number: QTBUG-29366 Change-Id: I83b58b4237e3438a27e5cdde4b1e4126e4740a94 Reviewed-by: Fabian Bumberger Reviewed-by: Thiago Macieira --- src/widgets/dialogs/qfileinfogatherer.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src') 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 -- cgit v1.2.3 From 47a66d5eac0df9481cff1dc23caed4335d49b515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 13 May 2014 14:28:18 +0200 Subject: Mac: Don't register for Pan Gestures. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will enable touch events for the viewport widget, which has undesired side effects (see task). Fixes a regression from Qt 4. Task-number: QTBUG-38815 Change-Id: I7b9c0d1de985d1c82f946140fecf460fcfc5e686 Reviewed-by: Morten Johan Sørvig --- src/widgets/widgets/qabstractscrollarea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3 From 35f6b003341f31172b3a0a7fab8902350b9ba6c0 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 25 Sep 2013 16:11:58 +0200 Subject: move loading of testability driver from QApplication to QGuiApplication This is useful without QWidget too. Change-Id: Ic7857e52e4a8f57c1205615a1f30323b486814af Reviewed-by: Richard J. Moore Reviewed-by: Friedemann Kleint Reviewed-by: Alberto Mardegan Reviewed-by: Shawn Rutledge --- src/gui/kernel/qguiapplication.cpp | 23 +++++++++++++++++++++++ src/widgets/kernel/qapplication.cpp | 23 ----------------------- src/widgets/kernel/qapplication_p.h | 1 - 3 files changed, 23 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8ccff4321d..91e4833812 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -96,6 +96,10 @@ #include #endif +#ifndef QT_NO_LIBRARY +#include +#endif + #if defined(Q_OS_MAC) # include "private/qcore_mac_p.h" #elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) @@ -1180,6 +1184,7 @@ void QGuiApplicationPrivate::init() QCoreApplicationPrivate::is_app_running = false; // Starting up. bool doGrabUnderDebugger = false; + bool loadTestability = false; QList pluginList; // Get command line params #ifndef QT_NO_SESSIONMANAGER @@ -1230,6 +1235,8 @@ void QGuiApplicationPrivate::init() is_session_restored = true; } #endif + } else if (arg == "-testability") { + loadTestability = true; } else { argv[j++] = argv[i]; } @@ -1287,6 +1294,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/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 0b983e7a9d..4bd306ed32 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 -#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); -- cgit v1.2.3 From 66790d63e914e46bc91818e530be40738f92cfcf Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 18 Jun 2014 14:53:42 +0200 Subject: XCB: Enable loading of the Qt::DragLinkCursor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It did not load due to an off-by-1 boundary error in a check. Qt::DragLinkCursor happens to be Qt::LastCursor. Task-number: QTBUG-39735 Change-Id: Ia7b11fc4eecc4329bd487bd5689c83c986fd2de6 Reviewed-by: Laszlo Agocs Reviewed-by: Jørgen Lind --- src/plugins/platforms/xcb/qxcbcursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3 From 3fed060b94ff04131de603d4d668ae7853e50a53 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Mon, 9 Jun 2014 16:27:36 +0300 Subject: Fix warning message when re-setting text on tooltip Fix warning message that gets printed when changing tooltip message without rect and widget parameters for already shown tooltip widget. Task-number: QTBUG-39550 Change-Id: I69ed8747e5e77ca618525d74479c72e02b7ab897 Reviewed-by: Andy Shaw Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qtooltip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3