Make licensechecker dependency optional

Change-Id: Ibf66800bac5f674fb015f4aaf3923b824651e75b
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
Kai Koehne
2015-06-11 17:31:39 +02:00
parent ac4162d459
commit b3e4cf2032
2 changed files with 10 additions and 3 deletions

View File

@@ -3,5 +3,6 @@ QTC_PLUGIN_NAME = QmlProfilerExtension
# qmldebug \
# extensionsystem
QTC_PLUGIN_DEPENDS += \
qmlprofiler \
licensechecker \
qmlprofiler
CONFIG(licensechecker): QT_PLUGIN_DEPENDS += licensechecker

View File

@@ -20,7 +20,9 @@
#include "qmlprofilerextensionconstants.h"
#include <qmlprofiler/qmlprofilertimelinemodelfactory.h>
#include <licensechecker/licensecheckerplugin.h>
#ifdef LICENSECHECKER
# include <licensechecker/licensecheckerplugin.h>
#endif
#include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
@@ -84,6 +86,7 @@ bool QmlProfilerExtensionPlugin::initialize(const QStringList &arguments, QStrin
Q_UNUSED(arguments)
Q_UNUSED(errorString)
#ifdef LICENSECHECKER
LicenseChecker::LicenseCheckerPlugin *licenseChecker
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
@@ -93,6 +96,9 @@ bool QmlProfilerExtensionPlugin::initialize(const QStringList &arguments, QStrin
} else {
qWarning() << "Invalid license, disabling QML Profiler Enterprise features";
}
#else // LICENSECHECKER
addAutoReleasedObject(new ModelFactory);
#endif
return true;
}