forked from qt-creator/qt-creator
AutoTest: Introduce ITestTreeItem
Preparation for having separated test tree items with a common base. Change-Id: I3735f582cc96910e971f5a41c799cc0729a10a58 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -242,7 +242,7 @@ void TestNavigationWidget::updateExpandedStateCache()
|
||||
|
||||
for (Utils::TreeItem *rootNode : *m_model->rootItem()) {
|
||||
rootNode->forAllChildren([this](Utils::TreeItem *child) {
|
||||
m_expandedStateCache.insert(static_cast<TestTreeItem *>(child),
|
||||
m_expandedStateCache.insert(static_cast<ITestTreeItem *>(child),
|
||||
m_view->isExpanded(child->index()));
|
||||
});
|
||||
}
|
||||
@@ -322,7 +322,7 @@ void TestNavigationWidget::reapplyCachedExpandedState()
|
||||
using namespace Utils;
|
||||
for (TreeItem *rootNode : *m_model->rootItem()) {
|
||||
rootNode->forAllChildren([this](TreeItem *child) {
|
||||
optional<bool> cached = m_expandedStateCache.get(static_cast<TestTreeItem *>(child));
|
||||
optional<bool> cached = m_expandedStateCache.get(static_cast<ITestTreeItem *>(child));
|
||||
if (cached.has_value()) {
|
||||
QModelIndex index = child->index();
|
||||
if (m_view->isExpanded(index) != cached.value())
|
||||
|
||||
Reference in New Issue
Block a user