forked from qt-creator/qt-creator
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: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user