forked from qt-creator/qt-creator
QmlDesigner: Rewriters parses immediately
The rewriter needs to parse the file immediately and not use the timer. Change-Id: I6399edc23201d301dcb7d8d33d1bd956dd087b4c Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -37,6 +37,7 @@ public:
|
||||
virtual bool isQt6Import() const = 0;
|
||||
virtual bool hasStartupTarget() const = 0;
|
||||
virtual PuppetStartData puppetStartData(const class Model &model) const = 0;
|
||||
virtual bool instantQmlTextUpdate() const = 0;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
@@ -1084,7 +1084,7 @@ void RewriterView::qmlTextChanged()
|
||||
}
|
||||
|
||||
case Amend: {
|
||||
if (m_instantQmlTextUpdate) {
|
||||
if (m_instantQmlTextUpdate || externalDependencies().instantQmlTextUpdate()) {
|
||||
amendQmlText();
|
||||
} else {
|
||||
if (externalDependencies().viewManagerUsesRewriterView(this)) {
|
||||
|
@@ -231,4 +231,9 @@ PuppetStartData ExternalDependencies::puppetStartData(const Model &model) const
|
||||
return data;
|
||||
}
|
||||
|
||||
bool ExternalDependencies::instantQmlTextUpdate() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
@@ -34,6 +34,7 @@ public:
|
||||
bool isQt6Import() const override;
|
||||
bool hasStartupTarget() const override;
|
||||
PuppetStartData puppetStartData(const class Model &model) const override;
|
||||
bool instantQmlTextUpdate() const override;
|
||||
|
||||
private:
|
||||
const DesignerSettings &m_designerSettings;
|
||||
|
@@ -158,6 +158,7 @@ public:
|
||||
bool isQt6Import() const override { return true; }
|
||||
bool hasStartupTarget() const override { return true; }
|
||||
PuppetStartData puppetStartData(const class Model &) const override { return {}; }
|
||||
bool instantQmlTextUpdate() const override { return true; }
|
||||
|
||||
public:
|
||||
QSettings qsettings;
|
||||
|
Reference in New Issue
Block a user