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 #include -#include - -class TWidgetPrivate : public QWidgetPrivate { -public: -#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) - QPlatformBackingStoreRhiConfig rhiConfig() const override { - const auto q = static_cast(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(*(new TWidgetPrivate), parent, {}) { +: TWidgetHelper(parent, {}) { [[maybe_unused]] static const auto Once = [] { auto format = QSurfaceFormat::defaultFormat(); format.setSwapInterval(0);