コード例 #1
0
QList<ProjectExplorer::ToolChain *> CrossLinuxToolChain32BitFactory::autoDetectToolChains(
        const QString &displayName, const QString &commandPath,
        const QStringList &debuggers, const ProjectExplorer::Abi &requiredAbi)
{
    //TODO add debuger options

    Q_UNUSED(debuggers);
    QList<ProjectExplorer::ToolChain *> result;
    CrossToolChain32Bit *tc = static_cast<CrossToolChain32Bit *>(createToolChain(true));
    QDir sdkDir =CrossSDKInfo::instance().sdkRoot();
    Utils::FileName tcCommand;
    QString sdkPath;

    sdkPath = sdkDir.canonicalPath();
    tcCommand.append(sdkPath + commandPath);

    if (!tcCommand.toFileInfo().exists()) {
        return result;
    }

    tc->setDisplayName(displayName);
    tc->setCompilerCommand(tcCommand);
    tc->setTargetAbi(requiredAbi);
    result.append(tc);
    return result;
}
コード例 #2
0
ファイル: settings.cpp プロジェクト: CNOT/julia-studio
Utils::FileName Settings::getPath(const QString &file)
{
    Utils::FileName result = sdkPath;
    if (file == QLatin1String("profiles") || file == QLatin1String("kits"))
        result.appendPath(QLatin1String("profiles"));
    else if (file == QLatin1String("qtversions") || file == QLatin1String("qtversion"))
        result.appendPath(QLatin1String("qtversion"));
    else if (file == QLatin1String("toolchains") || file == QLatin1String("toolChains"))
        result.appendPath(QLatin1String("toolchains"));
    else if (file == QLatin1String("toolchains") || file == QLatin1String("toolChains"))
        result.appendPath(QLatin1String("toolchains"));
    else if (file == QLatin1String("devices"))
        result.appendPath(QLatin1String("devices"));
    else if (file == QLatin1String("android"))
        result.appendPath(QLatin1String("android"));
    else
        return Utils::FileName();
    result.append(QLatin1String(".xml"));
    return result;
}