Fix qmlRegisterType crash

This fixes #7
This commit is contained in:
oKcerG 2016-09-07 23:25:13 +02:00
parent 9ad7a0a53c
commit 45d16933c3

View File

@ -247,11 +247,9 @@ QVariantMap QQmlSortFilterProxyModel::modelDataMap(const QModelIndex& modelIndex
return map;
}
struct QQmlSortFilterProxyModelRegisterHelper {
QQmlSortFilterProxyModelRegisterHelper() {
qmlRegisterType<QAbstractItemModel>();
qmlRegisterType<QQmlSortFilterProxyModel>("SortFilterProxyModel", 0, 1, "SortFilterProxyModel");
}
};
void registerQQmlSortFilterProxyModelTypes() {
qmlRegisterType<QAbstractItemModel>();
qmlRegisterType<QQmlSortFilterProxyModel>("SortFilterProxyModel", 0, 1, "SortFilterProxyModel");
}
static QQmlSortFilterProxyModelRegisterHelper registerHelper;
Q_COREAPP_STARTUP_FUNCTION(registerQQmlSortFilterProxyModelTypes)