Commit d5a0bacf authored by Jonathan Esk-Riddell's avatar Jonathan Esk-Riddell 🏄
Browse files

<sitter> Riddell: note that the watcher should be made a stack variable

parent da9320ee
......@@ -209,7 +209,7 @@ struct KIPIInterfacePrivate
QAction * mLoadingAction;
QAction * mNoPluginAction;
QAction * mInstallPluginAction;
QPointer<QFileSystemWatcher> mPluginWatcher;
QFileSystemWatcher mPluginWatcher;
QTimer mPluginLoadTimer;
void setupPluginsMenu()
......@@ -346,9 +346,9 @@ void KIPIInterface::loadOnePlugin()
d->mInstallPluginAction->setEnabled(true);
QObject::connect(d->mInstallPluginAction, &QAction::triggered,
this, [=](){QDesktopServices::openUrl(QUrl(KIPI_PLUGINS_URL));});
d->mPluginWatcher = new QFileSystemWatcher(d->mMainWindow);
d->mPluginWatcher->addPaths(QCoreApplication::libraryPaths());
connect(d->mPluginWatcher, &QFileSystemWatcher::directoryChanged, this, &KIPIInterface::packageFinished);
d->mPluginWatcher.setParent(d->mMainWindow);
d->mPluginWatcher.addPaths(QCoreApplication::libraryPaths());
connect(&d->mPluginWatcher, &QFileSystemWatcher::directoryChanged, this, &KIPIInterface::packageFinished);
} else {
d->mPluginMenu->addAction(d->mNoPluginAction);
}
......
Supports Markdown
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