summaryrefslogtreecommitdiff
authorhash <hash>2002-08-22 06:47:27 (UTC)
committer hash <hash>2002-08-22 06:47:27 (UTC)
commit4ed706f6a327e06403e1def058b7290dcde3e634 (patch) (unidiff)
treeb31268a6673791d4163712d83592750345a1c672
parentee8b169221775d527fdf76947503e870dfef63aa (diff)
downloadopie-4ed706f6a327e06403e1def058b7290dcde3e634.zip
opie-4ed706f6a327e06403e1def058b7290dcde3e634.tar.gz
opie-4ed706f6a327e06403e1def058b7290dcde3e634.tar.bz2
comments behind shift and meta key map definitions wasnt working...
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index 74c99c7..1c17172 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -1036,24 +1036,27 @@ void Keys::setKeysFromFile(const char * filename) {
1036 int row; 1036 int row;
1037 int qcode; 1037 int qcode;
1038 ushort unicode; 1038 ushort unicode;
1039 int width; 1039 int width;
1040 QString buf; 1040 QString buf;
1041 QString comment; 1041 QString comment;
1042 char * xpm[256]; //couldnt be larger than that... could it? 1042 char * xpm[256]; //couldnt be larger than that... could it?
1043 QPixmap *xpm2pix = 0; 1043 QPixmap *xpm2pix = 0;
1044 1044
1045 buf = t.readLine(); 1045 buf = t.readLine();
1046 while (buf) { 1046 while (buf) {
1047 1047
1048 // get rid of comments
1049 buf.replace(QRegExp("#.*$", FALSE, FALSE), "");
1050
1048 // key definition 1051 // key definition
1049 if (buf.contains(QRegExp("^\\d+\\s+[0-1a-fx]+", FALSE, FALSE))) { 1052 if (buf.contains(QRegExp("^\\d+\\s+[0-1a-fx]+", FALSE, FALSE))) {
1050 // no $1 type referencing!!! this implementation of regexp sucks 1053 // no $1 type referencing!!! this implementation of regexp sucks
1051 1054
1052 // dont know of any sscanf() type funcs in Qt lib 1055 // dont know of any sscanf() type funcs in Qt lib
1053 QTextStream tmp (buf, IO_ReadOnly); 1056 QTextStream tmp (buf, IO_ReadOnly);
1054 tmp >> row >> qcode >> unicode >> width >> comment; 1057 tmp >> row >> qcode >> unicode >> width >> comment;
1055 1058
1056 buf = t.readLine(); 1059 buf = t.readLine();
1057 int xpmLineCount = 0; 1060 int xpmLineCount = 0;
1058 xpm2pix = 0; 1061 xpm2pix = 0;
1059 1062