mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
change(Task): warn when disposing while running
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
a17a45c748
commit
ae7e143537
2 changed files with 8 additions and 1 deletions
|
|
@ -48,6 +48,13 @@ Task::Task(bool show_debug) : m_show_debug(show_debug)
|
|||
setAutoDelete(false);
|
||||
}
|
||||
|
||||
Task::~Task()
|
||||
{
|
||||
if (isRunning()) {
|
||||
qCWarning(taskLogC) << "Task" << describe() << "disposed while running!";
|
||||
}
|
||||
}
|
||||
|
||||
void Task::setStatus(const QString& new_status)
|
||||
{
|
||||
if (m_status != new_status) {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class Task : public QObject, public QRunnable {
|
|||
|
||||
public:
|
||||
explicit Task(bool show_debug_log = true);
|
||||
virtual ~Task() = default;
|
||||
~Task() override;
|
||||
|
||||
bool isRunning() const;
|
||||
bool isFinished() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue