summaryrefslogtreecommitdiffstats
path: root/main/dependencies/qt3/src/dialogs/qcolordialog.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-10-06 13:29:55 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-10-06 13:29:55 -0500
commitbfb8895e56527b719d72c9c16a8ac6254b23e6cf (patch)
tree6ddc53d0d1fa624fb57220fdba2d6fae141b72ad /main/dependencies/qt3/src/dialogs/qcolordialog.cpp
parent40778f37456fa527b7ea2292fe1c2f40b8176298 (diff)
downloadtde-bfb8895e56527b719d72c9c16a8ac6254b23e6cf.tar.gz
tde-bfb8895e56527b719d72c9c16a8ac6254b23e6cf.zip
Apply qtkdeintegration patches to Qt3
This partially resolves Bug #528
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