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