diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2012-12-14 18:19:07 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-08 03:17:37 +0100 |
commit | fd4c5b6e1c4ef488e827a1610fd62e1105373a13 (patch) | |
tree | a9abe03a704b749b7b6aa72960a221fb421296ac /src/quick/items/qquickitem_p.h | |
parent | c280d67864dbef12c490380c29e03d5b18c102f1 (diff) |
Deinline QQuickKeysAttached::keyToSignal.
This also means we don't need to expose the SigMap struct or value - it can be
made file-local. This isn't performance-critical, so it shouldn't really matter.
Change-Id: I08d48df4f903df49a6ea58e6f10f3f53a97d89de
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Diffstat (limited to 'src/quick/items/qquickitem_p.h')
-rw-r--r-- | src/quick/items/qquickitem_p.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 804b10deac..10c7798ff6 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -819,28 +819,9 @@ private: virtual void inputMethodEvent(QInputMethodEvent *, bool post); virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const; #endif - const QByteArray keyToSignal(int key) { - QByteArray keySignal; - if (key >= Qt::Key_0 && key <= Qt::Key_9) { - keySignal = "digit0Pressed"; - keySignal[5] = '0' + (key - Qt::Key_0); - } else { - int i = 0; - while (sigMap[i].key && sigMap[i].key != key) - ++i; - keySignal = sigMap[i].sig; - } - return keySignal; - } + const QByteArray keyToSignal(int key); bool isConnected(const char *signalName); - - struct SigMap { - int key; - const char *sig; - }; - - static const SigMap sigMap[]; }; Qt::MouseButtons QQuickItemPrivate::acceptedMouseButtons() const |