diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-23 13:40:48 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-23 13:40:48 (GMT) |
commit | 558fafd76690e067b775a28a739c6aedfdffe783 (patch) | |
tree | f42c5ef841db3896edb6bd6b0d0481fe3e050c75 /tests | |
parent | b401ad3ad0448a9893d1d383ad47769ebc9025ff (diff) | |
parent | 24cdab32de2abd8669f281dd54c8da1124514915 (diff) | |
download | Qt-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 'tests')
-rw-r--r-- | tests/auto/qlineedit/tst_qlineedit.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index b34e559..e0747f8 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -66,7 +66,6 @@ #include <qspinbox.h> #include <qdebug.h> - //TESTED_CLASS= //TESTED_FILES= @@ -275,6 +274,7 @@ private slots: void taskQTBUG_7902_contextMenuCrash(); #endif void taskQTBUG_7395_readOnlyShortcut(); + void QTBUG697_paletteCurrentColorGroup(); #ifdef QT3_SUPPORT void validateAndSet_data(); @@ -3714,5 +3714,21 @@ void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut() QCOMPARE(spy.count(), 1); } +void tst_QLineEdit::QTBUG697_paletteCurrentColorGroup() +{ + testWidget->setText(" "); + QPalette p = testWidget->palette(); + p.setBrush(QPalette::Active, QPalette::Highlight, Qt::green); + p.setBrush(QPalette::Inactive, QPalette::Highlight, Qt::red); + testWidget->setPalette(p); + testWidget->selectAll(); + QImage img(testWidget->rect().size(),QImage::Format_ARGB32 ); + testWidget->render(&img); + QCOMPARE(img.pixel(10, testWidget->height()/2), QColor(Qt::green).rgb()); + QApplication::setActiveWindow(0); + testWidget->render(&img); + QCOMPARE(img.pixel(10, testWidget->height()/2), QColor(Qt::red).rgb()); +} + QTEST_MAIN(tst_QLineEdit) #include "tst_qlineedit.moc" |