]> git.sesse.net Git - kdenlive/commitdiff
Fix compilation with KDE < 4.5
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 24 Nov 2011 10:00:52 +0000 (11:00 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 24 Nov 2011 10:07:04 +0000 (11:07 +0100)
src/choosecolorwidget.cpp

index aa154b6ed9f935f4906ac6afdca2c3ad01d85455..e6f777dbe9beeae7ce3d3a79ff5363d56a266d72 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <KColorButton>
 #include <KLocalizedString>
+#include <kdeversion.h>
 
 static QColor stringToColor(QString strColor)
 {
@@ -102,12 +103,18 @@ ChooseColorWidget::ChooseColorWidget(QString text, QString color, QWidget *paren
 
 QString ChooseColorWidget::getColor()
 {
-    return colorToString(m_button->color(), m_button->isAlphaChannelEnabled());
+    bool alphaChannel = false;
+#if KDE_IS_VERSION(4,5,0)
+    alphaChannel = m_button->isAlphaChannelEnabled();
+#endif
+    return colorToString(m_button->color(), alphaChannel);
 }
 
 void ChooseColorWidget::setAlphaChannelEnabled(bool enabled)
 {
+#if KDE_IS_VERSION(4,5,0)
     m_button->setAlphaChannelEnabled(enabled);
+#endif
 }
 
 void ChooseColorWidget::setColor(QColor color)