-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 3 |
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 @@ -1042,12 +1042,15 @@ void Keys::setKeysFromFile(const char * filename) { 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); |