[Updater] In-app updater

* start downloading automatically in 1st screen
* minor changes
This commit is contained in:
Klaus Basan
2019-10-31 23:20:54 +01:00
committed by Mat Sutcliffe
parent 5bed714e75
commit 4e3c819f6d
2 changed files with 8 additions and 10 deletions

View File

@@ -313,17 +313,15 @@ namespace BlackGui
**/
}
const bool started = QProcess::startDetached(executable, arguments, dir.absolutePath());
if (started)
const bool shutdown = ui->cb_Shutdown->isChecked();
const bool started = QProcess::startDetached(executable, arguments, dir.absolutePath());
if (started && shutdown && sGui)
{
const bool shutdown = ui->cb_Shutdown->isChecked();
if (sGui && shutdown)
QTimer::singleShot(250, sGui, []
{
QTimer::singleShot(1000, sGui, []
{
CGuiApplication::exit();
});
}
if (!sGui) { return; }
CGuiApplication::exit();
});
break;
}
} // files

View File

@@ -174,7 +174,7 @@ namespace BlackGui
{
m_downloadDialog->setMode(CDownloadComponent::SwiftInstaller);
m_downloadDialog->setDownloadFile(artifact.asRemoteFile());
m_downloadDialog->show();
m_downloadDialog->showAndStartDownloading();
}
}