summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Riddell <jr@jriddell.org>2016-10-04 10:06:49 (GMT)
committerJonathan Riddell <jr@jriddell.org>2016-10-04 10:06:49 (GMT)
commitd5a0bacfa64a60f7e190be48221249c9eaba4f6a (patch)
tree250441f360225f5d73dc90156eaac4830705fcf5
parentda9320eeab35b1ecd25595b24a4ad79075fbf627 (diff)
<sitter> Riddell: note that the watcher should be made a stack variable
-rw-r--r--app/kipiinterface.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/kipiinterface.cpp b/app/kipiinterface.cpp
index f4067e3..a021003 100644
--- a/app/kipiinterface.cpp
+++ b/app/kipiinterface.cpp
@@ -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);
}