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,10 +104,17 @@ void FindToolWindow::setCurrentFilter(int index)
|
|||||||
QWidget *configWidget = m_configWidgets.at(i);
|
QWidget *configWidget = m_configWidgets.at(i);
|
||||||
if (!configWidget)
|
if (!configWidget)
|
||||||
continue;
|
continue;
|
||||||
if (i == index)
|
if (i == index) {
|
||||||
m_ui.configWidget->layout()->addWidget(configWidget);
|
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);
|
configWidget->setParent(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user