Commit 33c6ffc6 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Remove dead code from NavigatorTreeModel

This code has been moved to the delegates.

Change-Id: I3e44a3eb2038299d3b0a7de1e86ed92c3d835bd4
Reviewed-by: Tim Jenssen's avatarTim Jenssen <>
parent 8f0c5397
......@@ -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())
if ( == newId)
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 {
void NavigatorTreeModel::openContextMenu(const QPoint &position)
QTC_ASSERT(m_view, return);
ModelNodeContextMenu::showContextMenu(, position, QPoint(), false);
bool NavigatorTreeModel::dropMimeData(const QMimeData *mimeData,
Qt::DropAction action,
int rowNumber,
......@@ -670,15 +642,4 @@ void NavigatorTreeModel::notifyModelNodesMoved(const QList<ModelNode> &modelNode
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
......@@ -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;
void moveNodesInteractive(NodeAbstractProperty &parentProperty, const QList<ModelNode> &modelNodes, int targetIndex);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment