forked from qt-creator/qt-creator
Android: Hide plugin class definition in .cpp
It's not meant to be used from the outside. Change-Id: I94e46f95f896fa4b44e77e0196523beb8afdf8c3 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -1563,7 +1563,7 @@ void AndroidConfigurations::updateAndroidDevice()
|
||||
}
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
void AndroidPlugin::testAndroidConfigAvailableNdkPlatforms_data()
|
||||
void AndroidTests::testAndroidConfigAvailableNdkPlatforms_data()
|
||||
{
|
||||
QTest::addColumn<FilePath>("ndkPath");
|
||||
QTest::addColumn<Abis>("abis");
|
||||
@@ -1608,7 +1608,7 @@ void AndroidPlugin::testAndroidConfigAvailableNdkPlatforms_data()
|
||||
<< abis64Bit;
|
||||
}
|
||||
|
||||
void AndroidPlugin::testAndroidConfigAvailableNdkPlatforms()
|
||||
void AndroidTests::testAndroidConfigAvailableNdkPlatforms()
|
||||
{
|
||||
QFETCH(FilePath, ndkPath);
|
||||
QFETCH(Abis, abis);
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#endif
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/infobar.h>
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
#include <languageclient/languageclientsettings.h>
|
||||
|
||||
@@ -52,6 +53,8 @@
|
||||
|
||||
#include <nanotrace/nanotrace.h>
|
||||
|
||||
#include <utils/infobar.h>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
@@ -78,8 +81,13 @@ void setupAndroidDeployConfiguration()
|
||||
static AndroidDeployConfigurationFactory theAndroidDeployConfigurationFactory;
|
||||
}
|
||||
|
||||
void AndroidPlugin::initialize()
|
||||
class AndroidPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Android.json")
|
||||
|
||||
void initialize() final
|
||||
{
|
||||
setupAndroidConfigurations();
|
||||
|
||||
setupAndroidPotentialKit();
|
||||
@@ -117,11 +125,12 @@ void AndroidPlugin::initialize()
|
||||
#ifdef WITH_TESTS
|
||||
addTest<AndroidSdkManagerTest>();
|
||||
addTest<SdkManagerOutputParserTest>();
|
||||
addTest<AndroidTests>();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void AndroidPlugin::kitsRestored()
|
||||
{
|
||||
void kitsRestored()
|
||||
{
|
||||
const bool qtForAndroidInstalled
|
||||
= !QtSupport::QtVersionManager::versions([](const QtSupport::QtVersion *v) {
|
||||
return v->targetDeviceTypes().contains(Android::Constants::ANDROID_DEVICE_TYPE);
|
||||
@@ -139,10 +148,10 @@ void AndroidPlugin::kitsRestored()
|
||||
});
|
||||
disconnect(KitManager::instance(), &KitManager::kitsLoaded,
|
||||
this, &AndroidPlugin::kitsRestored);
|
||||
}
|
||||
}
|
||||
|
||||
void AndroidPlugin::askUserAboutAndroidSetup()
|
||||
{
|
||||
void askUserAboutAndroidSetup()
|
||||
{
|
||||
NANOTRACE_SCOPE("Android", "AndroidPlugin::askUserAboutAndroidSetup");
|
||||
if (!Core::ICore::infoBar()->canInfoBeAdded(kSetupAndroidSetting))
|
||||
return;
|
||||
@@ -161,6 +170,9 @@ void AndroidPlugin::askUserAboutAndroidSetup()
|
||||
});
|
||||
});
|
||||
Core::ICore::infoBar()->addInfo(info);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // Android::Internal
|
||||
|
||||
#include "androidplugin.moc"
|
||||
|
||||
@@ -3,21 +3,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
#include <QObject>
|
||||
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidPlugin final : public ExtensionSystem::IPlugin
|
||||
class AndroidTests final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Android.json")
|
||||
|
||||
void initialize() final;
|
||||
|
||||
void kitsRestored();
|
||||
void askUserAboutAndroidSetup();
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
void testAndroidConfigAvailableNdkPlatforms_data();
|
||||
void testAndroidConfigAvailableNdkPlatforms();
|
||||
|
||||
@@ -286,7 +286,7 @@ void setupAndroidQtVersion()
|
||||
}
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
void AndroidPlugin::testAndroidQtVersionParseBuiltWith_data()
|
||||
void AndroidTests::testAndroidQtVersionParseBuiltWith_data()
|
||||
{
|
||||
QTest::addColumn<QString>("modulesCoreJson");
|
||||
QTest::addColumn<bool>("hasInfo");
|
||||
@@ -332,7 +332,7 @@ void AndroidPlugin::testAndroidQtVersionParseBuiltWith_data()
|
||||
<< 31;
|
||||
}
|
||||
|
||||
void AndroidPlugin::testAndroidQtVersionParseBuiltWith()
|
||||
void AndroidTests::testAndroidQtVersionParseBuiltWith()
|
||||
{
|
||||
QFETCH(QString, modulesCoreJson);
|
||||
QFETCH(bool, hasInfo);
|
||||
|
||||
Reference in New Issue
Block a user