telegram-desktop: fix build with Qt 6.9
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
diff --git a/Telegram/SourceFiles/media/view/media_view_pip.cpp b/Telegram/SourceFiles/media/view/media_view_pip.cpp
|
||||
index 4e1d7c136..7c8f95888 100644
|
||||
--- a/Telegram/SourceFiles/media/view/media_view_pip.cpp
|
||||
+++ b/Telegram/SourceFiles/media/view/media_view_pip.cpp
|
||||
@@ -362,6 +362,10 @@ void PipPanel::init() {
|
||||
) | rpl::filter(rpl::mappers::_1) | rpl::start_with_next([=] {
|
||||
// Workaround Qt's forced transient parent.
|
||||
Ui::Platform::ClearTransientParent(widget());
|
||||
+ }, rp()->lifetime());
|
||||
+
|
||||
+ rp()->shownValue(
|
||||
+ ) | rpl::filter(rpl::mappers::_1) | rpl::start_with_next([=] {
|
||||
Ui::Platform::SetWindowMargins(widget(), _padding);
|
||||
}, rp()->lifetime());
|
||||
|
||||
Submodule Telegram/lib_base contains modified content
|
||||
diff --git a/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp b/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
|
||||
index 8aca67c..6b781fb 100644
|
||||
--- a/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
|
||||
+++ b/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
|
||||
@@ -16,7 +16,11 @@
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
#include <qpa/qplatformintegration.h>
|
||||
#include <private/qguiapplication_p.h>
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||
+#include <private/qdesktopunixservices_p.h>
|
||||
+#else // Qt >= 6.9.0
|
||||
#include <private/qgenericunixservices_p.h>
|
||||
+#endif // Qt < 6.9.0
|
||||
#endif // Qt >= 6.5.0
|
||||
|
||||
#include <sstream>
|
||||
@@ -39,7 +43,10 @@ std::string ParentWindowID(QWindow *window) {
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
- if (const auto services = dynamic_cast<QGenericUnixServices*>(
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||
+ using QDesktopUnixServices = QGenericUnixServices;
|
||||
+#endif // Qt < 6.9.0
|
||||
+ if (const auto services = dynamic_cast<QDesktopUnixServices*>(
|
||||
QGuiApplicationPrivate::platformIntegration()->services())) {
|
||||
return services->portalWindowIdentifier(window).toStdString();
|
||||
}
|
||||
+8
@@ -56,6 +56,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-E9d5jWw4HeCO4sqDB0tXXgxM91kg1Gixi9B0xZQYe14=";
|
||||
};
|
||||
|
||||
# Combined backport to fix Qt 6.9 issues:
|
||||
# - https://github.com/telegramdesktop/tdesktop/commit/8b92ab25c776899c5432bf935447cac6f0b3ea2d
|
||||
# - https://github.com/telegramdesktop/tdesktop/commit/c261c3367a11eeef69e6e346d339706dc4f00406
|
||||
# FIXME: remove in next update
|
||||
patches = [
|
||||
./qt-6.9.patch
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp \
|
||||
--replace-fail '"libasound.so.2"' '"${lib.getLib alsa-lib}/lib/libasound.so.2"'
|
||||
|
||||
Reference in New Issue
Block a user