From 0aceec65a5405ae6ef8a745a611fea7caafd12f0 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 19 Jun 2017 11:54:03 -0700 Subject: ATSPI: correct configure warning message when ATSPI is missing This threw me for a loop: Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... yes [...] Note: Disabling Linux Accessibility Bridge: D-Bus is missing. Also, this is not the Linux bridge, since I was running on FreeBSD. Change-Id: I1d5a585d4af842f9a66ffffd14c99ab2a8d648de Reviewed-by: Frederik Gladhorn --- src/gui/configure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/configure.json b/src/gui/configure.json index 2fb03a452a..1b2b0775a2 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -1041,7 +1041,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", -- cgit v1.2.3 From 5ede5706a8b8052280981aa1d9c42999a24b74b5 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Tue, 30 May 2017 22:22:22 +0200 Subject: Convert features.wheelevent to QT_CONFIG Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen --- src/gui/kernel/qevent.cpp | 8 ++++---- src/gui/kernel/qevent.h | 2 +- src/gui/kernel/qguiapplication.cpp | 4 ++-- src/gui/kernel/qwindow.cpp | 6 +++--- src/gui/kernel/qwindow.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 2777e408c1..12ac7323a6 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 @@ -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(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: diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index cfc3b842d7..95de600012 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: diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index c0b0acbda6..8cbf0a457d 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1997,7 +1997,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; @@ -2027,7 +2027,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* diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 519d749b8a..8048a397e8 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2220,7 +2220,7 @@ bool QWindow::event(QEvent *ev) #endif break; } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: wheelEvent(static_cast(ev)); break; @@ -2418,7 +2418,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). */ @@ -2426,7 +2426,7 @@ void QWindow::wheelEvent(QWheelEvent *ev) { ev->ignore(); } -#endif //QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) /*! Override this to handle touch events (\a ev). diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 2883749d2e..748c3ee707 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -71,7 +71,7 @@ class QShowEvent; class QHideEvent; class QKeyEvent; class QMouseEvent; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) class QWheelEvent; #endif class QTouchEvent; @@ -344,7 +344,7 @@ 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 *); -- cgit v1.2.3 From 7f62c5fedc4a677fd9d9b002c4dfb9fd52a8a1a3 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Tue, 30 May 2017 23:04:21 +0200 Subject: Convert features.tabletevent to QT_CONFIG Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen --- src/gui/kernel/qevent.cpp | 12 ++++++------ src/gui/kernel/qevent.h | 4 ++-- src/gui/kernel/qevent_p.h | 4 ++-- src/gui/kernel/qguiapplication.cpp | 6 +++--- src/gui/kernel/qwindow.cpp | 4 ++-- src/gui/kernel/qwindow.h | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 12ac7323a6..5ae76abb55 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -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 /*! @@ -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) { @@ -4063,7 +4063,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e) dbg << "QContextMenuEvent(" << static_cast(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(e)); break; -# endif // !QT_NO_TABLETEVENT +# endif // QT_CONFIG(tabletevent) case QEvent::Enter: dbg << "QEnterEvent(" << static_cast(e)->pos() << ')'; break; diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 95de600012..18f8718330 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -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 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 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 8cbf0a457d..f43329afd0 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2302,7 +2302,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; @@ -2369,7 +2369,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, @@ -2383,7 +2383,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 8048a397e8..cf4a75dfce 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2254,7 +2254,7 @@ bool QWindow::event(QEvent *ev) break; } -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) case QEvent::TabletPress: case QEvent::TabletMove: case QEvent::TabletRelease: @@ -2436,7 +2436,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 748c3ee707..db8e828e70 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -75,7 +75,7 @@ class QMouseEvent; class QWheelEvent; #endif class QTouchEvent; -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) class QTabletEvent; #endif @@ -348,7 +348,7 @@ protected: 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); -- cgit v1.2.3 From c2a147c3cb71a6740be9528d416a0dba6a4c9ec8 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 23 Jun 2017 11:52:02 +0200 Subject: Fix GCC 8 warnings about ignored const on cast result types qdrawhelper.cpp:1365:25: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers] for (; i < count && (const uintptr_t)buffer & 0xF; ++i) { ^~~~~~~~~~~~~~~~~~~~~~~ etc... Change-Id: I702f9aada24ad49ebc7ede0a04e5afc1b0164e30 Reviewed-by: Thiago Macieira --- src/gui/painting/qdrawhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 9d5710a5e9..82aceb93c7 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -1359,7 +1359,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(*buffer++); } -- cgit v1.2.3 From 150ee7f4f1fb6280aa7fd8c15b6d72d806c0f68c Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Sat, 10 Jun 2017 07:09:50 +0200 Subject: Convert features.whatsthis to QT_[REQUIRE_]CONFIG Move feature definition to gui/configure.json Change-Id: I00b35c0e259d0a695d84a9bf6803eba74d41465a Reviewed-by: Oswald Buddenhagen --- src/gui/configure.json | 6 ++++++ src/gui/itemmodels/qstandarditemmodel.h | 4 ++-- src/gui/kernel/qevent.cpp | 4 ++-- src/gui/kernel/qevent.h | 2 +- src/gui/kernel/qwindowsysteminterface.cpp | 2 +- src/gui/kernel/qwindowsysteminterface.h | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src/gui') diff --git a/src/gui/configure.json b/src/gui/configure.json index 1b2b0775a2..343cfcf798 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -1020,6 +1020,12 @@ "section": "Utilities", "condition": "!config.integrity", "output": [ "privateFeature" ] + }, + "whatsthis": { + "label": "QWhatsThis", + "purpose": "Supports displaying \"What's this\" help.", + "section": "Widget Support", + "output": [ "publicFeature", "feature" ] } }, 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(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 5ae76abb55..680acb16e7 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -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 diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 18f8718330..b8f86acd75 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -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/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 3982b5568e..b8299e2cb8 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -860,7 +860,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 aadf63782f..e582787dd9 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -236,7 +236,7 @@ public: const QPoint &pos, const QPoint &globalPos, Qt::KeyboardModifiers modifiers); #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) static void handleEnterWhatsThisEvent(); #endif -- cgit v1.2.3 From 6dd61b4e62d9b67a721bbf671b7ffd62c0a50809 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Wed, 22 Feb 2017 14:06:51 +0300 Subject: xcb: Replace XCB_USE_XINPUT define by QT_CONFIG macro .. and remove it from qxcbconnection_xi2.cpp as this file is build _only_ when xinput2 is available. Change-Id: I66d6a299c120fc034f8519cd188e1b845d5bd1bc Reviewed-by: Gatis Paeglis --- src/gui/configure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/configure.json b/src/gui/configure.json index 343cfcf798..a2a78aa071 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -799,7 +799,7 @@ "xinput2": { "label": "Xinput2", "emitIf": "features.xcb", - "condition": "libs.xinput2", + "condition": "features.xcb-xlib && libs.xinput2", "output": [ "privateFeature" ] }, "xkbcommon-evdev": { -- cgit v1.2.3