diff options
Diffstat (limited to 'src/dialogs/qcolordialog.cpp')
-rw-r--r-- | src/dialogs/qcolordialog.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/dialogs/qcolordialog.cpp b/src/dialogs/qcolordialog.cpp index 44bf70e..4ce83bb 100644 --- a/src/dialogs/qcolordialog.cpp +++ b/src/dialogs/qcolordialog.cpp @@ -63,6 +63,10 @@ QRgb macGetRgba( QRgb initial, bool *ok, QWidget *parent, const char* name ); QColor macGetColor( const QColor& initial, QWidget *parent, const char *name ); #endif +#ifdef Q_WS_X11 +#include "private/qtkdeintegration_x11_p.h" +#endif + //////////// QWellArray BEGIN struct QWellArrayData; @@ -1481,7 +1485,10 @@ QColorDialog::QColorDialog(QWidget* parent, const char* name, bool modal) : QColor QColorDialog::getColor( const QColor& initial, QWidget *parent, const char *name ) { -#if defined(Q_WS_MAC) +#if defined(Q_WS_X11) + if( QKDEIntegration::enabled()) + return QKDEIntegration::getColor( initial, parent, name ); +#elif defined(Q_WS_MAC) return macGetColor(initial, parent, name); #endif @@ -1519,6 +1526,13 @@ QRgb QColorDialog::getRgba( QRgb initial, bool *ok, QWidget *parent, const char* name ) { #if defined(Q_WS_MAC) + if( QKDEIntegration::enabled()) { + QColor color = QKDEIntegration::getColor( QColor( initial ), parent, name ); + if( ok ) + *ok = color.isValid(); + return color.rgba(); + } +#elif defined(Q_WS_MAC) return macGetRgba(initial, ok, parent, name); #endif |