diff --git a/.travis.yml b/.travis.yml index eec3229..49c6eb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,21 +63,21 @@ matrix: env: - CXX=g++-8 - CC=gcc-8 - - QT_PKG=59 + - QT_PKG=510 addons: apt: sources: - ubuntu-toolchain-r-test - - sourceline: 'ppa:beineri/opt-qt597-xenial' + - sourceline: 'ppa:beineri/opt-qt-5.10.1-xenial' packages: - g++-8 - ninja-build - - qt59base - - qt59tools - - qt59svg - - qt59multimedia - - qt59quickcontrols2 - - qt59graphicaleffects + - qt510base + - qt510tools + - qt510svg + - qt510multimedia + - qt510quickcontrols2 + - qt510graphicaleffects - liblmdb-dev - libgl1-mesa-dev # needed for missing gl.h - os: linux @@ -85,23 +85,23 @@ matrix: env: - CXX=clang++-6.0 - CC=clang-6.0 - - QT_PKG=59 + - QT_PKG=510 addons: apt: sources: - ubuntu-toolchain-r-test - llvm-toolchain-xenial-6.0 - - sourceline: 'ppa:beineri/opt-qt597-xenial' + - sourceline: 'ppa:beineri/opt-qt-5.10.1-xenial' packages: - clang++-6.0 - g++-7 - ninja-build - - qt59base - - qt59tools - - qt59svg - - qt59multimedia - - qt59quickcontrols2 - - qt59graphicaleffects + - qt510base + - qt510tools + - qt510svg + - qt510multimedia + - qt510quickcontrols2 + - qt510graphicaleffects - liblmdb-dev - libgl1-mesa-dev # needed for missing gl.h - os: linux diff --git a/CMakeLists.txt b/CMakeLists.txt index 4348e81..2f83a86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,9 +142,9 @@ if (APPLE) endif(APPLE) if (Qt5Widgets_FOUND) - if (Qt5Widgets_VERSION VERSION_LESS 5.9.0) + if (Qt5Widgets_VERSION VERSION_LESS 5.10.0) message(STATUS "Qt version ${Qt5Widgets_VERSION}") - message(WARNING "Minimum supported Qt5 version is 5.9!") + message(WARNING "Minimum supported Qt5 version is 5.10!") endif() endif(Qt5Widgets_FOUND) diff --git a/README.md b/README.md index 2d24165..92b5546 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ sudo pacman -S qt5-base \ ##### Gentoo Linux ```bash -sudo emerge -a ">=dev-qt/qtgui-5.9.0" media-libs/fontconfig +sudo emerge -a ">=dev-qt/qtgui-5.10.0" media-libs/fontconfig ``` ##### Ubuntu 20.04 diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index 1815117..b11c496 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -125,11 +125,13 @@ TimelineViewManager::TimelineViewManager(QSharedPointer userSettin 0, "UserProfileModel", "UserProfile needs to be instantiated on the C++ side"); + + static auto self = this; qmlRegisterSingletonType( - "im.nheko", 1, 0, "TimelineManager", [this](QQmlEngine *, QJSEngine *) { return this; }); + "im.nheko", 1, 0, "TimelineManager", [](QQmlEngine *, QJSEngine *) { return self; }); qmlRegisterSingletonType( - "im.nheko", 1, 0, "Settings", [this](QQmlEngine *, QJSEngine *) { - return this->settings.data(); + "im.nheko", 1, 0, "Settings", [](QQmlEngine *, QJSEngine *) { + return self->settings.data(); }); qRegisterMetaType(); @@ -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; } }