forked from qt-creator/qt-creator
AutoTest: Fix using of cache
Change-Id: I3f7695c96139c1f1809631ead1b723e3820b240d Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -116,6 +116,8 @@ TestNavigationWidget::TestNavigationWidget(QWidget *parent) :
|
||||
this, &TestNavigationWidget::reapplyCachedExpandedState);
|
||||
connect(m_progressTimer, &QTimer::timeout,
|
||||
m_progressIndicator, &Utils::ProgressIndicator::show);
|
||||
connect(m_view, &TestTreeView::expanded, this, &TestNavigationWidget::updateExpandedStateCache);
|
||||
connect(m_view, &TestTreeView::collapsed, this, &TestNavigationWidget::updateExpandedStateCache);
|
||||
}
|
||||
|
||||
void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
@@ -226,8 +228,18 @@ QList<QToolButton *> TestNavigationWidget::createToolButtons()
|
||||
collapse->setIcon(Utils::Icons::COLLAPSE_TOOLBAR.icon());
|
||||
collapse->setToolTip(tr("Collapse All"));
|
||||
|
||||
connect(expand, &QToolButton::clicked, m_view, &TestTreeView::expandAll);
|
||||
connect(collapse, &QToolButton::clicked, m_view, &TestTreeView::collapseAll);
|
||||
connect(expand, &QToolButton::clicked, m_view, [this]() {
|
||||
m_view->blockSignals(true);
|
||||
m_view->expandAll();
|
||||
m_view->blockSignals(false);
|
||||
updateExpandedStateCache();
|
||||
});
|
||||
connect(collapse, &QToolButton::clicked, m_view, [this]() {
|
||||
m_view->blockSignals(true);
|
||||
m_view->collapseAll();
|
||||
m_view->blockSignals(false);
|
||||
updateExpandedStateCache();
|
||||
});
|
||||
connect(m_sort, &QToolButton::clicked, this, &TestNavigationWidget::onSortClicked);
|
||||
|
||||
list << m_filterButton << m_sort << expand << collapse;
|
||||
|
||||
Reference in New Issue
Block a user