Commit b6a4c254 authored by mfekari's avatar mfekari Committed by Christian Kandeler

set the default sdk path when using qmake from ndk

Change-Id: Idfae74c9d2c9319b311cae7b2cd65500b2400973
Reviewed-by: default avatarTobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: default avatarFabian Bumberger <fbumberger@rim.com>
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 6ddb0f79
......@@ -50,6 +50,7 @@ QnxAbstractQtVersion::QnxAbstractQtVersion(QnxArchitecture arch, const Utils::Fi
: QtSupport::BaseQtVersion(path, isAutoDetected, autoDetectionSource)
, m_arch(arch)
{
setDefaultSdkPath();
}
QnxArchitecture QnxAbstractQtVersion::architecture() const
......@@ -168,3 +169,24 @@ QString QnxAbstractQtVersion::invalidReason() const
return tr("No SDK path set");
return QtSupport::BaseQtVersion::invalidReason();
}
void QnxAbstractQtVersion::setDefaultSdkPath()
{
QHash<QString, QString> info = versionInfo();
QString qtHostPrefix;
if (info.contains(QLatin1String("QT_HOST_PREFIX")))
qtHostPrefix = info.value(QLatin1String("QT_HOST_PREFIX"));
else
return;
QString envFile;
#if defined Q_OS_WIN
envFile = qtHostPrefix + QLatin1String("/bbndk-env.bat");
#elif defined Q_OS_UNIX
envFile = qtHostPrefix + QLatin1String("/bbndk-env.sh");
#endif
if (QFileInfo(envFile).exists())
setSdkPath(qtHostPrefix);
}
......@@ -70,6 +70,7 @@ public:
QString invalidReason() const;
virtual QString sdkDescription() const = 0;
void setDefaultSdkPath();
protected:
QString sdkPath() const;
......
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