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


C++ QmakeProFileNode::filePath方法代码示例

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


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

示例1: suggestedIncludePath

QString InternalLibraryDetailsController::suggestedIncludePath() const
{
    const int currentIndex = libraryDetailsWidget()->libraryComboBox->currentIndex();
    if (currentIndex >= 0) {
        QmakeProFileNode *proFileNode = m_proFileNodes.at(currentIndex);
        return proFileNode->filePath().toFileInfo().absolutePath();
    }
    return QString();
}
开发者ID:DuinoDu,项目名称:qt-creator,代码行数:9,代码来源:librarydetailscontroller.cpp

示例2: init

bool QMakeStep::init(QList<const BuildStep *> &earlierSteps)
{
    if (m_commandFuture)
        return false;

    QmakeBuildConfiguration *qmakeBc = qmakeBuildConfiguration();
    const BaseQtVersion *qtVersion = QtKitInformation::qtVersion(target()->kit());

    if (!qtVersion)
        return false;

    QString workingDirectory;

    if (qmakeBc->subNodeBuild())
        workingDirectory = qmakeBc->subNodeBuild()->buildDir();
    else
        workingDirectory = qmakeBc->buildDirectory().toString();

    m_qmakeExecutable = qtVersion->qmakeCommand().toString();
    m_qmakeArguments = allArguments(qtVersion);
    m_runMakeQmake = (qtVersion->qtVersion() >= QtVersionNumber(5, 0 ,0));
    if (m_runMakeQmake) {
        m_makeExecutable = makeCommand();
        if (m_makeExecutable.isEmpty())
            return false;
    } else {
        m_makeExecutable.clear();
    }

    QString makefile = workingDirectory;

    if (qmakeBc->subNodeBuild()) {
        if (!qmakeBc->subNodeBuild()->makefile().isEmpty())
            makefile.append(qmakeBc->subNodeBuild()->makefile());
        else
            makefile.append(QLatin1String("/Makefile"));
    } else if (!qmakeBc->makefile().isEmpty()) {
        makefile.append(QLatin1Char('/'));
        makefile.append(qmakeBc->makefile());
    } else {
        makefile.append(QLatin1String("/Makefile"));
    }

    // Check whether we need to run qmake
    bool makefileOutDated = (qmakeBc->compareToImportFrom(makefile) != QmakeBuildConfiguration::MakefileMatches);
    if (m_forced || makefileOutDated)
        m_needToRunQMake = true;
    m_forced = false;

    ProcessParameters *pp = processParameters();
    pp->setMacroExpander(qmakeBc->macroExpander());
    pp->setWorkingDirectory(workingDirectory);
    pp->setEnvironment(qmakeBc->environment());

    setOutputParser(new QMakeParser);

    QmakeProFileNode *node = static_cast<QmakeProject *>(qmakeBc->target()->project())->rootProjectNode();
    if (qmakeBc->subNodeBuild())
        node = qmakeBc->subNodeBuild();
    QString proFile = node->filePath().toString();

    QList<ProjectExplorer::Task> tasks = qtVersion->reportIssues(proFile, workingDirectory);
    Utils::sort(tasks);

    if (!tasks.isEmpty()) {
        bool canContinue = true;
        foreach (const ProjectExplorer::Task &t, tasks) {
            addTask(t);
            if (t.type == Task::Error)
                canContinue = false;
        }
开发者ID:lostcodder,项目名称:qt-creator,代码行数:71,代码来源:qmakestep.cpp


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