本文整理汇总了C++中core::Id::name方法的典型用法代码示例。如果您正苦于以下问题:C++ Id::name方法的具体用法?C++ Id::name怎么用?C++ Id::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core::Id
的用法示例。
在下文中一共展示了Id::name方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: displayNameForId
QString QnxDeployConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id.name().startsWith(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID))
return tr("Deploy to QNX Device");
return QString();
}
示例2: buildTargetFromId
QString CMakeRunConfigurationFactory::buildTargetFromId(Core::Id id)
{
QString idstr = QString::fromUtf8(id.name());
if (!idstr.startsWith(QLatin1String(CMAKE_RC_PREFIX)))
return QString();
return idstr.mid(QString::fromLatin1(CMAKE_RC_PREFIX).length());
}
示例3: canRestore
bool RemoteLinuxRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
{
if (!canHandle(parent))
return false;
const Core::Id id = idFromMap(map);
return id == RemoteLinuxCustomRunConfiguration::runConfigId()
|| id.name().startsWith(RemoteLinuxRunConfiguration::IdPrefix);
}
示例4: displayNameForId
QString BlackBerryRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
const QString path = pathFromId(id);
if (path.isEmpty())
return QString();
if (id.name().startsWith(Constants::QNX_BB_RUNCONFIGURATION_PREFIX))
return QFileInfo(path).completeBaseName();
return QString();
}
示例5: canCreate
bool QnxRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
if (!canHandle(parent) || !id.name().startsWith(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX))
return false;
Qt4ProjectManager::Qt4Project *qt4Project = qobject_cast<Qt4ProjectManager::Qt4Project *>(parent->project());
if (!qt4Project)
return false;
return qt4Project->hasApplicationProFile(pathFromId(id));
}
示例6: displayNameForId
QString QnxRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
const QString path = pathFromId(id);
if (path.isEmpty())
return QString();
if (id.name().startsWith(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX))
return tr("%1 on QNX Device").arg(QFileInfo(path).completeBaseName());
return QString();
}
示例7: unregisterShortcut
/*!
\brief Removes the knowledge about a shortcut under the specified \a id.
Usually you do not need to unregister shortcuts. The only valid use case for unregistering
shortcuts, is for shortcuts that represent user definable actions. If the user removes such an action,
a corresponding shortcut also has to be unregistered from the action manager,
to make it disappear from shortcut settings etc.
*/
void ActionManager::unregisterShortcut(const Core::Id &id)
{
Shortcut *sc = 0;
CommandPrivate *c = m_instance->d->m_idCmdMap.value(id, 0);
QTC_ASSERT(c, return);
sc = qobject_cast<Shortcut *>(c);
if (!sc) {
qWarning() << "unregisterShortcut: id" << id.name()
<< "is registered with a different command type.";
return;
}
delete sc->shortcut();
m_instance->d->m_idCmdMap.remove(id);
delete sc;
emit m_instance->commandListChanged();
}
示例8: canCreate
bool QnxDeployConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
return canHandle(parent) && id.name().startsWith(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID);
}
示例9: displayNameForId
QString IosDeployConfigurationFactory::displayNameForId(Core::Id id) const
{
if (id.name().startsWith(IOS_DC_PREFIX))
return tr("Deploy on iOS");
return QString();
}
示例10: qHash
uint qHash(const Core::Id &id) { return qHash(id.name()); }