┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawit Alemayehu <[email protected]>2012-09-11 16:40:32 -0400
committerDawit Alemayehu <[email protected]>2012-09-11 16:57:51 -0400
commitfa36040a9a3969a6c754299e94d55391061e4ea8 (patch)
tree065b085df7e2b4dfe0cf07b4db390572bd144f9b
parentbdfd49e7e71295a3bc509e310f9d3efaea3fcdc7 (diff)
Fix compile against the minimum required kdelibs version (v4.7.97)
(cherry picked from commit f0d5e062bf0452258d337d7dcb2edd2eefa1c37b)
-rw-r--r--src/dolphinpart.cpp7
-rw-r--r--src/dolphinpart.h7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index a957fa665..a7e8bffec 100644
--- a/src/dolphinpart.cpp
+++ b/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/src/dolphinpart.h b/src/dolphinpart.h
index 6cf9fe324..0895686b8 100644
--- a/src/dolphinpart.h
+++ b/src/dolphinpart.h
@@ -20,10 +20,15 @@
#ifndef DOLPHINPART_H
#define DOLPHINPART_H
+#include <kdeversion.h>
+
#include <kparts/part.h>
#include <kparts/browserextension.h>
#include <kparts/fileinfoextension.h>
+
+#if KDE_IS_VERSION(4, 9, 2)
#include <kparts/listingextension.h>
+#endif
#include <QItemSelectionModel>
@@ -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 */