forked from qt-creator/qt-creator
QmlOutlineModel: Use document instead of widget
Change-Id: I56c4a1da84d00064334a235aec8f2710efdba365 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user