QmlJS: Add error message for invalid root item in the designer

Documents with those types do crash the qmlpuppet and confuse the users.
With this patch we give a clear error message and such files are not supported
anymore.

Change-Id: Iba19def2751d4dc81d90684c0c63c0274fdf49cf
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Thomas Hartmann
2014-09-10 09:49:51 +02:00
parent 5f0da502a4
commit 95182687f8
4 changed files with 26 additions and 0 deletions

View File

@@ -221,6 +221,8 @@ StaticAnalysisMessages::StaticAnalysisMessages()
tr("Qt Quick Designer only supports states in the root item."));
newMsg(WarnAboutQtQuick1InsteadQtQuick2, Warning,
tr("Using Qt Quick 1 code model instead of Qt Quick 2."));
newMsg(ErrUnsupportedRootTypeInVisualDesigner, Error,
tr("This type is not supported as a root element by Qt Quick Designer %1."), 1);
}
} // anonymous namespace