forked from qt-creator/qt-creator
AutoTest: Cache expanded state as well
Parsing may end up with incomplete information when parsing documents that are currently edited and contain syntax errors due to incomplete changes. This resulted in not re-adding all items which in turn led to lose also its expanded state when re-adding it in a later successful parse. Avoid the need to expand manually again and again by caching the expanded state for a couple of re-parses. Change-Id: I2994b9c7ab56c0c76f416d10247e68dea271cd10 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -64,7 +64,7 @@ public:
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
QList<QToolButton *> createToolButtons();
|
||||
|
||||
signals:
|
||||
void updateExpandedStateCache();
|
||||
|
||||
private:
|
||||
void onItemActivated(const QModelIndex &index);
|
||||
@@ -74,6 +74,7 @@ private:
|
||||
void onParsingFinished();
|
||||
void initializeFilterMenu();
|
||||
void onRunThisTestTriggered(TestRunMode runMode);
|
||||
void reapplyCachedExpandedState();
|
||||
|
||||
TestTreeModel *m_model;
|
||||
TestTreeSortFilterModel *m_sortFilterModel;
|
||||
@@ -85,6 +86,8 @@ private:
|
||||
Utils::ProgressIndicator *m_progressIndicator;
|
||||
QTimer *m_progressTimer;
|
||||
QFrame *m_missingFrameworksWidget;
|
||||
QHash<QString, bool> m_expandedStateCache;
|
||||
QHash<QString, int> m_itemUseCache;
|
||||
};
|
||||
|
||||
class TestNavigationWidgetFactory : public Core::INavigationWidgetFactory
|
||||
|
||||
Reference in New Issue
Block a user