Commit f7105846 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: do not allow deprectaed Qt 4.7 imports for Bauhaus

Bauhaus does not support import Qt 4.7 anymore

Reviewed-by: Kai Koehne
parent c502c6e8
......@@ -78,6 +78,7 @@ public:
public:
Error();
Error(const QDeclarativeError &qmlError);
Error(const QString &shortDescription);
Error(Exception *exception);
Type type() const
......
......@@ -71,6 +71,16 @@ RewriterView::Error::Error(const QDeclarativeError &qmlError):
{
}
RewriterView::Error::Error(const QString &shortDescription) :
m_type(ParseError),
m_line(1),
m_column(0),
m_description(shortDescription),
m_url()
{
}
QString RewriterView::Error::toString() const
{
QString str;
......
......@@ -587,6 +587,16 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
setupImports(doc, differenceHandler);
foreach (const Import &import, m_rewriterView->model()->imports()) {
if (import.url() == "Qt") {
QList<RewriterView::Error> errors;
RewriterView::Error error(QObject::tr("Deprecated import: import Qt 4.7 use import QtQuick 1.0 instead"));
errors.append(error);
m_rewriterView->setErrors(errors);
return false;
}
}
UiObjectMember *astRootNode = 0;
if (UiProgram *program = doc->qmlProgram())
if (program->members)
......
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