summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qkeysequenceedit_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2013-11-09 16:58:52 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-14 18:59:38 +0100
commit6b745d6c6336445ec98cbed4dfa1fd3fb801b369 (patch)
tree681a03520aa32819661770fd62cf1a3da8ce99f7 /src/widgets/widgets/qkeysequenceedit_p.h
parentee53530a0e7a60828d74cf29a42bacb2828c9ded (diff)
Move MaxKeyCount from QKeySequenceEditPrivate to QKeySequencePrivate
Adjust users and add a static_cast that MaxKeyCount be 4. That is instead of adjusting all the code to use MaxKeyCount instead, some of which cannot be thus changed (e.g. where using the QKeySequence(int, int, int, int) constructor). This was requested in the original review, but never implemented. Change-Id: I3812340890f4d75257139f04e73e83083ca09760 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/widgets/widgets/qkeysequenceedit_p.h')
-rw-r--r--src/widgets/widgets/qkeysequenceedit_p.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/widgets/widgets/qkeysequenceedit_p.h b/src/widgets/widgets/qkeysequenceedit_p.h
index 58c9699059..f74433bb71 100644
--- a/src/widgets/widgets/qkeysequenceedit_p.h
+++ b/src/widgets/widgets/qkeysequenceedit_p.h
@@ -46,6 +46,7 @@
#include "qkeysequenceedit.h"
#include <private/qwidget_p.h>
+#include <private/qkeysequence_p.h>
QT_BEGIN_NAMESPACE
@@ -57,8 +58,6 @@ class QKeySequenceEditPrivate : public QWidgetPrivate
{
Q_DECLARE_PUBLIC(QKeySequenceEdit)
public:
- enum { MaxKeyCount = 4 };
-
void init();
int translateModifiers(Qt::KeyboardModifiers state, const QString &text);
void resetState();
@@ -67,7 +66,7 @@ public:
QLineEdit *lineEdit;
QKeySequence keySequence;
int keyNum;
- int key[MaxKeyCount];
+ int key[QKeySequencePrivate::MaxKeyCount];
int prevKey;
int releaseTimer;
};