From 23ce4f09dfcc55888314299cb92baa77f082e309 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 1 Nov 2023 08:02:56 +0400 Subject: [PATCH] Rp{Widget,Window}NoRhi ->Rp{Widget,Window}OpenGL This is more explicit --- ui/gl/gl_window.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/gl/gl_window.cpp b/ui/gl/gl_window.cpp index 0495700..0f3fdd1 100644 --- a/ui/gl/gl_window.cpp +++ b/ui/gl/gl_window.cpp @@ -24,20 +24,20 @@ namespace { constexpr auto kUseNativeChild = false;// ::Platform::IsWindows(); -class RpWidgetNoRhi : public RpWidget { +class RpWidgetOpenGL : public RpWidget { protected: #if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) std::optional rhiConfig() const override { - return QPlatformBackingStoreRhiConfig(); + return { QPlatformBackingStoreRhiConfig::OpenGL }; } #endif // Qt >= 6.4.0 }; -class RpWindowNoRhi : public RpWindow { +class RpWindowOpenGL : public RpWindow { protected: #if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) std::optional rhiConfig() const override { - return QPlatformBackingStoreRhiConfig(); + return { QPlatformBackingStoreRhiConfig::OpenGL }; } #endif // Qt >= 6.4.0 }; @@ -79,7 +79,7 @@ not_null Window::widget() const { std::unique_ptr Window::createWindow( const Fn &chooseBackend) { - std::unique_ptr result = std::make_unique(); + std::unique_ptr result = std::make_unique(); if constexpr (!kUseNativeChild) { _backend = chooseBackend(CheckCapabilities(result.get())); if (_backend != Backend::OpenGL) { @@ -96,7 +96,7 @@ std::unique_ptr Window::createNativeBodyWrap( return nullptr; } const auto create = [] { - auto result = std::make_unique(); + auto result = std::make_unique(); result->setWindowFlags(Qt::FramelessWindowHint | Qt::Window); result->setAttribute(Qt::WA_NativeWindow); result->setAttribute(Qt::WA_DontCreateNativeAncestors);