mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Fix issues with old qt and bump to 5.10
This commit is contained in:
parent
99ba1f17d3
commit
08d5a84cbd
4 changed files with 26 additions and 24 deletions
32
.travis.yml
32
.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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue