From: Luc Schrijvers Date: Sat, 15 Mar 2025 18:50:21 +0000 (+0100) Subject: only use KDirNotify if existing X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/fad3305b8cbbdcc39de69740167326aff6fe6616 only use KDirNotify if existing will not be there if we have no dbus enabled for kio --- diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 02fe3e308..b0b7a8581 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -8,6 +8,9 @@ #include "informationpanelcontent.h" +#define HAVE_KDIRNOTIFY __has_include() +#if HAVE_KDIRNOTIFY +#endif #include #include #include @@ -406,6 +409,7 @@ void InformationPanel::init() Q_ASSERT(m_urlChangedTimer->interval() < m_infoTimer->interval()); Q_ASSERT(m_urlChangedTimer->interval() < m_resetUrlTimer->interval()); +#if HAVE_KDIRNOTIFY org::kde::KDirNotify *dirNotify = new org::kde::KDirNotify(QString(), QString(), QDBusConnection::sessionBus(), this); connect(dirNotify, &OrgKdeKDirNotifyInterface::FileRenamed, this, &InformationPanel::slotFileRenamed); connect(dirNotify, &OrgKdeKDirNotifyInterface::FilesAdded, this, &InformationPanel::slotFilesAdded); @@ -413,6 +417,7 @@ void InformationPanel::init() connect(dirNotify, &OrgKdeKDirNotifyInterface::FilesRemoved, this, &InformationPanel::slotFilesRemoved); connect(dirNotify, &OrgKdeKDirNotifyInterface::enteredDirectory, this, &InformationPanel::slotEnteredDirectory); connect(dirNotify, &OrgKdeKDirNotifyInterface::leftDirectory, this, &InformationPanel::slotLeftDirectory); +#endif m_content = new InformationPanelContent(this); connect(m_content, &InformationPanelContent::urlActivated, this, &InformationPanel::urlActivated);