summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml32
-rw-r--r--CMakeLists.txt4
-rw-r--r--README.md2
-rw-r--r--src/timeline/TimelineViewManager.cpp12
4 files changed, 26 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml
index eec32290..49c6eb17 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 4348e819..2f83a865 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 2d24165c..92b55460 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 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;
                 }
         }