Skip to content

Commit 896c9c2

Browse files
committed
Use qmlProtectModule to speed up loading a bit.
1 parent d56bd88 commit 896c9c2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gel.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@
88

99
namespace com { namespace cutehacks { namespace gel {
1010

11+
static const char* GEL_URI = "com.cutehacks.gel";
12+
1113
void registerEngine(QQmlEngine *)
1214
{
1315
// deprecated and done autmatically below
1416
}
1517

1618
static void registerTypes()
1719
{
18-
qmlRegisterType<JsonListModel>("com.cutehacks.gel", 1, 0, "JsonListModel");
19-
qmlRegisterType<Collection>("com.cutehacks.gel", 1, 0, "Collection");
20+
qmlRegisterType<JsonListModel>(GEL_URI, 1, 0, "JsonListModel");
21+
qmlRegisterType<Collection>(GEL_URI, 1, 0, "Collection");
22+
qmlProtectModule(GEL_URI, 1);
2023
}
2124

2225
Q_COREAPP_STARTUP_FUNCTION(registerTypes)

0 commit comments

Comments
 (0)