forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.0'
Change-Id: I3ecb199025eb536045ec23e3afc3fe903e2dae63
This commit is contained in:
@@ -109,7 +109,10 @@ bool PixmapCacheModel::expanded(int ) const
|
||||
void PixmapCacheModel::setExpanded(int category, bool expanded)
|
||||
{
|
||||
Q_UNUSED(category);
|
||||
bool prev_expanded = d->isExpanded;
|
||||
d->isExpanded = expanded;
|
||||
if (prev_expanded != expanded)
|
||||
emit expandedChanged();
|
||||
}
|
||||
|
||||
int PixmapCacheModel::categoryDepth(int categoryIndex) const
|
||||
|
@@ -3,4 +3,5 @@ QTC_PLUGIN_NAME = QmlProfilerExtension
|
||||
# qmldebug \
|
||||
# extensionsystem
|
||||
QTC_PLUGIN_DEPENDS += \
|
||||
qmlprofiler
|
||||
qmlprofiler \
|
||||
licensechecker \
|
||||
|
@@ -19,6 +19,8 @@
|
||||
#include "qmlprofilerextensionplugin.h"
|
||||
#include "qmlprofilerextensionconstants.h"
|
||||
|
||||
#include <licensechecker/licensecheckerplugin.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
@@ -26,7 +28,10 @@
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
#include <QMainWindow>
|
||||
#include <QMenu>
|
||||
@@ -61,8 +66,15 @@ bool QmlProfilerExtensionPlugin::initialize(const QStringList &arguments, QStrin
|
||||
Q_UNUSED(arguments)
|
||||
Q_UNUSED(errorString)
|
||||
|
||||
addAutoReleasedObject(new PixmapCacheModel);
|
||||
addAutoReleasedObject(new SceneGraphTimelineModel);
|
||||
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
||||
= 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user