summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2010-07-23 09:01:38 (GMT)
committerPierre Rossi <pierre.rossi@nokia.com>2010-07-23 09:01:38 (GMT)
commitf8c82039e9b665cabaf605a3d363108e732d8205 (patch)
treef33da7a7097c8ab24903938f4862dcc3bac23ff7 /src
parentd9d877326b13c55dc33b1cac13f3ee70e8de62bf (diff)
downloadQt-f8c82039e9b665cabaf605a3d363108e732d8205.zip
Qt-f8c82039e9b665cabaf605a3d363108e732d8205.tar.gz
Qt-f8c82039e9b665cabaf605a3d363108e732d8205.tar.bz2
Revert "Make QPalette::operator== return false if the currentColorGroup differs"
This reverts commit d9d877326b13c55dc33b1cac13f3ee70e8de62bf. The behavior change it implied was bigger than expected and made too many autotests fail. Will document better that the currentColorGroup is not taken into account when comparing palettes.
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qpalette.cpp2
-rw-r--r--src/gui/widgets/qlineedit.cpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 910dfa9..98e8f66 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -876,8 +876,6 @@ void QPalette::detach()
*/
bool QPalette::operator==(const QPalette &p) const
{
- if (p.currentColorGroup() != current_group)
- return false;
if (isCopyOf(p))
return true;
for(int grp = 0; grp < (int)NColorGroups; grp++) {
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 98f0f44..1bffde1 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1946,7 +1946,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
if (d->control->hasSelectedText() || (d->cursorVisible && !d->control->inputMask().isEmpty() && !d->control->isReadOnly())){
flags |= QLineControl::DrawSelections;
// Palette only used for selections/mask and may not be in sync
- if (d->control->palette() != pal)
+ if(d->control->palette() != pal)
d->control->setPalette(pal);
}