Fix crash in QMakeStep::allArguments

qtVersion can be null now
This commit is contained in:
dt
2011-05-16 12:18:07 +02:00
parent e3158d0e99
commit 9dea7a397b

View File

@@ -137,10 +137,14 @@ QString QMakeStep::allArguments(bool shorted)
if (!haveSpec) { if (!haveSpec) {
const QString tcSpec = bc->toolChain() ? bc->toolChain()->mkspec() : QString(); const QString tcSpec = bc->toolChain() ? bc->toolChain()->mkspec() : QString();
if (!tcSpec.isEmpty() && bc->qtVersion()->hasMkspec(tcSpec)) if (tcSpec.isEmpty()) {
arguments << "-spec" << tcSpec; if (bc->qtVersion())
else
arguments << "-spec" << bc->qtVersion()->mkspec(); arguments << "-spec" << bc->qtVersion()->mkspec();
} else if (!bc->qtVersion() || bc->qtVersion()->hasMkspec(tcSpec)) {
arguments << "-spec" << tcSpec;
} else {
arguments << "-spec" << bc->qtVersion()->mkspec();
}
} }
// Find out what flags we pass on to qmake // Find out what flags we pass on to qmake