Qnx: Merge qnxbaseqtconfigwidget.{cpp,h} into qnxqtversion

Not worth a file pair of its own.

Change-Id: I5a7e64d142e38a075f726ca6d6a8cb2e4a39e57b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
hjk
2021-09-27 14:47:00 +02:00
parent e6130c9446
commit d70bc79809
6 changed files with 27 additions and 120 deletions

View File

@@ -5,7 +5,6 @@ add_qtc_plugin(Qnx
qnx.qrc qnx.qrc
qnx_export.h qnx_export.h
qnxanalyzesupport.cpp qnxanalyzesupport.h qnxanalyzesupport.cpp qnxanalyzesupport.h
qnxbaseqtconfigwidget.cpp qnxbaseqtconfigwidget.h
qnxconfiguration.cpp qnxconfiguration.h qnxconfiguration.cpp qnxconfiguration.h
qnxconfigurationmanager.cpp qnxconfigurationmanager.h qnxconfigurationmanager.cpp qnxconfigurationmanager.h
qnxconstants.h qnxconstants.h

View File

@@ -3,7 +3,6 @@ QT += network xml
include(../../qtcreatorplugin.pri) include(../../qtcreatorplugin.pri)
SOURCES += qnxplugin.cpp \ SOURCES += qnxplugin.cpp \
qnxbaseqtconfigwidget.cpp \
qnxutils.cpp \ qnxutils.cpp \
qnxdevicewizard.cpp \ qnxdevicewizard.cpp \
qnxrunconfiguration.cpp \ qnxrunconfiguration.cpp \
@@ -25,7 +24,6 @@ SOURCES += qnxplugin.cpp \
HEADERS += qnxplugin.h\ HEADERS += qnxplugin.h\
qnxconstants.h \ qnxconstants.h \
qnxbaseqtconfigwidget.h \
qnxutils.h \ qnxutils.h \
qnxdevicewizard.h \ qnxdevicewizard.h \
qnxrunconfiguration.h \ qnxrunconfiguration.h \

View File

@@ -21,8 +21,6 @@ QtcPlugin {
"qnxtoolchain.cpp", "qnxtoolchain.cpp",
"qnxtoolchain.h", "qnxtoolchain.h",
"qnx.qrc", "qnx.qrc",
"qnxbaseqtconfigwidget.cpp",
"qnxbaseqtconfigwidget.h",
"qnxconstants.h", "qnxconstants.h",
"qnxconfiguration.cpp", "qnxconfiguration.cpp",
"qnxconfiguration.h", "qnxconfiguration.h",

View File

@@ -1,61 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
** 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 The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "qnxbaseqtconfigwidget.h"
#include "qnxqtversion.h"
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <QDir>
#include <QHBoxLayout>
using namespace Utils;
namespace Qnx {
namespace Internal {
QnxBaseQtConfigWidget::QnxBaseQtConfigWidget(QnxQtVersion *version) :
m_version(version),
m_sdpPathChooser(new PathChooser)
{
QTC_ASSERT(version, return);
auto layout = new QHBoxLayout(this);
layout->addWidget(m_sdpPathChooser);
m_sdpPathChooser->setExpectedKind(PathChooser::ExistingDirectory);
m_sdpPathChooser->setHistoryCompleter("Qnx.Sdp.History");
m_sdpPathChooser->setFilePath(version->sdpPath());
connect(m_sdpPathChooser, &PathChooser::rawPathChanged, [this] {
m_version->setSdpPath(m_sdpPathChooser->filePath());
emit changed();
});
}
} // namespace Internal
} // namespace Qnx

View File

@@ -1,53 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
** 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 The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include <qtsupport/qtconfigwidget.h>
namespace Utils {
class PathChooser;
class FilePath;
} // Utils
namespace Qnx {
namespace Internal {
class QnxQtVersion;
class QnxBaseQtConfigWidget : public QtSupport::QtConfigWidget
{
Q_OBJECT
public:
explicit QnxBaseQtConfigWidget(QnxQtVersion *version);
private:
QnxQtVersion *m_version;
Utils::PathChooser *m_sdpPathChooser;
};
} // namespace Internal
} // namespace Qnx

View File

@@ -25,17 +25,21 @@
#include "qnxqtversion.h" #include "qnxqtversion.h"
#include "qnxbaseqtconfigwidget.h"
#include "qnxconstants.h" #include "qnxconstants.h"
#include "qnxutils.h" #include "qnxutils.h"
#include <coreplugin/featureprovider.h> #include <coreplugin/featureprovider.h>
#include <proparser/profileevaluator.h> #include <proparser/profileevaluator.h>
#include <qtsupport/qtconfigwidget.h>
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/pathchooser.h>
#include <QDir> #include <QDir>
#include <QHBoxLayout>
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
@@ -49,6 +53,28 @@ const char QNX_TARGET_KEY[] = "QNX_TARGET";
const char QNX_HOST_KEY[] = "QNX_HOST"; const char QNX_HOST_KEY[] = "QNX_HOST";
const char QNX_QNX_FEATURE[] = "QtSupport.Wizards.FeatureQNX"; const char QNX_QNX_FEATURE[] = "QtSupport.Wizards.FeatureQNX";
class QnxBaseQtConfigWidget : public QtSupport::QtConfigWidget
{
public:
explicit QnxBaseQtConfigWidget(QnxQtVersion *version)
{
QTC_ASSERT(version, return);
auto layout = new QHBoxLayout(this);
auto sdpPathChooser(new PathChooser);
layout->addWidget(sdpPathChooser);
sdpPathChooser->setExpectedKind(PathChooser::ExistingDirectory);
sdpPathChooser->setHistoryCompleter("Qnx.Sdp.History");
sdpPathChooser->setFilePath(version->sdpPath());
connect(sdpPathChooser, &PathChooser::rawPathChanged, [this, version, sdpPathChooser] {
version->setSdpPath(sdpPathChooser->filePath());
emit changed();
});
}
};
QnxQtVersion::QnxQtVersion() = default; QnxQtVersion::QnxQtVersion() = default;
QString QnxQtVersion::description() const QString QnxQtVersion::description() const