Diffstat (limited to 'inputmethods/multikey/keyboard.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index 1dd8ca1..de3aa52 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp @@ -96,9 +96,9 @@ Keyboard::~Keyboard() { void Keyboard::resizeEvent(QResizeEvent*) { int ph = picks->sizeHint().height(); picks->setGeometry( 0, 0, width(), ph ); - keyHeight = (height()-(usePicks ? ph : 0))/keys->rows(); + keyHeight = (height()-(usePicks ? ph : 0))/(keys->rows()?keys->rows():1); int nk; // number of keys? if ( useLargeKeys ) { nk = 15; @@ -1320,8 +1320,11 @@ Keys::Keys() { map = QPEApplication::qpeDir() + "/share/multikey/" + l + ".keymap"; } + if (map.isNull() || !(QFile(map).exists())) { + map = QPEApplication::qpeDir() + "/share/multikey/en.keymap"; + } setKeysFromFile(map); } |