diff options
author | BogDan Vatra <bogdan@kdab.com> | 2016-01-14 17:38:25 +0200 |
---|---|---|
committer | BogDan Vatra <bogdan@kdab.com> | 2016-01-14 15:46:08 +0000 |
commit | 825f7fe1d80583fe70c1616e1d3973cc3dc65e7b (patch) | |
tree | 1ed8cb3c4328e7052ebaf2f790852f77e1cf1ac9 /src | |
parent | 4a63bba7ce76801b8bea1094a7ff16a9f8029b37 (diff) |
Make axisIdentifier & buttonIdentifier const
Change-Id: Idedf3cab5d8a30d1a417ceb10555170b53b00d26
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/input/frontend/qabstractphysicaldevice.h | 4 | ||||
-rw-r--r-- | src/input/frontend/qkeyboardcontroller.cpp | 4 | ||||
-rw-r--r-- | src/input/frontend/qkeyboardcontroller.h | 4 | ||||
-rw-r--r-- | src/input/frontend/qmousecontroller.cpp | 4 | ||||
-rw-r--r-- | src/input/frontend/qmousecontroller.h | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/input/frontend/qabstractphysicaldevice.h b/src/input/frontend/qabstractphysicaldevice.h index 915042edc..8056a195b 100644 --- a/src/input/frontend/qabstractphysicaldevice.h +++ b/src/input/frontend/qabstractphysicaldevice.h @@ -62,8 +62,8 @@ public: virtual QStringList axisNames() const = 0; virtual QStringList buttonNames() const = 0; - virtual int axisIdentifier(const QString &name) = 0; - virtual int buttonIdentifier(const QString &name) = 0; + virtual int axisIdentifier(const QString &name) const = 0; + virtual int buttonIdentifier(const QString &name) const = 0; void addAxisSetting(QAxisSetting *axisSetting); void removeAxisSetting(QAxisSetting *axisSetting); diff --git a/src/input/frontend/qkeyboardcontroller.cpp b/src/input/frontend/qkeyboardcontroller.cpp index 77b54c7fa..09ff52066 100644 --- a/src/input/frontend/qkeyboardcontroller.cpp +++ b/src/input/frontend/qkeyboardcontroller.cpp @@ -258,13 +258,13 @@ QStringList QKeyboardController::buttonNames() const return d->m_keyNames; } -int QKeyboardController::axisIdentifier(const QString &name) +int QKeyboardController::axisIdentifier(const QString &name) const { Q_UNUSED(name); return 0; } -int QKeyboardController::buttonIdentifier(const QString &name) +int QKeyboardController::buttonIdentifier(const QString &name) const { Q_D(const QKeyboardController); return d->m_keyMap.value(name, 0); diff --git a/src/input/frontend/qkeyboardcontroller.h b/src/input/frontend/qkeyboardcontroller.h index aafbd3e57..e929629d9 100644 --- a/src/input/frontend/qkeyboardcontroller.h +++ b/src/input/frontend/qkeyboardcontroller.h @@ -62,8 +62,8 @@ public: int buttonCount() const Q_DECL_FINAL; QStringList axisNames() const Q_DECL_FINAL; QStringList buttonNames() const Q_DECL_FINAL; - int axisIdentifier(const QString &name) Q_DECL_FINAL; - int buttonIdentifier(const QString &name) Q_DECL_FINAL; + int axisIdentifier(const QString &name) const Q_DECL_FINAL; + int buttonIdentifier(const QString &name) const Q_DECL_FINAL; protected: QKeyboardController(QKeyboardControllerPrivate &dd, QNode *parent = 0); diff --git a/src/input/frontend/qmousecontroller.cpp b/src/input/frontend/qmousecontroller.cpp index a8e3cbc61..30b200629 100644 --- a/src/input/frontend/qmousecontroller.cpp +++ b/src/input/frontend/qmousecontroller.cpp @@ -107,7 +107,7 @@ QStringList QMouseController::buttonNames() const << QStringLiteral("Center"); } -int QMouseController::axisIdentifier(const QString &name) +int QMouseController::axisIdentifier(const QString &name) const { if (name == QStringLiteral("X")) return X; @@ -116,7 +116,7 @@ int QMouseController::axisIdentifier(const QString &name) return -1; } -int QMouseController::buttonIdentifier(const QString &name) +int QMouseController::buttonIdentifier(const QString &name) const { if (name == QStringLiteral("Left")) return Left; diff --git a/src/input/frontend/qmousecontroller.h b/src/input/frontend/qmousecontroller.h index 8a03d7e14..3773c652c 100644 --- a/src/input/frontend/qmousecontroller.h +++ b/src/input/frontend/qmousecontroller.h @@ -72,8 +72,8 @@ public: int buttonCount() const Q_DECL_FINAL; QStringList axisNames() const Q_DECL_FINAL; QStringList buttonNames() const Q_DECL_FINAL; - int axisIdentifier(const QString &name) Q_DECL_FINAL; - int buttonIdentifier(const QString &name) Q_DECL_FINAL; + int axisIdentifier(const QString &name) const Q_DECL_FINAL; + int buttonIdentifier(const QString &name) const Q_DECL_FINAL; float sensitivity() const; |