From 9d046826f87c1971f4104ca5fc86ef58250168c5 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 30 Jan 2019 17:30:24 +0100 Subject: [PATCH] iOS: Move IosDeploy*Factory to plugin Change-Id: I752a497ce95609cfb92207e1dfbc6cf91ffa9f3c Reviewed-by: hjk Reviewed-by: Christian Stenger --- src/plugins/ios/ios.pro | 4 -- src/plugins/ios/ios.qbs | 4 -- src/plugins/ios/iosdeployconfiguration.cpp | 51 ---------------------- src/plugins/ios/iosdeployconfiguration.h | 40 ----------------- src/plugins/ios/iosdeploystepfactory.cpp | 46 ------------------- src/plugins/ios/iosdeploystepfactory.h | 40 ----------------- src/plugins/ios/iosplugin.cpp | 33 +++++++++++++- 7 files changed, 31 insertions(+), 187 deletions(-) delete mode 100644 src/plugins/ios/iosdeployconfiguration.cpp delete mode 100644 src/plugins/ios/iosdeployconfiguration.h delete mode 100644 src/plugins/ios/iosdeploystepfactory.cpp delete mode 100644 src/plugins/ios/iosdeploystepfactory.h diff --git a/src/plugins/ios/ios.pro b/src/plugins/ios/ios.pro index d0706cac29b..d4e4d9e05d0 100644 --- a/src/plugins/ios/ios.pro +++ b/src/plugins/ios/ios.pro @@ -25,9 +25,7 @@ HEADERS += \ iosprobe.h \ iosbuildstep.h \ iostoolhandler.h \ - iosdeployconfiguration.h \ iosdeploystep.h \ - iosdeploystepfactory.h \ iosdeploystepwidget.h \ simulatorcontrol.h \ iosbuildconfiguration.h \ @@ -54,9 +52,7 @@ SOURCES += \ iosprobe.cpp \ iosbuildstep.cpp \ iostoolhandler.cpp \ - iosdeployconfiguration.cpp \ iosdeploystep.cpp \ - iosdeploystepfactory.cpp \ iosdeploystepwidget.cpp \ simulatorcontrol.cpp \ iosbuildconfiguration.cpp \ diff --git a/src/plugins/ios/ios.qbs b/src/plugins/ios/ios.qbs index dc9b12318c0..c5553f9e459 100644 --- a/src/plugins/ios/ios.qbs +++ b/src/plugins/ios/ios.qbs @@ -29,12 +29,8 @@ QtcPlugin { "iosconfigurations.cpp", "iosconfigurations.h", "iosconstants.h", - "iosdeployconfiguration.cpp", - "iosdeployconfiguration.h", "iosdeploystep.cpp", "iosdeploystep.h", - "iosdeploystepfactory.cpp", - "iosdeploystepfactory.h", "iosdeploystepwidget.cpp", "iosdeploystepwidget.h", "iosdeploystepwidget.ui", diff --git a/src/plugins/ios/iosdeployconfiguration.cpp b/src/plugins/ios/iosdeployconfiguration.cpp deleted file mode 100644 index 81dd217db3c..00000000000 --- a/src/plugins/ios/iosdeployconfiguration.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 "iosconstants.h" -#include "iosdeploystep.h" -#include "iosdeployconfiguration.h" - -#include -#include - -#include - -using namespace ProjectExplorer; - -namespace Ios { -namespace Internal { - -IosDeployConfigurationFactory::IosDeployConfigurationFactory() -{ - setConfigBaseId("Qt4ProjectManager.IosDeployConfiguration"); - setSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID); - addSupportedTargetDeviceType(Constants::IOS_DEVICE_TYPE); - addSupportedTargetDeviceType(Constants::IOS_SIMULATOR_TYPE); - setDefaultDisplayName(QCoreApplication::translate("Ios::Internal", "Deploy on iOS")); - addInitialStep(IosDeployStep::stepId()); -} - -} // namespace Internal -} // namespace Ios diff --git a/src/plugins/ios/iosdeployconfiguration.h b/src/plugins/ios/iosdeployconfiguration.h deleted file mode 100644 index ad351ac1d25..00000000000 --- a/src/plugins/ios/iosdeployconfiguration.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 Ios { -namespace Internal { - -class IosDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory -{ -public: - IosDeployConfigurationFactory(); -}; - -} // namespace Internal -} // namespace Ios diff --git a/src/plugins/ios/iosdeploystepfactory.cpp b/src/plugins/ios/iosdeploystepfactory.cpp deleted file mode 100644 index bd92f96aac0..00000000000 --- a/src/plugins/ios/iosdeploystepfactory.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 "iosdeploystepfactory.h" - -#include "iosconstants.h" -#include "iosdeploystep.h" - -#include - -namespace Ios { -namespace Internal { - -IosDeployStepFactory::IosDeployStepFactory() -{ - registerStep(IosDeployStep::stepId()); - setDisplayName(IosDeployStep::tr("Deploy to iOS device or emulator")); - setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY); - setSupportedDeviceTypes({Constants::IOS_DEVICE_TYPE, Constants::IOS_SIMULATOR_TYPE}); - setRepeatable(false); -} - -} // namespace Internal -} // namespace Ios diff --git a/src/plugins/ios/iosdeploystepfactory.h b/src/plugins/ios/iosdeploystepfactory.h deleted file mode 100644 index d94a79f57fa..00000000000 --- a/src/plugins/ios/iosdeploystepfactory.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 Ios { -namespace Internal { - -class IosDeployStepFactory : public ProjectExplorer::BuildStepFactory -{ -public: - IosDeployStepFactory(); -}; - -} // namespace Internal -} // namespace Ios diff --git a/src/plugins/ios/iosplugin.cpp b/src/plugins/ios/iosplugin.cpp index 89ce3be3e12..39f649450c1 100644 --- a/src/plugins/ios/iosplugin.cpp +++ b/src/plugins/ios/iosplugin.cpp @@ -29,8 +29,7 @@ #include "iosbuildstep.h" #include "iosconfigurations.h" #include "iosconstants.h" -#include "iosdeployconfiguration.h" -#include "iosdeploystepfactory.h" +#include "iosdeploystep.h" #include "iosdevicefactory.h" #include "iosdsymbuildstep.h" #include "iosqtversionfactory.h" @@ -41,10 +40,13 @@ #include "iostoolhandler.h" #include "iosrunconfiguration.h" +#include #include #include #include +#include + #include using namespace ProjectExplorer; @@ -55,6 +57,33 @@ namespace Internal { Q_LOGGING_CATEGORY(iosLog, "qtc.ios.common", QtWarningMsg) +class IosDeployStepFactory : public BuildStepFactory +{ +public: + IosDeployStepFactory() + { + registerStep(IosDeployStep::stepId()); + setDisplayName(IosDeployStep::tr("Deploy to iOS device or emulator")); + setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY); + setSupportedDeviceTypes({Constants::IOS_DEVICE_TYPE, Constants::IOS_SIMULATOR_TYPE}); + setRepeatable(false); + } +}; + +class IosDeployConfigurationFactory : public DeployConfigurationFactory +{ +public: + IosDeployConfigurationFactory() + { + setConfigBaseId("Qt4ProjectManager.IosDeployConfiguration"); + setSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID); + addSupportedTargetDeviceType(Constants::IOS_DEVICE_TYPE); + addSupportedTargetDeviceType(Constants::IOS_SIMULATOR_TYPE); + setDefaultDisplayName(QCoreApplication::translate("Ios::Internal", "Deploy on iOS")); + addInitialStep(IosDeployStep::stepId()); + } +}; + class IosPluginPrivate { public: