From 99ca5c796eba25412a1f3bdb4e8f0083c0e2e485 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 25 Nov 2024 06:17:08 -0600 Subject: Qt UI: Fixes for Installation Environment 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") --- ui/qt5/inputpage.cc | 9 ++++----- ui/qt5/intropage.cc | 2 +- ui/qt5/partitionmanualpage.cc | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'ui/qt5') 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 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; } } diff --git a/ui/qt5/intropage.cc b/ui/qt5/intropage.cc index d0189e7..20d139c 100644 --- a/ui/qt5/intropage.cc +++ b/ui/qt5/intropage.cc @@ -59,7 +59,7 @@ IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) { p->waitForStarted(); if(p->error() == QProcess::FailedToStart) { // We may be on the -inst CD that has no sudo and runs as root. - p->start("/usr/bin/partitionmanager"); + p->start("/usr/bin/partitionmanager", QStringList{}); } horizonWizard()->tools.push_back(p); }); diff --git a/ui/qt5/partitionmanualpage.cc b/ui/qt5/partitionmanualpage.cc index 28329bc..1509045 100644 --- a/ui/qt5/partitionmanualpage.cc +++ b/ui/qt5/partitionmanualpage.cc @@ -42,7 +42,7 @@ PartitionManualPage::PartitionManualPage(QWidget *parent) p.waitForStarted(); if(p.error() == QProcess::FailedToStart) { // We may be on the -inst CD that has no sudo and runs as root. - p.start("/usr/bin/partitionmanager"); + p.start("/usr/bin/partitionmanager", QStringList{}); } }); layout->addStretch(); -- cgit v1.2.3-70-g09d2