mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-12-01 22:58:49 +03:00
Fix breaking while using qmlRegisterSingletonInstance
This commit is contained in:
parent
a27662dc08
commit
2b5deabbdc
2 changed files with 7 additions and 5 deletions
|
@ -41,9 +41,7 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
|
||||||
this->deleteLater();
|
this->deleteLater();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(this,&DeviceVerificationFlow::deleteFlow,this,[this](){
|
connect(this, &DeviceVerificationFlow::deleteFlow, this, [this]() { this->deleteLater(); });
|
||||||
this->deleteLater();
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
ChatPage::instance(),
|
ChatPage::instance(),
|
||||||
|
|
|
@ -140,8 +140,12 @@ TimelineViewManager::TimelineViewManager(QSharedPointer<UserSettings> userSettin
|
||||||
0,
|
0,
|
||||||
"UserProfileModel",
|
"UserProfileModel",
|
||||||
"UserProfile needs to be instantiated on the C++ side");
|
"UserProfile needs to be instantiated on the C++ side");
|
||||||
qmlRegisterSingletonInstance("im.nheko", 1, 0, "TimelineManager", this);
|
qmlRegisterSingletonType<TimelineViewManager>(
|
||||||
qmlRegisterSingletonInstance("im.nheko", 1, 0, "Settings", settings.data());
|
"im.nheko", 1, 0, "TimelineManager", [this](QQmlEngine *, QJSEngine *) { return this; });
|
||||||
|
qmlRegisterSingletonType<UserSettings>(
|
||||||
|
"im.nheko", 1, 0, "Settings", [this](QQmlEngine *, QJSEngine *) {
|
||||||
|
return this->settings.data();
|
||||||
|
});
|
||||||
|
|
||||||
qRegisterMetaType<mtx::events::collections::TimelineEvents>();
|
qRegisterMetaType<mtx::events::collections::TimelineEvents>();
|
||||||
qRegisterMetaType<std::vector<DeviceInfo>>();
|
qRegisterMetaType<std::vector<DeviceInfo>>();
|
||||||
|
|
Loading…
Reference in a new issue