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);