forked from qt-creator/qt-creator
Qnx: Allow broader kit generation
So far we insisted on a Qt version being present. For more general use, including limited testing it's more convenient to also allow kits being generated when no QNX Qt is around. Change-Id: I99954b76543f2a04063a737444dce0ae5c921929 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -176,15 +176,6 @@ bool QnxConfiguration::isActive() const
|
|||||||
return hasToolChain && hasDebugger;
|
return hasToolChain && hasDebugger;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QnxConfiguration::canCreateKits() const
|
|
||||||
{
|
|
||||||
if (!isValid())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return Utils::anyOf(m_targets,
|
|
||||||
[this](const Target &target) -> bool { return qnxQtVersion(target); });
|
|
||||||
}
|
|
||||||
|
|
||||||
FilePath QnxConfiguration::sdpPath() const
|
FilePath QnxConfiguration::sdpPath() const
|
||||||
{
|
{
|
||||||
return envFile().parentDir();
|
return envFile().parentDir();
|
||||||
@@ -276,10 +267,7 @@ QList<ToolChain *> QnxConfiguration::findToolChain(const QList<ToolChain *> &alr
|
|||||||
void QnxConfiguration::createKit(const Target &target, const QnxToolChainMap &toolChainMap,
|
void QnxConfiguration::createKit(const Target &target, const QnxToolChainMap &toolChainMap,
|
||||||
const QVariant &debugger)
|
const QVariant &debugger)
|
||||||
{
|
{
|
||||||
QnxQtVersion *qnxQt = qnxQtVersion(target);
|
QnxQtVersion *qnxQt = qnxQtVersion(target); // nullptr is ok.
|
||||||
// Do not create incomplete kits if no qt qnx version found
|
|
||||||
if (!qnxQt)
|
|
||||||
return;
|
|
||||||
|
|
||||||
const auto init = [&](Kit *k) {
|
const auto init = [&](Kit *k) {
|
||||||
QtKitAspect::setQtVersion(k, qnxQt);
|
QtKitAspect::setQtVersion(k, qnxQt);
|
||||||
|
@@ -47,7 +47,6 @@ public:
|
|||||||
bool activate();
|
bool activate();
|
||||||
void deactivate();
|
void deactivate();
|
||||||
bool isActive() const;
|
bool isActive() const;
|
||||||
bool canCreateKits() const;
|
|
||||||
Utils::FilePath sdpPath() const;
|
Utils::FilePath sdpPath() const;
|
||||||
|
|
||||||
QList<ProjectExplorer::ToolChain *> autoDetect(
|
QList<ProjectExplorer::ToolChain *> autoDetect(
|
||||||
|
@@ -183,7 +183,7 @@ void QnxSettingsWidget::updateInformation()
|
|||||||
m_configsCombo->itemData(currentIndex).value<void*>());
|
m_configsCombo->itemData(currentIndex).value<void*>());
|
||||||
|
|
||||||
// update the checkbox
|
// update the checkbox
|
||||||
m_generateKitsCheckBox->setEnabled(config ? config->canCreateKits() : false);
|
m_generateKitsCheckBox->setEnabled(config ? config->isValid() : false);
|
||||||
m_generateKitsCheckBox->setChecked(config ? config->isActive() : false);
|
m_generateKitsCheckBox->setChecked(config ? config->isActive() : false);
|
||||||
|
|
||||||
// update information
|
// update information
|
||||||
|
@@ -4,13 +4,11 @@
|
|||||||
#include "qnxutils.h"
|
#include "qnxutils.h"
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/fileutils.h>
|
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
#include <utils/temporaryfile.h>
|
#include <utils/temporaryfile.h>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStandardPaths>
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
Reference in New Issue
Block a user