qmljs: cleanup

Change-Id: I951403ecec2b896e5b0322d79dfad952deeaae4a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
This commit is contained in:
Fawzi Mohamed
2014-11-19 15:23:32 +01:00
committed by Fawzi Mohamed
parent 42fc31bff7
commit af803b60ae

View File

@@ -421,10 +421,12 @@ void PluginDumper::loadQmltypesFile(const QStringList &qmltypesFilePaths,
void PluginDumper::dump(const Plugin &plugin)
{
ModelManagerInterface::ProjectInfo info = m_modelManager->defaultProjectInfo();
const Snapshot snapshot = m_modelManager->snapshot();
LibraryInfo libraryInfo = snapshot.libraryInfo(plugin.qmldirPath);
// if there are type infos, don't dump!
if (!plugin.typeInfoPaths.isEmpty()) {
const Snapshot snapshot = m_modelManager->snapshot();
LibraryInfo libraryInfo = snapshot.libraryInfo(plugin.qmldirPath);
if (!libraryInfo.isValid())
return;
@@ -432,11 +434,7 @@ void PluginDumper::dump(const Plugin &plugin)
return;
}
ModelManagerInterface::ProjectInfo info = m_modelManager->defaultProjectInfo();
if (!info.tryQmlDump || info.qmlDumpPath.isEmpty()) {
const Snapshot snapshot = m_modelManager->snapshot();
LibraryInfo libraryInfo = snapshot.libraryInfo(plugin.qmldirPath);
if (!libraryInfo.isValid())
return;