forked from qt-creator/qt-creator
UiCodeModelSupport: Fix crash when removing kit
Change-Id: I30c5c9f2456e911d01376b1c06f2255a95080897 Task-number: QTCREATORBUG-15120 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -251,12 +251,12 @@ void UiCodeModelSupport::updateFromBuild()
|
||||
QString UiCodeModelSupport::uicCommand() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *version;
|
||||
if (m_project->needsConfiguration()) {
|
||||
version = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::defaultKit());
|
||||
} else {
|
||||
ProjectExplorer::Target *target = m_project->activeTarget();
|
||||
ProjectExplorer::Target *target;
|
||||
if (!m_project->needsConfiguration()
|
||||
&& (target = m_project->activeTarget()))
|
||||
version = QtSupport::QtKitInformation::qtVersion(target->kit());
|
||||
}
|
||||
else
|
||||
version = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::defaultKit());
|
||||
return version ? version->uicCommand() : QString();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user