summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--im.nheko.Nheko.yaml2
-rw-r--r--resources/qml/device-verification/EmojiVerification.qml2
-rw-r--r--resources/qml/dialogs/RoomSettingsDialog.qml1
-rw-r--r--src/FallbackAuth.cpp4
-rw-r--r--src/ReCaptcha.cpp4
-rw-r--r--src/Utils.cpp8
-rw-r--r--src/timeline/InputBar.cpp4
-rw-r--r--src/timeline/TimelineModel.cpp12
9 files changed, 22 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt

index 99fb2ab1..f4dc639e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -604,7 +604,7 @@ if(USE_BUNDLED_MTXCLIENT) FetchContent_Declare( MatrixClient GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git - GIT_TAG 4fb7d678aeea197d16b52bfb1dc35b506673bb52 + GIT_TAG 58af2030c22e2dae7d6156c70572714c6363acee ) set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "") set(BUILD_LIB_TESTS OFF CACHE INTERNAL "") diff --git a/im.nheko.Nheko.yaml b/im.nheko.Nheko.yaml
index ad879e7a..cead580f 100644 --- a/im.nheko.Nheko.yaml +++ b/im.nheko.Nheko.yaml
@@ -223,7 +223,7 @@ modules: buildsystem: cmake-ninja name: mtxclient sources: - - commit: 4fb7d678aeea197d16b52bfb1dc35b506673bb52 + - commit: 58af2030c22e2dae7d6156c70572714c6363acee #tag: v0.9.2 type: git url: https://github.com/Nheko-Reborn/mtxclient.git diff --git a/resources/qml/device-verification/EmojiVerification.qml b/resources/qml/device-verification/EmojiVerification.qml
index 0ee279cd..a8abd740 100644 --- a/resources/qml/device-verification/EmojiVerification.qml +++ b/resources/qml/device-verification/EmojiVerification.qml
@@ -13,7 +13,7 @@ ColumnLayout { spacing: 16 Label { - Layout.preferredWidth: 400 + Layout.preferredWidth: scroll.availableWidth Layout.fillWidth: true wrapMode: Text.Wrap text: qsTr("Please verify the following emoji. You should see the same emoji on both sides. If they differ, please press 'They do not match!' to abort verification!") diff --git a/resources/qml/dialogs/RoomSettingsDialog.qml b/resources/qml/dialogs/RoomSettingsDialog.qml
index b435e55b..941d4f90 100644 --- a/resources/qml/dialogs/RoomSettingsDialog.qml +++ b/resources/qml/dialogs/RoomSettingsDialog.qml
@@ -20,6 +20,7 @@ ApplicationWindow { minimumHeight: 450 width: 450 height: 680 + Layout.preferredWidth: scroll.availableWidth color: palette.window modality: Qt.NonModal flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint diff --git a/src/FallbackAuth.cpp b/src/FallbackAuth.cpp
index dc16b7cb..d5f8c861 100644 --- a/src/FallbackAuth.cpp +++ b/src/FallbackAuth.cpp
@@ -19,8 +19,8 @@ FallbackAuth::FallbackAuth(const QString &session, const QString &authType, QObj void FallbackAuth::openFallbackAuth() { - const auto url = QString("https://%1:%2/_matrix/client/r0/auth/%4/" - "fallback/web?session=%3") + const auto url = QStringLiteral("https://%1:%2/_matrix/client/r0/auth/%4/" + "fallback/web?session=%3") .arg(QString::fromStdString(http::client()->server())) .arg(http::client()->port()) .arg(m_session, m_authType); diff --git a/src/ReCaptcha.cpp b/src/ReCaptcha.cpp
index a1d0c56f..9a89bb4d 100644 --- a/src/ReCaptcha.cpp +++ b/src/ReCaptcha.cpp
@@ -19,8 +19,8 @@ ReCaptcha::ReCaptcha(const QString &session, const QString &context, QObject *pa void ReCaptcha::openReCaptcha() { - const auto url = QString("https://%1:%2/_matrix/client/r0/auth/m.login.recaptcha/" - "fallback/web?session=%3") + const auto url = QStringLiteral("https://%1:%2/_matrix/client/r0/auth/m.login.recaptcha/" + "fallback/web?session=%3") .arg(QString::fromStdString(http::client()->server())) .arg(http::client()->port()) .arg(m_session); diff --git a/src/Utils.cpp b/src/Utils.cpp
index 498bad9a..b4d45472 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp
@@ -1110,10 +1110,10 @@ utils::getFormattedQuoteBody(const RelatedInfo &related, const QString &html) } } }; - return QString("<mx-reply><blockquote><a " - "href=\"https://matrix.to/#/%1/%2\">In reply " - "to</a> <a href=\"https://matrix.to/#/%3\">%4</a><br" - "/>%5</blockquote></mx-reply>") + return QStringLiteral("<mx-reply><blockquote><a " + "href=\"https://matrix.to/#/%1/%2\">In reply " + "to</a> <a href=\"https://matrix.to/#/%3\">%4</a><br" + "/>%5</blockquote></mx-reply>") .arg(related.room, QString::fromStdString(related.related_event), related.quoted_user, diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index e0dfe9b9..1636bcd1 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp
@@ -75,7 +75,7 @@ MediaUpload::thumbnailDataUrl() const buffer.open(QIODevice::WriteOnly); thumbnail_.save(&buffer, "PNG"); QString base64 = QString::fromUtf8(byteArray.toBase64()); - return QString("data:image/png;base64,") + base64; + return QStringLiteral("data:image/png;base64,") + base64; } bool @@ -241,7 +241,7 @@ InputBar::updateTextContentProperties(const QString &t, bool charDeleted) } } - auto roomMention = containsRoomMention(t); + auto roomMention = containsRoomMention(t) && this->room->permissions()->canPingRoom(); if (roomMention != this->containsAtRoom_) { if (roomMention) diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index b41d1e0c..03606d90 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1162,12 +1162,12 @@ TimelineModel::syncState(const mtx::responses::State &s) void TimelineModel::addEvents(const mtx::responses::Timeline &timeline) { - if (timeline.events.empty()) - return; - if (timeline.limited) setPaginationInProgress(false); + if (timeline.events.empty()) + return; + events.handleSync(timeline); using namespace mtx::events; @@ -2034,7 +2034,11 @@ TimelineModel::copyMedia(const QString &eventId) const clipContents->setImageData(img); } - QGuiApplication::clipboard()->setMimeData(clipContents); + // Qt uses COM for clipboard management on windows and our HTTP threads do not + // initialize it, so run in the event loop + QTimer::singleShot(0, ChatPage::instance(), [clipContents] { + QGuiApplication::clipboard()->setMimeData(clipContents); + }); return; } catch (const std::exception &e) {