QmlDesigner: Fix critical cmake issues for effect maker

Qtc12 issues related to how effect maker configured

Task-number: QDS-11064
Change-Id: Ic7768ef41928a97e447e12c0a2c252f87fe82c68
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Amr Essam
2023-11-02 18:09:06 +02:00
committed by Amr Elsayed
parent 84b0501693
commit 05037278bc
3 changed files with 16 additions and 17 deletions

View File

@@ -1,9 +1,8 @@
find_package(Qt6 OPTIONAL_COMPONENTS Gui Quick) find_package(Qt6 OPTIONAL_COMPONENTS Gui Quick)
add_qtc_plugin(EffectMakerNew add_qtc_plugin(EffectMakerNew
CONDITION TARGET QmlDesigner
PLUGIN_DEPENDS PLUGIN_DEPENDS
Qt::Core QtCreator::QmlDesigner QtCreator::ProjectExplorer QtCreator::QmlProjectManager QtCreator::QmlDesigner QtCreator::ProjectExplorer QtCreator::QmlProjectManager
DEPENDS DEPENDS
Qt::Core Qt::Core
QtCreator::Utils Qt::CorePrivate Qt::Widgets Qt::Qml Qt::QmlPrivate Qt::Quick QtCreator::Utils Qt::CorePrivate Qt::Widgets Qt::Qml Qt::QmlPrivate Qt::Quick

View File

@@ -1,15 +1,15 @@
{ {
\"Name\" : \"EffectMakerNew\", "Name" : "EffectMakerNew",
\"Version\" : \"${IDE_VERSION}\", "Version" : "${IDE_VERSION}",
\"CompatVersion\" : \"${IDE_VERSION_COMPAT}\", "CompatVersion" : "${IDE_VERSION_COMPAT}",
\"Vendor\" : \"The Qt Company Ltd\", "Vendor" : "The Qt Company Ltd",
\"Copyright\" : \"(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd\", "Copyright" : "(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd",
\"License\" : [ \"Commercial Usage\", "License" : [ "Commercial Usage",
\"\", "",
\"Licensees holding valid Qt Enterprise licenses may use this plugin in accordance with the Qt Enterprise License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and The Qt Company.\" "Licensees holding valid Qt Enterprise licenses may use this plugin in accordance with the Qt Enterprise License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and The Qt Company."
], ],
\"Description\" : \"Plugin for Effect Maker.\", "Description" : "Plugin for Effect Maker.",
\"Url\" : \"http://www.qt.io\", "Url" : "http://www.qt.io",
${IDE_PLUGIN_DEPENDENCIES} ${IDE_PLUGIN_DEPENDENCIES}
} }

View File

@@ -9,13 +9,12 @@
#include "effectmakerview.h" #include "effectmakerview.h"
#include "propertyhandler.h" #include "propertyhandler.h"
//#include "qmldesigner/designercore/imagecache/midsizeimagecacheprovider.h"
#include "qmldesignerconstants.h" #include "qmldesignerconstants.h"
#include "qmldesignerplugin.h" #include "qmldesignerplugin.h"
#include "qqmlcontext.h" #include "qqmlcontext.h"
#include "theme.h" #include "theme.h"
#include "qmldesigner/components/propertyeditor/assetimageprovider.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <studioquickwidget.h> #include <studioquickwidget.h>
@@ -140,9 +139,10 @@ void EffectMakerWidget::initView()
m_quickWidget->rootContext()->setContextProperty("modelNodeBackend", &m_backendModelNode); m_quickWidget->rootContext()->setContextProperty("modelNodeBackend", &m_backendModelNode);
m_quickWidget->rootContext()->setContextProperty("activeDragSuffix", ""); m_quickWidget->rootContext()->setContextProperty("activeDragSuffix", "");
m_quickWidget->engine()->addImageProvider("qmldesigner_thumbnails", //TODO: Fix crash on macos
new QmlDesigner::AssetImageProvider( // m_quickWidget->engine()->addImageProvider("qmldesigner_thumbnails",
QmlDesigner::QmlDesignerPlugin::imageCache())); // new QmlDesigner::AssetImageProvider(
// QmlDesigner::QmlDesignerPlugin::imageCache()));
// init the first load of the QML UI elements // init the first load of the QML UI elements
reloadQmlSource(); reloadQmlSource();