Commit 8fbaa0d1 authored by Christian Kamm's avatar Christian Kamm

QmlJS: Fix warnings about duplicate and empty file watchers.

Change-Id: Ia2d5f7588f1a5eb4192526e85b2569b4b175dad2
Reviewed-on: http://codereview.qt.nokia.com/3085Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent 30eefea9
......@@ -162,15 +162,21 @@ void PluginDumper::onLoadPluginTypes(const QString &libraryPath, const QString &
// watch plugin libraries
foreach (const QmlDirParser::Plugin &plugin, snapshot.libraryInfo(canonicalLibraryPath).plugins()) {
const QString pluginLibrary = resolvePlugin(canonicalLibraryPath, plugin.path, plugin.name);
pluginWatcher()->addFile(pluginLibrary, Utils::FileSystemWatcher::WatchModifiedDate);
m_libraryToPluginIndex.insert(pluginLibrary, index);
if (!pluginLibrary.isEmpty()) {
if (!pluginWatcher()->watchesFile(pluginLibrary))
pluginWatcher()->addFile(pluginLibrary, Utils::FileSystemWatcher::WatchModifiedDate);
m_libraryToPluginIndex.insert(pluginLibrary, index);
}
}
// watch library xml file
if (plugin.hasPredumpedQmlTypesFile()) {
const QString &path = plugin.predumpedQmlTypesFilePath();
pluginWatcher()->addFile(path, Utils::FileSystemWatcher::WatchModifiedDate);
m_libraryToPluginIndex.insert(path, index);
if (!path.isEmpty()) {
if (!pluginWatcher()->watchesFile(path))
pluginWatcher()->addFile(path, Utils::FileSystemWatcher::WatchModifiedDate);
m_libraryToPluginIndex.insert(path, index);
}
}
dump(plugin);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment