QnxToolChain *BlackBerryConfiguration::createToolChain(
        ProjectExplorer::Abi abi, const QString &versionName)
{
    QnxToolChain* toolChain = new QnxToolChain(ToolChain::AutoDetection);
    toolChain->setDisplayName(tr("QCC for %1").arg(versionName));
    toolChain->setCompilerCommand(m_gccCompiler);
    toolChain->setNdkPath(ndkPath());
    if (abi.isValid())
        toolChain->setTargetAbi(abi);
    ToolChainManager::registerToolChain(toolChain);
    return toolChain;
}
void QnxToolChainConfigWidget::applyImpl()
{
    if (toolChain()->isAutoDetected())
        return;

    QnxToolChain *tc = static_cast<QnxToolChain *>(toolChain());
    Q_ASSERT(tc);
    QString displayName = tc->displayName();
    tc->resetToolChain(m_compilerCommand->fileName());
    tc->setDisplayName(displayName); // reset display name
    tc->setNdkPath(m_ndkPath->fileName().toString());
    tc->setTargetAbi(m_abiWidget->currentAbi());
}