forked from qt-creator/qt-creator
QmlDesigner: Show Effect wizard only in enterprise version
(cherry picked from commit 73cdb6239d
)
Change-Id: If0c99beec083514ed5c531bb7a67cd7a392c3108
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
c3ac86a13a
commit
aea333e042
@@ -7,8 +7,8 @@
|
|||||||
"trDisplayName": "Effect File (Effect Maker)",
|
"trDisplayName": "Effect File (Effect Maker)",
|
||||||
"trDisplayCategory": "Effects",
|
"trDisplayCategory": "Effects",
|
||||||
"iconText": "qep",
|
"iconText": "qep",
|
||||||
"platformIndependent": false,
|
"platformIndependent": true,
|
||||||
"enabled": true,
|
"enabled": "%{JS: value('Features').indexOf('QmlDesigner.Wizards.Enterprise') >= 0}",
|
||||||
"featuresRequired": [ "QmlDesigner.Wizards.Enterprise" ],
|
"featuresRequired": [ "QmlDesigner.Wizards.Enterprise" ],
|
||||||
|
|
||||||
"options": { "key": "DefaultSuffix", "value": "qep" },
|
"options": { "key": "DefaultSuffix", "value": "qep" },
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qmldesignerplugin.h"
|
#include "qmldesignerplugin.h"
|
||||||
|
#include "coreplugin/iwizardfactory.h"
|
||||||
#include "designmodecontext.h"
|
#include "designmodecontext.h"
|
||||||
#include "designmodewidget.h"
|
#include "designmodewidget.h"
|
||||||
#include "dynamiclicensecheck.h"
|
#include "dynamiclicensecheck.h"
|
||||||
@@ -61,8 +62,10 @@
|
|||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/designmode.h>
|
#include <coreplugin/designmode.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
|
#include <coreplugin/featureprovider.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/idocument.h>
|
#include <coreplugin/idocument.h>
|
||||||
|
#include <coreplugin/iwizardfactory.h>
|
||||||
#include <coreplugin/messagebox.h>
|
#include <coreplugin/messagebox.h>
|
||||||
#include <coreplugin/modemanager.h>
|
#include <coreplugin/modemanager.h>
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
@@ -74,19 +77,19 @@
|
|||||||
#include <sqlitelibraryinitializer.h>
|
#include <sqlitelibraryinitializer.h>
|
||||||
#include <qmljs/qmljsmodelmanagerinterface.h>
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
|
|
||||||
|
#include <utils/algorithm.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/algorithm.h>
|
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QTimer>
|
#include <QApplication>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <qplugin.h>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QProcessEnvironment>
|
#include <QProcessEnvironment>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
#include <QTimer>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
#include <QApplication>
|
#include <qplugin.h>
|
||||||
|
|
||||||
#include "nanotrace/nanotrace.h"
|
#include "nanotrace/nanotrace.h"
|
||||||
#include <modelnodecontextmenu_helper.h>
|
#include <modelnodecontextmenu_helper.h>
|
||||||
@@ -99,6 +102,17 @@ namespace QmlDesigner {
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
class EnterpriseFeatureProvider : public Core::IFeatureProvider
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QSet<Utils::Id> availableFeatures(Utils::Id id) const override
|
||||||
|
{
|
||||||
|
return {"QmlDesigner.Wizards.Enterprise"};
|
||||||
|
}
|
||||||
|
QSet<Utils::Id> availablePlatforms() const override { return {}; }
|
||||||
|
QString displayNameForPlatform(Utils::Id id) const override { return {}; }
|
||||||
|
};
|
||||||
|
|
||||||
QString normalizeIdentifier(const QString &string)
|
QString normalizeIdentifier(const QString &string)
|
||||||
{
|
{
|
||||||
if (string.isEmpty())
|
if (string.isEmpty())
|
||||||
@@ -283,6 +297,10 @@ bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *e
|
|||||||
#endif
|
#endif
|
||||||
//TODO Move registering those types out of the property editor, since they are used also in the states editor
|
//TODO Move registering those types out of the property editor, since they are used also in the states editor
|
||||||
Quick2PropertyEditorView::registerQmlTypes();
|
Quick2PropertyEditorView::registerQmlTypes();
|
||||||
|
|
||||||
|
if (QmlDesigner::checkLicense() == QmlDesigner::FoundLicense::enterprise)
|
||||||
|
Core::IWizardFactory::registerFeatureProvider(new EnterpriseFeatureProvider);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user