kdecore: create the global KDirWatch instance on demand

Q_GLOBAL_STATIC() no longer creates instance on demand

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-28 20:59:11 +03:00
parent cc6903476e
commit ac69de425c

View file

@ -17,6 +17,7 @@
*/
#include "kdirwatch.h"
#include "kglobal.h"
#include "kdirwatch_p.h"
#include "kde_file.h"
@ -33,11 +34,11 @@ KDirWatchPrivate::~KDirWatchPrivate()
watcher->deleteLater();
}
Q_GLOBAL_STATIC(KDirWatch, globalWatch)
K_GLOBAL_STATIC(KDirWatch, globalWatch)
KDirWatch* KDirWatch::self()
{
return globalWatch();
return globalWatch;
}
KDirWatch::KDirWatch(QObject* parent)