NOISSUE Add a skeleton of the wonko system

This commit is contained in:
Jan Dalheimer
2016-04-06 23:09:30 +02:00
committed by Petr Mrázek
parent 5ae3b2c114
commit 00e5968bd2
53 changed files with 2632 additions and 32 deletions

View File

@ -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())

View File

@ -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());