forked from qt-creator/qt-creator
QmlJS editor: Simplify document/semInfo updating significantly.
* Instead of having SemanticInfoUpdater reparse documents itself, it now relies on the ModelManager doing that. * SemanticInfoUpdater now takes a doc and snapshot to generate the convenience Context / ScopeChain. Could be converted into a future to avoid having a (99% idle) thread per editor. * Renamed several functions in QmlJSTextEditorWidget to better indicate their behavior. Change-Id: I8af6ccab099130fa7fa227e44864561ca2c3f9e0 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
committed by
Leandro Melo
parent
fa6c3cc1ec
commit
56bf0e3023
@@ -408,7 +408,7 @@ Qt::ItemFlags QmlOutlineModel::flags(const QModelIndex &index) const
|
||||
|
||||
// only allow drag&drop if we're in sync
|
||||
if (m_semanticInfo.isValid()
|
||||
&& m_semanticInfo.revision() == m_textEditor->editorRevision()) {
|
||||
&& !m_textEditor->isSemanticInfoOutdated()) {
|
||||
if (index.parent().isValid())
|
||||
flags |= Qt::ItemIsDragEnabled;
|
||||
if (index.data(ItemTypeRole) != NonElementBindingType)
|
||||
|
||||
Reference in New Issue
Block a user