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 From 0afc80c9225ca9630f627fe1aea3d4fd7f958082 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 29 Jul 2014 12:56:34 +0200 Subject: Don't convert signed to unsigned when we need all 32bit The fast scale methods qt_scale_image_16bit and qt_scale_image_32bit were incorrectly assigning an unsigned value to a signed variable, which broke their support of images with dimensions from 32384 to 65535. Images with dimensions higher than that are already using another code- path. Task-number: QTBUG-40297 Change-Id: I8c971889e069381224cea2befbb5c66cd93ea5c2 Reviewed-by: Gunnar Sletta --- src/gui/painting/qblendfunctions_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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> 16]); srcx += ix; @@ -258,7 +258,7 @@ template 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> 16]); -- cgit v1.2.3 From e7839d9717820a8f0049316c626d28fbcf252fa7 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Wed, 2 Jul 2014 17:14:26 +0200 Subject: QCoreTextFontDatabase: Fix font weight value when populating a family MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kCTFontWeightTrait returns a normalized value between -1.0 (lightest) and 1.0 (heaviest), 0.0 being the regular font weight. The threshold values used in this change have been estimated from the weight values of fonts from the Helvetica Neue and Myriad Pro font families. Change-Id: I49de8e8bd5894107de4842aeda7ace2e83f95be3 Reviewed-by: Tor Arne Vestbø --- .../fontdatabases/mac/qcoretextfontdatabase.mm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index 9248785696..4aa4253773 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)); -- cgit v1.2.3 From 3866c89dee50e3a1156097f3f866e280b327ba28 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 16 Jul 2014 18:39:40 -0700 Subject: Work around ICC bug in local static symbols for Q_GLOBAL_STATIC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling the innerFunction() of the Q_GLOBAL_STATIC expansion, ICC emits global symbols for the internal "holder" local static variable and its guard. If there are two global statics of the same name in two different .cpp files, the linker will incorrectly merge the two "holder" variables. This was noted between the "customTypes" global statics of qmetatype.cpp and qdbusmetatype.cpp in a static build. The C++ standard requires that local static variables declared in inline functions must be the same, regardless of whether the body of the function got inlined or not. The IA-64 C++ ABI does that by requiring local static symbols for inline functions to be global and mergeable ("link once"). However, two functions in anonymous namespaces in different files are not considered to be the same function, so their local statics should not be merged. This is where ICC failed: the local statics are global and mergeable, even though the function is in an anonymous namespace. ICC correctly emits the function itself as a local symbol. Alternative solutions were: 1) add "static", but you can't use a static symbol in a template parameter in C++98 mode 2) remove the "inline" keyword, but then GCC 4.8 will not inline Intel issue ID: 6000058488 Task-number: QTBUG-40053 Change-Id: I307622222499682dde711b2771c8cf7557400799 Reviewed-by: Jędrzej Nowacki --- src/corelib/global/qglobalstatic.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h index ad39452cf4..1c44569dbd 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 \ -- cgit v1.2.3 From 429beecb19e9a2890fe60a56e7eed7ddf6067e61 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 9 Jul 2014 16:36:59 +0200 Subject: Fix double clicks in eglfs The window can be null in the qpa event. This is indicated by the nullWindow field to be able to differentiate between a dead window and a genuinely null input. [ChangeLog] Double click events are now sent correctly on eglfs. Task-number: QTBUG-40146 Change-Id: I63c8d08e0dec217b929161d2e827e0c273b4dd3e Reviewed-by: Will Wagner Reviewed-by: Friedemann Kleint --- src/gui/kernel/qguiapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index f429ad2229..8e0fdd561f 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1755,7 +1755,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); -- cgit v1.2.3 From 07e1f524f383eced94d4b3cdc150f7db2aadcd27 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 28 Jul 2014 10:06:22 +0200 Subject: Propagate swapInterval to QGLFormat Task-number: QTBUG-39370 Change-Id: Ib3a46a0ae24e5f6d690625b1d91be9e599bbc927 Reviewed-by: Gunnar Sletta --- src/opengl/qgl_qpa.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index 61d295f173..90ba0e7f5a 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -77,6 +77,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()); @@ -105,6 +106,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()); -- cgit v1.2.3 From 291c6615a3b5209760da03d1830d31a2581bd0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Mon, 14 Jul 2014 13:12:07 +0100 Subject: cocoa: Fix compiler warnings about unused functions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id85c86dd2f2468b3ac17751aefdebe0e8666a0c0 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qpaintengine_mac.mm | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm index ef67d1166f..f4cd071ab7 100644 --- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm @@ -193,7 +193,6 @@ CGImageRef qt_mac_create_imagemask(const QPixmap &pixmap, const QRectF &sr) //conversion inline static float qt_mac_convert_color_to_cg(int c) { return ((float)c * 1000 / 255) / 1000; } -inline static int qt_mac_convert_color_from_cg(float c) { return qRound(c * 255); } CGAffineTransform qt_mac_convert_transform_to_cg(const QTransform &t) { return CGAffineTransformMake(t.m11(), t.m12(), t.m21(), t.m22(), t.dx(), t.dy()); } @@ -974,11 +973,6 @@ void QCoreGraphicsPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, co d->restoreGraphicsState(); } -static void drawImageReleaseData (void *info, const void *, size_t) -{ - delete static_cast(info); -} - void QCoreGraphicsPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRectF &sr, Qt::ImageConversionFlags flags) { -- cgit v1.2.3 From c0429719c1a28bb1a0d88862b3a8c84525ee9a48 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 31 Jul 2014 10:16:01 +0200 Subject: Add missing power button keycode to keymap Change-Id: I03682716aaea8344ebb5b71dcea5fe18babcd610 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Laszlo Agocs --- src/platformsupport/input/evdevkeyboard/qevdevkeyboard_defaultmap_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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 }, -- cgit v1.2.3