summaryrefslogtreecommitdiff
path: root/src/mainwindow.h
diff options
context:
space:
mode:
authorAL <26797547+Al12rs@users.noreply.github.com>2020-06-06 18:08:30 +0200
committerAL <26797547+Al12rs@users.noreply.github.com>2020-06-06 18:08:30 +0200
commit1497685ea5d7059b34bfb65643388a4f4edf4d49 (patch)
tree78c13bae0f6d0335c51848748f2dcaec0682d5c6 /src/mainwindow.h
parent226b2b1843bbf41581757f44f8a2f4728f0a4b19 (diff)
Make checkForProblems update local variable with the problem count,
Make updateProblemsButton just update the ui using that variable (no heavy operation) Add checkForProblemsAsync to perform the heavy checks in another thread.
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 25d09584..1f66c860 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 problemCount and singnals checkForProblemsDone().
+ void checkForProblems();
void setCategoryListVisible(bool visible);
@@ -267,8 +270,6 @@ private:
QMenu *openFolderMenu();
- void scheduleUpdateButton();
-
QDir currentSavesDir() const;
void startMonitorSaves();
@@ -358,6 +359,8 @@ private:
// when painting the count
QIcon m_originalNotificationIcon;
+ size_t m_NumberOfProblems;
+
Executable* getSelectedExecutable();
private slots:
@@ -523,8 +526,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.
+ void checkForProblemsAsync();
+
void saveModMetas();
void updateStyle(const QString &style);