summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/colorlistbox.cpp10
-rw-r--r--microkde/kcolorbutton.cpp13
2 files changed, 22 insertions, 1 deletions
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index 7386207..2bddca6 100644
--- a/kaddressbook/views/colorlistbox.cpp
+++ b/kaddressbook/views/colorlistbox.cpp
@@ -29,2 +29,5 @@
29#include "colorlistbox.h" 29#include "colorlistbox.h"
30#ifdef DESKTOP_VERSION
31#include <qcolordialog.h>
32#endif
30 33
@@ -99,2 +102,8 @@ void ColorListBox::newColor( int index )
99#else //KAB_EMBEDDED 102#else //KAB_EMBEDDED
103#ifdef DESKTOP_VERSION
104 QColor col = QColorDialog::getColor ( c );
105 if ( col.isValid () ) {
106 setColor( index, col );
107 }
108#else
100 KColorDialog* k = new KColorDialog( this ); 109 KColorDialog* k = new KColorDialog( this );
@@ -106,2 +115,3 @@ void ColorListBox::newColor( int index )
106 delete k; 115 delete k;
116#endif
107#endif //KAB_EMBEDDED 117#endif //KAB_EMBEDDED
diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp
index 433f909..c7c6088 100644
--- a/microkde/kcolorbutton.cpp
+++ b/microkde/kcolorbutton.cpp
@@ -6,3 +6,5 @@
6#include "qlayout.h" 6#include "qlayout.h"
7 7#ifdef DESKTOP_VERSION
8#include <qcolordialog.h>
9#endif
8void KColorButton:: edit() 10void KColorButton:: edit()
@@ -10,2 +12,10 @@ void KColorButton:: edit()
10 12
13#ifdef DESKTOP_VERSION
14 QColor col = QColorDialog::getColor ( mColor );
15 if ( col.isValid () ) {
16 mColor = col;
17 setColor ( mColor );
18 emit changed ( mColor );
19 }
20#else
11 KColorDialog* k = new KColorDialog( this ); 21 KColorDialog* k = new KColorDialog( this );
@@ -19,2 +29,3 @@ void KColorButton:: edit()
19 delete k; 29 delete k;
30#endif
20} 31}