diff --git a/dolphin/src/dolphinpart.cpp b/dolphin/src/dolphinpart.cpp index a957fa665a..a7e8bffec2 100644 --- a/dolphin/src/dolphinpart.cpp +++ b/dolphin/src/dolphinpart.cpp @@ -120,6 +120,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL // Create file info and listing filter extensions. // NOTE: Listing filter needs to be instantiated after the creation of the view. new DolphinPartFileInfoExtension(this); + +#if KDE_IS_VERSION(4, 9, 2) new DolphinPartListingFilterExtension(this); KDirLister* lister = m_view->m_model->m_dirLister; @@ -130,6 +132,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL } else { kWarning() << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported"; } +#endif createActions(); m_actionHandler->updateViewActions(); @@ -661,6 +664,8 @@ KFileItemList DolphinPartFileInfoExtension::queryFor(KParts::FileInfoExtension:: return list; } +#if KDE_IS_VERSION(4, 9, 2) + DolphinPartListingFilterExtension::DolphinPartListingFilterExtension (DolphinPart* part) : KParts::ListingFilterExtension(part) , m_part(part) @@ -739,4 +744,6 @@ void DolphinPartListingNotificationExtension::slotItemsDeleted(const KFileItemLi emit listingEvent(KParts::ListingNotificationExtension::ItemsDeleted, items); } +#endif + #include "dolphinpart.moc" diff --git a/dolphin/src/dolphinpart.h b/dolphin/src/dolphinpart.h index 6cf9fe3243..0895686b83 100644 --- a/dolphin/src/dolphinpart.h +++ b/dolphin/src/dolphinpart.h @@ -20,10 +20,15 @@ #ifndef DOLPHINPART_H #define DOLPHINPART_H +#include + #include #include #include + +#if KDE_IS_VERSION(4, 9, 2) #include +#endif #include @@ -282,6 +287,7 @@ protected: DolphinPart* part() const; }; +#if KDE_IS_VERSION(4, 9, 2) class DolphinPartListingFilterExtension : public KParts::ListingFilterExtension { Q_OBJECT @@ -309,5 +315,6 @@ public Q_SLOTS: void slotNewItems(const KFileItemList&); void slotItemsDeleted(const KFileItemList&); }; +#endif #endif /* DOLPHINPART_H */ diff --git a/konq-plugins/dirfilter/CMakeLists.txt b/konq-plugins/dirfilter/CMakeLists.txt index f83ad1387c..dd3349859a 100644 --- a/konq-plugins/dirfilter/CMakeLists.txt +++ b/konq-plugins/dirfilter/CMakeLists.txt @@ -1,5 +1,7 @@ ########### next target ############### +if (${KDE_VERSION} VERSION_GREATER "4.9.1") + set(dirfilterplugin_PART_SRCS dirfilterplugin.cpp ) kde4_add_plugin(dirfilterplugin ${dirfilterplugin_PART_SRCS}) @@ -13,3 +15,4 @@ install(TARGETS dirfilterplugin DESTINATION ${PLUGIN_INSTALL_DIR} ) install( FILES dirfilterplugin.rc dirfilterplugin.desktop DESTINATION ${DATA_INSTALL_DIR}/dolphinpart/kpartplugins ) +endif (${KDE_VERSION} VERSION_GREATER "4.9.1")