NOISSUE Add a skeleton of the wonko system
This commit is contained in:

committed by
Petr Mrázek

parent
5ae3b2c114
commit
00e5968bd2
@ -97,6 +97,18 @@ int ProgressDialog::execWithTask(Task *task)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: only provide the unique_ptr overloads
|
||||
int ProgressDialog::execWithTask(std::unique_ptr<Task> &&task)
|
||||
{
|
||||
connect(this, &ProgressDialog::destroyed, task.get(), &Task::deleteLater);
|
||||
return execWithTask(task.release());
|
||||
}
|
||||
int ProgressDialog::execWithTask(std::unique_ptr<Task> &task)
|
||||
{
|
||||
connect(this, &ProgressDialog::destroyed, task.get(), &Task::deleteLater);
|
||||
return execWithTask(task.release());
|
||||
}
|
||||
|
||||
bool ProgressDialog::handleImmediateResult(QDialog::DialogCode &result)
|
||||
{
|
||||
if(task->isFinished())
|
||||
|
@ -16,6 +16,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include <memory>
|
||||
|
||||
class Task;
|
||||
|
||||
@ -35,6 +36,8 @@ public:
|
||||
void updateSize();
|
||||
|
||||
int execWithTask(Task *task);
|
||||
int execWithTask(std::unique_ptr<Task> &&task);
|
||||
int execWithTask(std::unique_ptr<Task> &task);
|
||||
|
||||
void setSkipButton(bool present, QString label = QString());
|
||||
|
||||
|
Reference in New Issue
Block a user