nheko: rebuild for qt6-6.11.1
This commit is contained in:
@@ -9,3 +9,146 @@
|
||||
find_package(Qt6DBus)
|
||||
|
||||
if(USE_BUNDLED_QTKEYCHAIN)
|
||||
From 93ce60d6f14679ab9f34edec166e9ad1884d3edd Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Werner <nicolas.werner@hotmail.de>
|
||||
Date: Fri, 26 Dec 2025 18:34:30 +0100
|
||||
Subject: [PATCH] Qt 6.10 compat
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 +++-
|
||||
src/MxcImageProvider.cpp | 6 ++----
|
||||
src/timeline/RoomlistModel.cpp | 8 ++++++++
|
||||
src/timeline/RoomlistModel.h | 8 ++++++++
|
||||
src/timeline/TimelineFilter.cpp | 15 +++++++++++++++
|
||||
5 files changed, 36 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3476f51ae..3fdae58fa 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -712,7 +712,9 @@ set_target_properties(nheko
|
||||
#
|
||||
# Add qml files
|
||||
#
|
||||
-
|
||||
+if(QT_KNOWN_POLICY_QTP0004)
|
||||
+ qt_policy(SET QTP0004 NEW)
|
||||
+endif()
|
||||
set(QML_SOURCES
|
||||
resources/qml/Root.qml
|
||||
resources/qml/ChatPage.qml
|
||||
diff --git a/src/MxcImageProvider.cpp b/src/MxcImageProvider.cpp
|
||||
index d4dd2f16f..ba4c4dd0f 100644
|
||||
--- a/src/MxcImageProvider.cpp
|
||||
+++ b/src/MxcImageProvider.cpp
|
||||
@@ -299,12 +299,10 @@ MxcImageProvider::download(const QString &id,
|
||||
"/media_cache",
|
||||
fileName);
|
||||
QDir().mkpath(fileInfo.absolutePath());
|
||||
+ QFile f(fileInfo.absoluteFilePath());
|
||||
|
||||
- if (fileInfo.exists()) {
|
||||
+ if (fileInfo.exists() && f.open(QIODevice::ReadOnly)) {
|
||||
if (encryptionInfo) {
|
||||
- QFile f(fileInfo.absoluteFilePath());
|
||||
- f.open(QIODevice::ReadOnly);
|
||||
-
|
||||
QByteArray fileData = f.readAll();
|
||||
auto tempData = mtx::crypto::to_string(
|
||||
mtx::crypto::decrypt_file(fileData.toStdString(), encryptionInfo.value()));
|
||||
diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp
|
||||
index 823ffe20f..ce2a8f846 100644
|
||||
--- a/src/timeline/RoomlistModel.cpp
|
||||
+++ b/src/timeline/RoomlistModel.cpp
|
||||
@@ -977,6 +977,10 @@ FilteredRoomlistModel::getRoomById(const QString &id) const
|
||||
void
|
||||
FilteredRoomlistModel::updateHiddenTagsAndSpaces()
|
||||
{
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||
+ beginFilterChange();
|
||||
+#endif
|
||||
+
|
||||
hiddenTags.clear();
|
||||
hiddenSpaces.clear();
|
||||
hideDMs = false;
|
||||
@@ -991,7 +995,11 @@ FilteredRoomlistModel::updateHiddenTagsAndSpaces()
|
||||
hideDMs = true;
|
||||
}
|
||||
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
|
||||
+ endFilterChange();
|
||||
+#else
|
||||
invalidateFilter();
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool
|
||||
diff --git a/src/timeline/RoomlistModel.h b/src/timeline/RoomlistModel.h
|
||||
index c3f485ef4..7dfeb707f 100644
|
||||
--- a/src/timeline/RoomlistModel.h
|
||||
+++ b/src/timeline/RoomlistModel.h
|
||||
@@ -212,6 +212,10 @@ public slots:
|
||||
|
||||
void updateFilterTag(QString tagId)
|
||||
{
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
|
||||
+ beginFilterChange();
|
||||
+#endif
|
||||
+
|
||||
if (tagId.startsWith(QLatin1String("tag:"))) {
|
||||
filterType = FilterBy::Tag;
|
||||
filterStr = tagId.mid(4);
|
||||
@@ -227,7 +231,11 @@ public slots:
|
||||
filterStr.clear();
|
||||
}
|
||||
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
|
||||
+ endFilterChange();
|
||||
+#else
|
||||
invalidateFilter();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void updateHiddenTagsAndSpaces();
|
||||
diff --git a/src/timeline/TimelineFilter.cpp b/src/timeline/TimelineFilter.cpp
|
||||
index 8e323ff61..b9e93859c 100644
|
||||
--- a/src/timeline/TimelineFilter.cpp
|
||||
+++ b/src/timeline/TimelineFilter.cpp
|
||||
@@ -41,7 +41,13 @@ TimelineFilter::startFiltering()
|
||||
{
|
||||
incrementalSearchIndex = 0;
|
||||
emit isFilteringChanged();
|
||||
+
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
|
||||
+ endFilterChange();
|
||||
+#else
|
||||
invalidateFilter();
|
||||
+#endif
|
||||
+
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
|
||||
@@ -181,6 +187,10 @@ void
|
||||
TimelineFilter::setSource(TimelineModel *s)
|
||||
{
|
||||
if (auto orig = this->source(); orig != s) {
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
|
||||
+ beginFilterChange();
|
||||
+#endif
|
||||
+
|
||||
cachedCount = 0;
|
||||
incrementalSearchIndex = 0;
|
||||
|
||||
@@ -215,7 +225,12 @@ TimelineFilter::setSource(TimelineModel *s)
|
||||
|
||||
emit sourceChanged();
|
||||
emit isFilteringChanged();
|
||||
+
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
|
||||
+ endFilterChange();
|
||||
+#else
|
||||
invalidateFilter();
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Template file for 'nheko'
|
||||
pkgname=nheko
|
||||
version=0.12.1
|
||||
revision=4
|
||||
revision=5
|
||||
build_style=cmake
|
||||
hostmakedepends="qt6-base qt6-tools qt6-declarative-host-tools pkg-config asciidoc"
|
||||
makedepends="qt6-multimedia-devel qt6-svg-devel qt6-declarative-private-devel fmt-devel
|
||||
@@ -17,6 +17,9 @@ changelog="https://raw.githubusercontent.com/Nheko-Reborn/nheko/master/CHANGELOG
|
||||
distfiles="https://github.com/Nheko-Reborn/nheko/archive/v${version}.tar.gz"
|
||||
checksum=81cc613ee2420b1289c9cc7aeee81cae69a153971fd3112225e48d1c7b224ea5
|
||||
|
||||
# needs a biiig stacc
|
||||
LDFLAGS="-Wl,-z,stack-size=0x200000"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv*-musl)
|
||||
makedepends+=" libunwind-devel"
|
||||
|
||||
Reference in New Issue
Block a user