From: Jean-Baptiste Mardelle Date: Thu, 24 Nov 2011 10:00:52 +0000 (+0100) Subject: Fix compilation with KDE < 4.5 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=bc2f33b95f13f998695e1cfab2885e29fadbb334;p=kdenlive Fix compilation with KDE < 4.5 --- diff --git a/src/choosecolorwidget.cpp b/src/choosecolorwidget.cpp index aa154b6e..e6f777db 100644 --- a/src/choosecolorwidget.cpp +++ b/src/choosecolorwidget.cpp @@ -26,6 +26,7 @@ #include #include +#include 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)