forked from qt-creator/qt-creator
CppTools: Do not call GC() more than necessary
Currently GC() is invoked if
- 5 CppEditors were closed or the last CppEditor was closed
- a project is about to be removed
- a session is about to be unloaded
Thus, for the following use cases, too much GC() calls (can) happen:
- File > Close All
- Close All Projects and Editors
- Changing the session
Fixed by introducing a timer.
Change-Id: I9c984d9de735fc8c6ee77a518e9fb5b63dba5881
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -84,6 +84,7 @@ public:
|
||||
Project *createProject(const QString &name);
|
||||
|
||||
QStringList waitForRefreshedSourceFiles();
|
||||
void waitForFinishedGc();
|
||||
|
||||
signals:
|
||||
void aboutToRemoveProject(ProjectExplorer::Project *project);
|
||||
@@ -91,8 +92,10 @@ signals:
|
||||
|
||||
public slots:
|
||||
void sourceFilesRefreshed(const QStringList &files);
|
||||
void gcFinished();
|
||||
|
||||
private:
|
||||
bool m_gcFinished;
|
||||
bool m_refreshHappened;
|
||||
QStringList m_lastRefreshedSourceFiles;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user