MCPcopy Create free account
hub / github.com/MultiMC/Launcher / start

Method start

launcher/ui/widgets/ProgressWidget.cpp:26–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void ProgressWidget::start(std::shared_ptr<Task> task)
27{
28 if (m_task)
29 {
30 disconnect(m_task.get(), 0, this, 0);
31 }
32 m_task = task;
33 connect(m_task.get(), &Task::finished, this, &ProgressWidget::handleTaskFinish);
34 connect(m_task.get(), &Task::status, this, &ProgressWidget::handleTaskStatus);
35 connect(m_task.get(), &Task::progress, this, &ProgressWidget::handleTaskProgress);
36 connect(m_task.get(), &Task::destroyed, this, &ProgressWidget::taskDestroyed);
37 if (!m_task->isRunning())
38 {
39 QMetaObject::invokeMethod(m_task.get(), "start", Qt::QueuedConnection);
40 }
41}
42bool ProgressWidget::exec(std::shared_ptr<Task> task)
43{
44 QEventLoop loop;

Callers 15

checkForUpdateMethod · 0.45
updateChanListMethod · 0.45
loadVersionInfoMethod · 0.45
startTaskMethod · 0.45
requestMethod · 0.45
requestLogoMethod · 0.45
requestLogoMethod · 0.45
performSearchMethod · 0.45
requestLogoMethod · 0.45
suggestCurrentMethod · 0.45
requestMethod · 0.45

Calls 2

getMethod · 0.45
isRunningMethod · 0.45

Tested by

no test coverage detected