Commit 5cf0e625 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Remove code that is no longer necessary

We can figure out now whether something was build with mingw or not.
parent 99911c5f
......@@ -1107,20 +1107,9 @@ QString BaseQtVersion::qtCorePath(const QHash<QString,QString> &versionInfo, con
return QString();
}
QList<ProjectExplorer::Abi> BaseQtVersion::qtAbisFromLibrary(const QString &coreLibrary, bool mingw)
QList<ProjectExplorer::Abi> BaseQtVersion::qtAbisFromLibrary(const QString &coreLibrary)
{
QList<ProjectExplorer::Abi> qtAbis = ProjectExplorer::Abi::abisOfBinary(coreLibrary);
#if defined (Q_OS_WIN)
if (mingw) {
QList<ProjectExplorer::Abi> tmp = qtAbis;
qtAbis.clear();
foreach (const ProjectExplorer::Abi &abi, tmp)
qtAbis.append(ProjectExplorer::Abi(abi.architecture(), abi.os(), ProjectExplorer::Abi::WindowsMSysFlavor,
abi.binaryFormat(), abi.wordWidth()));
}
#else
Q_UNUSED(mingw)
#endif
if (qtAbis.isEmpty() && !coreLibrary.isEmpty()) {
qWarning("Warning: Could not find ABI for '%s'"
"Qt Creator does not know about the system includes, "
......
......@@ -195,7 +195,7 @@ protected:
// helper function for desktop and simulator to figure out the supported abis based on the libraries
static QString qtCorePath(const QHash<QString,QString> &versionInfo, const QString &versionString);
static QList<ProjectExplorer::Abi> qtAbisFromLibrary(const QString &coreLibrary, bool mingw);
static QList<ProjectExplorer::Abi> qtAbisFromLibrary(const QString &coreLibrary);
void ensureMkSpecParsed() const;
virtual void parseMkSpec(ProFileEvaluator *) const;
......
......@@ -87,18 +87,12 @@ QString DesktopQtVersion::invalidReason() const
return QString();
}
void DesktopQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
{
m_mingw = (evaluator->value("MAKEFILE_GENERATOR") == "MINGW");
BaseQtVersion::parseMkSpec(evaluator);
}
QList<ProjectExplorer::Abi> DesktopQtVersion::qtAbis() const
{
if (!m_qtAbisUpToDate) {
m_qtAbisUpToDate = true;
ensureMkSpecParsed();
m_qtAbis = qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()), m_mingw);
m_qtAbis = qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()));
}
return m_qtAbis;
}
......
......@@ -58,12 +58,10 @@ public:
virtual QSet<QString> supportedTargetIds() const;
QString description() const;
protected:
void parseMkSpec(ProFileEvaluator *) const;
private:
mutable bool m_qtAbisUpToDate;
mutable QList<ProjectExplorer::Abi> m_qtAbis;
mutable bool m_mingw;
};
}
......
......@@ -92,17 +92,11 @@ QList<ProjectExplorer::Abi> SimulatorQtVersion::qtAbis() const
if (!m_qtAbisUpToDate) {
m_qtAbisUpToDate = true;
ensureMkSpecParsed();
m_qtAbis = qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()), m_mingw);
m_qtAbis = qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()));
}
return m_qtAbis;
}
void SimulatorQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
{
m_mingw = (evaluator->value("MAKEFILE_GENERATOR") == "MINGW");
BaseQtVersion::parseMkSpec(evaluator);
}
bool SimulatorQtVersion::supportsTargetId(const QString &id) const
{
return id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID);
......
......@@ -58,12 +58,10 @@ public:
virtual QSet<QString> supportedTargetIds() const;
QString description() const;
protected:
void parseMkSpec(ProFileEvaluator *evaluator) const;
private:
mutable bool m_qtAbisUpToDate;
mutable QList<ProjectExplorer::Abi> m_qtAbis;
mutable bool m_mingw;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment