From 05037278bc4ef0fbd1ef994832891aa5cfb396f4 Mon Sep 17 00:00:00 2001 From: Amr Essam Date: Thu, 2 Nov 2023 18:09:06 +0200 Subject: [PATCH] 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 --- src/plugins/effectmakernew/CMakeLists.txt | 3 +-- .../effectmakernew/EffectMakerNew.json.in | 20 +++++++++---------- .../effectmakernew/effectmakerwidget.cpp | 10 +++++----- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/plugins/effectmakernew/CMakeLists.txt b/src/plugins/effectmakernew/CMakeLists.txt index 81496c7eb78..d190481db85 100644 --- a/src/plugins/effectmakernew/CMakeLists.txt +++ b/src/plugins/effectmakernew/CMakeLists.txt @@ -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 diff --git a/src/plugins/effectmakernew/EffectMakerNew.json.in b/src/plugins/effectmakernew/EffectMakerNew.json.in index 7846ea6dc98..555876364b8 100644 --- a/src/plugins/effectmakernew/EffectMakerNew.json.in +++ b/src/plugins/effectmakernew/EffectMakerNew.json.in @@ -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} } diff --git a/src/plugins/effectmakernew/effectmakerwidget.cpp b/src/plugins/effectmakernew/effectmakerwidget.cpp index c26247fef19..983459cffdb 100644 --- a/src/plugins/effectmakernew/effectmakerwidget.cpp +++ b/src/plugins/effectmakernew/effectmakerwidget.cpp @@ -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 #include @@ -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();