diff --git a/src/plugins/qnx/CMakeLists.txt b/src/plugins/qnx/CMakeLists.txt index e91fb8d5691..5e2e2934cb8 100644 --- a/src/plugins/qnx/CMakeLists.txt +++ b/src/plugins/qnx/CMakeLists.txt @@ -5,7 +5,6 @@ add_qtc_plugin(Qnx qnx.qrc qnx_export.h qnxanalyzesupport.cpp qnxanalyzesupport.h - qnxbaseqtconfigwidget.cpp qnxbaseqtconfigwidget.h qnxconfiguration.cpp qnxconfiguration.h qnxconfigurationmanager.cpp qnxconfigurationmanager.h qnxconstants.h diff --git a/src/plugins/qnx/qnx.pro b/src/plugins/qnx/qnx.pro index 9415297b465..5a04002b0d6 100644 --- a/src/plugins/qnx/qnx.pro +++ b/src/plugins/qnx/qnx.pro @@ -3,7 +3,6 @@ QT += network xml include(../../qtcreatorplugin.pri) SOURCES += qnxplugin.cpp \ - qnxbaseqtconfigwidget.cpp \ qnxutils.cpp \ qnxdevicewizard.cpp \ qnxrunconfiguration.cpp \ @@ -25,7 +24,6 @@ SOURCES += qnxplugin.cpp \ HEADERS += qnxplugin.h\ qnxconstants.h \ - qnxbaseqtconfigwidget.h \ qnxutils.h \ qnxdevicewizard.h \ qnxrunconfiguration.h \ diff --git a/src/plugins/qnx/qnx.qbs b/src/plugins/qnx/qnx.qbs index 8897c422ab8..b4b3aeede17 100644 --- a/src/plugins/qnx/qnx.qbs +++ b/src/plugins/qnx/qnx.qbs @@ -21,8 +21,6 @@ QtcPlugin { "qnxtoolchain.cpp", "qnxtoolchain.h", "qnx.qrc", - "qnxbaseqtconfigwidget.cpp", - "qnxbaseqtconfigwidget.h", "qnxconstants.h", "qnxconfiguration.cpp", "qnxconfiguration.h", diff --git a/src/plugins/qnx/qnxbaseqtconfigwidget.cpp b/src/plugins/qnx/qnxbaseqtconfigwidget.cpp deleted file mode 100644 index 7ac289c9bf5..00000000000 --- a/src/plugins/qnx/qnxbaseqtconfigwidget.cpp +++ /dev/null @@ -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 -#include - -#include -#include - -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 diff --git a/src/plugins/qnx/qnxbaseqtconfigwidget.h b/src/plugins/qnx/qnxbaseqtconfigwidget.h deleted file mode 100644 index 1ab1a9d16e5..00000000000 --- a/src/plugins/qnx/qnxbaseqtconfigwidget.h +++ /dev/null @@ -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 - -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 diff --git a/src/plugins/qnx/qnxqtversion.cpp b/src/plugins/qnx/qnxqtversion.cpp index b0fcf300b35..ee0d3924b0a 100644 --- a/src/plugins/qnx/qnxqtversion.cpp +++ b/src/plugins/qnx/qnxqtversion.cpp @@ -25,17 +25,21 @@ #include "qnxqtversion.h" -#include "qnxbaseqtconfigwidget.h" #include "qnxconstants.h" #include "qnxutils.h" #include #include + +#include #include + #include #include +#include #include +#include using namespace ProjectExplorer; using namespace Utils; @@ -49,6 +53,28 @@ const char QNX_TARGET_KEY[] = "QNX_TARGET"; const char QNX_HOST_KEY[] = "QNX_HOST"; 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; QString QnxQtVersion::description() const