From 1ee836bd1bb777dded54810909e508dc0470ada3 Mon Sep 17 00:00:00 2001 From: sandman Date: Tue, 22 Oct 2002 11:38:47 +0000 Subject: - Always try to load the "en" keymap, if a user specified one cannot be found - Fix the divison by zero error in resizeEvent, in case there is a keymap with 0 rows or no keymap at all. --- (limited to 'inputmethods') 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 @@ -97,7 +97,7 @@ 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 ) { @@ -1321,7 +1321,10 @@ Keys::Keys() { + l + ".keymap"; } - + if (map.isNull() || !(QFile(map).exists())) { + map = QPEApplication::qpeDir() + "/share/multikey/en.keymap"; + } + setKeysFromFile(map); } diff --git a/inputmethods/multikey/keyboardimpl.cpp b/inputmethods/multikey/keyboardimpl.cpp index 2bcb0fa..cebd43d 100644 --- a/inputmethods/multikey/keyboardimpl.cpp +++ b/inputmethods/multikey/keyboardimpl.cpp @@ -78,7 +78,6 @@ QPixmap *KeyboardImpl::icon() QString KeyboardImpl::name() { return qApp->translate( "InputMethods", "Multikey" ); -// return qApp->translate( "InputMethods", "Opti" ); } void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) -- cgit v0.9.0.2