From 9670c67704be26c73640c21983405662510695a8 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 6 Apr 2018 11:49:36 +0200 Subject: [PATCH] Qnx: Move QnxRunConfigurationFactory close to run config No need to have half a dozen lines of code in a separate translation unit. Change-Id: I7b611f3404d3db4a1f731b4bfa79bd560a2bf9f3 Reviewed-by: Christian Stenger --- src/plugins/qnx/qnx.pro | 2 - src/plugins/qnx/qnx.qbs | 2 - src/plugins/qnx/qnxplugin.cpp | 1 - src/plugins/qnx/qnxrunconfiguration.cpp | 12 +++++ src/plugins/qnx/qnxrunconfiguration.h | 7 +++ .../qnx/qnxrunconfigurationfactory.cpp | 45 ------------------- src/plugins/qnx/qnxrunconfigurationfactory.h | 41 ----------------- 7 files changed, 19 insertions(+), 91 deletions(-) delete mode 100644 src/plugins/qnx/qnxrunconfigurationfactory.cpp delete mode 100644 src/plugins/qnx/qnxrunconfigurationfactory.h diff --git a/src/plugins/qnx/qnx.pro b/src/plugins/qnx/qnx.pro index cd24ea1f7fd..49f9d55b77d 100644 --- a/src/plugins/qnx/qnx.pro +++ b/src/plugins/qnx/qnx.pro @@ -10,7 +10,6 @@ SOURCES += qnxplugin.cpp \ qnxrunconfiguration.cpp \ qnxanalyzesupport.cpp \ qnxdebugsupport.cpp \ - qnxrunconfigurationfactory.cpp \ qnxqtversionfactory.cpp \ qnxqtversion.cpp \ qnxdeployconfiguration.cpp \ @@ -38,7 +37,6 @@ HEADERS += qnxplugin.h\ qnxrunconfiguration.h \ qnxanalyzesupport.h \ qnxdebugsupport.h \ - qnxrunconfigurationfactory.h \ qnxqtversionfactory.h \ qnxqtversion.h \ qnxdeployconfiguration.h \ diff --git a/src/plugins/qnx/qnx.qbs b/src/plugins/qnx/qnx.qbs index b17a538411c..8740daf0ce1 100644 --- a/src/plugins/qnx/qnx.qbs +++ b/src/plugins/qnx/qnx.qbs @@ -65,8 +65,6 @@ QtcPlugin { "qnxqtversionfactory.h", "qnxrunconfiguration.cpp", "qnxrunconfiguration.h", - "qnxrunconfigurationfactory.cpp", - "qnxrunconfigurationfactory.h", "qnxutils.cpp", "qnxutils.h", "qnx_export.h", diff --git a/src/plugins/qnx/qnxplugin.cpp b/src/plugins/qnx/qnxplugin.cpp index 2217774c31a..4bc3a7e9688 100644 --- a/src/plugins/qnx/qnxplugin.cpp +++ b/src/plugins/qnx/qnxplugin.cpp @@ -35,7 +35,6 @@ #include "qnxqtversion.h" #include "qnxqtversionfactory.h" #include "qnxrunconfiguration.h" -#include "qnxrunconfigurationfactory.h" #include "qnxsettingspage.h" #include "qnxtoolchain.h" #include "qnxutils.h" diff --git a/src/plugins/qnx/qnxrunconfiguration.cpp b/src/plugins/qnx/qnxrunconfiguration.cpp index 81daeb3f959..b6f5f84fd5b 100644 --- a/src/plugins/qnx/qnxrunconfiguration.cpp +++ b/src/plugins/qnx/qnxrunconfiguration.cpp @@ -24,12 +24,15 @@ ****************************************************************************/ #include "qnxrunconfiguration.h" + #include "qnxconstants.h" +#include "qnxdevicefactory.h" #include #include #include +#include #include @@ -98,5 +101,14 @@ bool QnxRunConfiguration::fromMap(const QVariantMap &map) return true; } +// QnxRunConfigurationFactory + +QnxRunConfigurationFactory::QnxRunConfigurationFactory() +{ + registerRunConfiguration(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX); + addSupportedTargetDeviceType(Constants::QNX_QNX_OS_TYPE); + addSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID); +} + } // namespace Internal } // namespace Qnx diff --git a/src/plugins/qnx/qnxrunconfiguration.h b/src/plugins/qnx/qnxrunconfiguration.h index 639badc999c..54580251168 100644 --- a/src/plugins/qnx/qnxrunconfiguration.h +++ b/src/plugins/qnx/qnxrunconfiguration.h @@ -47,5 +47,12 @@ private: QString m_qtLibPath; }; +class QnxRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory +{ + Q_OBJECT +public: + QnxRunConfigurationFactory(); +}; + } // namespace Internal } // namespace Qnx diff --git a/src/plugins/qnx/qnxrunconfigurationfactory.cpp b/src/plugins/qnx/qnxrunconfigurationfactory.cpp deleted file mode 100644 index 396f1e024af..00000000000 --- a/src/plugins/qnx/qnxrunconfigurationfactory.cpp +++ /dev/null @@ -1,45 +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 "qnxrunconfigurationfactory.h" - -#include "qnxconstants.h" -#include "qnxrunconfiguration.h" -#include "qnxdevicefactory.h" - -#include - -namespace Qnx { -namespace Internal { - -QnxRunConfigurationFactory::QnxRunConfigurationFactory() -{ - registerRunConfiguration(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX); - addSupportedTargetDeviceType(Constants::QNX_QNX_OS_TYPE); - addSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID); -} - -} // namespace Internal -} // namespace Qnx diff --git a/src/plugins/qnx/qnxrunconfigurationfactory.h b/src/plugins/qnx/qnxrunconfigurationfactory.h deleted file mode 100644 index 85e89cbe0c9..00000000000 --- a/src/plugins/qnx/qnxrunconfigurationfactory.h +++ /dev/null @@ -1,41 +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 Qnx { -namespace Internal { - -class QnxRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory -{ - Q_OBJECT -public: - QnxRunConfigurationFactory(); -}; - -} // namespace Internal -} // namespace Qnx