summaryrefslogtreecommitdiff
authorhash <hash>2002-08-22 06:47:27 (UTC)
committer hash <hash>2002-08-22 06:47:27 (UTC)
commit4ed706f6a327e06403e1def058b7290dcde3e634 (patch) (side-by-side diff)
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) (show 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
@@ -1032,32 +1032,35 @@ void Keys::setKeysFromFile(const char * filename) {
if (f.open(IO_ReadOnly)) {
QTextStream t(&f);
int row;
int qcode;
ushort unicode;
int width;
QString buf;
QString comment;
char * xpm[256]; //couldnt be larger than that... could it?
QPixmap *xpm2pix = 0;
buf = t.readLine();
while (buf) {
+ // get rid of comments
+ buf.replace(QRegExp("#.*$", FALSE, FALSE), "");
+
// key definition
if (buf.contains(QRegExp("^\\d+\\s+[0-1a-fx]+", FALSE, FALSE))) {
// no $1 type referencing!!! this implementation of regexp sucks
// dont know of any sscanf() type funcs in Qt lib
QTextStream tmp (buf, IO_ReadOnly);
tmp >> row >> qcode >> unicode >> width >> comment;
buf = t.readLine();
int xpmLineCount = 0;
xpm2pix = 0;
// erase blank space
while (buf.contains(QRegExp("^\\s*$")) && buf) buf = t.readLine();
while (buf.contains(QRegExp("^\\s*\".*\""))) {