diff options
author | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2010-09-28 10:56:35 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2010-09-28 10:56:35 (GMT) |
commit | aef084fc06e325c9b206c274d5b297660b7c671f (patch) | |
tree | e415161d5200d2eee7a098c8f5e411a486178a47 /tests/auto/qcombobox/tst_qcombobox.cpp | |
parent | ae5f7005c709165f847445aca746b5b338341121 (diff) | |
download | Qt-aef084fc06e325c9b206c274d5b297660b7c671f.zip Qt-aef084fc06e325c9b206c274d5b297660b7c671f.tar.gz Qt-aef084fc06e325c9b206c274d5b297660b7c671f.tar.bz2 |
Fix a color propagation issue with Combobox line edit
Some pixmap based themes were affected by this issue since they
needed to resolve the palette against the widget and the lineedit
palette was already resolved. We now set the palette on the lineedit
when you modify the parent palette. You can still maintain a separate
palette on the lineedit, but you have to set it after the parent has
been set. We can remove some workarounds for plastique and vista style
due to this.
Task-number: QTBUG-5950
Reviewed-by: ogoffart
Diffstat (limited to 'tests/auto/qcombobox/tst_qcombobox.cpp')
-rw-r--r-- | tests/auto/qcombobox/tst_qcombobox.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index f00f3ef..71dab40 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -475,6 +475,18 @@ void tst_QComboBox::setPalette() QVERIFY(((QWidget*)o)->palette() == pal); } } + + testWidget->setEditable(true); + pal.setColor(QPalette::Base, Qt::red); + //Setting it on the lineedit should be separate form the combo + testWidget->lineEdit()->setPalette(pal); + QVERIFY(testWidget->palette() != pal); + QVERIFY(testWidget->lineEdit()->palette() == pal); + pal.setColor(QPalette::Base, Qt::green); + //Setting it on the combo directly should override lineedit + testWidget->setPalette(pal); + QVERIFY(testWidget->palette() == pal); + QVERIFY(testWidget->lineEdit()->palette() == pal); } void tst_QComboBox::sizeAdjustPolicy() |