Fix issues with old qt and bump to 5.10

This commit is contained in:
Nicolas Werner 2020-10-08 17:26:07 +02:00
parent 99ba1f17d3
commit 08d5a84cbd
4 changed files with 26 additions and 24 deletions

View file

@ -125,11 +125,13 @@ TimelineViewManager::TimelineViewManager(QSharedPointer<UserSettings> userSettin
0,
"UserProfileModel",
"UserProfile needs to be instantiated on the C++ side");
static auto self = this;
qmlRegisterSingletonType<TimelineViewManager>(
"im.nheko", 1, 0, "TimelineManager", [this](QQmlEngine *, QJSEngine *) { return this; });
"im.nheko", 1, 0, "TimelineManager", [](QQmlEngine *, QJSEngine *) { return self; });
qmlRegisterSingletonType<UserSettings>(
"im.nheko", 1, 0, "Settings", [this](QQmlEngine *, QJSEngine *) {
return this->settings.data();
"im.nheko", 1, 0, "Settings", [](QQmlEngine *, QJSEngine *) {
return self->settings.data();
});
qRegisterMetaType<mtx::events::collections::TimelineEvents>();
@ -413,8 +415,8 @@ void
TimelineViewManager::removeVerificationFlow(DeviceVerificationFlow *flow)
{
for (auto it = dvList.keyValueBegin(); it != dvList.keyValueEnd(); ++it) {
if (it->second == flow) {
dvList.remove(it->first);
if ((*it).second == flow) {
dvList.remove((*it).first);
return;
}
}