当前位置: 首页>>代码示例>>C++>>正文


C++ Id::name方法代码示例

本文整理汇总了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();
}
开发者ID:aizaimenghuangu,项目名称:QtTestor,代码行数:7,代码来源:qnxdeployconfigurationfactory.cpp

示例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());
}
开发者ID:syntheticpp,项目名称:qt-creator,代码行数:7,代码来源:cmakerunconfiguration.cpp

示例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);
}
开发者ID:FlavioFalcao,项目名称:qt-creator,代码行数:8,代码来源:remotelinuxrunconfigurationfactory.cpp

示例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();
}
开发者ID:ProDataLab,项目名称:qt-creator,代码行数:11,代码来源:blackberryrunconfigurationfactory.cpp

示例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));
}
开发者ID:aizaimenghuangu,项目名称:QtTestor,代码行数:11,代码来源:qnxrunconfigurationfactory.cpp

示例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();
}
开发者ID:aizaimenghuangu,项目名称:QtTestor,代码行数:11,代码来源:qnxrunconfigurationfactory.cpp

示例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();
}
开发者ID:mornelon,项目名称:QtCreator_compliments,代码行数:24,代码来源:actionmanager.cpp

示例8: canCreate

bool QnxDeployConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
    return canHandle(parent) && id.name().startsWith(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID);
}
开发者ID:aizaimenghuangu,项目名称:QtTestor,代码行数:4,代码来源:qnxdeployconfigurationfactory.cpp

示例9: displayNameForId

QString IosDeployConfigurationFactory::displayNameForId(Core::Id id) const
{
    if (id.name().startsWith(IOS_DC_PREFIX))
        return tr("Deploy on iOS");
    return QString();
}
开发者ID:OnlineCop,项目名称:qt-creator,代码行数:6,代码来源:iosdeployconfiguration.cpp

示例10: qHash

uint qHash(const Core::Id &id) { return qHash(id.name()); }
开发者ID:anchowee,项目名称:QtCreator,代码行数:1,代码来源:id.cpp


注:本文中的core::Id::name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。