forked from qt-creator/qt-creator
Make licensechecker dependency optional
Change-Id: Ie867d2da37a507d36caaf16494f996b88ca4e142 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -50,5 +50,7 @@ equals(TEST, 1) {
|
|||||||
RESOURCES += clangstaticanalyzerunittests.qrc
|
RESOURCES += clangstaticanalyzerunittests.qrc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CONFIG(licensechecker): DEFINES += LICENSECHECKER
|
||||||
|
|
||||||
DISTFILES += \
|
DISTFILES += \
|
||||||
tests/tests.pri
|
tests/tests.pri
|
||||||
|
@@ -4,8 +4,9 @@ QTC_LIB_DEPENDS += \
|
|||||||
utils
|
utils
|
||||||
QTC_PLUGIN_DEPENDS += \
|
QTC_PLUGIN_DEPENDS += \
|
||||||
analyzerbase \
|
analyzerbase \
|
||||||
cpptools \
|
cpptools
|
||||||
licensechecker
|
|
||||||
QTC_TEST_DEPENDS += \
|
QTC_TEST_DEPENDS += \
|
||||||
qbsprojectmanager \
|
qbsprojectmanager \
|
||||||
qmakeprojectmanager
|
qmakeprojectmanager
|
||||||
|
|
||||||
|
CONFIG(licensechecker): QTC_PLUGIN_DEPENDS += licensechecker
|
||||||
|
@@ -35,9 +35,12 @@
|
|||||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/dialogs/ioptionspage.h>
|
#include <coreplugin/dialogs/ioptionspage.h>
|
||||||
#include <licensechecker/licensecheckerplugin.h>
|
|
||||||
#include <projectexplorer/projectpanelfactory.h>
|
#include <projectexplorer/projectpanelfactory.h>
|
||||||
|
|
||||||
|
#ifdef LICENSECHECKER
|
||||||
|
#include <licensechecker/licensecheckerplugin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
@@ -114,6 +117,7 @@ bool ClangStaticAnalyzerPlugin::initialize(const QStringList &arguments, QString
|
|||||||
panelFactory->setSimpleCreateWidgetFunction<ProjectSettingsWidget>(QIcon());
|
panelFactory->setSimpleCreateWidgetFunction<ProjectSettingsWidget>(QIcon());
|
||||||
ProjectExplorer::ProjectPanelFactory::registerFactory(panelFactory);
|
ProjectExplorer::ProjectPanelFactory::registerFactory(panelFactory);
|
||||||
|
|
||||||
|
#ifdef LICENSECHECKER
|
||||||
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
||||||
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
||||||
|
|
||||||
@@ -123,8 +127,10 @@ bool ClangStaticAnalyzerPlugin::initialize(const QStringList &arguments, QString
|
|||||||
} else {
|
} else {
|
||||||
qWarning() << "Invalid license, disabling Clang Static Analyzer";
|
qWarning() << "Invalid license, disabling Clang Static Analyzer";
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
#else // LICENSECHECKER
|
||||||
|
return initializeEnterpriseFeatures(arguments, errorString);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClangStaticAnalyzerPlugin::initializeEnterpriseFeatures(const QStringList &arguments,
|
bool ClangStaticAnalyzerPlugin::initializeEnterpriseFeatures(const QStringList &arguments,
|
||||||
|
Reference in New Issue
Block a user