summaryrefslogtreecommitdiff
path: root/ui/qt5/inputpage.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt5/inputpage.cc')
-rw-r--r--ui/qt5/inputpage.cc9
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;
}
}