forked from qt-creator/qt-creator
QmlJS: Fix warnings about duplicate and empty file watchers.
Change-Id: Ia2d5f7588f1a5eb4192526e85b2569b4b175dad2 Reviewed-on: http://codereview.qt.nokia.com/3085 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user