forked from qt-creator/qt-creator
Make licensechecker dependency optional
Change-Id: Ibf66800bac5f674fb015f4aaf3923b824651e75b Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
@@ -3,5 +3,6 @@ QTC_PLUGIN_NAME = QmlProfilerExtension
|
|||||||
# qmldebug \
|
# qmldebug \
|
||||||
# extensionsystem
|
# extensionsystem
|
||||||
QTC_PLUGIN_DEPENDS += \
|
QTC_PLUGIN_DEPENDS += \
|
||||||
qmlprofiler \
|
qmlprofiler
|
||||||
licensechecker \
|
|
||||||
|
CONFIG(licensechecker): QT_PLUGIN_DEPENDS += licensechecker
|
||||||
|
@@ -20,7 +20,9 @@
|
|||||||
#include "qmlprofilerextensionconstants.h"
|
#include "qmlprofilerextensionconstants.h"
|
||||||
#include <qmlprofiler/qmlprofilertimelinemodelfactory.h>
|
#include <qmlprofiler/qmlprofilertimelinemodelfactory.h>
|
||||||
|
|
||||||
#include <licensechecker/licensecheckerplugin.h>
|
#ifdef LICENSECHECKER
|
||||||
|
# include <licensechecker/licensecheckerplugin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/icontext.h>
|
#include <coreplugin/icontext.h>
|
||||||
@@ -84,6 +86,7 @@ bool QmlProfilerExtensionPlugin::initialize(const QStringList &arguments, QStrin
|
|||||||
Q_UNUSED(arguments)
|
Q_UNUSED(arguments)
|
||||||
Q_UNUSED(errorString)
|
Q_UNUSED(errorString)
|
||||||
|
|
||||||
|
#ifdef LICENSECHECKER
|
||||||
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
||||||
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
||||||
|
|
||||||
@@ -93,6 +96,9 @@ bool QmlProfilerExtensionPlugin::initialize(const QStringList &arguments, QStrin
|
|||||||
} else {
|
} else {
|
||||||
qWarning() << "Invalid license, disabling QML Profiler Enterprise features";
|
qWarning() << "Invalid license, disabling QML Profiler Enterprise features";
|
||||||
}
|
}
|
||||||
|
#else // LICENSECHECKER
|
||||||
|
addAutoReleasedObject(new ModelFactory);
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user