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)
add_qtc_plugin(EffectMakerNew
CONDITION TARGET QmlDesigner
PLUGIN_DEPENDS
Qt::Core QtCreator::QmlDesigner QtCreator::ProjectExplorer QtCreator::QmlProjectManager
QtCreator::QmlDesigner QtCreator::ProjectExplorer QtCreator::QmlProjectManager
DEPENDS
Qt::Core
QtCreator::Utils Qt::CorePrivate Qt::Widgets Qt::Qml Qt::QmlPrivate Qt::Quick

View File

@@ -1,15 +1,15 @@
{
\"Name\" : \"EffectMakerNew\",
\"Version\" : \"${IDE_VERSION}\",
\"CompatVersion\" : \"${IDE_VERSION_COMPAT}\",
\"Vendor\" : \"The Qt Company Ltd\",
\"Copyright\" : \"(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd\",
\"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.\"
"Name" : "EffectMakerNew",
"Version" : "${IDE_VERSION}",
"CompatVersion" : "${IDE_VERSION_COMPAT}",
"Vendor" : "The Qt Company Ltd",
"Copyright" : "(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd",
"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."
],
\"Description\" : \"Plugin for Effect Maker.\",
\"Url\" : \"http://www.qt.io\",
"Description" : "Plugin for Effect Maker.",
"Url" : "http://www.qt.io",
${IDE_PLUGIN_DEPENDENCIES}
}

View File

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