QmlJSEditor: Don't warn about failing dumps if dumper is from 2.1

Ignore dumper failures if dumper is from 2.1. This is the case e.g.
for the time being with the Qt SDK 1.1. The type info might still
be available if a .qmltypes file is available.

Task-number: QTCREATORBUG-4380
Reviewed-by: Erik Verbruggen
This commit is contained in:
Kai Koehne
2011-04-08 14:02:12 +02:00
parent cd995e0826
commit d40c15abea

View File

@@ -164,7 +164,17 @@ void PluginDumper::qmlPluginTypeDumpDone(int exitCode)
Core::MessageManager *messageManager = Core::MessageManager::instance(); Core::MessageManager *messageManager = Core::MessageManager::instance();
const QString errorMessages = process->readAllStandardError(); const QString errorMessages = process->readAllStandardError();
messageManager->printToOutputPane(qmldumpErrorMessage(libraryPath, errorMessages)); messageManager->printToOutputPane(qmldumpErrorMessage(libraryPath, errorMessages));
libraryInfo.setDumpStatus(LibraryInfo::DumpError, qmldumpFailedMessage(errorMessages));
if (errorMessages.contains(QLatin1String("Usage: qmldump [plugin/import/path plugin.uri]"))) {
// outdated qmldump from 2.1.
// TODO: Show a warning that qmldump should be recompiled.
libraryInfo.setDumpStatus(LibraryInfo::DumpDone);
if (!libraryPath.isEmpty())
m_modelManager->updateLibraryInfo(libraryPath, libraryInfo);
return;
} else {
libraryInfo.setDumpStatus(LibraryInfo::DumpError, qmldumpFailedMessage(errorMessages));
}
} }
const QByteArray output = process->readAllStandardOutput(); const QByteArray output = process->readAllStandardOutput();