forked from qt-creator/qt-creator
Fixes: Don't crash if we don't get any toolchain.
Details: Stupid me.
This commit is contained in:
@@ -457,8 +457,12 @@ void Qt4Project::updateCodeModel()
|
|||||||
const QString newQtLibsPath = versionInfo.value(QLatin1String("QT_INSTALL_LIBS"));
|
const QString newQtLibsPath = versionInfo.value(QLatin1String("QT_INSTALL_LIBS"));
|
||||||
|
|
||||||
ToolChain *tc = toolChain(activeBuildConfiguration());
|
ToolChain *tc = toolChain(activeBuildConfiguration());
|
||||||
QByteArray predefinedMacros = tc->predefinedMacros();
|
QByteArray predefinedMacros;
|
||||||
QList<HeaderPath> allHeaderPaths = tc->systemHeaderPaths();
|
QList<HeaderPath> allHeaderPaths;
|
||||||
|
if (tc) {
|
||||||
|
predefinedMacros = tc->predefinedMacros();
|
||||||
|
allHeaderPaths = tc->systemHeaderPaths();
|
||||||
|
}
|
||||||
foreach (HeaderPath headerPath, allHeaderPaths) {
|
foreach (HeaderPath headerPath, allHeaderPaths) {
|
||||||
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
|
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
|
||||||
allFrameworkPaths.append(headerPath.path());
|
allFrameworkPaths.append(headerPath.path());
|
||||||
|
Reference in New Issue
Block a user