Qt: Delay showing game list refresh progress
Otherwise we spend more time updating the visuals than actually scanning.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "common/progress_callback.h"
|
||||
#include "common/timer.h"
|
||||
#include <QtWidgets/QProgressDialog>
|
||||
|
||||
class QtProgressCallback final : public QObject, public BaseProgressCallback
|
||||
@ -7,7 +8,7 @@ class QtProgressCallback final : public QObject, public BaseProgressCallback
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtProgressCallback(QWidget* parent_widget);
|
||||
QtProgressCallback(QWidget* parent_widget, float show_delay = 0.0f);
|
||||
~QtProgressCallback();
|
||||
|
||||
bool IsCancelled() const override;
|
||||
@ -28,5 +29,9 @@ public:
|
||||
void ModalInformation(const char* message) override;
|
||||
|
||||
private:
|
||||
void checkForDelayedShow();
|
||||
|
||||
QProgressDialog m_dialog;
|
||||
Common::Timer m_show_timer;
|
||||
float m_show_delay;
|
||||
};
|
||||
Reference in New Issue
Block a user