Skip to content
Snippets Groups Projects
Commit abc9bf21 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm using

parent 19590c57
No related branches found
No related tags found
1 merge request!427Reduce include dependences in GUI; break cyclic dependence between View and Model
...@@ -23,12 +23,11 @@ ...@@ -23,12 +23,11 @@
#include <QMimeData> #include <QMimeData>
#include <QtCore/QXmlStreamWriter> #include <QtCore/QXmlStreamWriter>
using GUI::Session::ItemUtils::ParentRow;
namespace { namespace {
const int MaxCompression = 9; const int MaxCompression = 9;
} }
SessionModel::SessionModel(QString model_tag, QObject* parent) SessionModel::SessionModel(QString model_tag, QObject* parent)
: QAbstractItemModel(parent), m_root_item(0), m_name("DefaultName"), m_model_tag(model_tag) : QAbstractItemModel(parent), m_root_item(0), m_name("DefaultName"), m_model_tag(model_tag)
{ {
...@@ -145,7 +144,7 @@ QModelIndex SessionModel::parent(const QModelIndex& child) const ...@@ -145,7 +144,7 @@ QModelIndex SessionModel::parent(const QModelIndex& child) const
if (parent_item == m_root_item) if (parent_item == m_root_item)
return QModelIndex(); return QModelIndex();
return createIndex(ParentRow(*parent_item), 0, parent_item); return createIndex(GUI::Session::ItemUtils::ParentRow(*parent_item), 0, parent_item);
} }
} }
return QModelIndex(); return QModelIndex();
...@@ -266,7 +265,6 @@ SessionItem* SessionModel::insertNewItem(QString model_type, SessionItem* parent ...@@ -266,7 +265,6 @@ SessionItem* SessionModel::insertNewItem(QString model_type, SessionItem* parent
if (parent_item != m_root_item) { if (parent_item != m_root_item) {
if (tag.isEmpty()) if (tag.isEmpty())
tag = parent_item->defaultTag(); tag = parent_item->defaultTag();
if (!parent_item->sessionItemTags()->isValid(tag, model_type)) if (!parent_item->sessionItemTags()->isValid(tag, model_type))
return nullptr; return nullptr;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment