diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-11-13 13:42:41 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-11-13 23:28:39 +0100 |
commit | 8a0a43bdaa216c131ab11b2bf7112eb746d7fc35 (patch) | |
tree | bc016d5c9f752cda8bf7a7a47fe6b4136467dbc0 /src/gui/kernel/qevent.h | |
parent | 64d62c53c1e92a1cc07449a0ea3c71501592c1e7 (diff) | |
download | qtbase-8a0a43bdaa216c131ab11b2bf7112eb746d7fc35.tar.gz |
Inline trivial getters for QEvent subclasses
Change-Id: Ic0ee4f3e311e1068d23796cee4fe58008a2a8114
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r-- | src/gui/kernel/qevent.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 609d59740e..2d17d68b3f 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -937,11 +937,11 @@ public: explicit QScrollPrepareEvent(const QPointF &startPos); ~QScrollPrepareEvent(); - QPointF startPos() const; + QPointF startPos() const { return m_startPos; } - QSizeF viewportSize() const; - QRectF contentPosRange() const; - QPointF contentPos() const; + QSizeF viewportSize() const { return m_viewportSize; } + QRectF contentPosRange() const { return m_contentPosRange; } + QPointF contentPos() const { return m_contentPos; } void setViewportSize(const QSizeF &size); void setContentPosRange(const QRectF &rect); @@ -968,9 +968,9 @@ public: QScrollEvent(const QPointF &contentPos, const QPointF &overshoot, ScrollState scrollState); ~QScrollEvent(); - QPointF contentPos() const; - QPointF overshootDistance() const; - ScrollState scrollState() const; + QPointF contentPos() const { return m_contentPos; } + QPointF overshootDistance() const { return m_overshoot; } + ScrollState scrollState() const { return m_state; } private: QPointF m_contentPos; @@ -984,8 +984,8 @@ public: QScreenOrientationChangeEvent(QScreen *screen, Qt::ScreenOrientation orientation); ~QScreenOrientationChangeEvent(); - QScreen *screen() const; - Qt::ScreenOrientation orientation() const; + QScreen *screen() const { return m_screen; } + Qt::ScreenOrientation orientation() const { return m_orientation; } private: QScreen *m_screen; @@ -996,7 +996,7 @@ class Q_GUI_EXPORT QApplicationStateChangeEvent : public QEvent { public: explicit QApplicationStateChangeEvent(Qt::ApplicationState state); - Qt::ApplicationState applicationState() const; + Qt::ApplicationState applicationState() const { return m_applicationState; } private: Qt::ApplicationState m_applicationState; |