diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-08-22 00:11:16 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-22 02:04:39 +0200 |
commit | c374f4441ab42d1849431bb42fec91a976a8e502 (patch) | |
tree | 0733146c5df48b91a39097730c445dbe9cd2359a /src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h | |
parent | 85b24bb2dea97c3a9b013bacd5a422b26fe5d14b (diff) | |
parent | c8ca300e491c186304d0864a9e870337e891e6f7 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h')
-rw-r--r-- | src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h index cc1db20432..aa65b7b895 100644 --- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h +++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h @@ -42,19 +42,29 @@ #ifndef QTABLEGENERATOR_H #define QTABLEGENERATOR_H -#include <QtCore/QList> +#include <QtCore/QVector> #include <QtCore/QFile> #include <QtCore/QMap> #include <QtCore/QString> #define QT_KEYSEQUENCE_MAX_LEN 6 +//#define DEBUG_GENERATOR + struct QComposeTableElement { uint keys[QT_KEYSEQUENCE_MAX_LEN]; uint value; +#ifdef DEBUG_GENERATOR QString comment; +#endif }; +#ifndef DEBUG_GENERATOR +QT_BEGIN_NAMESPACE +Q_DECLARE_TYPEINFO(QComposeTableElement, Q_PRIMITIVE_TYPE); +QT_END_NAMESPACE +#endif + class Compare { public: @@ -97,12 +107,12 @@ public: void printComposeTable() const; void orderComposeTable(); - QList<QComposeTableElement> composeTable() const; + QVector<QComposeTableElement> composeTable() const; TableState tableState() const { return m_state; } protected: bool processFile(QString composeFileName); - void parseKeySequence(QString line); + void parseKeySequence(char *line); void parseIncludeInstruction(QString line); void findComposeFile(); @@ -110,16 +120,14 @@ protected: QString systemComposeDir(); ushort keysymToUtf8(quint32 sym); - quint32 stringToKeysym(QString keysymName); - void readLocaleMappings(); + QString readLocaleMappings(const QByteArray &locale); void initPossibleLocations(); bool cleanState() const { return ((m_state & NoErrors) == NoErrors); } QString locale() const; private: - QList<QComposeTableElement> m_composeTable; - QMap<QString, QString> m_localeToTable; + QVector<QComposeTableElement> m_composeTable; TableState m_state; QString m_systemComposeDir; QList<QString> m_possibleLocations; |