forked from qt-creator/qt-creator
QmlDesigner: Disable EffectComposer in MCU projects
Fixes: QDS-14551 Change-Id: Ie58caadd9e1206101d2d2a38244a209befd6c6a7 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -167,7 +167,7 @@ Item {
|
|||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
visible: !EffectComposerBackend.rootView.isMCUProject()
|
||||||
spacing: 1
|
spacing: 1
|
||||||
|
|
||||||
EffectComposerTopBar {
|
EffectComposerTopBar {
|
||||||
@@ -403,6 +403,13 @@ Item {
|
|||||||
} // SplitView
|
} // SplitView
|
||||||
} // ColumnLayout
|
} // ColumnLayout
|
||||||
|
|
||||||
|
Text {
|
||||||
|
visible: EffectComposerBackend.rootView.isMCUProject()
|
||||||
|
text: qsTr("Effect Composer is not supported in MCU projects.")
|
||||||
|
color: StudioTheme.Values.themeTextColor
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
|
||||||
DropArea {
|
DropArea {
|
||||||
id: dropArea
|
id: dropArea
|
||||||
|
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <qmldesigner/components/componentcore/theme.h>
|
#include <qmldesigner/components/componentcore/theme.h>
|
||||||
#include <qmldesigner/components/propertyeditor/assetimageprovider.h>
|
#include <qmldesigner/components/propertyeditor/assetimageprovider.h>
|
||||||
|
#include <qmldesigner/designermcumanager.h>
|
||||||
#include <qmldesigner/documentmanager.h>
|
#include <qmldesigner/documentmanager.h>
|
||||||
#include <qmldesigner/qmldesignerconstants.h>
|
#include <qmldesigner/qmldesignerconstants.h>
|
||||||
#include <qmldesigner/qmldesignerplugin.h>
|
#include <qmldesigner/qmldesignerplugin.h>
|
||||||
@@ -249,6 +250,11 @@ void EffectComposerWidget::updateCanBeAdded()
|
|||||||
m_effectComposerModel->nodeNames());
|
m_effectComposerModel->nodeNames());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EffectComposerWidget::isMCUProject() const
|
||||||
|
{
|
||||||
|
return QmlDesigner::DesignerMcuManager::instance().isMCUProject();
|
||||||
|
}
|
||||||
|
|
||||||
QSize EffectComposerWidget::sizeHint() const
|
QSize EffectComposerWidget::sizeHint() const
|
||||||
{
|
{
|
||||||
return {420, 420};
|
return {420, 420};
|
||||||
|
@@ -59,6 +59,7 @@ public:
|
|||||||
Q_INVOKABLE bool isEffectNode(const QByteArray &mimeData) const;
|
Q_INVOKABLE bool isEffectNode(const QByteArray &mimeData) const;
|
||||||
Q_INVOKABLE void dropNode(const QByteArray &mimeData);
|
Q_INVOKABLE void dropNode(const QByteArray &mimeData);
|
||||||
Q_INVOKABLE void updateCanBeAdded();
|
Q_INVOKABLE void updateCanBeAdded();
|
||||||
|
Q_INVOKABLE bool isMCUProject() const;
|
||||||
|
|
||||||
QSize sizeHint() const override;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user