ADS: Do not re-use variables

Change-Id: I2aee3d6684d40077acfe652638292901bd660ea6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2020-03-02 10:26:56 +01:00
committed by Tim Jenssen
parent 45d42d4518
commit b329b7220b

View File

@@ -336,9 +336,9 @@ namespace ADS
void DockWidget::toggleViewInternal(bool open) void DockWidget::toggleViewInternal(bool open)
{ {
DockContainerWidget *dockContainerWidget = dockContainer(); const DockContainerWidget *const beforeDockContainerWidget = dockContainer();
DockWidget *topLevelDockWidgetBefore = dockContainerWidget DockWidget *topLevelDockWidgetBefore = beforeDockContainerWidget
? dockContainerWidget->topLevelDockWidget() ? beforeDockContainerWidget->topLevelDockWidget()
: nullptr; : nullptr;
if (open) { if (open) {
@@ -359,7 +359,7 @@ namespace ADS
// Here we need to call the dockContainer() function again, because if // Here we need to call the dockContainer() function again, because if
// this dock widget was unassigned before the call to showDockWidget() then // this dock widget was unassigned before the call to showDockWidget() then
// it has a dock container now // it has a dock container now
dockContainerWidget = dockContainer(); const DockContainerWidget *const dockContainerWidget = dockContainer();
DockWidget *topLevelDockWidgetAfter = dockContainerWidget DockWidget *topLevelDockWidgetAfter = dockContainerWidget
? dockContainerWidget->topLevelDockWidget() ? dockContainerWidget->topLevelDockWidget()
: nullptr; : nullptr;