diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-05-12 15:29:00 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-05-12 15:29:41 +0200 |
commit | cf15e14e5e527b265939295f6b4342f8db05ccc4 (patch) | |
tree | 545cb5e65a2df75258b137d3ad8f24ae6a02e4d0 /src/plugins/qmljstools/qmljsplugindumper.cpp | |
parent | 04c5425de2292c9da66c7c1dd2ae0c646528ca07 (diff) | |
download | qt-creator-cf15e14e5e527b265939295f6b4342f8db05ccc4.tar.gz |
QmlJS: Add tooltips to imports.
Task-number: QTCREATORBUG-4814
Diffstat (limited to 'src/plugins/qmljstools/qmljsplugindumper.cpp')
-rw-r--r-- | src/plugins/qmljstools/qmljsplugindumper.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/qmljstools/qmljsplugindumper.cpp b/src/plugins/qmljstools/qmljsplugindumper.cpp index 9b2ef8b5cb..6ad21f2a1e 100644 --- a/src/plugins/qmljstools/qmljsplugindumper.cpp +++ b/src/plugins/qmljstools/qmljsplugindumper.cpp @@ -82,7 +82,7 @@ void PluginDumper::onLoadPluginTypes(const QString &libraryPath, const QString & return; const Snapshot snapshot = m_modelManager->snapshot(); const LibraryInfo libraryInfo = snapshot.libraryInfo(canonicalLibraryPath); - if (libraryInfo.dumpStatus() != LibraryInfo::DumpNotStartedOrRunning) + if (libraryInfo.pluginTypeInfoStatus() != LibraryInfo::NoTypeInfo) return; // avoid inserting the same plugin twice @@ -174,14 +174,14 @@ void PluginDumper::qmlPluginTypeDumpDone(int exitCode) Core::MessageManager *messageManager = Core::MessageManager::instance(); const QString errorMessages = process->readAllStandardError(); messageManager->printToOutputPane(qmldumpErrorMessage(libraryPath, errorMessages)); - libraryInfo.setDumpStatus(LibraryInfo::DumpError, qmldumpFailedMessage(errorMessages)); + libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, qmldumpFailedMessage(errorMessages)); } const QByteArray output = process->readAllStandardOutput(); QString error; QList<FakeMetaObject::ConstPtr> objectsList = parseHelper(output, &error); if (exitCode == 0 && !error.isEmpty()) { - libraryInfo.setDumpStatus(LibraryInfo::DumpError, tr("Type dump of C++ plugin failed. Parse error:\n'%1'").arg(error)); + libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, tr("Type dump of C++ plugin failed. Parse error:\n'%1'").arg(error)); } if (exitCode == 0 && error.isEmpty()) { @@ -189,7 +189,7 @@ void PluginDumper::qmlPluginTypeDumpDone(int exitCode) // ### disabled code path for running qmldump to get Qt's builtins // if (libraryPath.isEmpty()) // Interpreter::CppQmlTypesLoader::builtinObjects.append(objectsList); - libraryInfo.setDumpStatus(LibraryInfo::DumpDone); + libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpDone); } if (!libraryPath.isEmpty()) @@ -212,7 +212,7 @@ void PluginDumper::qmlPluginTypeDumpError(QProcess::ProcessError) if (!libraryPath.isEmpty()) { const Snapshot snapshot = m_modelManager->snapshot(); LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath); - libraryInfo.setDumpStatus(LibraryInfo::DumpError, qmldumpFailedMessage(errorMessages)); + libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, qmldumpFailedMessage(errorMessages)); m_modelManager->updateLibraryInfo(libraryPath, libraryInfo); } } @@ -238,7 +238,7 @@ void PluginDumper::dump(const Plugin &plugin) const QString &path = plugin.predumpedQmlTypesFilePath(); Utils::FileReader reader; if (!reader.fetch(path, QFile::Text)) { - libraryInfo.setDumpStatus(LibraryInfo::DumpError, reader.errorString()); + libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileError, reader.errorString()); m_modelManager->updateLibraryInfo(plugin.qmldirPath, libraryInfo); return; } @@ -248,9 +248,9 @@ void PluginDumper::dump(const Plugin &plugin) if (error.isEmpty()) { libraryInfo.setMetaObjects(objectsList); - libraryInfo.setDumpStatus(LibraryInfo::DumpDone); + libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileDone); } else { - libraryInfo.setDumpStatus(LibraryInfo::DumpError, + libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileError, tr("Failed to parse '%1'.\nError: %2").arg(path, error)); } m_modelManager->updateLibraryInfo(plugin.qmldirPath, libraryInfo); @@ -269,7 +269,7 @@ void PluginDumper::dump(const Plugin &plugin) if (!libraryInfo.isValid()) return; - libraryInfo.setDumpStatus(LibraryInfo::DumpError, + libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, tr("Could not locate the helper application for dumping type information from C++ plugins.\n" "Please build the debugging helpers on the Qt version options page.")); m_modelManager->updateLibraryInfo(plugin.qmldirPath, libraryInfo); |