From d71a83ef0d306b8e23b2be5baa3e347116ba8253 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 6 Oct 2011 13:29:55 -0500 Subject: Apply qtkdeintegration patches to Qt3 This partially resolves Bug #528 --- src/dialogs/qcolordialog.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/dialogs/qcolordialog.cpp') 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 -- cgit v1.2.3