forked from qt-creator/qt-creator
QmlDesigner: improve error output of the puppets
- errors -> warning none false outputs -> debug - adding some more error outputs Change-Id: Ice61d10a87dc5ef789b7913cae166641b18ddf27 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -77,7 +77,7 @@ void ComponentNodeInstance::setNodeSource(const QString &source)
|
|||||||
|
|
||||||
if (component()->isError()) {
|
if (component()->isError()) {
|
||||||
foreach (const QQmlError &error, component()->errors())
|
foreach (const QQmlError &error, component()->errors())
|
||||||
qDebug() << error;
|
qWarning() << error;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -480,7 +480,7 @@ void NodeInstanceServer::setupDefaultDummyData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_dummyContextObject) {
|
if (m_dummyContextObject) {
|
||||||
qWarning() << "Loaded default dummy context object.";
|
qDebug() << "Loaded default dummy context object.";
|
||||||
m_dummyContextObject->setParent(this);
|
m_dummyContextObject->setParent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1134,7 +1134,7 @@ void NodeInstanceServer::loadDummyDataFile(const QFileInfo& qmlFileInfo)
|
|||||||
QVariant oldDummyDataObject = rootContext()->contextProperty(qmlFileInfo.completeBaseName());
|
QVariant oldDummyDataObject = rootContext()->contextProperty(qmlFileInfo.completeBaseName());
|
||||||
|
|
||||||
if (dummyData) {
|
if (dummyData) {
|
||||||
qWarning() << "Loaded dummy data:" << qmlFileInfo.filePath();
|
qDebug() << "Loaded dummy data:" << qmlFileInfo.filePath();
|
||||||
rootContext()->setContextProperty(qmlFileInfo.completeBaseName(), dummyData);
|
rootContext()->setContextProperty(qmlFileInfo.completeBaseName(), dummyData);
|
||||||
dummyData->setParent(this);
|
dummyData->setParent(this);
|
||||||
m_dummyObjectList.append(DummyPair(qmlFileInfo.completeBaseName(), dummyData));
|
m_dummyObjectList.append(DummyPair(qmlFileInfo.completeBaseName(), dummyData));
|
||||||
|
@@ -973,6 +973,12 @@ QObject *ObjectNodeInstance::createComponentWrap(const QString &nodeSource, cons
|
|||||||
QQmlEngine::setContextForObject(object, context);
|
QQmlEngine::setContextForObject(object, context);
|
||||||
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
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;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1018,7 +1024,7 @@ QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlC
|
|||||||
if (component.isError()) {
|
if (component.isError()) {
|
||||||
qDebug() << componentPath;
|
qDebug() << componentPath;
|
||||||
foreach (const QQmlError &error, component.errors())
|
foreach (const QQmlError &error, component.errors())
|
||||||
qDebug() << error;
|
qWarning() << error;
|
||||||
}
|
}
|
||||||
|
|
||||||
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
||||||
@@ -1038,11 +1044,10 @@ QObject *ObjectNodeInstance::createComponent(const QUrl &componentUrl, QQmlConte
|
|||||||
component.completeCreate();
|
component.completeCreate();
|
||||||
|
|
||||||
if (component.isError()) {
|
if (component.isError()) {
|
||||||
qDebug() << componentUrl;
|
qWarning() << "Error in:" << Q_FUNC_INFO << componentUrl;
|
||||||
foreach (const QQmlError &error, component.errors())
|
foreach (const QQmlError &error, component.errors())
|
||||||
qDebug() << error;
|
qWarning() << error;
|
||||||
}
|
}
|
||||||
|
|
||||||
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
@@ -1063,6 +1068,12 @@ QObject *ObjectNodeInstance::createCustomParserObject(const QString &nodeSource,
|
|||||||
component.completeCreate();
|
component.completeCreate();
|
||||||
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
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;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -950,6 +950,12 @@ QObject *ObjectNodeInstance::createCustomParserObject(const QString &nodeSource,
|
|||||||
tweakObjects(object);
|
tweakObjects(object);
|
||||||
component.completeCreate();
|
component.completeCreate();
|
||||||
|
|
||||||
|
if (component.isError()) {
|
||||||
|
qDebug() << component.url().toString();
|
||||||
|
foreach (const QDeclarativeError &error, component.errors())
|
||||||
|
qWarning() << error;
|
||||||
|
}
|
||||||
|
|
||||||
QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
|
QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
|
Reference in New Issue
Block a user