本文整理汇总了C++中BaseQtVersion::isValid方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseQtVersion::isValid方法的具体用法?C++ BaseQtVersion::isValid怎么用?C++ BaseQtVersion::isValid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseQtVersion
的用法示例。
在下文中一共展示了BaseQtVersion::isValid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createQtVersion
MerQtVersion* MerTarget::createQtVersion() const
{
const FileName qmake = FileName::fromString(targetPath() + QLatin1Char('/') +
QLatin1String(Constants::MER_WRAPPER_QMAKE));
// Is there a qtversion present for this qmake?
BaseQtVersion *qtv = QtVersionManager::qtVersionForQMakeBinary(qmake);
if (qtv && !qtv->isValid()) {
QtVersionManager::removeVersion(qtv);
qtv = 0;
}
if (!qtv)
qtv = new MerQtVersion(qmake, true, targetPath());
//QtVersionFactory::createQtVersionFromQMakePath(qmake, true, targetPath());
QTC_ASSERT(qtv && qtv->type() == QLatin1String(Constants::MER_QT), return 0);
MerQtVersion *merqtv = static_cast<MerQtVersion *>(qtv);
const QString vmName = m_sdk->virtualMachineName();
merqtv->setVirtualMachineName(vmName);
merqtv->setTargetName(m_name);
merqtv->setUnexpandedDisplayName(
QString::fromLatin1("Qt %1 in %2 %3").arg(qtv->qtVersionString(),
vmName, m_name));
return merqtv;
}
示例2: emitBuildDirectoryChanged
void Qt4BuildConfiguration::setShadowBuildAndDirectory(bool shadowBuild, const QString &buildDirectory)
{
BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
QString directoryToSet = buildDirectory;
bool toSet = (shadowBuild && version && version->isValid() && version->supportsShadowBuilds());
if (m_shadowBuild == toSet && m_buildDirectory == directoryToSet)
return;
m_shadowBuild = toSet;
m_buildDirectory = directoryToSet;
emitBuildDirectoryChanged();
emitProFileEvaluateNeeded();
}
示例3: BuildConfigurationInfo
QList<BuildConfigurationInfo> Qt4BuildConfigurationFactory::availableBuildConfigurations(const Kit *k,
const QString &proFilePath)
{
QList<BuildConfigurationInfo> infoList;
BaseQtVersion *version = QtKitInformation::qtVersion(k);
if (!version || !version->isValid())
return infoList;
BaseQtVersion::QmakeBuildConfigs config = version->defaultBuildConfig() | QtSupport::BaseQtVersion::DebugBuild;
BuildConfigurationInfo info = BuildConfigurationInfo(config, QString(), QString(), false);
info.directory = Qt4Project::shadowBuildDirectory(proFilePath, k, buildConfigurationDisplayName(info));
infoList.append(info);
info.buildConfig = config ^ BaseQtVersion::DebugBuild;
info.directory = Qt4Project::shadowBuildDirectory(proFilePath, k, buildConfigurationDisplayName(info));
infoList.append(info);
return infoList;
}