diff options
author | Liang Qi <liang.qi@qt.io> | 2017-07-05 08:54:21 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2017-07-05 08:54:21 +0000 |
commit | 207253384b69e49db22e9b1cfe472ad0d99a9051 (patch) | |
tree | d31d1f136509cc1942f308c8bb479f7479131e6e /src/gui | |
parent | 4f7507c52390cd19d76e0f36744f21fbc3e14674 (diff) | |
parent | c2b224a758ce7e6dcf3748444fa8e29ab81904be (diff) |
Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/configure.json | 10 | ||||
-rw-r--r-- | src/gui/itemmodels/qstandarditemmodel.h | 4 | ||||
-rw-r--r-- | src/gui/kernel/qevent.cpp | 24 | ||||
-rw-r--r-- | src/gui/kernel/qevent.h | 8 | ||||
-rw-r--r-- | src/gui/kernel/qevent_p.h | 4 | ||||
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.h | 8 | ||||
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 2 |
11 files changed, 45 insertions, 39 deletions
diff --git a/src/gui/configure.json b/src/gui/configure.json index f25090ddfd..5e85d341dd 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -847,7 +847,7 @@ "xinput2": { "label": "Xinput2", "emitIf": "features.xcb", - "condition": "libs.xinput2", + "condition": "features.xcb-xlib && libs.xinput2", "output": [ "privateFeature" ] }, "xkbcommon-evdev": { @@ -1068,6 +1068,12 @@ "section": "Utilities", "condition": "!config.integrity", "output": [ "privateFeature" ] + }, + "whatsthis": { + "label": "QWhatsThis", + "purpose": "Supports displaying \"What's this\" help.", + "section": "Widget Support", + "output": [ "publicFeature", "feature" ] } }, @@ -1089,7 +1095,7 @@ XKB configuration data. This is required for keyboard input support." { "type": "note", "condition": "features.accessibility && features.xcb && !features.accessibility-atspi-bridge", - "message": "Disabling Linux Accessibility Bridge: D-Bus is missing." + "message": "Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing." }, { "type": "warning", diff --git a/src/gui/itemmodels/qstandarditemmodel.h b/src/gui/itemmodels/qstandarditemmodel.h index a9cde106c1..73107b827c 100644 --- a/src/gui/itemmodels/qstandarditemmodel.h +++ b/src/gui/itemmodels/qstandarditemmodel.h @@ -95,7 +95,7 @@ public: inline void setStatusTip(const QString &statusTip); #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) inline QString whatsThis() const { return qvariant_cast<QString>(data(Qt::WhatsThisRole)); } @@ -272,7 +272,7 @@ inline void QStandardItem::setStatusTip(const QString &astatusTip) { setData(astatusTip, Qt::StatusTipRole); } #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) inline void QStandardItem::setWhatsThis(const QString &awhatsThis) { setData(awhatsThis, Qt::WhatsThisRole); } #endif diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 2777e408c1..680acb16e7 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -767,7 +767,7 @@ QHoverEvent::~QHoverEvent() \sa pos(), pixelDelta(), angleDelta() */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) QWheelEvent::QWheelEvent(const QPointF &pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient) @@ -952,7 +952,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, invertedScrolling(inverted) {} -#endif // QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) /*! \fn QPoint QWheelEvent::pixelDelta() const @@ -2264,7 +2264,7 @@ QVariant QInputMethodQueryEvent::value(Qt::InputMethodQuery query) const return QVariant(); } -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) /*! \class QTabletEvent @@ -2706,7 +2706,7 @@ Qt::MouseButtons QTabletEvent::buttons() const \sa posF() */ -#endif // QT_NO_TABLETEVENT +#endif // QT_CONFIG(tabletevent) #ifndef QT_NO_GESTURES /*! @@ -3325,7 +3325,7 @@ QStatusTipEvent::~QStatusTipEvent() #endif // QT_NO_STATUSTIP -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) /*! \class QWhatsThisClickedEvent @@ -3362,7 +3362,7 @@ QWhatsThisClickedEvent::~QWhatsThisClickedEvent() This?" text. */ -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) #ifndef QT_NO_ACTION @@ -3856,7 +3856,7 @@ static void formatDropEvent(QDebug d, const QDropEvent *e) # endif // !QT_NO_DRAGANDDROP -# ifndef QT_NO_TABLETEVENT +# if QT_CONFIG(tabletevent) static void formatTabletEvent(QDebug d, const QTabletEvent *e) { @@ -3883,7 +3883,7 @@ static void formatTabletEvent(QDebug d, const QTabletEvent *e) d << ", tangentialPressure=" << e->tangentialPressure(); } -# endif // !QT_NO_TABLETEVENT +# endif // QT_CONFIG(tabletevent) QDebug operator<<(QDebug dbg, const QTouchEvent::TouchPoint &tp) { @@ -3956,13 +3956,13 @@ QDebug operator<<(QDebug dbg, const QEvent *e) dbg << ')'; } break; -# ifndef QT_NO_WHEELEVENT +# if QT_CONFIG(wheelevent) case QEvent::Wheel: { const QWheelEvent *we = static_cast<const QWheelEvent *>(e); dbg << "QWheelEvent(" << "pixelDelta=" << we->pixelDelta() << ", angleDelta=" << we->angleDelta() << ')'; } break; -# endif // !QT_NO_WHEELEVENT +# endif // QT_CONFIG(wheelevent) case QEvent::KeyPress: case QEvent::KeyRelease: case QEvent::ShortcutOverride: @@ -4063,7 +4063,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e) dbg << "QContextMenuEvent(" << static_cast<const QContextMenuEvent *>(e)->pos() << ')'; break; # endif // !QT_NO_CONTEXTMENU -# ifndef QT_NO_TABLETEVENT +# if QT_CONFIG(tabletevent) case QEvent::TabletEnterProximity: case QEvent::TabletLeaveProximity: case QEvent::TabletPress: @@ -4071,7 +4071,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e) case QEvent::TabletRelease: formatTabletEvent(dbg, static_cast<const QTabletEvent *>(e)); break; -# endif // !QT_NO_TABLETEVENT +# endif // QT_CONFIG(tabletevent) case QEvent::Enter: dbg << "QEnterEvent(" << static_cast<const QEnterEvent *>(e)->pos() << ')'; break; diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index cfc3b842d7..b8f86acd75 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -169,7 +169,7 @@ protected: QPointF p, op; }; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) class Q_GUI_EXPORT QWheelEvent : public QInputEvent { public: @@ -237,7 +237,7 @@ protected: }; #endif -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) class Q_GUI_EXPORT QTabletEvent : public QInputEvent { Q_GADGET @@ -295,7 +295,7 @@ protected: // ### Qt 6: QPointingEvent will have Buttons, QTabletEvent will inherit void *mExtra; }; -#endif // QT_NO_TABLETEVENT +#endif // QT_CONFIG(tabletevent) #ifndef QT_NO_GESTURES class Q_GUI_EXPORT QNativeGestureEvent : public QInputEvent @@ -699,7 +699,7 @@ private: }; #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) class Q_GUI_EXPORT QWhatsThisClickedEvent : public QEvent { public: diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h index 1eccfaea78..7df4a1e25b 100644 --- a/src/gui/kernel/qevent_p.h +++ b/src/gui/kernel/qevent_p.h @@ -94,7 +94,7 @@ public: QVector<QPointF> rawScreenPositions; }; -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) class QTabletEventPrivate { public: @@ -106,7 +106,7 @@ public: Qt::MouseButton b; Qt::MouseButtons buttonState; }; -#endif // QT_NO_TABLETEVENT +#endif // QT_CONFIG(tabletevent) QT_END_NAMESPACE diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index b76ff65aff..51653d9f8a 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2004,7 +2004,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e) { -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) QWindow *window = e->window.data(); QPointF globalPoint = e->globalPos; QPointF localPoint = e->localPos; @@ -2034,7 +2034,7 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh QGuiApplication::sendSpontaneousEvent(window, &ev); #else Q_UNUSED(e); -#endif /* ifndef QT_NO_WHEELEVENT */ +#endif // QT_CONFIG(wheelevent) } // Remember, Qt convention is: keyboard state is state *before* @@ -2309,7 +2309,7 @@ QGuiApplicationPrivate::TabletPointData &QGuiApplicationPrivate::tabletDevicePoi void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::TabletEvent *e) { -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) TabletPointData &pointData = tabletDevicePoint(e->uid); QEvent::Type type = QEvent::TabletMove; @@ -2376,7 +2376,7 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T void QGuiApplicationPrivate::processTabletEnterProximityEvent(QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e) { -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) QTabletEvent ev(QEvent::TabletEnterProximity, QPointF(), QPointF(), e->device, e->pointerType, 0, 0, 0, 0, 0, 0, @@ -2390,7 +2390,7 @@ void QGuiApplicationPrivate::processTabletEnterProximityEvent(QWindowSystemInter void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e) { -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) QTabletEvent ev(QEvent::TabletLeaveProximity, QPointF(), QPointF(), e->device, e->pointerType, 0, 0, 0, 0, 0, 0, diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 9f20fe0855..bd52113762 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2268,7 +2268,7 @@ bool QWindow::event(QEvent *ev) #endif break; } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: wheelEvent(static_cast<QWheelEvent*>(ev)); break; @@ -2302,7 +2302,7 @@ bool QWindow::event(QEvent *ev) break; } -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) case QEvent::TabletPress: case QEvent::TabletMove: case QEvent::TabletRelease: @@ -2466,7 +2466,7 @@ void QWindow::mouseMoveEvent(QMouseEvent *ev) ev->ignore(); } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) /*! Override this to handle mouse wheel or other wheel events (\a ev). */ @@ -2474,7 +2474,7 @@ void QWindow::wheelEvent(QWheelEvent *ev) { ev->ignore(); } -#endif //QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) /*! Override this to handle touch events (\a ev). @@ -2484,7 +2484,7 @@ void QWindow::touchEvent(QTouchEvent *ev) ev->ignore(); } -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) /*! Override this to handle tablet press, move, and release events (\a ev). diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 529589e67b..4a874caacb 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -71,11 +71,11 @@ class QShowEvent; class QHideEvent; class QKeyEvent; class QMouseEvent; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) class QWheelEvent; #endif class QTouchEvent; -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) class QTabletEvent; #endif @@ -354,11 +354,11 @@ protected: virtual void mouseReleaseEvent(QMouseEvent *); virtual void mouseDoubleClickEvent(QMouseEvent *); virtual void mouseMoveEvent(QMouseEvent *); -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) virtual void wheelEvent(QWheelEvent *); #endif virtual void touchEvent(QTouchEvent *); -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) virtual void tabletEvent(QTabletEvent *); #endif virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result); diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index dfad6bc2d8..fd9c627506 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -867,7 +867,7 @@ void QWindowSystemInterface::handleContextMenuEvent(QWindow *window, bool mouseT } #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) void QWindowSystemInterface::handleEnterWhatsThisEvent() { QWindowSystemInterfacePrivate::WindowSystemEvent *e = diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index bf3a9a6886..73ef612a06 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -239,7 +239,7 @@ public: const QPoint &pos, const QPoint &globalPos, Qt::KeyboardModifiers modifiers); #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) static void handleEnterWhatsThisEvent(); #endif diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 4519c4af19..ca82f9a35a 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -1362,7 +1362,7 @@ static inline void qConvertARGB64PMToA2RGB30PM_sse2(uint *dest, const QRgba64 *b const __m128i cmask = _mm_set1_epi32(0x000003ff); int i = 0; __m128i vr, vg, vb, va; - for (; i < count && (const uintptr_t)buffer & 0xF; ++i) { + for (; i < count && uintptr_t(buffer) & 0xF; ++i) { *dest++ = qConvertRgb64ToRgb30<PixelOrder>(*buffer++); } |