diff options
author | Eike Ziller <eike.ziller@qt.io> | 2024-02-23 11:49:23 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2024-02-23 12:35:58 +0000 |
commit | a9c2be10713fc4cba647c91d50cc6d9e4d1d8136 (patch) | |
tree | 9e4d8036aa273db653fbd863db96269d04e414dd /src/plugins/projectexplorer | |
parent | 8feb31b2ac194af3b5da09e6c1636a7953b40ffb (diff) |
Projects: Fix misc settings widgets if vanished targets are shown
When vanished targets where shown in Projects, clicking on the project
specific settings showed a blank page.
There were hardcoded indices for the target and the misc settings. Get
the right child for the index directly instead.
Change-Id: I725d470ad04f8a227c91938efada76a757a7442c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r-- | src/plugins/projectexplorer/projectwindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index c0577c5c52..66dca5ecd5 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -527,11 +527,11 @@ public: } case PanelWidgetRole: - case ActiveItemRole: - if (m_currentChildIndex == 0) - return m_targetsItem->data(column, role); - if (m_currentChildIndex == 1) - return m_miscItem->data(column, role); + case ActiveItemRole: { + TreeItem *child = childAt(m_currentChildIndex); + if (child) + return child->data(column, role); + } } return {}; } |