Commit fd6afba3 authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: improve error output of the puppets

 - errors -> warning none false outputs -> debug
 - adding some more error outputs

Change-Id: Ice61d10a87dc5ef789b7913cae166641b18ddf27
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 808094e9
......@@ -77,7 +77,7 @@ void ComponentNodeInstance::setNodeSource(const QString &source)
if (component()->isError()) {
foreach (const QQmlError &error, component()->errors())
qDebug() << error;
qWarning() << error;
}
}
......
......@@ -480,7 +480,7 @@ void NodeInstanceServer::setupDefaultDummyData()
}
if (m_dummyContextObject) {
qWarning() << "Loaded default dummy context object.";
qDebug() << "Loaded default dummy context object.";
m_dummyContextObject->setParent(this);
}
......@@ -1134,7 +1134,7 @@ void NodeInstanceServer::loadDummyDataFile(const QFileInfo& qmlFileInfo)
QVariant oldDummyDataObject = rootContext()->contextProperty(qmlFileInfo.completeBaseName());
if (dummyData) {
qWarning() << "Loaded dummy data:" << qmlFileInfo.filePath();
qDebug() << "Loaded dummy data:" << qmlFileInfo.filePath();
rootContext()->setContextProperty(qmlFileInfo.completeBaseName(), dummyData);
dummyData->setParent(this);
m_dummyObjectList.append(DummyPair(qmlFileInfo.completeBaseName(), dummyData));
......
......@@ -973,6 +973,12 @@ QObject *ObjectNodeInstance::createComponentWrap(const QString &nodeSource, cons
QQmlEngine::setContextForObject(object, context);
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
if (component->isError()) {
qWarning() << "Error in:" << Q_FUNC_INFO << component->url().toString();
foreach (const QQmlError &error, component->errors())
qWarning() << error;
qWarning() << "file data:\n" << data;
}
return object;
}
......@@ -1018,7 +1024,7 @@ QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlC
if (component.isError()) {
qDebug() << componentPath;
foreach (const QQmlError &error, component.errors())
qDebug() << error;
qWarning() << error;
}
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
......@@ -1038,11 +1044,10 @@ QObject *ObjectNodeInstance::createComponent(const QUrl &componentUrl, QQmlConte
component.completeCreate();
if (component.isError()) {
qDebug() << componentUrl;
qWarning() << "Error in:" << Q_FUNC_INFO << componentUrl;
foreach (const QQmlError &error, component.errors())
qDebug() << error;
qWarning() << error;
}
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
return object;
......@@ -1063,6 +1068,12 @@ QObject *ObjectNodeInstance::createCustomParserObject(const QString &nodeSource,
component.completeCreate();
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
if (component.isError()) {
qWarning() << "Error in:" << Q_FUNC_INFO << component.url().toString();
foreach (const QQmlError &error, component.errors())
qWarning() << error;
qWarning() << "file data:\n" << data;
}
return object;
}
......
......@@ -950,6 +950,12 @@ QObject *ObjectNodeInstance::createCustomParserObject(const QString &nodeSource,
tweakObjects(object);
component.completeCreate();
if (component.isError()) {
qDebug() << component.url().toString();
foreach (const QDeclarativeError &error, component.errors())
qWarning() << error;
}
QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
return object;
......
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