diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-05-22 04:41:04 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-05-22 04:41:04 (GMT) |
commit | ba9caa7181282109ea8def0994838b6538da0b13 (patch) | |
tree | f1ae3f595fe6f601ce411d69179d6c0c8c650386 /tests/auto/qcombobox/tst_qcombobox.cpp | |
parent | 2575eac4c26ad92dde95959a82f576edc3e76e1d (diff) | |
parent | f9d26f0bebd5bcc32d15c4a627251c44cf78389e (diff) | |
download | Qt-ba9caa7181282109ea8def0994838b6538da0b13.zip Qt-ba9caa7181282109ea8def0994838b6538da0b13.tar.gz Qt-ba9caa7181282109ea8def0994838b6538da0b13.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts:
src/corelib/kernel/kernel.pri
src/corelib/tools/tools.pri
tools/qdoc3/htmlgenerator.cpp
tools/qdoc3/htmlgenerator.h
Diffstat (limited to 'tests/auto/qcombobox/tst_qcombobox.cpp')
-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 6a87e3c..2fff6d0 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 ); @@ -2206,5 +2209,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" |