本文整理汇总了C++中qtsupport::BaseQtVersion::isValid方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseQtVersion::isValid方法的具体用法?C++ BaseQtVersion::isValid怎么用?C++ BaseQtVersion::isValid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qtsupport::BaseQtVersion
的用法示例。
在下文中一共展示了BaseQtVersion::isValid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createBuildInfo
QList<BuildInfo *> QmakeBuildConfigurationFactory::availableSetups(const Kit *k, const QString &projectPath) const
{
QList<ProjectExplorer::BuildInfo *> result;
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k);
if (!qtVersion || !qtVersion->isValid())
return result;
result << createBuildInfo(k, projectPath, ProjectExplorer::BuildConfiguration::Debug);
result << createBuildInfo(k, projectPath, ProjectExplorer::BuildConfiguration::Profile);
result << createBuildInfo(k, projectPath, ProjectExplorer::BuildConfiguration::Release);
return result;
}
示例2: qtIsSupported
bool PuppetCreator::qtIsSupported() const
{
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitInformation::qtVersion(m_kit);
if (currentQtVersion
&& currentQtVersion->isValid()
&& currentQtVersion->qtVersion() >= QtSupport::QtVersionNumber(5, 2, 0)
&& (currentQtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT)
|| currentQtVersion->type() == QLatin1String(QtSupport::Constants::SIMULATORQT)))
return true;
return false;
}
示例3: minimumVersion
IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration)
{
QmlProfilerEngine *engine = new QmlProfilerEngine(this, sp, runConfiguration);
engine->registerProfilerStateManager(d->m_profilerState);
bool isTcpConnection = true;
if (runConfiguration) {
// Check minimum Qt Version. We cannot really be sure what the Qt version
// at runtime is, but guess that the active build configuraiton has been used.
QtSupport::QtVersionNumber minimumVersion(4, 7, 4);
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(runConfiguration->target()->kit());
if (version) {
if (version->isValid() && version->qtVersion() < minimumVersion) {
int result = QMessageBox::warning(QApplication::activeWindow(), tr("QML Profiler"),
tr("The QML profiler requires Qt 4.7.4 or newer.\n"
"The Qt version configured in your active build configuration is too old.\n"
"Do you want to continue?"), QMessageBox::Yes, QMessageBox::No);
if (result == QMessageBox::No)
return 0;
}
}
}
// FIXME: Check that there's something sensible in sp.connParams
if (isTcpConnection) {
d->m_profilerConnections->setTcpConnection(sp.connParams.host, sp.connParams.port);
}
d->m_runConfiguration = runConfiguration;
//
// Initialize m_projectFinder
//
QString projectDirectory;
if (d->m_runConfiguration) {
Project *project = d->m_runConfiguration->target()->project();
projectDirectory = project->projectDirectory();
}
populateFileFinder(projectDirectory, sp.sysroot);
connect(engine, SIGNAL(processRunning(quint16)), d->m_profilerConnections, SLOT(connectClient(quint16)));
connect(d->m_profilerConnections, SIGNAL(connectionFailed()), engine, SLOT(cancelProcess()));
return engine;
}