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 isQt6Import() const = 0;
|
||||||
virtual bool hasStartupTarget() const = 0;
|
virtual bool hasStartupTarget() const = 0;
|
||||||
virtual PuppetStartData puppetStartData(const class Model &model) const = 0;
|
virtual PuppetStartData puppetStartData(const class Model &model) const = 0;
|
||||||
|
virtual bool instantQmlTextUpdate() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -1084,7 +1084,7 @@ void RewriterView::qmlTextChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
case Amend: {
|
case Amend: {
|
||||||
if (m_instantQmlTextUpdate) {
|
if (m_instantQmlTextUpdate || externalDependencies().instantQmlTextUpdate()) {
|
||||||
amendQmlText();
|
amendQmlText();
|
||||||
} else {
|
} else {
|
||||||
if (externalDependencies().viewManagerUsesRewriterView(this)) {
|
if (externalDependencies().viewManagerUsesRewriterView(this)) {
|
||||||
|
@@ -231,4 +231,9 @@ PuppetStartData ExternalDependencies::puppetStartData(const Model &model) const
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ExternalDependencies::instantQmlTextUpdate() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -34,6 +34,7 @@ public:
|
|||||||
bool isQt6Import() const override;
|
bool isQt6Import() const override;
|
||||||
bool hasStartupTarget() const override;
|
bool hasStartupTarget() const override;
|
||||||
PuppetStartData puppetStartData(const class Model &model) const override;
|
PuppetStartData puppetStartData(const class Model &model) const override;
|
||||||
|
bool instantQmlTextUpdate() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const DesignerSettings &m_designerSettings;
|
const DesignerSettings &m_designerSettings;
|
||||||
|
@@ -158,6 +158,7 @@ public:
|
|||||||
bool isQt6Import() const override { return true; }
|
bool isQt6Import() const override { return true; }
|
||||||
bool hasStartupTarget() const override { return true; }
|
bool hasStartupTarget() const override { return true; }
|
||||||
PuppetStartData puppetStartData(const class Model &) const override { return {}; }
|
PuppetStartData puppetStartData(const class Model &) const override { return {}; }
|
||||||
|
bool instantQmlTextUpdate() const override { return true; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QSettings qsettings;
|
QSettings qsettings;
|
||||||
|
Reference in New Issue
Block a user