forked from qt-creator/qt-creator
QuickToolBar: critical bugfix
The protype chain is cached in m_prototypes, but the type might have changed. We have to check for this case. Reviewed-by: Lasse Holmstedt
This commit is contained in:
@@ -157,6 +157,13 @@ void QuickToolBar::apply(TextEditor::BaseTextEditorEditable *editor, Document::P
|
||||
end = objectBinding->lastSourceLocation().end();
|
||||
}
|
||||
|
||||
if (lookupContext.isNull()) {
|
||||
if (name != m_oldType)
|
||||
m_prototypes.clear();
|
||||
}
|
||||
|
||||
m_oldType = name;
|
||||
|
||||
m_prototypes.append(name);
|
||||
|
||||
int line1;
|
||||
|
||||
@@ -53,6 +53,7 @@ private:
|
||||
bool m_blockWriting;
|
||||
QStringList m_propertyOrder;
|
||||
QStringList m_prototypes;
|
||||
QString m_oldType;
|
||||
};
|
||||
|
||||
} //QmlDesigner
|
||||
|
||||
Reference in New Issue
Block a user