1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

Add progress_dialog::SignalFailure()

Turns the taskbar progress bar red, commonly used on Windows
in cases like this to signal failure.
This commit is contained in:
Silent 2019-10-05 17:22:40 +02:00 committed by Ivan
parent b30be0fbc1
commit abfa1114bc
2 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,14 @@ void progress_dialog::SetValue(int progress)
QProgressDialog::setValue(value); QProgressDialog::setValue(value);
} }
void progress_dialog::SignalFailure()
{
#ifdef _WIN32
m_tb_progress->stop();
#endif
// TODO: Implement an equivalent for Linux, if possible
}
#ifdef HAVE_QTDBUS #ifdef HAVE_QTDBUS
void progress_dialog::UpdateProgress(int progress, bool disable) void progress_dialog::UpdateProgress(int progress, bool disable)
{ {

View File

@ -20,6 +20,7 @@ public:
progress_dialog(const QString &windowTitle, const QString &labelText, const QString &cancelButtonText, int minimum, int maximum, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags()); progress_dialog(const QString &windowTitle, const QString &labelText, const QString &cancelButtonText, int minimum, int maximum, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
~progress_dialog(); ~progress_dialog();
void SetValue(int progress); void SetValue(int progress);
void SignalFailure();
private: private:
#ifdef _WIN32 #ifdef _WIN32