QtSupport et al: Move QtVersionFactory to *QtVersion implementation

At most a dozen lines each left.

Change-Id: Ifbf34f814266ba7bee83d3fee9db831eb450dfc4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-02-14 12:29:00 +01:00
parent 631b982aaa
commit 06cc09a30f
44 changed files with 167 additions and 553 deletions

View File

@@ -15,7 +15,6 @@ HEADERS += \
iossettingswidget.h \
iosrunner.h \
iosdsymbuildstep.h \
iosqtversionfactory.h \
iosqtversion.h \
iosplugin.h \
iosdevicefactory.h \
@@ -42,7 +41,6 @@ SOURCES += \
iossettingswidget.cpp \
iosrunner.cpp \
iosdsymbuildstep.cpp \
iosqtversionfactory.cpp \
iosqtversion.cpp \
iosplugin.cpp \
iosdevicefactory.cpp \

View File

@@ -47,8 +47,6 @@ QtcPlugin {
"iosprobe.h",
"iosqtversion.cpp",
"iosqtversion.h",
"iosqtversionfactory.cpp",
"iosqtversionfactory.h",
"iosrunconfiguration.cpp",
"iosrunconfiguration.h",
"iosrunner.cpp",

View File

@@ -32,7 +32,7 @@
#include "iosdeploystep.h"
#include "iosdevicefactory.h"
#include "iosdsymbuildstep.h"
#include "iosqtversionfactory.h"
#include "iosqtversion.h"
#include "iosrunner.h"
#include "iossettingspage.h"
#include "iossimulator.h"

View File

@@ -108,3 +108,16 @@ QSet<Core::Id> IosQtVersion::targetDeviceTypes() const
// iOS Qt version supports ios devices as well as simulator.
return {Constants::IOS_DEVICE_TYPE, Constants::IOS_SIMULATOR_TYPE};
}
// Factory
IosQtVersionFactory::IosQtVersionFactory()
{
setQtVersionCreator([] { return new IosQtVersion; });
setSupportedType(Constants::IOSQT);
setPriority(90);
setRestrictionChecker([](const SetupData &setup) {
return setup.platforms.contains("ios");
});
}

View File

@@ -26,6 +26,7 @@
#pragma once
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtversionfactory.h>
#include <QCoreApplication>
@@ -54,5 +55,11 @@ public:
QString description() const override;
};
class IosQtVersionFactory : public QtSupport::QtVersionFactory
{
public:
IosQtVersionFactory();
};
} // namespace Internal
} // namespace Ios

View File

@@ -1,45 +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 "iosqtversionfactory.h"
#include "iosqtversion.h"
#include "iosconstants.h"
namespace Ios {
namespace Internal {
IosQtVersionFactory::IosQtVersionFactory()
{
setQtVersionCreator([] { return new IosQtVersion; });
setSupportedType(Constants::IOSQT);
setPriority(90);
setRestrictionChecker([](const SetupData &setup) {
return setup.platforms.contains("ios");
});
}
} // Internal
} // Ios

View File

@@ -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 <qtsupport/qtversionfactory.h>
namespace Ios {
namespace Internal {
class IosQtVersionFactory : public QtSupport::QtVersionFactory
{
public:
IosQtVersionFactory();
};
} // namespace Internal
} // namespace Ios