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
|
||||
}
|
||||
|
||||
CONFIG(licensechecker): DEFINES += LICENSECHECKER
|
||||
|
||||
DISTFILES += \
|
||||
tests/tests.pri
|
||||
|
@@ -4,8 +4,9 @@ QTC_LIB_DEPENDS += \
|
||||
utils
|
||||
QTC_PLUGIN_DEPENDS += \
|
||||
analyzerbase \
|
||||
cpptools \
|
||||
licensechecker
|
||||
cpptools
|
||||
QTC_TEST_DEPENDS += \
|
||||
qbsprojectmanager \
|
||||
qmakeprojectmanager
|
||||
|
||||
CONFIG(licensechecker): QTC_PLUGIN_DEPENDS += licensechecker
|
||||
|
@@ -35,9 +35,12 @@
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include <licensechecker/licensecheckerplugin.h>
|
||||
#include <projectexplorer/projectpanelfactory.h>
|
||||
|
||||
#ifdef LICENSECHECKER
|
||||
#include <licensechecker/licensecheckerplugin.h>
|
||||
#endif
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
#include <QAction>
|
||||
@@ -114,6 +117,7 @@ bool ClangStaticAnalyzerPlugin::initialize(const QStringList &arguments, QString
|
||||
panelFactory->setSimpleCreateWidgetFunction<ProjectSettingsWidget>(QIcon());
|
||||
ProjectExplorer::ProjectPanelFactory::registerFactory(panelFactory);
|
||||
|
||||
#ifdef LICENSECHECKER
|
||||
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
||||
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
||||
|
||||
@@ -123,8 +127,10 @@ bool ClangStaticAnalyzerPlugin::initialize(const QStringList &arguments, QString
|
||||
} else {
|
||||
qWarning() << "Invalid license, disabling Clang Static Analyzer";
|
||||
}
|
||||
|
||||
return true;
|
||||
#else // LICENSECHECKER
|
||||
return initializeEnterpriseFeatures(arguments, errorString);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ClangStaticAnalyzerPlugin::initializeEnterpriseFeatures(const QStringList &arguments,
|
||||
|
Reference in New Issue
Block a user