void MainWidget::mainTabRestartProfile() { if (debug) qDebug() << PDEBUG; if (!checkExternalApps(QString("netctl"), configuration, debug)) { ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); return mainWindow->emitNeedToBeConfigured(); } if (ui->tableWidget_main->currentItem() == nullptr) return; mainWindow->setDisabled(true); QString profile = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 0)->text(); InterfaceAnswer answer = restartProfileSlot(profile, mainWindow->netctlInterface, useHelper, debug); mainWindow->showMessage(answer == InterfaceAnswer::True); updateMainTab(); }
void MainWindow::mainTabRestartProfile() { if (debug) qDebug() << PDEBUG; if (!checkExternalApps(QString("netctl"))) { ErrorWindow::showWindow(1, QString(PDEBUG), debug); emit(needToBeConfigured()); return; } if (ui->tableWidget_main->currentItem() == nullptr) return; ui->tabWidget->setDisabled(true); QString profile = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 0)->text(); if (restartProfileSlot(profile)) ui->statusBar->showMessage(QApplication::translate("MainWindow", "Done")); else ui->statusBar->showMessage(QApplication::translate("MainWindow", "Error")); updateMainTab(); }