summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-10-08 17:26:07 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-10-08 17:26:07 +0200
commit08d5a84cbdbb8937dbe4d43817e01d8ae00760cc (patch)
treeb5a84553a6004cebfd922522166ff844577501a4 /src/timeline
parentMerge remote-tracking branch 'origin/master' into cross-signing (diff)
downloadnheko-08d5a84cbdbb8937dbe4d43817e01d8ae00760cc.tar.xz
Fix issues with old qt and bump to 5.10
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/TimelineViewManager.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp

index 18151173..b11c4965 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp
@@ -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; } }