]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix compile against the minimum required kdelibs version (v4.7.97)
authorDawit Alemayehu <adawit@kde.org>
Tue, 11 Sep 2012 20:40:32 +0000 (16:40 -0400)
committerDawit Alemayehu <adawit@kde.org>
Tue, 11 Sep 2012 20:57:18 +0000 (16:57 -0400)
src/dolphinpart.cpp
src/dolphinpart.h

index a957fa665aed811ba5d88fe9821170bca1a6e096..a7e8bffec2f2662a0a4d511b5f30cf791504452e 100644 (file)
@@ -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);
     // 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;
     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";
     }
     } else {
         kWarning() << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported";
     }
+#endif
 
     createActions();
     m_actionHandler->updateViewActions();
 
     createActions();
     m_actionHandler->updateViewActions();
@@ -661,6 +664,8 @@ KFileItemList DolphinPartFileInfoExtension::queryFor(KParts::FileInfoExtension::
     return list;
 }
 
     return list;
 }
 
+#if KDE_IS_VERSION(4, 9, 2)
+
 DolphinPartListingFilterExtension::DolphinPartListingFilterExtension (DolphinPart* part)
     : KParts::ListingFilterExtension(part)
       , m_part(part)
 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);
 }
 
     emit listingEvent(KParts::ListingNotificationExtension::ItemsDeleted, items);
 }
 
+#endif
+
 #include "dolphinpart.moc"
 #include "dolphinpart.moc"
index 6cf9fe324345084732c003c12fdcf81a674f10a4..0895686b837c0cf6830d2f802f1be926664c85b3 100644 (file)
 #ifndef DOLPHINPART_H
 #define DOLPHINPART_H
 
 #ifndef DOLPHINPART_H
 #define DOLPHINPART_H
 
+#include <kdeversion.h>
+
 #include <kparts/part.h>
 #include <kparts/browserextension.h>
 #include <kparts/fileinfoextension.h>
 #include <kparts/part.h>
 #include <kparts/browserextension.h>
 #include <kparts/fileinfoextension.h>
+
+#if KDE_IS_VERSION(4, 9, 2)
 #include <kparts/listingextension.h>
 #include <kparts/listingextension.h>
+#endif
 
 #include <QItemSelectionModel>
 
 
 #include <QItemSelectionModel>
 
@@ -282,6 +287,7 @@ protected:
     DolphinPart* part() const;
 };
 
     DolphinPart* part() const;
 };
 
+#if KDE_IS_VERSION(4, 9, 2)
 class DolphinPartListingFilterExtension : public KParts::ListingFilterExtension
 {
     Q_OBJECT
 class DolphinPartListingFilterExtension : public KParts::ListingFilterExtension
 {
     Q_OBJECT
@@ -309,5 +315,6 @@ public Q_SLOTS:
    void slotNewItems(const KFileItemList&);
    void slotItemsDeleted(const KFileItemList&);
 };
    void slotNewItems(const KFileItemList&);
    void slotItemsDeleted(const KFileItemList&);
 };
+#endif
 
 #endif /* DOLPHINPART_H */
 
 #endif /* DOLPHINPART_H */