Skip to content

Commit

Permalink
Fix reboot target chosen by m_rebootItemIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
Inokinoki committed Apr 10, 2022
1 parent 30054b6 commit ef48472
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions qefientryview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ void QEFIEntryView::resetFromStaticListClicked(bool checked)
void QEFIEntryView::rebootClicked(bool checked)
{
Q_UNUSED(checked);
if (m_rebootItemIndex >= 0 || m_rebootItemIndex < m_order.size()) {
qDebug() << "[EFIRebootView] Set " << m_order[m_rebootItemIndex] << " "
<< m_entryItems[m_order[m_rebootItemIndex]].name() << " as reboot target";
if (m_selectedItemIndex >= 0 || m_selectedItemIndex < m_order.size()) {
qDebug() << "[EFIRebootView] Set " << m_order[m_selectedItemIndex] << " "
<< m_entryItems[m_order[m_selectedItemIndex]].name() << " as reboot target";
// Set BootNext
QEFIEntryStaticList::instance()->setBootNext(m_order[m_rebootItemIndex]);
QEFIEntryStaticList::instance()->setBootNext(m_order[m_selectedItemIndex]);
int ret = QMessageBox::warning(this, QStringLiteral("Reboot to ") +
m_entryItems[m_order[m_rebootItemIndex]].name(),
m_entryItems[m_order[m_selectedItemIndex]].name(),
QStringLiteral("Do you want to reboot now?"),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);
Expand Down
1 change: 0 additions & 1 deletion qefientryview.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class QEFIEntryView: public QWidget
QList<quint16> m_order;

int m_selectedItemIndex;
int m_rebootItemIndex;

void updateButtonState();
public:
Expand Down

0 comments on commit ef48472

Please sign in to comment.