summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qitemeditorfactory.h
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-01-27 03:33:13 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-30 16:25:09 +0100
commitd9468a975210ecb58ff199e931f47df5b99b267f (patch)
treecdcf71215bca02739c80f550e9ddbed635ad38ab /src/widgets/itemviews/qitemeditorfactory.h
parentbe1867b6c4743da937d269f04c2e108a18d3f400 (diff)
Change the type key for delegate editors to int.
Previous type of QVariant::Type does not allow for custom types. While technically source incompatible I found no re-implementation of this class in qttools or qt-creator (most likely to use it for property editors). The virtual methods are not needed because registerEditor is all the API that is really needed. Task-number: QTBUG-1065 Change-Id: I2a9c578c444a80359416f2224a0ee03903bfe779 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/itemviews/qitemeditorfactory.h')
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/itemviews/qitemeditorfactory.h b/src/widgets/itemviews/qitemeditorfactory.h
index 52a5dea25f..aff8de3a4c 100644
--- a/src/widgets/itemviews/qitemeditorfactory.h
+++ b/src/widgets/itemviews/qitemeditorfactory.h
@@ -102,16 +102,16 @@ public:
inline QItemEditorFactory() {}
virtual ~QItemEditorFactory();
- virtual QWidget *createEditor(QVariant::Type type, QWidget *parent) const;
- virtual QByteArray valuePropertyName(QVariant::Type type) const;
+ virtual QWidget *createEditor(int userType, QWidget *parent) const;
+ virtual QByteArray valuePropertyName(int userType) const;
- void registerEditor(QVariant::Type type, QItemEditorCreatorBase *creator);
+ void registerEditor(int userType, QItemEditorCreatorBase *creator);
static const QItemEditorFactory *defaultFactory();
static void setDefaultFactory(QItemEditorFactory *factory);
private:
- QHash<QVariant::Type, QItemEditorCreatorBase *> creatorMap;
+ QHash<int, QItemEditorCreatorBase *> creatorMap;
};
#endif // QT_NO_ITEMVIEWS