Make the display for qws mkspecs nicer.

This commit is contained in:
dt
2009-11-02 17:36:29 +01:00
parent 835d522ac2
commit f84a144e01

View File

@@ -1049,9 +1049,18 @@ void QtVersion::updateMkSpec() const
}
#endif
int index = qMax(mkspec.lastIndexOf('/'), mkspec.lastIndexOf('\\'));
if (index >= 0)
mkspec = mkspec.mid(index+1).trimmed();
QString mkspecdir = versionInfo().value("QMAKE_MKSPECS");
if (mkspecdir.isEmpty())
mkspecdir = versionInfo().value("QT_INSTALL_DATA") + "/mkspecs";
if (mkspec.startsWith(mkspecdir)) {
mkspec = mkspec.mid(mkspecdir.length() + 1);
qDebug() << "Setting mkspec to"<<mkspec;
} else {
int index = qMax(mkspec.lastIndexOf('/'), mkspec.lastIndexOf('\\'));
if (index >= 0)
mkspec = mkspec.mid(index+1).trimmed();
}
m_mkspec = mkspec;
m_mkspecUpToDate = true;