diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp index fb27dde3ec56c99c97e25b9b3b6e0097521b1c1f..465ab0efe80e3f57b9c10645299e63ce537c481d 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp @@ -36,7 +36,6 @@ #include <abstractview.h> #include <invalididexception.h> #include <rewritingexception.h> -#include <modelnodecontextmenu.h> #include <qmlitemnode.h> #include <coreplugin/icore.h> @@ -411,33 +410,6 @@ QModelIndex NavigatorTreeModel::createIndexFromModelNode(int row, int column, co return index; } -void NavigatorTreeModel::setId(const QModelIndex &index, const QString &newId) -{ - ModelNode modelNode = modelNodeForIndex(index); - - if (!modelNode.isValid()) - return; - - if (modelNode.id() == newId) - return; - - if (!modelNode.isValidId(newId)) { - Core::AsynchronousMessageBox::warning(tr("Invalid Id"), tr("%1 is an invalid id.").arg(newId)); - } else if (modelNode.view()->hasId(newId)) { - Core::AsynchronousMessageBox::warning(tr("Invalid Id"), tr("%1 already exists.").arg(newId)); - } else { - modelNode.setIdWithRefactoring(newId); - } -} - -void NavigatorTreeModel::openContextMenu(const QPoint &position) -{ - QTC_ASSERT(m_view, return); -#ifndef QMLDESIGNER_TEST - ModelNodeContextMenu::showContextMenu(m_view.data(), position, QPoint(), false); -#endif -} - bool NavigatorTreeModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction action, int rowNumber, @@ -670,15 +642,4 @@ void NavigatorTreeModel::notifyModelNodesMoved(const QList<ModelNode> &modelNode layoutChanged(indexes); } -bool NavigatorTreeModel::isNodeVisible(const QModelIndex &index) const -{ - return m_view->isNodeVisible(modelNodeForIndex(index)); -} - -bool NavigatorTreeModel::hasError(const QModelIndex &index) const -{ - return QmlObjectNode(modelNodeForIndex(index)).hasError(); -} - - } // QmlDesigner diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h index 78c998274be920e6824f7e80d2afd010e9842014..4fb8275a074dd6dc6107690548685ee77b07893a 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h @@ -78,9 +78,6 @@ public: QModelIndex createIndexFromModelNode(int row, int column, const ModelNode &modelNode) const; - void setId(const QModelIndex &index, const QString &newId); - void openContextMenu(const QPoint &position); - Qt::DropActions supportedDropActions() const override; Qt::DropActions supportedDragActions() const override; bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; @@ -89,8 +86,6 @@ public: void notifyModelNodesRemoved(const QList<ModelNode> &modelNodes); void notifyModelNodesInserted(const QList<ModelNode> &modelNodes); void notifyModelNodesMoved(const QList<ModelNode> &modelNodes); - bool isNodeVisible(const QModelIndex &index) const; - bool hasError(const QModelIndex &index) const; private: void moveNodesInteractive(NodeAbstractProperty &parentProperty, const QList<ModelNode> &modelNodes, int targetIndex);