[Kdenlive-devel] Compile fix for kdelibs5 4.1 (was Re: kdelibs5 version dependency)

Mikko Rapeli mikko.rapeli at iki.fi
Fri Sep 18 08:29:19 UTC 2009


On Fri, Sep 18, 2009 at 11:11:15AM +0300, Mikko Rapeli wrote:
> I just tried compiling on Debian stable/lenny with kdelibs5 4.1 and it
> fails. Fixes were simple at this point and #ifdef'ing them out might
> work too though I don't if kdelibs provides that kind of version numbers
> to compare with.

Ah, read the source, Luke. Here's a fix to compile on kdelibs5 4.1:

Index: src/titlewidget.cpp
===================================================================
--- src/titlewidget.cpp	(revision 3912)
+++ src/titlewidget.cpp	(working copy)
@@ -26,6 +26,7 @@
 #include <KStandardDirs>
 #include <KMessageBox>
 #include <kio/netaccess.h>
+#include <kdeversion.h>
 
 #include <QDomDocument>
 #include <QGraphicsItem>
@@ -1450,7 +1451,9 @@
         KFileDialog *fs = new KFileDialog(KUrl(m_projectTitlePath), "application/x-kdenlivetitle",this);
         fs->setOperationMode(KFileDialog::Saving);
         fs->setMode(KFile::File);
+#if KDE_IS_VERSION(4,2,0)
         fs->setConfirmOverwrite(true);
+#endif
         fs->setKeepLocation(true);
         fs->exec();
         url = fs->selectedUrl();
Index: src/monitor.cpp
===================================================================
--- src/monitor.cpp	(revision 3912)
+++ src/monitor.cpp	(working copy)
@@ -30,6 +30,7 @@
 #include <KFileDialog>
 #include <KApplication>
 #include <KMessageBox>
+#include <kdeversion.h>
 
 #include <QMouseEvent>
 #include <QStylePainter>
@@ -487,7 +488,9 @@
     KFileDialog *fs = new KFileDialog(KUrl(), "image/png",this);
     fs->setOperationMode(KFileDialog::Saving);
     fs->setMode(KFile::File);
+#if KDE_IS_VERSION(4,2,0)
     fs->setConfirmOverwrite(true);
+#endif
     fs->setKeepLocation(true);
     fs->exec();
     QString path = fs->selectedFile();
Index: src/recmonitor.cpp
===================================================================
--- src/recmonitor.cpp	(revision 3912)
+++ src/recmonitor.cpp	(working copy)
@@ -30,7 +30,9 @@
 #include <KComboBox>
 #include <KIO/NetAccess>
 #include <KFileItem>
+#if KDE_IS_VERSION(4,2,0)
 #include <KDiskFreeSpaceInfo>
+#endif
 
 #include <QMouseEvent>
 #include <QMenu>




More information about the Kdenlive mailing list