static build: remove unused code.

This commit is contained in:
Mentalflow 2024-03-06 20:54:41 +08:00
parent 2ae2e2509a
commit bbca8bfa5a
No known key found for this signature in database
GPG Key ID: 5AE68D4401A2EE71

View File

@ -27,7 +27,6 @@ void FluentUI::registerTypes(QQmlEngine *engine){
void FluentUI::registerTypes(const char *uri){ void FluentUI::registerTypes(const char *uri){
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0)) #if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
Q_INIT_RESOURCE(fluentui); Q_INIT_RESOURCE(fluentui);
#endif
qmlRegisterType<FluWindowLifecycle>(uri,major,minor,"FluWindowLifecycle"); qmlRegisterType<FluWindowLifecycle>(uri,major,minor,"FluWindowLifecycle");
qmlRegisterType<FluQrCodeItem>(uri,major,minor,"FluQrCodeItem"); qmlRegisterType<FluQrCodeItem>(uri,major,minor,"FluQrCodeItem");
qmlRegisterType<FluCaptcha>(uri,major,minor,"FluCaptcha"); qmlRegisterType<FluCaptcha>(uri,major,minor,"FluCaptcha");
@ -145,6 +144,7 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterUncreatableMetaObject(FluNetworkType::staticMetaObject, uri,major,minor,"FluNetworkType", "Access to enums & flags only"); qmlRegisterUncreatableMetaObject(FluNetworkType::staticMetaObject, uri,major,minor,"FluNetworkType", "Access to enums & flags only");
qmlRegisterModule(uri,major,minor); qmlRegisterModule(uri,major,minor);
#endif
} }
void FluentUI::initializeEngine(QQmlEngine *engine, const char *uri){ void FluentUI::initializeEngine(QQmlEngine *engine, const char *uri){
@ -167,5 +167,4 @@ void FluentUI::initializeEngine(QQmlEngine *engine, const char *uri){
engine->rootContext()->setContextProperty("FluEventBus",eventBus); engine->rootContext()->setContextProperty("FluEventBus",eventBus);
FluNetwork* network = FluNetwork::getInstance(); FluNetwork* network = FluNetwork::getInstance();
engine->rootContext()->setContextProperty("FluNetwork",network); engine->rootContext()->setContextProperty("FluNetwork",network);
engine->addImportPath("qrc:/qt/qml");
} }