diff options
author | axis <qt-info@nokia.com> | 2009-05-20 11:44:05 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-05-20 11:44:05 (GMT) |
commit | 91e041fcff000024e619de5d7561ce141cb99d99 (patch) | |
tree | 0fc7285a4a1634f6a74499c324d00b6aef181974 /tests/auto/qcombobox | |
parent | d68629e4cfb94776b8ef02cd01cf0b02bf430db8 (diff) | |
parent | 25f86fbab2e7d23832b0bb8ae8530289258e2aa5 (diff) | |
download | Qt-91e041fcff000024e619de5d7561ce141cb99d99.zip Qt-91e041fcff000024e619de5d7561ce141cb99d99.tar.gz Qt-91e041fcff000024e619de5d7561ce141cb99d99.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts:
tests/auto/network-settings.h
tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
tests/auto/qiodevice/tst_qiodevice.cpp
tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
tests/auto/qsslsocket/tst_qsslsocket.cpp
Diffstat (limited to 'tests/auto/qcombobox')
-rw-r--r-- | tests/auto/qcombobox/tst_qcombobox.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index e881496..620cd07 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -76,6 +76,7 @@ #endif #include <qabstractitemview.h> #include "../../shared/util.h" +#include <qstyleditemdelegate.h> //TESTED_CLASS= //TESTED_FILES= @@ -141,6 +142,8 @@ private slots: void setModelColumn(); void noScrollbar_data(); void noScrollbar(); + void setItemDelegate(); + void task253944_itemDelegateIsReset(); protected slots: void onEditTextChanged( const QString &newString ); @@ -2209,5 +2212,26 @@ void tst_QComboBox::noScrollbar() } } +void tst_QComboBox::setItemDelegate() +{ + QComboBox comboBox; + QStyledItemDelegate *itemDelegate = new QStyledItemDelegate; + comboBox.setItemDelegate(itemDelegate); + QCOMPARE(comboBox.itemDelegate(), itemDelegate); +} + +void tst_QComboBox::task253944_itemDelegateIsReset() +{ + QComboBox comboBox; + QStyledItemDelegate *itemDelegate = new QStyledItemDelegate; + comboBox.setItemDelegate(itemDelegate); + + comboBox.setEditable(true); + QCOMPARE(comboBox.itemDelegate(), itemDelegate); + + comboBox.setStyleSheet("QComboBox { border: 1px solid gray; }"); + QCOMPARE(comboBox.itemDelegate(), itemDelegate); +} + QTEST_MAIN(tst_QComboBox) #include "tst_qcombobox.moc" |