summaryrefslogtreecommitdiffstats
path: root/main/dependencies/qt3/src/dialogs/qcolordialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/dependencies/qt3/src/dialogs/qcolordialog.cpp')
-rw-r--r--main/dependencies/qt3/src/dialogs/qcolordialog.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/main/dependencies/qt3/src/dialogs/qcolordialog.cpp b/main/dependencies/qt3/src/dialogs/qcolordialog.cpp
index 44bf70e35..4ce83bba0 100644
--- a/main/dependencies/qt3/src/dialogs/qcolordialog.cpp
+++ b/main/dependencies/qt3/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