From eee4f2c6ac87fc42a34be04a755167bb9fdc50d2 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 11 Jun 2015 17:21:54 +0200 Subject: Make licensechecker dependency optional Change-Id: Ia353ef7065dbd7dd3ff1f3a9293613cf7f14ce37 Reviewed-by: Eike Ziller --- plugins/autotest/autotest.pro | 1 + plugins/autotest/autotest_dependencies.pri | 5 +++-- plugins/autotest/autotestplugin.cpp | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/autotest/autotest.pro b/plugins/autotest/autotest.pro index 4d3c6643f2..4022cb4399 100644 --- a/plugins/autotest/autotest.pro +++ b/plugins/autotest/autotest.pro @@ -7,6 +7,7 @@ include(../../qtcreatorplugin.pri) include(autotest_dependencies.pri) DEFINES += AUTOTEST_LIBRARY +CONFIG(licensechecker): DEFINES += LICENSECHECKER SOURCES += \ testtreeview.cpp \ diff --git a/plugins/autotest/autotest_dependencies.pri b/plugins/autotest/autotest_dependencies.pri index a21b5fce96..74dc51e15b 100644 --- a/plugins/autotest/autotest_dependencies.pri +++ b/plugins/autotest/autotest_dependencies.pri @@ -5,8 +5,9 @@ QTC_PLUGIN_DEPENDS += \ projectexplorer \ cpptools \ qmljstools \ - qmakeprojectmanager \ - licensechecker + qmakeprojectmanager + +CONFIG(licensechecker): QTC_PLUGIN_DEPENDS += licensechecker QTC_LIB_DEPENDS += \ cplusplus \ diff --git a/plugins/autotest/autotestplugin.cpp b/plugins/autotest/autotestplugin.cpp index a2ab783418..525f21ae3e 100644 --- a/plugins/autotest/autotestplugin.cpp +++ b/plugins/autotest/autotestplugin.cpp @@ -38,7 +38,9 @@ #include -#include +#ifdef LICENSECHECKER +# include +#endif #include #include @@ -89,6 +91,7 @@ QSharedPointer AutotestPlugin::settings() const bool AutotestPlugin::checkLicense() { +#ifdef LICENSECHECKER LicenseChecker::LicenseCheckerPlugin *licenseChecker = ExtensionSystem::PluginManager::getObject(); @@ -97,6 +100,7 @@ bool AutotestPlugin::checkLicense() return false; } else if (!licenseChecker->enterpriseFeatures()) return false; +#endif // LICENSECHECKER return true; } -- cgit v1.2.1