Commit 7b313e96 authored by Mehdi Fekari's avatar Mehdi Fekari Committed by Mehdi Fekari

Qnx: Refactor BlackBerryConfiguration

Improve the NDK setting page to enable managing multiple NDKs.

* Refactor BlackBerryConfiguration to support multiple configurations
* Add auto detected kits for installed NDKs
* Add/Remove manual NDKs

Change-Id: Icbc850551da3f729ccaa3473da720ade3051adaf
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: default avatarWolfgang Bremer <wbremer@blackberry.com>
parent 2ac65aaa
......@@ -31,6 +31,7 @@
#include "blackberrycertificate.h"
#include "blackberryconfiguration.h"
#include "blackberryconfigurationmanager.h"
#include <utils/hostosinfo.h>
......@@ -178,12 +179,16 @@ void BlackBerryCertificate::processError()
QString BlackBerryCertificate::command() const
{
QString command = BlackBerryConfiguration::instance()
.qnxEnv().value(QLatin1String("QNX_HOST"))
+ QLatin1String("/usr/bin/blackberry-keytool");
if (Utils::HostOsInfo::isWindowsHost())
command += QLatin1String(".bat");
QString command;
// TOOD: Give user choice to select NDK from where to get commands
QMultiMap<QString, QString> qnxEnv = BlackBerryConfigurationManager::instance().defaultQnxEnv();
if (!qnxEnv.isEmpty()) {
command = qnxEnv.value(QLatin1String("QNX_HOST"))
+ QLatin1String("/usr/bin/blackberry-keytool");
if (Utils::HostOsInfo::isWindowsHost())
command += QLatin1String(".bat");
}
return command;
}
......
......@@ -31,7 +31,7 @@
#include "blackberrycertificatemodel.h"
#include "blackberrycertificate.h"
#include "blackberryconfiguration.h"
#include "blackberryconfigurationmanager.h"
#include <coreplugin/icore.h>
......@@ -196,9 +196,9 @@ bool BlackBerryCertificateModel::insertCertificate(BlackBerryCertificate *certif
void BlackBerryCertificateModel::load()
{
BlackBerryConfiguration &configuration = BlackBerryConfiguration::instance();
m_certificates = configuration.certificates();
m_activeCertificate = configuration.activeCertificate();
BlackBerryConfigurationManager &configManager = BlackBerryConfigurationManager::instance();
m_certificates = configManager.certificates();
m_activeCertificate = configManager.activeCertificate();
}
} // namespace Internal
......
This diff is collapsed.
......@@ -42,83 +42,50 @@
#include <projectexplorer/kit.h>
#include <projectexplorer/gcctoolchain.h>
#include <QSettings>
#include <QObject>
namespace Qnx {
namespace Internal {
class BlackBerryCertificate;
class BlackBerryConfig
{
QString ndkPath;
QString targetName;
Utils::FileName qmake4BinaryFile;
Utils::FileName qmake5BinaryFile;
Utils::FileName gccCompiler;
Utils::FileName deviceDebuger;
Utils::FileName simulatorDebuger;
Utils::FileName sysRoot;
QMultiMap<QString, QString> qnxEnv;
QList<BlackBerryCertificate*> certificates;
BlackBerryCertificate *activeCertificate;
friend class BlackBerryConfiguration;
};
class BlackBerryConfiguration: public QObject
class BlackBerryConfiguration
{
Q_OBJECT
public:
static BlackBerryConfiguration &instance();
BlackBerryConfig config() const;
Utils::FileName qmake4Path() const;
Utils::FileName qmake5Path() const;
Utils::FileName gccPath() const;
Utils::FileName deviceGdbPath() const;
Utils::FileName simulatorGdbPath() const;
Utils::FileName sysRoot() const;
QMultiMap<QString, QString> qnxEnv() const;
void setupNdkConfiguration(const QString &ndkPath);
BlackBerryConfiguration(const QString& ndkPath, bool isAutoDetected, const QString &displayName = QString());
bool activate();
void deactivate();
QString ndkPath() const;
QString displayName() const;
QString targetName() const;
QString barsignerCskPath() const;
QString barsignerDbPath() const;
QString defaultKeystorePath() const;
QString defaultDebugTokenPath() const;
void loadSettings();
void clearNdkSettings();
void cleanNdkConfiguration();
void syncCertificates(QList<BlackBerryCertificate*> certificates,
BlackBerryCertificate *activeCertificate);
void addCertificate(BlackBerryCertificate *certificate);
void removeCertificate(BlackBerryCertificate *certificate);
QList<BlackBerryCertificate*> certificates() const;
BlackBerryCertificate *activeCertificate();
public slots:
void saveSettings();
bool isAutoDetected() const;
bool isActive() const;
bool isValid() const;
Utils::FileName qmake4BinaryFile() const;
Utils::FileName qmake5BinaryFile() const;
Utils::FileName gccCompiler() const;
Utils::FileName deviceDebuger() const;
Utils::FileName simulatorDebuger() const;
Utils::FileName sysRoot() const;
QMultiMap<QString, QString> qnxEnv() const;
private:
BlackBerryConfiguration(QObject *parent = 0);
static BlackBerryConfiguration *m_instance;
BlackBerryConfig m_config;
void loadCertificates();
void loadNdkSettings();
void saveCertificates();
void saveNdkSettings();
bool refresh();
bool setNdkPath(const QString &ndkPath);
void setupNdkConfigPerQtVersion(const Utils::FileName &qmakePath, ProjectExplorer::GccToolChain* tc);
QString m_ndkPath;
QString m_displayName;
QString m_targetName;
bool m_isAutoDetected;
Utils::FileName m_qmake4BinaryFile;
Utils::FileName m_qmake5BinaryFile;
Utils::FileName m_gccCompiler;
Utils::FileName m_deviceDebuger;
Utils::FileName m_simulatorDebuger;
Utils::FileName m_sysRoot;
QMultiMap<QString, QString> m_qnxEnv;
void setupConfigurationPerQtVersion(const Utils::FileName &qmakePath, ProjectExplorer::GccToolChain* tc);
QtSupport::BaseQtVersion* createQtVersion(const Utils::FileName &qmakePath);
ProjectExplorer::GccToolChain* createGccToolChain();
ProjectExplorer::Kit* createKit(QnxArchitecture arch, QtSupport::BaseQtVersion* qtVersion, ProjectExplorer::GccToolChain* tc);
void setSticky(ProjectExplorer::Kit* kit);
signals:
void updated();
};
} // namespace Internal
......
This diff is collapsed.
/**************************************************************************
**
** Copyright (C) 2011 - 2013 Research In Motion
**
** Contact: Research In Motion (blackberry-qt@qnx.com)
** Contact: KDAB (info@kdab.com)
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef BLACKBERRYCONFIGURATIONMANAGER_H
#define BLACKBERRYCONFIGURATIONMANAGER_H
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <QSettings>
#include <QObject>
namespace Qnx {
namespace Internal {
class BlackBerryConfiguration;
class BlackBerryCertificate;
class BlackBerryConfigurationManager : public QObject
{
Q_OBJECT
public:
static BlackBerryConfigurationManager &instance();
~BlackBerryConfigurationManager();
bool addConfiguration(BlackBerryConfiguration *config);
void removeConfiguration(BlackBerryConfiguration *config);
QList<BlackBerryConfiguration*> configurations() const;
QList<BlackBerryConfiguration*> manualConfigurations() const;
BlackBerryConfiguration *configurationFromNdkPath(const QString &ndkPath) const;
QString barsignerCskPath() const;
QString barsignerDbPath() const;
QString defaultKeystorePath() const;
QString defaultDebugTokenPath() const;
void clearConfigurationSettings(BlackBerryConfiguration *config);
void syncCertificates(QList<BlackBerryCertificate*> certificates,
BlackBerryCertificate *activeCertificate);
void addCertificate(BlackBerryCertificate *certificate);
void removeCertificate(BlackBerryCertificate *certificate);
QList<BlackBerryCertificate*> certificates() const;
BlackBerryCertificate *activeCertificate();
QMultiMap<QString, QString> defaultQnxEnv();
public slots:
void loadSettings();
void saveSettings();
private:
BlackBerryConfigurationManager(QObject *parent = 0);
static BlackBerryConfigurationManager *m_instance;
QList<BlackBerryConfiguration*> m_configs;
QList<BlackBerryCertificate*> m_certificates;
BlackBerryCertificate *m_activeCertificate;
void loadCertificates();
void loadManualConfigurations();
void loadAutoDetectedConfigurations();
void saveCertificates();
void saveManualConfigurations();
void clearInvalidConfigurations();
};
} // namespace Internal
} // namespace Qnx
#endif // BLACKBERRYCONFIGURATIONMANAGER_H
......@@ -30,6 +30,7 @@
****************************************************************************/
#include "blackberrycsjregistrar.h"
#include "blackberryconfigurationmanager.h"
#include "blackberryconfiguration.h"
#include <utils/hostosinfo.h>
......@@ -57,9 +58,15 @@ void BlackBerryCsjRegistrar::tryRegister(const QStringList &csjFiles,
if (m_process->state() != QProcess::NotRunning)
return;
QString command = BlackBerryConfiguration::instance()
.qnxEnv().value(QLatin1String("QNX_HOST"))
+ (QLatin1String("/usr/bin/blackberry-signer"));
if (BlackBerryConfigurationManager::instance().configurations().isEmpty())
return;
QMultiMap<QString, QString> qnxEnv = BlackBerryConfigurationManager::instance().defaultQnxEnv();
if (qnxEnv.isEmpty())
return;
QString command = qnxEnv.value(QLatin1String("QNX_HOST"))
+ (QLatin1String("/usr/bin/blackberry-signer"));
if (Utils::HostOsInfo::isWindowsHost())
command += QLatin1String(".bat");
......
......@@ -32,7 +32,7 @@
#include "blackberrydebugtokenrequestdialog.h"
#include "blackberrydebugtokenrequester.h"
#include "blackberrydeviceinformation.h"
#include "blackberryconfiguration.h"
#include "blackberryconfigurationmanager.h"
#include "blackberrycertificate.h"
#include "ui_blackberrydebugtokenrequestdialog.h"
......@@ -283,9 +283,9 @@ void BlackBerryDebugTokenRequestDialog::setBusy(bool busy)
void BlackBerryDebugTokenRequestDialog::populateComboBox()
{
BlackBerryConfiguration &configuration = BlackBerryConfiguration::instance();
BlackBerryConfigurationManager &configManager = BlackBerryConfigurationManager::instance();
QList<BlackBerryCertificate*> certificates = configuration.certificates();
QList<BlackBerryCertificate*> certificates = configManager.certificates();
foreach (const BlackBerryCertificate *certificate, certificates)
m_ui->keystore->addItem(certificate->fileName());
......
......@@ -32,6 +32,7 @@
#include "blackberrydeviceconnection.h"
#include "blackberryconfiguration.h"
#include "blackberryconfigurationmanager.h"
#include "qnxutils.h"
#include <projectexplorer/devicesupport/devicemanager.h>
......@@ -61,7 +62,11 @@ BlackBerryDeviceConnection::BlackBerryDeviceConnection() :
void BlackBerryDeviceConnection::connectDevice(const ProjectExplorer::IDevice::ConstPtr &device)
{
Utils::Environment env = Utils::Environment::systemEnvironment();
QnxUtils::prependQnxMapToEnvironment(BlackBerryConfiguration::instance().qnxEnv(), env);
QMultiMap<QString, QString> qnxEnv = BlackBerryConfigurationManager::instance().defaultQnxEnv();
if (!qnxEnv.isEmpty())
QnxUtils::prependQnxMapToEnvironment(qnxEnv, env);
m_process->setEnvironment(env.toStringList());
m_host = device->sshParameters().host;
......
......@@ -31,7 +31,7 @@
#include "blackberrykeyswidget.h"
#include "blackberryregisterkeydialog.h"
#include "blackberryconfiguration.h"
#include "blackberryconfigurationmanager.h"
#include "blackberrycertificatemodel.h"
#include "blackberryimportcertificatedialog.h"
#include "blackberrycreatecertificatedialog.h"
......@@ -75,9 +75,9 @@ BlackBerryKeysWidget::BlackBerryKeysWidget(QWidget *parent) :
void BlackBerryKeysWidget::apply()
{
BlackBerryConfiguration &configuration = BlackBerryConfiguration::instance();
BlackBerryConfigurationManager &configManager = BlackBerryConfigurationManager::instance();
configuration.syncCertificates(m_model->certificates(), m_model->activeCertificate());
configManager.syncCertificates(m_model->certificates(), m_model->activeCertificate());
}
void BlackBerryKeysWidget::registerKey()
......@@ -109,12 +109,12 @@ void BlackBerryKeysWidget::unregisterKey()
if (answer & QMessageBox::No)
return;
BlackBerryConfiguration &configuration = BlackBerryConfiguration::instance();
BlackBerryConfigurationManager &configManager = BlackBerryConfigurationManager::instance();
QFile f(configuration.barsignerCskPath());
QFile f(configManager.barsignerCskPath());
f.remove();
f.setFileName(configuration.barsignerDbPath());
f.setFileName(configManager.barsignerDbPath());
f.remove();
updateRegisterSection();
......
......@@ -31,6 +31,7 @@
#include "blackberryndkprocess.h"
#include "blackberryconfiguration.h"
#include "blackberryconfigurationmanager.h"
#include <utils/hostosinfo.h>
......@@ -54,12 +55,15 @@ BlackBerryNdkProcess::BlackBerryNdkProcess(const QString &command, QObject *pare
QString BlackBerryNdkProcess::command() const
{
QString command = BlackBerryConfiguration::instance()
.qnxEnv().value(QLatin1String("QNX_HOST"))
+ (QLatin1String("/usr/bin/")) + m_command;
if (Utils::HostOsInfo::isWindowsHost())
command += QLatin1String(".bat");
QString command;
QMultiMap<QString, QString> qnxEnv = BlackBerryConfigurationManager::instance().defaultQnxEnv();
if (!qnxEnv.isEmpty()) {
command = qnxEnv.value(QLatin1String("QNX_HOST"))
+ (QLatin1String("/usr/bin/")) + m_command;
if (Utils::HostOsInfo::isWindowsHost())
command += QLatin1String(".bat");
}
return command;
}
......
......@@ -35,36 +35,40 @@
#include "blackberryutils.h"
#include "blackberrysetupwizard.h"
#include "blackberryconfigurationmanager.h"
#include "blackberryconfiguration.h"
#include <utils/pathchooser.h>
#include <coreplugin/icore.h>
#include <QMessageBox>
#include <QFileDialog>
#include <QStandardItemModel>
#include <QTreeWidgetItem>
namespace Qnx {
namespace Internal {
BlackBerryNDKSettingsWidget::BlackBerryNDKSettingsWidget(QWidget *parent) :
QWidget(parent),
m_ui(new Ui_BlackBerryNDKSettingsWidget)
m_ui(new Ui_BlackBerryNDKSettingsWidget),
m_autoDetectedNdks(0),
m_manualNdks(0)
{
m_bbConfig = &BlackBerryConfiguration::instance();
m_bbConfigManager = &BlackBerryConfigurationManager::instance();
m_ui->setupUi(this);
m_ui->sdkPath->setExpectedKind(Utils::PathChooser::ExistingDirectory);
m_ui->sdkPath->setPath(m_bbConfig->ndkPath());
m_hasValidSdkPath = QnxUtils::isValidNdkPath(m_ui->sdkPath->path());
m_ui->removeNdkButton->setEnabled(false);
initInfoTable();
initNdkList();
connect(m_ui->wizardButton, SIGNAL(clicked()), this, SLOT(launchBlackBerrySetupWizard()));
connect(m_ui->sdkPath, SIGNAL(changed(QString)), this, SLOT(checkSdkPath()));
connect(m_ui->removeButton, SIGNAL(clicked()), this, SLOT(cleanConfiguration()));
connect(m_bbConfig, SIGNAL(updated()), this, SLOT(updateInfoTable()));
}
void BlackBerryNDKSettingsWidget::setRemoveButtonVisible(bool visible)
{
m_ui->removeButton->setVisible(visible);
connect(m_ui->addNdkButton, SIGNAL(clicked()), this, SLOT(addNdk()));
connect(m_ui->removeNdkButton, SIGNAL(clicked()), this, SLOT(removeNdk()));
connect(m_ui->ndksTreeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(updateInfoTable(QTreeWidgetItem*)));
}
void BlackBerryNDKSettingsWidget::setWizardMessageVisible(bool visible)
......@@ -73,9 +77,9 @@ void BlackBerryNDKSettingsWidget::setWizardMessageVisible(bool visible)
m_ui->wizardButton->setVisible(visible);
}
QString BlackBerryNDKSettingsWidget::sdkPath() const
bool BlackBerryNDKSettingsWidget::hasActiveNdk() const
{
return m_ui->sdkPath->path();
return !m_bbConfigManager->configurations().isEmpty();
}
void BlackBerryNDKSettingsWidget::launchBlackBerrySetupWizard() const
......@@ -92,30 +96,16 @@ void BlackBerryNDKSettingsWidget::launchBlackBerrySetupWizard() const
wizard.exec();
}
void BlackBerryNDKSettingsWidget::checkSdkPath()
void BlackBerryNDKSettingsWidget::updateInfoTable(QTreeWidgetItem* currentNdk)
{
if (!m_ui->sdkPath->path().isEmpty() &&
QnxUtils::isValidNdkPath(m_ui->sdkPath->path())) {
m_bbConfig->setupNdkConfiguration(m_ui->sdkPath->path());
m_hasValidSdkPath = true;
} else {
m_hasValidSdkPath = false;
QString ndkPath = currentNdk->text(1);
if (ndkPath.isEmpty()) {
m_ui->removeNdkButton->setEnabled(false);
return;
}
emit sdkPathChanged(m_ui->sdkPath->path());
}
bool BlackBerryNDKSettingsWidget::hasValidSdkPath() const
{
return m_hasValidSdkPath;
}
void BlackBerryNDKSettingsWidget::updateInfoTable()
{
QMultiMap<QString, QString> env = m_bbConfig->qnxEnv();
QMultiMap<QString, QString> env = QnxUtils::parseEnvironmentFile(QnxUtils::envFilePath(ndkPath));
if (env.isEmpty()) {
// clear
clearInfoTable();
return;
}
......@@ -137,30 +127,83 @@ void BlackBerryNDKSettingsWidget::updateInfoTable()
m_infoModel->appendRow(row);
}
m_infoModel->appendRow( QList<QStandardItem*>() << new QStandardItem(QString(QLatin1String("QMAKE 4"))) << new QStandardItem(m_bbConfig->qmake4Path().toString()));
m_infoModel->appendRow( QList<QStandardItem*>() << new QStandardItem(QString(QLatin1String("QMAKE 5"))) << new QStandardItem(m_bbConfig->qmake5Path().toString()));
m_infoModel->appendRow( QList<QStandardItem*>() << new QStandardItem(QString(QLatin1String("COMPILER"))) << new QStandardItem(m_bbConfig->gccPath().toString()));
BlackBerryConfiguration *config = m_bbConfigManager->configurationFromNdkPath(ndkPath);
if (!config)
return;
QString qmake4Path = config->qmake4BinaryFile().toString();
QString qmake5Path = config->qmake5BinaryFile().toString();
if (!qmake4Path.isEmpty())
m_infoModel->appendRow(QList<QStandardItem*>() << new QStandardItem(QString(QLatin1String("QMAKE 4"))) << new QStandardItem(qmake4Path));
if (!qmake5Path.isEmpty())
m_infoModel->appendRow(QList<QStandardItem*>() << new QStandardItem(QString(QLatin1String("QMAKE 5"))) << new QStandardItem(qmake5Path));
m_infoModel->appendRow(QList<QStandardItem*>() << new QStandardItem(QString(QLatin1String("COMPILER"))) << new QStandardItem(config->gccCompiler().toString()));
m_ui->removeButton->setEnabled(true);
m_ui->removeNdkButton->setEnabled(!config->isAutoDetected());
}
void BlackBerryNDKSettingsWidget::updateNdkList()
{
foreach (BlackBerryConfiguration *config, m_bbConfigManager->configurations()) {
QTreeWidgetItem *parent = config->isAutoDetected() ? m_autoDetectedNdks : m_manualNdks;
QTreeWidgetItem *item = new QTreeWidgetItem(parent);
item->setText(0, config->displayName());
item->setText(1, config->ndkPath()); // TODO: should be target name for NDKs >= v10.2
}
if (m_autoDetectedNdks->child(0)) {
m_autoDetectedNdks->child(0)->setSelected(true);
updateInfoTable(m_autoDetectedNdks->child(0));
}
}
void BlackBerryNDKSettingsWidget::clearInfoTable()
{
m_infoModel->clear();
m_ui->sdkPath->setPath(QString());
m_ui->removeButton->setEnabled(false);
}
void BlackBerryNDKSettingsWidget::cleanConfiguration()
void BlackBerryNDKSettingsWidget::addNdk()
{
QString selectedPath = QFileDialog::getExistingDirectory(0, tr("Select the NDK path"),
QString(),
QFileDialog::ShowDirsOnly);
if (selectedPath.isEmpty())
return;
BlackBerryConfiguration *config = m_bbConfigManager->configurationFromNdkPath(selectedPath);
if (!config) {
config = new BlackBerryConfiguration(selectedPath, false);
if (!m_bbConfigManager->addConfiguration(config)) {
delete config;
return;
}
QTreeWidgetItem *item = new QTreeWidgetItem(m_manualNdks);
item->setText(0, selectedPath.split(QDir::separator()).last());
item->setText(1, selectedPath);
updateInfoTable(item);
}
}
void BlackBerryNDKSettingsWidget::removeNdk()
{
QString ndkPath = m_ui->ndksTreeWidget->currentItem()->text(1);
QMessageBox::StandardButton button =
QMessageBox::question(Core::ICore::mainWindow(),
tr("Clean BlackBerry 10 Configuration"),
tr("Are you sure you want to remove the current BlackBerry configuration?"),
tr("Are you sure you want to remove:\n %1?").arg(ndkPath),
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes)
m_bbConfig->cleanNdkConfiguration();
if (button == QMessageBox::Yes) {
BlackBerryConfiguration *config = m_bbConfigManager->configurationFromNdkPath(ndkPath);
if (config)
m_bbConfigManager->removeConfiguration(config);
m_manualNdks->removeChild(m_ui->ndksTreeWidget->currentItem());
}
}
void BlackBerryNDKSettingsWidget::initInfoTable()
......@@ -170,8 +213,27 @@ void BlackBerryNDKSettingsWidget::initInfoTable()
m_ui->ndkInfosTableView->setModel(m_infoModel);
m_ui->ndkInfosTableView->verticalHeader()->hide();
m_ui->ndkInfosTableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
}
updateInfoTable();
void BlackBerryNDKSettingsWidget::initNdkList()
{
m_ui->ndksTreeWidget->header()->setResizeMode(QHeaderView::Stretch);
m_ui->ndksTreeWidget->header()->setStretchLastSection(false);
m_ui->ndksTreeWidget->setHeaderItem(new QTreeWidgetItem(QStringList() << tr("NDK") << tr("Path")));
m_ui->ndksTreeWidget->setTextElideMode(Qt::ElideNone);
m_ui->ndksTreeWidget->setColumnCount(2);
m_autoDetectedNdks = new QTreeWidgetItem(m_ui->ndksTreeWidget);
m_autoDetectedNdks->setText(0, tr("Auto-Detected"));
m_autoDetectedNdks->setFirstColumnSpanned(true);
m_autoDetectedNdks->setFlags(Qt::ItemIsEnabled);