summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp')
-rw-r--r--tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp b/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
index e0a9db3d7d..44b1cebcfb 100644
--- a/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
+++ b/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
@@ -48,6 +48,7 @@ class tst_QItemEditorFactory: public QObject
private slots:
void createEditor();
void createCustomEditor();
+ void uintValues();
};
void tst_QItemEditorFactory::createEditor()
@@ -100,6 +101,24 @@ void tst_QItemEditorFactory::createCustomEditor()
delete creator;
}
+void tst_QItemEditorFactory::uintValues()
+{
+ QItemEditorFactory editorFactory;
+
+ QWidget parent;
+
+ {
+ QWidget *editor = editorFactory.createEditor(QMetaType::UInt, &parent);
+ QCOMPARE(editor->metaObject()->className(), "QUIntSpinBox");
+ QCOMPARE(editor->metaObject()->userProperty().type(), QVariant::UInt);
+ }
+ {
+ QWidget *editor = editorFactory.createEditor(QMetaType::Int, &parent);
+ QCOMPARE(editor->metaObject()->className(), "QSpinBox");
+ QCOMPARE(editor->metaObject()->userProperty().type(), QVariant::Int);
+ }
+}
+
QTEST_MAIN(tst_QItemEditorFactory)
#include "tst_qitemeditorfactory.moc"