qml: make dumping errors more chatty

Change-Id: I1471ba9459a1e48a03e26aa5dc008072460447be
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-01-16 11:48:07 +01:00
parent 671d2d729e
commit 188d50dc1d
2 changed files with 5 additions and 0 deletions

View File

@@ -639,6 +639,9 @@ void ModelManager::updateDocument(Document::Ptr doc)
void ModelManager::updateLibraryInfo(const QString &path, const LibraryInfo &info) void ModelManager::updateLibraryInfo(const QString &path, const LibraryInfo &info)
{ {
if (!info.pluginTypeInfoError().isEmpty())
qDebug() << "Dumping errors for " << path << ":" << info.pluginTypeInfoError();
{ {
QMutexLocker locker(&m_mutex); QMutexLocker locker(&m_mutex);
_validSnapshot.insertLibraryInfo(path, info); _validSnapshot.insertLibraryInfo(path, info);

View File

@@ -330,6 +330,7 @@ void PluginDumper::qmlPluginTypeDumpDone(int exitCode)
if (!error.isEmpty()) { if (!error.isEmpty()) {
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError,
qmldumpErrorMessage(libraryPath, error)); qmldumpErrorMessage(libraryPath, error));
printParseWarnings(libraryPath, libraryInfo.pluginTypeInfoError());
} else { } else {
libraryInfo.setMetaObjects(objectsList.values()); libraryInfo.setMetaObjects(objectsList.values());
libraryInfo.setModuleApis(moduleApis); libraryInfo.setModuleApis(moduleApis);
@@ -413,6 +414,7 @@ void PluginDumper::loadQmltypesFile(const QStringList &qmltypesFilePaths,
if (errors.isEmpty()) { if (errors.isEmpty()) {
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileDone); libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileDone);
} else { } else {
printParseWarnings(libraryPath, errors.join(QLatin1String("\n")));
errors.prepend(tr("Errors while reading typeinfo files:")); errors.prepend(tr("Errors while reading typeinfo files:"));
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileError, errors.join(QLatin1String("\n"))); libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileError, errors.join(QLatin1String("\n")));
} }