forked from qt-creator/qt-creator
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:
@@ -19,7 +19,6 @@ HEADERS += \
|
||||
androidrunner.h \
|
||||
androidrunnerworker.h \
|
||||
androiddebugsupport.h \
|
||||
androidqtversionfactory.h \
|
||||
androidqtversion.h \
|
||||
androidcreatekeystorecertificate.h \
|
||||
javaparser.h \
|
||||
@@ -67,7 +66,6 @@ SOURCES += \
|
||||
androidrunner.cpp \
|
||||
androidrunnerworker.cpp \
|
||||
androiddebugsupport.cpp \
|
||||
androidqtversionfactory.cpp \
|
||||
androidqtversion.cpp \
|
||||
androidcreatekeystorecertificate.cpp \
|
||||
javaparser.cpp \
|
||||
|
||||
@@ -75,8 +75,6 @@ Project {
|
||||
"androidqmltoolingsupport.h",
|
||||
"androidqtversion.cpp",
|
||||
"androidqtversion.h",
|
||||
"androidqtversionfactory.cpp",
|
||||
"androidqtversionfactory.h",
|
||||
"androidrunconfiguration.cpp",
|
||||
"androidrunconfiguration.h",
|
||||
"androidrunenvironmentaspect.h",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "androidpackageinstallationstep.h"
|
||||
#include "androidpotentialkit.h"
|
||||
#include "androidqmltoolingsupport.h"
|
||||
#include "androidqtversionfactory.h"
|
||||
#include "androidqtversion.h"
|
||||
#include "androidrunconfiguration.h"
|
||||
#include "androidruncontrol.h"
|
||||
#include "androidsettingspage.h"
|
||||
|
||||
@@ -42,9 +42,11 @@
|
||||
|
||||
#include <proparser/profileevaluator.h>
|
||||
|
||||
using namespace Android::Internal;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
AndroidQtVersion::AndroidQtVersion()
|
||||
: QtSupport::BaseQtVersion()
|
||||
{
|
||||
@@ -154,3 +156,22 @@ QSet<Core::Id> AndroidQtVersion::targetDeviceTypes() const
|
||||
{
|
||||
return {Constants::ANDROID_DEVICE_TYPE};
|
||||
}
|
||||
|
||||
|
||||
// Factory
|
||||
|
||||
AndroidQtVersionFactory::AndroidQtVersionFactory()
|
||||
{
|
||||
setQtVersionCreator([] { return new AndroidQtVersion; });
|
||||
setSupportedType(Constants::ANDROIDQT);
|
||||
setPriority(90);
|
||||
|
||||
setRestrictionChecker([](const SetupData &setup) {
|
||||
return !setup.config.contains("android-no-sdk")
|
||||
&& (setup.config.contains("android")
|
||||
|| setup.platforms.contains("android"));
|
||||
});
|
||||
}
|
||||
|
||||
} // Internal
|
||||
} // Android
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtversionfactory.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
@@ -62,5 +63,11 @@ private:
|
||||
mutable int m_minNdk = -1;
|
||||
};
|
||||
|
||||
class AndroidQtVersionFactory : public QtSupport::QtVersionFactory
|
||||
{
|
||||
public:
|
||||
AndroidQtVersionFactory();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
||||
** 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 "androidqtversionfactory.h"
|
||||
#include "androidqtversion.h"
|
||||
#include "androidconstants.h"
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
AndroidQtVersionFactory::AndroidQtVersionFactory()
|
||||
{
|
||||
setQtVersionCreator([] { return new AndroidQtVersion; });
|
||||
setSupportedType(Constants::ANDROIDQT);
|
||||
setPriority(90);
|
||||
|
||||
setRestrictionChecker([](const SetupData &setup) {
|
||||
return !setup.config.contains("android-no-sdk")
|
||||
&& (setup.config.contains("android")
|
||||
|| setup.platforms.contains("android"));
|
||||
});
|
||||
}
|
||||
|
||||
} // Internal
|
||||
} // Android
|
||||
@@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
||||
** 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 Android {
|
||||
namespace Internal {
|
||||
|
||||
class AndroidQtVersionFactory : public QtSupport::QtVersionFactory
|
||||
{
|
||||
public:
|
||||
AndroidQtVersionFactory();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
Reference in New Issue
Block a user