forked from qt-creator/qt-creator
Disable functionality for invalid licenses
Change-Id: I2366784444e458bec30120809b151bfccd8b182f Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -3,4 +3,5 @@ QTC_PLUGIN_NAME = QmlProfilerExtension
|
|||||||
# qmldebug \
|
# qmldebug \
|
||||||
# extensionsystem
|
# extensionsystem
|
||||||
QTC_PLUGIN_DEPENDS += \
|
QTC_PLUGIN_DEPENDS += \
|
||||||
qmlprofiler
|
qmlprofiler \
|
||||||
|
licensechecker \
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
#include "qmlprofilerextensionplugin.h"
|
#include "qmlprofilerextensionplugin.h"
|
||||||
#include "qmlprofilerextensionconstants.h"
|
#include "qmlprofilerextensionconstants.h"
|
||||||
|
|
||||||
|
#include <licensechecker/licensecheckerplugin.h>
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/icontext.h>
|
#include <coreplugin/icontext.h>
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
@@ -26,7 +28,10 @@
|
|||||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
|
|
||||||
|
#include <extensionsystem/pluginmanager.h>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
#include <QDebug>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
@@ -61,8 +66,15 @@ bool QmlProfilerExtensionPlugin::initialize(const QStringList &arguments, QStrin
|
|||||||
Q_UNUSED(arguments)
|
Q_UNUSED(arguments)
|
||||||
Q_UNUSED(errorString)
|
Q_UNUSED(errorString)
|
||||||
|
|
||||||
addAutoReleasedObject(new PixmapCacheModel);
|
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
||||||
addAutoReleasedObject(new SceneGraphTimelineModel);
|
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
||||||
|
|
||||||
|
if (licenseChecker && licenseChecker->hasValidLicense()) {
|
||||||
|
addAutoReleasedObject(new PixmapCacheModel);
|
||||||
|
addAutoReleasedObject(new SceneGraphTimelineModel);
|
||||||
|
} else {
|
||||||
|
qWarning() << "Invalid license, disabling QML Profiler Enterprise features";
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user