diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-10-06 13:29:55 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-10-06 13:29:55 -0500 |
commit | d71a83ef0d306b8e23b2be5baa3e347116ba8253 (patch) | |
tree | 7e97f8f0eaf491f1700e537a9c87b03863e2a8fa /src/dialogs/qcolordialog.cpp | |
parent | b1444fa097ab72348e6b86526d2d7d7ab673529e (diff) | |
download | qt3-d71a83ef0d306b8e23b2be5baa3e347116ba8253.tar.gz qt3-d71a83ef0d306b8e23b2be5baa3e347116ba8253.zip |
Apply qtkdeintegration patches to Qt3v3.5.13
This partially resolves Bug #528
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 |