mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:46:41 +00:00
UI: Add info to "Restart Required" dialog
This commit is contained in:
parent
f405c6d1f8
commit
8f8cf6043b
@ -125,8 +125,7 @@ void OptionsPage::saveService(bool isService)
|
||||
});
|
||||
}
|
||||
|
||||
QMetaObject::invokeMethod(
|
||||
fortManager(), &FortManager::processRestartRequired, Qt::QueuedConnection);
|
||||
fortManager()->processRestartRequired(tr("Windows Service installation changed"));
|
||||
}
|
||||
|
||||
void OptionsPage::onRetranslateUi()
|
||||
|
@ -268,7 +268,7 @@ bool FortManager::installDriver()
|
||||
if (IoC<FortSettings>()->hasService()) {
|
||||
// Re-install the service and app restart required to continue
|
||||
StartupUtil::setServiceInstalled(true);
|
||||
processRestartRequired();
|
||||
processRestartRequired(tr("Driver reinstalled"));
|
||||
} else {
|
||||
// Re-open the driver device and initialize it
|
||||
if (setupDriver()) {
|
||||
@ -403,12 +403,13 @@ void FortManager::setupServiceInfoManager()
|
||||
&ConfManager::updateDriverServices);
|
||||
}
|
||||
|
||||
void FortManager::processRestartRequired()
|
||||
void FortManager::processRestartRequired(const QString &info)
|
||||
{
|
||||
if (IoC<FortSettings>()->isService()) {
|
||||
qCDebug(LC) << "Restart required:" << info;
|
||||
IoC<ServiceManager>()->restart();
|
||||
} else {
|
||||
IoC<WindowManager>()->processRestartRequired();
|
||||
IoC<WindowManager>()->processRestartRequired(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ public slots:
|
||||
bool installDriver();
|
||||
bool removeDriver();
|
||||
|
||||
void processRestartRequired();
|
||||
void processRestartRequired(const QString &info = {});
|
||||
|
||||
static void setupPortableResource();
|
||||
static void setupResources();
|
||||
|
@ -56,7 +56,7 @@ void DbErrorManager::checkDriveList()
|
||||
|
||||
if (m_driveMask == driveMask) {
|
||||
// Restart on profile drive mounted
|
||||
IoC<FortManager>()->processRestartRequired();
|
||||
IoC<FortManager>()->processRestartRequired(tr("Profile's drive mounted"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user