forked from qt-creator/qt-creator
QmlDesigner: Add link error switch in RewriterView
Add a switch in RewriterView to disable link error checks. Change-Id: I6bac2c6c92872463c2246e67e803a6724973fae7 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
cf86bc789f
commit
f7e7bcd877
@@ -127,11 +127,13 @@ public:
|
|||||||
|
|
||||||
QString convertTypeToImportAlias(const QString &type) const;
|
QString convertTypeToImportAlias(const QString &type) const;
|
||||||
|
|
||||||
bool checkSemanticErrors() const
|
bool checkSemanticErrors() const { return m_checkSemanticErrors; }
|
||||||
{ return m_checkErrors; }
|
|
||||||
|
|
||||||
void setCheckSemanticErrors(bool b)
|
void setCheckSemanticErrors(bool b) { m_checkSemanticErrors = b; }
|
||||||
{ m_checkErrors = b; }
|
|
||||||
|
bool checkLinkErrors() const { return m_checkLinkErrors; }
|
||||||
|
|
||||||
|
void setCheckLinkErrors(bool b) { m_checkLinkErrors = b; }
|
||||||
|
|
||||||
QString pathForImport(const Import &import);
|
QString pathForImport(const Import &import);
|
||||||
|
|
||||||
@@ -191,7 +193,8 @@ private: //variables
|
|||||||
TextModifier *m_textModifier = nullptr;
|
TextModifier *m_textModifier = nullptr;
|
||||||
int transactionLevel = 0;
|
int transactionLevel = 0;
|
||||||
bool m_modificationGroupActive = false;
|
bool m_modificationGroupActive = false;
|
||||||
bool m_checkErrors = true;
|
bool m_checkSemanticErrors = true;
|
||||||
|
bool m_checkLinkErrors = true;
|
||||||
|
|
||||||
DifferenceHandling m_differenceHandling;
|
DifferenceHandling m_differenceHandling;
|
||||||
QScopedPointer<Internal::ModelNodePositionStorage> m_positionStorage;
|
QScopedPointer<Internal::ModelNodePositionStorage> m_positionStorage;
|
||||||
|
|||||||
@@ -1139,8 +1139,10 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
|
|||||||
m_scopeChain = QSharedPointer<const ScopeChain>(
|
m_scopeChain = QSharedPointer<const ScopeChain>(
|
||||||
new ScopeChain(ctxt.scopeChain()));
|
new ScopeChain(ctxt.scopeChain()));
|
||||||
|
|
||||||
|
if (view()->checkLinkErrors()) {
|
||||||
qCInfo(rewriterBenchmark) << "linked:" << time.elapsed();
|
qCInfo(rewriterBenchmark) << "linked:" << time.elapsed();
|
||||||
collectLinkErrors(&errors, ctxt);
|
collectLinkErrors(&errors, ctxt);
|
||||||
|
}
|
||||||
|
|
||||||
setupPossibleImports(snapshot, m_vContext);
|
setupPossibleImports(snapshot, m_vContext);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user