Ejemplo n.º 1
1
void QmakeKitInformation::setup(Kit *k)
{
    QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
    if (!version)
        return;

    FileName spec = QmakeKitInformation::mkspec(k);
    if (spec.isEmpty())
        spec = version->mkspec();

    ToolChain *tc = ToolChainKitInformation::toolChain(k);

    if (!tc || (!tc->suggestedMkspecList().empty() && !tc->suggestedMkspecList().contains(spec))) {
        ToolChain *possibleTc = 0;
        foreach (ToolChain *current, ToolChainManager::toolChains()) {
            if (version->qtAbis().contains(current->targetAbi())) {
                possibleTc = current;
                if (current->suggestedMkspecList().contains(spec))
                    break;
            }
        }
        ToolChainKitInformation::setToolChain(k, possibleTc);
    }
Ejemplo n.º 2
0
void QmakeKitInformation::setup(Kit *k)
{
    QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
    if (!version)
        return;

    if (version->type() == "Boot2Qt.QtVersionType") // HACK: Ignore boot2Qt kits!
        return;

    FileName spec = QmakeKitInformation::mkspec(k);
    if (spec.isEmpty())
        spec = version->mkspec();


    ToolChain *tc = ToolChainKitInformation::toolChain(k, ToolChain::Language::Cxx);

    if (!tc || (!tc->suggestedMkspecList().empty() && !tc->suggestedMkspecList().contains(spec))) {
        ToolChain *possibleTc = nullptr;
        foreach (ToolChain *current, ToolChainManager::toolChains()) {
            if (current->language() == ToolChain::Language::Cxx
                    && version->qtAbis().contains(current->targetAbi())) {
                possibleTc = current;
                if (current->suggestedMkspecList().contains(spec))
                    break;
            }
        }
        if (possibleTc)
            ToolChainKitInformation::setToolChain(k, possibleTc);
    }