QmlDesigner: Do not check for warnings if validating

If the rewriter is validating the changes come from the ui.
Do not show warnings in this case, since this is simply annoying.

Change-Id: Ia48233fbff26506c58e10ed2772212aac711f4fe
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-02-21 16:45:57 +01:00
parent 36cc76670e
commit 80aad7bdd4

View File

@@ -913,6 +913,8 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
{
qCInfo(rewriterBenchmark) << Q_FUNC_INFO;
const bool justSanityCheck = !differenceHandler.isValidator();
QTime time;
if (rewriterBenchmark().isInfoEnabled())
time.start();
@@ -963,7 +965,8 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
setActive(false);
return false;
}
m_rewriterView->setWarnings(warnings);
if (!justSanityCheck)
m_rewriterView->setWarnings(warnings);
qCInfo(rewriterBenchmark) << "checked semantic errors:" << time.elapsed();
}
setupUsedImports();