forked from qt-creator/qt-creator
Fixes: - Crash on searching in "current project"
Task: - 243147 RevBy: - Thorbjørn Details: - Crash occurred in case there actually is no "current project", e.g. because the current file doesn't appear in a project.
This commit is contained in:
@@ -104,11 +104,18 @@ void FindToolWindow::setCurrentFilter(int index)
|
||||
QWidget *configWidget = m_configWidgets.at(i);
|
||||
if (!configWidget)
|
||||
continue;
|
||||
if (i == index)
|
||||
if (i == index) {
|
||||
m_ui.configWidget->layout()->addWidget(configWidget);
|
||||
else
|
||||
bool enabled = m_filters.at(i)->isEnabled();
|
||||
m_ui.matchCase->setEnabled(enabled);
|
||||
m_ui.wholeWords->setEnabled(enabled);
|
||||
m_ui.searchTerm->setEnabled(enabled);
|
||||
m_ui.searchButton->setEnabled(enabled);
|
||||
configWidget->setEnabled(enabled);
|
||||
} else {
|
||||
configWidget->setParent(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FindToolWindow::search()
|
||||
|
Reference in New Issue
Block a user