diff options
Diffstat (limited to 'net-im/telegram-desktop/files')
-rw-r--r-- | net-im/telegram-desktop/files/tdesktop-4.8.4-remove-private-qt.patch | 50 | ||||
-rw-r--r-- | net-im/telegram-desktop/files/tdesktop-4.8.4-system-cppgir.patch (renamed from net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch) | 10 |
2 files changed, 55 insertions, 5 deletions
diff --git a/net-im/telegram-desktop/files/tdesktop-4.8.4-remove-private-qt.patch b/net-im/telegram-desktop/files/tdesktop-4.8.4-remove-private-qt.patch new file mode 100644 index 000000000000..3dcf17662564 --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-4.8.4-remove-private-qt.patch @@ -0,0 +1,50 @@ +Remove uses of private Qt classes + +Currently, this is used to fix compatibility with odd environments, and only +for Qt6. This causes more trouble than it's worth, because it means telegram +must be rebuilt with every minor Qt bump. + +https://bugs.gentoo.org/908500 + +--- tdesktop-4.8.4-full.orig/Telegram/lib_ui/ui/rp_widget.cpp ++++ tdesktop-4.8.4-full/Telegram/lib_ui/ui/rp_widget.cpp +@@ -12,38 +12,9 @@ + + #include <QtGui/QWindow> + #include <QtGui/QtEvents> +-#include <private/qwidget_p.h> +- +-class TWidgetPrivate : public QWidgetPrivate { +-public: +-#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) +- QPlatformBackingStoreRhiConfig rhiConfig() const override { +- const auto q = static_cast<TWidget*>(q_ptr); +- if (!q->testAttribute(Qt::WA_WState_Created)) { +- return QWidgetPrivate::rhiConfig(); +- } +- if (const auto config = q->rhiConfig()) { +- return *config; +- } +- if (::Platform::IsMac10_14OrGreater()) { +- return { QPlatformBackingStoreRhiConfig::Metal }; +- } +- // We can't specify the widget here as q_evaluateRhiConfig is called +- // in QWidgetWindow constructor, while windowHandle is set right after +- // the constructor is completed +- if (::Platform::IsWayland() // old versions of mutter produce flicker without OpenGL +- && Ui::GL::ChooseBackendDefault( +- Ui::GL::CheckCapabilities(nullptr)) +- == Ui::GL::Backend::OpenGL) { +- return { QPlatformBackingStoreRhiConfig::OpenGL }; +- } +- return QWidgetPrivate::rhiConfig(); +- } +-#endif // Qt >= 6.4.0 +-}; + + TWidget::TWidget(QWidget *parent) +-: TWidgetHelper<QWidget>(*(new TWidgetPrivate), parent, {}) { ++: TWidgetHelper<QWidget>(parent, {}) { + [[maybe_unused]] static const auto Once = [] { + auto format = QSurfaceFormat::defaultFormat(); + format.setSwapInterval(0); diff --git a/net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch b/net-im/telegram-desktop/files/tdesktop-4.8.4-system-cppgir.patch index 54c79b3e5a0c..d8bd00aae907 100644 --- a/net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch +++ b/net-im/telegram-desktop/files/tdesktop-4.8.4-system-cppgir.patch @@ -1,7 +1,7 @@ Use system cppgir ---- tdesktop-4.8.3-full.orig/cmake/external/glib/CMakeLists.txt -+++ tdesktop-4.8.3-full/cmake/external/glib/CMakeLists.txt +--- tdesktop-4.8.4-full.orig/cmake/external/glib/CMakeLists.txt ++++ tdesktop-4.8.4-full/cmake/external/glib/CMakeLists.txt @@ -7,14 +7,6 @@ add_library(external_glib INTERFACE IMPORTED GLOBAL) add_library(desktop-app::external_glib ALIAS external_glib) @@ -10,15 +10,15 @@ Use system cppgir - set(BUILD_TESTING OFF) - set(BUILD_DOC OFF) - set(CMAKE_DISABLE_FIND_PACKAGE_Qt5Core ON) -- add_subdirectory(cppgir) +- add_subdirectory(cppgir EXCLUDE_FROM_ALL) -endfunction() -add_cppgir() - include(generate_cppgir.cmake) generate_cppgir(external_glib Gio-2.0) ---- tdesktop-4.8.3-full.orig/cmake/external/glib/generate_cppgir.cmake -+++ tdesktop-4.8.3-full/cmake/external/glib/generate_cppgir.cmake +--- tdesktop-4.8.4-full.orig/cmake/external/glib/generate_cppgir.cmake ++++ tdesktop-4.8.4-full/cmake/external/glib/generate_cppgir.cmake @@ -4,6 +4,8 @@ # For license and copyright information please follow this link: # https://github.com/desktop-app/legal/blob/master/LEGAL |