Commit 80aad7bd authored by Thomas Hartmann's avatar Thomas Hartmann

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's avatarTim Jenssen <tim.jenssen@qt.io>
parent 36cc7667
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment