-rw-r--r-- | inputmethods/multikey/configdlg.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp index a9137b9..9ea59a4 100644 --- a/inputmethods/multikey/configdlg.cpp +++ b/inputmethods/multikey/configdlg.cpp @@ -242,12 +242,15 @@ void ConfigDlg::setMap(int index) { } // ConfigDlg::addMap() {{{1 void ConfigDlg::addMap() { QString map = OFileDialog::getOpenFileName(1, QDir::home().absPath()); + + if (map.isNull()) return; + Config config ("multikey"); config.setGroup("keymaps"); QStringList maps = config.readListEntry("maps", QChar('|')); maps.append(map); keymaps->insertItem(map); keymaps->setSelected(keymaps->count() - 1, true); |