forked from qt-creator/qt-creator
outputpanemanager: fix potential crash in case of no outputpanes
Reviewed-by: dt
This commit is contained in:
@@ -238,7 +238,7 @@ void OutputPaneManager::init()
|
|||||||
begin = sorted.constBegin();
|
begin = sorted.constBegin();
|
||||||
it = sorted.constEnd();
|
it = sorted.constEnd();
|
||||||
int shortcutNumber = 1;
|
int shortcutNumber = 1;
|
||||||
do {
|
while (it != begin) {
|
||||||
--it;
|
--it;
|
||||||
IOutputPane* outPane = it.value();
|
IOutputPane* outPane = it.value();
|
||||||
const int idx = m_outputWidgetPane->addWidget(outPane->outputWidget(this));
|
const int idx = m_outputWidgetPane->addWidget(outPane->outputWidget(this));
|
||||||
@@ -283,7 +283,7 @@ void OutputPaneManager::init()
|
|||||||
m_widgetComboBox->addItem(outPane->displayName(), idx);
|
m_widgetComboBox->addItem(outPane->displayName(), idx);
|
||||||
|
|
||||||
connect(cmd->action(), SIGNAL(triggered()), this, SLOT(shortcutTriggered()));
|
connect(cmd->action(), SIGNAL(triggered()), this, SLOT(shortcutTriggered()));
|
||||||
} while (it != begin);
|
}
|
||||||
|
|
||||||
changePage();
|
changePage();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user