diff options
author | mae <qt-info@nokia.com> | 2009-04-17 17:32:32 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-04-24 07:52:34 (GMT) |
commit | ab83f16fd07300342d786f48a82b4d81f77f670d (patch) | |
tree | 9b109f8e2188aabcfa03f8d7f98e8e1ed63aa7fb /src/declarative/qml/qmlcomponent.cpp | |
parent | b080c837c4c63b1cd0fdea9ae483cad824aef0d1 (diff) | |
download | Qt-ab83f16fd07300342d786f48a82b4d81f77f670d.zip Qt-ab83f16fd07300342d786f48a82b4d81f77f670d.tar.gz Qt-ab83f16fd07300342d786f48a82b4d81f77f670d.tar.bz2 |
support both *.qml and *.whatever with autodetection. Some debug output, some fixes. Some stuff works now, biggest omission is UiObjectBinding to get the more complex examples working.
Diffstat (limited to 'src/declarative/qml/qmlcomponent.cpp')
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 590f23f..4a3f9b0 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -61,6 +61,17 @@ QT_BEGIN_NAMESPACE class QByteArray; +bool QmlComponentPrivate::isXml(const QByteArray &ba) +{ + for (int i = 0; i < ba.size(); ++i) { + char c = ba.at(i); + if (c == ' ' || c == '\n' || c == '\r' || c == '\t') + continue; + return (c == '<'); + } + return true; +} + /*! \class QmlComponent \brief The QmlComponent class encapsulates a QML component description. @@ -334,6 +345,20 @@ void QmlComponent::loadUrl(const QUrl &url) d->fromTypeData(data); +<<<<<<< HEAD:src/declarative/qml/qmlcomponent.cpp +======= + // Compile data + QmlCompiler compiler; + if(!compiler.compile(d->engine, parser, d->cc)) { + qWarning().nospace() +#ifdef QML_VERBOSEERRORS_ENABLED + << "QmlComponent: " +#endif + << compiler.errorDescription().toLatin1().constData() << " @" + << d->name.toLatin1().constData() << ":" + << compiler.errorLine(); + } +>>>>>>> support both *.qml and *.whatever with autodetection. Some debug output, some fixes.:src/declarative/qml/qmlcomponent.cpp } emit statusChanged(status()); |