Fix launch when no java is loaded
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
828acef7e9
commit
14fb54afd9
31 changed files with 163 additions and 290 deletions
|
@ -50,7 +50,9 @@
|
|||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
#include "QObjectPtr.h"
|
||||
#include "VersionPage.h"
|
||||
#include "tasks/SequentialTask.h"
|
||||
#include "ui/dialogs/InstallLoaderDialog.h"
|
||||
#include "ui_VersionPage.h"
|
||||
|
||||
|
@ -415,14 +417,18 @@ void VersionPage::on_actionDownload_All_triggered()
|
|||
return;
|
||||
}
|
||||
|
||||
auto updateTask = m_inst->createUpdateTask(Net::Mode::Online);
|
||||
if (!updateTask) {
|
||||
auto updateTasks = m_inst->createUpdateTask();
|
||||
if (updateTasks.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
auto task = makeShared<SequentialTask>(this);
|
||||
for (auto t : updateTasks) {
|
||||
task->addTask(t);
|
||||
}
|
||||
ProgressDialog tDialog(this);
|
||||
connect(updateTask.get(), &Task::failed, this, &VersionPage::onGameUpdateError);
|
||||
connect(task.get(), &Task::failed, this, &VersionPage::onGameUpdateError);
|
||||
// FIXME: unused return value
|
||||
tDialog.execWithTask(updateTask.get());
|
||||
tDialog.execWithTask(task.get());
|
||||
updateButtons();
|
||||
m_container->refreshContainer();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue