summaryrefslogtreecommitdiff
path: root/src/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 25d09584..94626ff3 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -178,6 +178,8 @@ signals:
void modListDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void checkForProblemsDone();
+
protected:
virtual void showEvent(QShowEvent *event);
@@ -244,8 +246,9 @@ private:
void fixCategories();
bool extractProgress(QProgressDialog &extractProgress, int percentage, std::string fileName);
-
- size_t checkForProblems();
+
+ // Performs checks, sets the m_NumberOfProblems and signals checkForProblemsDone().
+ void checkForProblemsImpl();
void setCategoryListVisible(bool visible);
@@ -267,8 +270,6 @@ private:
QMenu *openFolderMenu();
- void scheduleUpdateButton();
-
QDir currentSavesDir() const;
void startMonitorSaves();
@@ -358,6 +359,10 @@ private:
// when painting the count
QIcon m_originalNotificationIcon;
+ std::atomic<std::size_t> m_NumberOfProblems;
+ std::atomic<bool> m_ProblemsCheckRequired;
+ std::mutex m_CheckForProblemsMutex;
+
Executable* getSelectedExecutable();
private slots:
@@ -523,8 +528,15 @@ private slots:
void checkBSAList();
+ // Only visually update the problems icon.
void updateProblemsButton();
+ // Queue a problem check to allow collapsing of multiple requests in short amount of time.
+ void scheduleCheckForProblems();
+
+ // Perform the actual problem check in another thread.
+ QFuture<void> checkForProblemsAsync();
+
void saveModMetas();
void updateStyle(const QString &style);