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


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

本文整理汇总了C++中core::Id::toString方法的典型用法代码示例。如果您正苦于以下问题:C++ Id::toString方法的具体用法?C++ Id::toString怎么用?C++ Id::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在core::Id的用法示例。


在下文中一共展示了Id::toString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: displayNameForId

QString QnxRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
    const QString path = pathFromId(id);
    if (path.isEmpty())
        return QString();

    if (id.toString().startsWith(QLatin1String(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX)))
        return tr("%1 on QNX Device").arg(QFileInfo(path).completeBaseName());

    return QString();
}
开发者ID:KDE,项目名称:android-qt-creator,代码行数:11,代码来源:qnxrunconfigurationfactory.cpp

示例2: bundleDirectory

FileName IosRunConfiguration::bundleDirectory() const
{
    FileName res;
    Core::Id devType = DeviceTypeKitInformation::deviceTypeId(target()->kit());
    bool isDevice = (devType == Constants::IOS_DEVICE_TYPE);
    if (!isDevice && devType != Constants::IOS_SIMULATOR_TYPE) {
        qCWarning(iosLog) << "unexpected device type in bundleDirForTarget: " << devType.toString();
        return res;
    }
    QmakeBuildConfiguration *bc =
            qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration());
    if (bc) {
        QmakeProject *pro = qobject_cast<QmakeProject *>(target()->project());
        const QmakeProFileNode *node = 0;
        if (pro)
            node = pro->rootProjectNode();
        if (node)
            node = node->findProFileFor(profilePath());
        if (node) {
            TargetInformation ti = node->targetInformation();
            if (ti.valid)
                res = FileName::fromString(ti.buildDir);
        }
        if (res.isEmpty())
            res = bc->buildDirectory();
        switch (bc->buildType()) {
        case BuildConfiguration::Debug :
        case BuildConfiguration::Unknown :
            if (isDevice)
                res.appendPath(QLatin1String("Debug-iphoneos"));
            else
                res.appendPath(QLatin1String("Debug-iphonesimulator"));
            break;
        case BuildConfiguration::Profile :
        case BuildConfiguration::Release :
            if (isDevice)
                res.appendPath(QLatin1String("Release-iphoneos"));
            else
                res.appendPath(QLatin1String("Release-iphonesimulator"));
            break;
        default:
            qCWarning(iosLog) << "IosBuildStep had an unknown buildType "
                     << target()->activeBuildConfiguration()->buildType();
        }
    }
    res.appendPath(applicationName() + QLatin1String(".app"));
    return res;
}
开发者ID:C-sjia,项目名称:qt-creator,代码行数:48,代码来源:iosrunconfiguration.cpp

示例3: QObject

ProjectConfiguration::ProjectConfiguration(QObject *parent, Core::Id id) :
    QObject(parent),
    m_id(id)
{ setObjectName(id.toString()); }
开发者ID:UIKit0,项目名称:qt-creator,代码行数:4,代码来源:projectconfiguration.cpp

示例4: displayNameForId

QString NimRunConfigurationFactory::displayNameForId(Core::Id id) const
{
    QString result = id.toString() + QStringLiteral("-TempRunConf");
    return result;
}
开发者ID:C-sjia,项目名称:qt-creator,代码行数:5,代码来源:nimrunconfigurationfactory.cpp


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