chore: add qqsfpm::registerTypes()

Under some circumstances, auto-registration doesn't work,
call this function to ensure types are registered.
This commit is contained in:
Patryk Osmaczko 2022-07-19 17:00:52 +02:00
parent 63e64c0a93
commit 6a471f1bef
3 changed files with 21 additions and 0 deletions

View File

@ -12,6 +12,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # This is to find generated *.moc and *.h file
add_library(SortFilterProxyModel OBJECT
qqmlsortfilterproxymodel.cpp
qqmlsortfilterproxymodeltypes.cpp
filters/filter.cpp
filters/filtercontainer.cpp
filters/rolefilter.cpp

View File

@ -0,0 +1,15 @@
#include "qqmlsortfilterproxymodeltypes.h"
namespace qqsfpm {
extern void registerQQmlSortFilterProxyModelTypes();
extern void registerFiltersTypes();
extern void registerSorterTypes();
extern void registerProxyRoleTypes();
} // namespace qqsfpm
void qqsfpm::registerTypes() {
registerQQmlSortFilterProxyModelTypes();
registerFiltersTypes();
registerSorterTypes();
registerProxyRoleTypes();
}

View File

@ -0,0 +1,5 @@
#pragma once
namespace qqsfpm {
void registerTypes();
}