Qt: Fix progress dialog cancelling
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/progress_callback.h"
|
||||
#include "common/timer.h"
|
||||
#include <QtCore/QThread>
|
||||
|
||||
#include <QtCore/QSemaphore>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtWidgets/QProgressDialog>
|
||||
#include <atomic>
|
||||
|
||||
@@ -17,7 +19,7 @@ public:
|
||||
QtModalProgressCallback(QWidget* parent_widget, float show_delay = 0.0f);
|
||||
~QtModalProgressCallback();
|
||||
|
||||
bool IsCancelled() const override;
|
||||
QProgressDialog& GetDialog() { return m_dialog; }
|
||||
|
||||
void SetCancellable(bool cancellable) override;
|
||||
void SetTitle(const char* title) override;
|
||||
@@ -34,6 +36,9 @@ public:
|
||||
bool ModalConfirmation(const char* message) override;
|
||||
void ModalInformation(const char* message) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void dialogCancelled();
|
||||
|
||||
private:
|
||||
void checkForDelayedShow();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user