summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/commands.pri4
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.cpp59
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.h61
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/puppettocreatorcommand.h2
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.cpp47
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.h15
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.cpp47
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.h47
-rw-r--r--share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp15
-rw-r--r--share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h4
-rw-r--r--share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h4
-rw-r--r--share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp8
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp7
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h2
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp123
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h3
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp12
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp14
18 files changed, 12 insertions, 462 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/commands/commands.pri b/share/qtcreator/qml/qmlpuppet/commands/commands.pri
index deee4c34e1..1bc858831e 100644
--- a/share/qtcreator/qml/qmlpuppet/commands/commands.pri
+++ b/share/qtcreator/qml/qmlpuppet/commands/commands.pri
@@ -27,9 +27,7 @@ HEADERS += $$PWD/changeauxiliarycommand.h
HEADERS += $$PWD/removesharedmemorycommand.h
HEADERS += $$PWD/puppetalivecommand.h
HEADERS += $$PWD/changeselectioncommand.h
-HEADERS += $$PWD/drop3dlibraryitemcommand.h
HEADERS += $$PWD/update3dviewstatecommand.h
-HEADERS += $$PWD/view3dclosedcommand.h
HEADERS += $$PWD/puppettocreatorcommand.h
HEADERS += $$PWD/inputeventcommand.h
HEADERS += $$PWD/view3dactioncommand.h
@@ -61,9 +59,7 @@ SOURCES += $$PWD/changeauxiliarycommand.cpp
SOURCES += $$PWD/removesharedmemorycommand.cpp
SOURCES += $$PWD/puppetalivecommand.cpp
SOURCES += $$PWD/changeselectioncommand.cpp
-SOURCES += $$PWD/drop3dlibraryitemcommand.cpp
SOURCES += $$PWD/update3dviewstatecommand.cpp
-SOURCES += $$PWD/view3dclosedcommand.cpp
SOURCES += $$PWD/puppettocreatorcommand.cpp
SOURCES += $$PWD/inputeventcommand.cpp
SOURCES += $$PWD/view3dactioncommand.cpp
diff --git a/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.cpp
deleted file mode 100644
index 6c851e3a43..0000000000
--- a/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#include "drop3dlibraryitemcommand.h"
-
-#include <QDataStream>
-
-namespace QmlDesigner {
-
-Drop3DLibraryItemCommand::Drop3DLibraryItemCommand(const QByteArray &itemData, qint32 sceneRootId)
- : m_itemData(itemData),
- m_sceneRootId(sceneRootId)
-{
-}
-
-QDataStream &operator<<(QDataStream &out, const Drop3DLibraryItemCommand &command)
-{
- out << command.itemData();
- out << command.sceneRootId();
-
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command)
-{
- in >> command.m_itemData;
- in >> command.m_sceneRootId;
-
- return in;
-}
-
-bool operator==(const Drop3DLibraryItemCommand &first, const Drop3DLibraryItemCommand &second)
-{
- return first.m_itemData == second.m_itemData && first.m_sceneRootId == second.m_sceneRootId;
-}
-
-} // namespace QmlDesigner
diff --git a/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.h b/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.h
deleted file mode 100644
index 4bc36e1ebd..0000000000
--- a/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-#include <QVector>
-#include <QDataStream>
-#include <QMimeData>
-
-#include "instancecontainer.h"
-
-namespace QmlDesigner {
-
-class Drop3DLibraryItemCommand
-{
- friend QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command);
- friend QDebug operator<<(QDebug debug, const Drop3DLibraryItemCommand &command);
- friend bool operator==(const Drop3DLibraryItemCommand &first,
- const Drop3DLibraryItemCommand &second);
-
-public:
- explicit Drop3DLibraryItemCommand(const QByteArray &itemData, qint32 sceneRootId);
- Drop3DLibraryItemCommand() = default;
-
- QByteArray itemData() const { return m_itemData; }
- qint32 sceneRootId() const { return m_sceneRootId; }
-
-private:
- QByteArray m_itemData;
- qint32 m_sceneRootId;
-};
-
-QDataStream &operator<<(QDataStream &out, const Drop3DLibraryItemCommand &command);
-QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command);
-bool operator==(const Drop3DLibraryItemCommand &first, const Drop3DLibraryItemCommand &second);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::Drop3DLibraryItemCommand)
diff --git a/share/qtcreator/qml/qmlpuppet/commands/puppettocreatorcommand.h b/share/qtcreator/qml/qmlpuppet/commands/puppettocreatorcommand.h
index 91c2877f4b..a713656bde 100644
--- a/share/qtcreator/qml/qmlpuppet/commands/puppettocreatorcommand.h
+++ b/share/qtcreator/qml/qmlpuppet/commands/puppettocreatorcommand.h
@@ -34,7 +34,7 @@ namespace QmlDesigner {
class PuppetToCreatorCommand
{
public:
- enum Type { KeyPressed, Edit3DToolState, Render3DView, ActiveSceneChanged, None };
+ enum Type { Edit3DToolState, Render3DView, ActiveSceneChanged, None };
PuppetToCreatorCommand(Type type, const QVariant &data);
PuppetToCreatorCommand() = default;
diff --git a/share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.cpp
index 584e041c7a..02fbdc0093 100644
--- a/share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.cpp
+++ b/share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.cpp
@@ -30,47 +30,12 @@
namespace QmlDesigner {
-Update3dViewStateCommand::Update3dViewStateCommand(Qt::WindowStates previousStates,
- Qt::WindowStates currentStates)
- : m_previousStates(previousStates)
- , m_currentStates(currentStates)
- , m_type(Update3dViewStateCommand::StateChange)
-{
-}
-
-Update3dViewStateCommand::Update3dViewStateCommand(bool active, bool hasPopup)
- : m_active(active)
- , m_hasPopup(hasPopup)
- , m_type(Update3dViewStateCommand::ActiveChange)
-{
-}
-
Update3dViewStateCommand::Update3dViewStateCommand(const QSize &size)
: m_size(size)
, m_type(Update3dViewStateCommand::SizeChange)
{
}
-Qt::WindowStates Update3dViewStateCommand::previousStates() const
-{
- return m_previousStates;
-}
-
-Qt::WindowStates Update3dViewStateCommand::currentStates() const
-{
- return m_currentStates;
-}
-
-bool Update3dViewStateCommand::isActive() const
-{
- return m_active;
-}
-
-bool Update3dViewStateCommand::hasPopup() const
-{
- return m_hasPopup;
-}
-
QSize Update3dViewStateCommand::size() const
{
return m_size;
@@ -83,10 +48,6 @@ Update3dViewStateCommand::Type Update3dViewStateCommand::type() const
QDataStream &operator<<(QDataStream &out, const Update3dViewStateCommand &command)
{
- out << command.previousStates();
- out << command.currentStates();
- out << qint32(command.isActive());
- out << qint32(command.hasPopup());
out << qint32(command.type());
out << command.size();
@@ -95,16 +56,8 @@ QDataStream &operator<<(QDataStream &out, const Update3dViewStateCommand &comman
QDataStream &operator>>(QDataStream &in, Update3dViewStateCommand &command)
{
- in >> command.m_previousStates;
- in >> command.m_currentStates;
- qint32 active;
- qint32 hasPopup;
qint32 type;
- in >> active;
- in >> hasPopup;
in >> type;
- command.m_active = active;
- command.m_hasPopup = hasPopup;
command.m_type = Update3dViewStateCommand::Type(type);
in >> command.m_size;
diff --git a/share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.h b/share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.h
index a38ca4bb54..ffc3fa6659 100644
--- a/share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.h
+++ b/share/qtcreator/qml/qmlpuppet/commands/update3dviewstatecommand.h
@@ -36,28 +36,15 @@ class Update3dViewStateCommand
friend QDebug operator<<(QDebug debug, const Update3dViewStateCommand &command);
public:
- enum Type { StateChange, ActiveChange, SizeChange, Empty };
+ enum Type { SizeChange, Empty };
- explicit Update3dViewStateCommand(Qt::WindowStates previousStates, Qt::WindowStates currentStates);
- explicit Update3dViewStateCommand(bool active, bool hasPopup);
explicit Update3dViewStateCommand(const QSize &size);
Update3dViewStateCommand() = default;
- Qt::WindowStates previousStates() const;
- Qt::WindowStates currentStates() const;
-
- bool isActive() const;
- bool hasPopup() const;
QSize size() const;
-
Type type() const;
private:
- Qt::WindowStates m_previousStates = Qt::WindowNoState;
- Qt::WindowStates m_currentStates = Qt::WindowNoState;
-
- bool m_active = false;
- bool m_hasPopup = false;
QSize m_size;
Type m_type = Empty;
diff --git a/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.cpp
deleted file mode 100644
index c7de7a99de..0000000000
--- a/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#include "view3dclosedcommand.h"
-
-namespace QmlDesigner {
-
-View3DClosedCommand::View3DClosedCommand() = default;
-
-QDataStream &operator<<(QDataStream &out, const View3DClosedCommand &/*command*/)
-{
- return out;
-}
-
-QDataStream &operator>>(QDataStream &in, View3DClosedCommand &/*command*/)
-{
- return in;
-}
-
-QDebug operator<<(QDebug debug, const View3DClosedCommand &/*command*/)
-{
- return debug.nospace() << "View3DClosedCommand()";
-}
-
-} // namespace QmlDesigner
diff --git a/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.h
deleted file mode 100644
index 132bb3c37b..0000000000
--- a/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-#include <qmetatype.h>
-#include <QDataStream>
-#include <QDebug>
-
-namespace QmlDesigner {
-
-class View3DClosedCommand
-{
-public:
- View3DClosedCommand();
-};
-
-QDataStream &operator<<(QDataStream &out, const View3DClosedCommand &command);
-QDataStream &operator>>(QDataStream &in, View3DClosedCommand &command);
-
-QDebug operator<<(QDebug debug, const View3DClosedCommand &command);
-
-} // namespace QmlDesigner
-
-Q_DECLARE_METATYPE(QmlDesigner::View3DClosedCommand)
diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
index e42c8bb3a2..115bb5a90a 100644
--- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
+++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
@@ -71,8 +71,6 @@
#include "debugoutputcommand.h"
#include "puppetalivecommand.h"
#include "changeselectioncommand.h"
-#include "drop3dlibraryitemcommand.h"
-#include "view3dclosedcommand.h"
#include "puppettocreatorcommand.h"
namespace QmlDesigner {
@@ -152,7 +150,6 @@ bool compareCommands(const QVariant &command, const QVariant &controlCommand)
static const int tokenCommandType = QMetaType::type("TokenCommand");
static const int debugOutputCommandType = QMetaType::type("DebugOutputCommand");
static const int changeSelectionCommandType = QMetaType::type("ChangeSelectionCommand");
- static const int drop3DLibraryItemCommandType = QMetaType::type("Drop3DLibraryItemCommand");
if (command.userType() == controlCommand.userType()) {
if (command.userType() == informationChangedCommandType)
@@ -177,8 +174,6 @@ bool compareCommands(const QVariant &command, const QVariant &controlCommand)
return command.value<DebugOutputCommand>() == controlCommand.value<DebugOutputCommand>();
else if (command.userType() == changeSelectionCommandType)
return command.value<ChangeSelectionCommand>() == controlCommand.value<ChangeSelectionCommand>();
- else if (command.userType() == drop3DLibraryItemCommandType)
- return command.value<Drop3DLibraryItemCommand>() == controlCommand.value<Drop3DLibraryItemCommand>();
}
return false;
@@ -266,21 +261,11 @@ void NodeInstanceClientProxy::selectionChanged(const ChangeSelectionCommand &com
writeCommand(QVariant::fromValue(command));
}
-void NodeInstanceClientProxy::library3DItemDropped(const Drop3DLibraryItemCommand &command)
-{
- writeCommand(QVariant::fromValue(command));
-}
-
void NodeInstanceClientProxy::handlePuppetToCreatorCommand(const PuppetToCreatorCommand &command)
{
writeCommand(QVariant::fromValue(command));
}
-void NodeInstanceClientProxy::view3DClosed(const View3DClosedCommand &command)
-{
- writeCommand(QVariant::fromValue(command));
-}
-
void NodeInstanceClientProxy::flush()
{
}
diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h
index 6cafd282af..f66bb4362b 100644
--- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h
+++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h
@@ -58,9 +58,7 @@ class ChangeStateCommand;
class ChangeNodeSourceCommand;
class EndPuppetCommand;
class ChangeSelectionCommand;
-class Drop3DLibraryItemCommand;
class PuppetToCreatorCommand;
-class View3DClosedCommand;
class InputEventCommand;
class View3DActionCommand;
@@ -82,9 +80,7 @@ public:
void debugOutput(const DebugOutputCommand &command) override;
void puppetAlive(const PuppetAliveCommand &command);
void selectionChanged(const ChangeSelectionCommand &command) override;
- void library3DItemDropped(const Drop3DLibraryItemCommand &command) override;
void handlePuppetToCreatorCommand(const PuppetToCreatorCommand &command) override;
- void view3DClosed(const View3DClosedCommand &command) override;
void flush() override;
void synchronizeWithClientProcess() override;
diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h
index d289a1b259..9498cfb1f7 100644
--- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h
+++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h
@@ -41,8 +41,6 @@ class RemoveSharedMemoryCommand;
class DebugOutputCommand;
class PuppetAliveCommand;
class ChangeSelectionCommand;
-class Drop3DLibraryItemCommand;
-class View3DClosedCommand;
class PuppetToCreatorCommand;
class NodeInstanceClientInterface
@@ -58,8 +56,6 @@ public:
virtual void token(const TokenCommand &command) = 0;
virtual void debugOutput(const DebugOutputCommand &command) = 0;
virtual void selectionChanged(const ChangeSelectionCommand &command) = 0;
- virtual void library3DItemDropped(const Drop3DLibraryItemCommand &command) = 0;
- virtual void view3DClosed(const View3DClosedCommand &command) = 0;
virtual void handlePuppetToCreatorCommand(const PuppetToCreatorCommand &command) = 0;
virtual void flush() {}
diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp
index b2703f7f32..307b758199 100644
--- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp
+++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp
@@ -47,7 +47,6 @@
#include "addimportcontainer.h"
#include "changenodesourcecommand.h"
#include "changeselectioncommand.h"
-#include "drop3dlibraryitemcommand.h"
#include "inputeventcommand.h"
#include "view3dactioncommand.h"
@@ -64,7 +63,6 @@
#include "endpuppetcommand.h"
#include "debugoutputcommand.h"
#include "puppetalivecommand.h"
-#include "view3dclosedcommand.h"
#include "puppettocreatorcommand.h"
#include <enumeration.h>
@@ -116,9 +114,6 @@ void NodeInstanceServerInterface::registerCommands()
qRegisterMetaType<ChangeSelectionCommand>("ChangeSelectionCommand");
qRegisterMetaTypeStreamOperators<ChangeSelectionCommand>("ChangeSelectionCommand");
- qRegisterMetaType<Drop3DLibraryItemCommand>("Drop3DLibraryItemCommand");
- qRegisterMetaTypeStreamOperators<Drop3DLibraryItemCommand>("Drop3DLibraryItemCommand");
-
qRegisterMetaType<RemovePropertiesCommand>("RemovePropertiesCommand");
qRegisterMetaTypeStreamOperators<RemovePropertiesCommand>("RemovePropertiesCommand");
@@ -206,9 +201,6 @@ void NodeInstanceServerInterface::registerCommands()
qRegisterMetaType<PuppetAliveCommand>("PuppetAliveCommand");
qRegisterMetaTypeStreamOperators<PuppetAliveCommand>("PuppetAliveCommand");
- qRegisterMetaType<View3DClosedCommand>("View3DClosedCommand");
- qRegisterMetaTypeStreamOperators<View3DClosedCommand>("View3DClosedCommand");
-
qRegisterMetaType<PuppetToCreatorCommand>("PuppetToCreatorCommand");
qRegisterMetaTypeStreamOperators<PuppetToCreatorCommand>("PuppetToCreatorCommand");
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp
index 2b5f805f17..cfdc513c1b 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp
@@ -67,7 +67,6 @@
#include <tokencommand.h>
#include <removesharedmemorycommand.h>
#include <changeselectioncommand.h>
-#include <drop3dlibraryitemcommand.h>
#include <inputeventcommand.h>
#include <view3dactioncommand.h>
@@ -1178,12 +1177,6 @@ ChangeSelectionCommand NodeInstanceServer::createChangeSelectionCommand(const QL
return ChangeSelectionCommand(idVector);
}
-Drop3DLibraryItemCommand NodeInstanceServer::createDrop3DLibraryItemCommand(const QByteArray &itemData,
- qint32 sceneRootId)
-{
- return Drop3DLibraryItemCommand(itemData, sceneRootId);
-}
-
ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QVector<InstancePropertyPair> &propertyList) const
{
QVector<PropertyValueContainer> valueVector;
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h
index e2a5528bcf..6b11e1b87f 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h
@@ -70,7 +70,6 @@ class AddImportContainer;
class MockupTypeContainer;
class IdContainer;
class ChangeSelectionCommand;
-class Drop3DLibraryItemCommand;
namespace Internal {
class ChildrenChangeEventFilter;
@@ -184,7 +183,6 @@ protected:
ChildrenChangedCommand createChildrenChangedCommand(const ServerNodeInstance &parentInstance, const QList<ServerNodeInstance> &instanceList) const;
ComponentCompletedCommand createComponentCompletedCommand(const QList<ServerNodeInstance> &instanceList);
ChangeSelectionCommand createChangeSelectionCommand(const QList<ServerNodeInstance> &instanceList);
- Drop3DLibraryItemCommand createDrop3DLibraryItemCommand(const QByteArray &itemData, qint32 sceneRootId);
void addChangedProperty(const InstancePropertyPair &property);
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
index 296a95e785..f6b5a47f45 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
@@ -59,9 +59,7 @@
#include "tokencommand.h"
#include "removesharedmemorycommand.h"
#include "objectnodeinstance.h"
-#include "drop3dlibraryitemcommand.h"
#include "puppettocreatorcommand.h"
-#include "view3dclosedcommand.h"
#include "inputeventcommand.h"
#include "view3dactioncommand.h"
@@ -100,80 +98,9 @@ static QVariant objectToVariant(QObject *object)
return QVariant::fromValue(object);
}
-bool Qt5InformationNodeInstanceServer::eventFilter(QObject *, QEvent *event)
-{
- switch (event->type()) {
- case QEvent::DragMove: {
- if (!dropAcceptable(static_cast<QDragMoveEvent *>(event))) {
- event->ignore();
- return true;
- }
- } break;
-
- case QEvent::Drop: {
- QDropEvent *dropEvent = static_cast<QDropEvent *>(event);
- QByteArray data = dropEvent->mimeData()->data(QStringLiteral("application/vnd.bauhaus.itemlibraryinfo"));
- if (!data.isEmpty()) {
- nodeInstanceClient()->library3DItemDropped(createDrop3DLibraryItemCommand(
- data, active3DSceneInstance().instanceId()));
- }
-
- } break;
-
- case QEvent::Close: {
- nodeInstanceClient()->view3DClosed(View3DClosedCommand());
- } break;
-
- case QEvent::KeyPress: {
- QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
- QPair<int, int> data = {keyEvent->key(), int(keyEvent->modifiers())};
- nodeInstanceClient()->handlePuppetToCreatorCommand({PuppetToCreatorCommand::KeyPressed,
- QVariant::fromValue(data)});
- } break;
-
- default:
- break;
- }
-
- return false;
-}
-
-bool Qt5InformationNodeInstanceServer::dropAcceptable(QDragMoveEvent *event) const
-{
- // Note: this method parses data out of the QDataStream. This should be in sync with how the
- // data is written to the stream (check QDataStream overloaded operators << and >> in
- // itemlibraryentry.cpp). If the write order changes, this logic may break.
- QDataStream stream(event->mimeData()->data(QStringLiteral("application/vnd.bauhaus.itemlibraryinfo")));
-
- QString name;
- TypeName typeName;
- int majorVersion;
- int minorVersion;
- QIcon typeIcon;
- QString libraryEntryIconPath;
- QString category;
- QString requiredImport;
- QHash<QString, QString> hints;
-
- stream >> name;
- stream >> typeName;
- stream >> majorVersion;
- stream >> minorVersion;
- stream >> typeIcon;
- stream >> libraryEntryIconPath;
- stream >> category;
- stream >> requiredImport;
- stream >> hints;
-
- QString canBeDropped = hints.value("canBeDroppedInView3D");
- return canBeDropped == "true" || canBeDropped == "True";
-}
-
void Qt5InformationNodeInstanceServer::createEditView3D()
{
#ifdef QUICK3D_MODULE
- static bool showEditView = qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_SHOW_EDIT_WINDOW");
-
qmlRegisterRevision<QQuick3DNode, 1>("MouseArea3D", 1, 0);
qmlRegisterType<QmlDesigner::Internal::MouseArea3D>("MouseArea3D", 1, 0, "MouseArea3D");
qmlRegisterType<QmlDesigner::Internal::CameraGeometry>("CameraGeometry", 1, 0, "CameraGeometry");
@@ -187,37 +114,19 @@ void Qt5InformationNodeInstanceServer::createEditView3D()
engine()->rootContext()->setContextProperty("_generalHelper", helper);
m_3dHelper = helper;
+ m_editView3D = new QQuickView(quickView()->engine(), quickView());
+ m_editView3D->setFormat(quickView()->format());
+ DesignerSupport::createOpenGLContext(m_editView3D.data());
QQmlComponent component(engine());
- if (showEditView) {
- component.loadUrl(QUrl("qrc:/qtquickplugin/mockfiles/EditWindow3D.qml"));
- m_editWindow3D = qobject_cast<QQuickWindow *>(component.create());
- m_editView3DRootItem = QQmlProperty::read(m_editWindow3D, "editViewRoot").value<QQuickItem *>();
-
- //For macOS we have to use the 4.1 core profile
- QSurfaceFormat surfaceFormat = m_editWindow3D->requestedFormat();
- surfaceFormat.setVersion(4, 1);
- surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
- m_editWindow3D->setFormat(surfaceFormat);
- } else {
- m_editView3D = new QQuickView(quickView()->engine(), quickView());
- m_editView3D->setFormat(quickView()->format());
- DesignerSupport::createOpenGLContext(m_editView3D.data());
- component.loadUrl(QUrl("qrc:/qtquickplugin/mockfiles/EditView3D.qml"));
- m_editView3DRootItem = qobject_cast<QQuickItem *>(component.create());
- }
+ component.loadUrl(QUrl("qrc:/qtquickplugin/mockfiles/EditView3D.qml"));
+ m_editView3DRootItem = qobject_cast<QQuickItem *>(component.create());
if (!m_editView3DRootItem) {
qWarning() << "Could not create edit view 3D: " << component.errors();
return;
}
- if (!showEditView) {
- DesignerSupport::setRootItem(m_editView3D, m_editView3DRootItem);
- } else {
- m_editView3DRootItem->installEventFilter(this);
- QQmlProperty showButtonsProperty(m_editView3DRootItem, "showButtons", context());
- showButtonsProperty.write(QVariant(true));
- }
+ DesignerSupport::setRootItem(m_editView3D, m_editView3DRootItem);
QObject::connect(m_editView3DRootItem, SIGNAL(selectionChanged(QVariant)),
this, SLOT(handleSelectionChanged(QVariant)));
@@ -233,8 +142,6 @@ void Qt5InformationNodeInstanceServer::createEditView3D()
this, &Qt5InformationNodeInstanceServer::doRender3DEditView);
helper->setParent(m_editView3DRootItem);
- if (showEditView)
- helper->setEdit3DWindow(m_editWindow3D);
#endif
}
@@ -521,8 +428,7 @@ void Qt5InformationNodeInstanceServer::render3DEditView()
// render the 3D edit view and send the result to creator process
void Qt5InformationNodeInstanceServer::doRender3DEditView()
{
- static bool showEditView = qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_SHOW_EDIT_WINDOW");
- if (m_editView3DRootItem && !showEditView) {
+ if (m_editView3DRootItem) {
if (!m_editView3DContentItem) {
m_editView3DContentItem = QQmlProperty::read(m_editView3DRootItem, "contentItem").value<QQuickItem *>();
if (m_editView3DContentItem) {
@@ -1258,7 +1164,7 @@ void Qt5InformationNodeInstanceServer::changeAuxiliaryValues(const ChangeAuxilia
render3DEditView();
}
-// update 3D view window state when the main app window state change
+// update 3D view size when it changes in creator side
void Qt5InformationNodeInstanceServer::update3DViewState(const Update3dViewStateCommand &command)
{
#ifdef QUICK3D_MODULE
@@ -1270,19 +1176,6 @@ void Qt5InformationNodeInstanceServer::update3DViewState(const Update3dViewState
helper->storeToolState(helper->globalStateId(), "rootSize", QVariant(command.size()), 0);
render3DEditView();
}
- } else if (m_editWindow3D) {
- if (command.type() == Update3dViewStateCommand::StateChange) {
- if (command.previousStates() & Qt::WindowMinimized) // main window expanded from minimize state
- m_editWindow3D->show();
- else if (command.currentStates() & Qt::WindowMinimized) // main window minimized
- m_editWindow3D->hide();
- } else if (command.type() == Update3dViewStateCommand::ActiveChange) {
- m_editWindow3D->setFlag(Qt::WindowStaysOnTopHint, command.isActive());
-
- // main window has a popup open, lower the edit view 3D so that the pop up is visible
- if (command.hasPopup())
- m_editWindow3D->lower();
- }
}
#else
Q_UNUSED(command)
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h
index 1e4d70577b..5244064e9e 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h
@@ -73,7 +73,6 @@ private slots:
protected:
void collectItemChangesAndSendChangeCommands() override;
- bool eventFilter(QObject *obj, QEvent *event) override;
void sendChildrenChangedCommand(const QList<ServerNodeInstance> &childList);
void sendTokenBack();
bool isDirtyRecursiveForNonInstanceItems(QQuickItem *item) const;
@@ -101,7 +100,6 @@ private:
void modifyVariantValue(const QVariant &node,
const PropertyName &propertyName,
ValuesModifiedCommand::TransactionOption option);
- bool dropAcceptable(QDragMoveEvent *event) const;
void updateView3DRect(QObject *view3D);
void updateActiveSceneToEditView3D();
void removeNode3D(QObject *node);
@@ -111,7 +109,6 @@ private:
void doRender3DEditView();
QPointer<QQuickView> m_editView3D;
- QPointer<QQuickWindow> m_editWindow3D;
QQuickItem *m_editView3DRootItem = nullptr;
QQuickItem *m_editView3DContentItem = nullptr;
QSet<QObject *> m_view3Ds;
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp
index be54efd2c5..449e4ff188 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp
@@ -54,30 +54,20 @@ Qt5NodeInstanceClientProxy::Qt5NodeInstanceClientProxy(QObject *parent) :
NodeInstanceClientProxy(parent)
{
prioritizeDown();
+ DesignerSupport::activateDesignerWindowManager();
if (QCoreApplication::arguments().at(1) == QLatin1String("--readcapturedstream")) {
- DesignerSupport::activateDesignerWindowManager();
qputenv("DESIGNER_DONT_USE_SHARED_MEMORY", "1");
setNodeInstanceServer(new Qt5TestNodeInstanceServer(this));
initializeCapturedStream(QCoreApplication::arguments().at(2));
readDataStream();
QCoreApplication::exit();
} else if (QCoreApplication::arguments().at(2) == QLatin1String("previewmode")) {
- DesignerSupport::activateDesignerWindowManager();
setNodeInstanceServer(new Qt5PreviewNodeInstanceServer(this));
initializeSocket();
} else if (QCoreApplication::arguments().at(2) == QLatin1String("editormode")) {
- /* The editormode does not use the DesignerWindowManager,
- * because we want to be able to show the 3D Edit View
- * as a normal QQuickView.
- * The DesignerWindowManager prevents any window from actually being shown. */
- if (!qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_MODE")
- || !qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_SHOW_EDIT_WINDOW")) {
- DesignerSupport::activateDesignerWindowManager();
- }
setNodeInstanceServer(new Qt5InformationNodeInstanceServer(this));
initializeSocket();
} else if (QCoreApplication::arguments().at(2) == QLatin1String("rendermode")) {
- DesignerSupport::activateDesignerWindowManager();
setNodeInstanceServer(new Qt5RenderNodeInstanceServer(this));
initializeSocket();
}
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp
index b503afb655..822ffd4f1c 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp
@@ -71,21 +71,9 @@ void Qt5NodeInstanceServer::initializeView()
DesignerSupport::createOpenGLContext(m_quickView.data());
- if (qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_MODE")
- && qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_SHOW_EDIT_WINDOW")
- && QCoreApplication::arguments().at(2) == "editormode") {
- /* In '3d editormode' we do not use the DesignerWindowManager
- * and since we do not show the QQuickView we have to manually create the OpenGL context */
- auto context = new QOpenGLContext(m_quickView);
- context->setFormat(surfaceFormat);
- context->create();
- if (!context->makeCurrent(m_quickView))
- qWarning("QOpenGLContext: makeCurrent() failed...");
- }
-
if (qEnvironmentVariableIsSet("QML_FILE_SELECTORS")) {
QQmlFileSelector *fileSelector = new QQmlFileSelector(engine(), engine());
- QStringList customSelectors = QString::fromUtf8(qgetenv("QML_FILE_SELECTORS")).split(",");
+ QStringList customSelectors = QString::fromUtf8(qgetenv("QML_FILE_SELECTORS")).split(',');
fileSelector->setExtraSelectors(customSelectors);
}
}