Commit e6f93ac7 authored by Tobias Hunger's avatar Tobias Hunger

QtSupport: More helper methods for BaseQtVersion

Add a method to query debug/release build availability and one for
the documentation path.

Qbs wants to know those and I do not want to hardcode QtSupport
details there.

Change-Id: I32c83167270dd34a81c4ab3f65e9d92b8f6bca90
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent c3562e98
......@@ -321,6 +321,11 @@ FileName BaseQtVersion::headerPath() const
return Utils::FileName::fromUserInput(qmakeProperty("QT_INSTALL_HEADERS"));
}
FileName BaseQtVersion::docsPath() const
{
return Utils::FileName::fromUserInput(qmakeProperty("QT_INSTALL_DOCS"));
}
FileName BaseQtVersion::libraryPath() const
{
return Utils::FileName::fromUserInput(qmakeProperty("QT_INSTALL_LIBS"));
......@@ -358,6 +363,16 @@ bool BaseQtVersion::isFrameworkBuild() const
return m_frameworkBuild;
}
bool BaseQtVersion::hasDebugBuild() const
{
return m_defaultConfigIsDebug || m_defaultConfigIsDebugAndRelease;
}
bool BaseQtVersion::hasReleaseBuild() const
{
return !m_defaultConfigIsDebug || m_defaultConfigIsDebugAndRelease;
}
void BaseQtVersion::setId(int id)
{
m_id = id;
......
......@@ -219,6 +219,7 @@ public:
virtual QList<ProjectExplorer::Task> validateKit(const ProjectExplorer::Kit *k);
Utils::FileName headerPath() const;
Utils::FileName docsPath() const;
Utils::FileName libraryPath() const;
Utils::FileName binPath() const;
Utils::FileName mkspecsPath() const;
......@@ -226,6 +227,9 @@ public:
QString qtNamespace() const;
QString qtLibInfix() const;
bool isFrameworkBuild() const;
// Note: A Qt version can have both a debug and a release built at the same time!
bool hasDebugBuild() const;
bool hasReleaseBuild() const;
protected:
BaseQtVersion();
......
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