QmlOutlineModel: Use document instead of widget

Change-Id: I56c4a1da84d00064334a235aec8f2710efdba365
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Eike Ziller
2014-01-30 16:10:23 +01:00
parent 9fcd43ed05
commit 1e6bc2758d
3 changed files with 7 additions and 7 deletions

View File

@@ -298,9 +298,9 @@ private:
int indent;
};
QmlOutlineModel::QmlOutlineModel(QmlJSTextEditorWidget *editor) :
QmlOutlineModel::QmlOutlineModel(QmlJSEditorDocument *editor) :
QStandardItemModel(editor),
m_textEditor(editor)
m_editorDocument(editor)
{
m_icons = Icons::instance();
const QString resourcePath = Core::ICore::resourcePath();
@@ -401,7 +401,7 @@ Qt::ItemFlags QmlOutlineModel::flags(const QModelIndex &index) const
// only allow drag&drop if we're in sync
if (m_semanticInfo.isValid()
&& !m_textEditor->isSemanticInfoOutdated()) {
&& !m_editorDocument->isSemanticInfoOutdated()) {
if (index.parent().isValid())
flags |= Qt::ItemIsDragEnabled;
if (index.data(ItemTypeRole) != NonElementBindingType)