forked from qt-creator/qt-creator
ADS: Do not re-use variables
Change-Id: I2aee3d6684d40077acfe652638292901bd660ea6 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
45d42d4518
commit
b329b7220b
@@ -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;
|
||||||
|
Reference in New Issue
Block a user