diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-11-25 06:17:08 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-11-25 06:22:56 -0600 |
commit | 99ca5c796eba25412a1f3bdb4e8f0083c0e2e485 (patch) | |
tree | 898b9ea66d85f9615625f36c4ac0dc1c9cf26a34 /ui/qt5/inputpage.cc | |
parent | 86cb8aa30e2dcbbcfa94d233d6397763aac6ad95 (diff) | |
download | horizon-99ca5c796eba25412a1f3bdb4e8f0083c0e2e485.tar.gz horizon-99ca5c796eba25412a1f3bdb4e8f0083c0e2e485.tar.bz2 horizon-99ca5c796eba25412a1f3bdb4e8f0083c0e2e485.tar.xz horizon-99ca5c796eba25412a1f3bdb4e8f0083c0e2e485.zip |
Qt UI: Fixes for Installation Environment0.9.9
Some typos and thinkos managed to slip through CI. Fix those.
Fixes: d56707af8b9c ("Add friendly names for keymaps")
Fixes: 4e77d86d6fc1 ("Qt UI: Fall back to non-sudo when launching KPM")
Diffstat (limited to 'ui/qt5/inputpage.cc')
-rw-r--r-- | ui/qt5/inputpage.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/qt5/inputpage.cc b/ui/qt5/inputpage.cc index 5e1958e..cbcc10d 100644 --- a/ui/qt5/inputpage.cc +++ b/ui/qt5/inputpage.cc @@ -54,7 +54,7 @@ InputPage::InputPage(QWidget *parent) : HorizonWizardPage(parent) { if(current == nullptr) return; QProcess setxkbmap; - setxkbmap.execute("setxkbmap", {current->text()}); + setxkbmap.execute("setxkbmap", {current->data(Qt::ToolTipRole).toString()}); }); /* REQ: UI.Input.Test */ @@ -82,10 +82,9 @@ void InputPage::initializePage() { if(dpy != nullptr) { XkbRF_VarDefsRec vardefs{}; XkbRF_GetNamesProp(dpy, nullptr, &vardefs); - QList<QListWidgetItem *> items = layoutList->items(); - for(int idx = 0; idx < items.size(); ++idx) { - if(items.at(idx)->data(Qt::ToolTipRole).toString == vardefs.layout) { - layoutList->setCurrentItem(items.at(idx)); + for(int idx = 0; idx < layoutList->count(); ++idx) { + if(layoutList->item(idx)->data(Qt::ToolTipRole).toString() == vardefs.layout) { + layoutList->setCurrentRow(idx); break; } } |