summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-23 13:40:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-23 13:40:48 (GMT)
commit558fafd76690e067b775a28a739c6aedfdffe783 (patch)
treef42c5ef841db3896edb6bd6b0d0481fe3e050c75 /src
parentb401ad3ad0448a9893d1d383ad47769ebc9025ff (diff)
parent24cdab32de2abd8669f281dd54c8da1124514915 (diff)
downloadQt-558fafd76690e067b775a28a739c6aedfdffe783.zip
Qt-558fafd76690e067b775a28a739c6aedfdffe783.tar.gz
Qt-558fafd76690e067b775a28a739c6aedfdffe783.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix QLineEdit's Highlight color when inactive.
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qpalette.cpp10
-rw-r--r--src/gui/widgets/qlineedit.cpp3
2 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 98e8f66..38ec806 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -868,11 +868,21 @@ void QPalette::detach()
Returns true (slowly) if this palette is different from \a p;
otherwise returns false (usually quickly).
+
+ \note The current ColorGroup is not taken into account when
+ comparing palettes
+
+ \sa operator==
*/
/*!
Returns true (usually quickly) if this palette is equal to \a p;
otherwise returns false (slowly).
+
+ \note The current ColorGroup is not taken into account when
+ comparing palettes
+
+ \sa operator!=
*/
bool QPalette::operator==(const QPalette &p) const
{
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index d7311ef..981e934 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1949,7 +1949,8 @@ 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->palette().currentColorGroup() != pal.currentColorGroup())
d->control->setPalette(pal);
}