From ac87cfdf263d2abd97b32857534d0f749b7c4479 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 6 Oct 2019 09:17:48 +0200 Subject: Replace SystemEnvData pToolkit/pPlatformName strings with enums (and streamline those data members' names) Change-Id: Ifdd596c7a54dd507045d412c30b463468c2f798b Reviewed-on: https://gerrit.libreoffice.org/80313 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vcl/qt5/Qt5Frame.cxx | 6 +++--- vcl/qt5/Qt5Instance.cxx | 3 +-- vcl/qt5/Qt5Object.cxx | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'vcl/qt5') diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 01e501ab1ba4..7803a7ebd4eb 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -187,11 +187,11 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) //m_aSystemData.pSalFrame = this; m_aSystemData.pWidget = m_pQWidget; //m_aSystemData.nScreen = m_nXScreen.getXScreen(); - m_aSystemData.pToolkit = "qt5"; + m_aSystemData.toolkit = SystemEnvData::Toolkit::Qt5; if (!bWayland) - m_aSystemData.pPlatformName = "xcb"; + m_aSystemData.platform = SystemEnvData::Platform::Xcb; else - m_aSystemData.pPlatformName = "wayland"; + m_aSystemData.platform = SystemEnvData::Platform::Wayland; SetIcon(SV_ICON_ID_OFFICE); } diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index 129eb8e5c221..eae41ad9a2bd 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -515,8 +515,7 @@ void* Qt5Instance::CreateGStreamerSink(const SystemChildWindow* pWindow) if (!pEnvData) return nullptr; - OUString aPlatform = OUString::createFromAscii(pEnvData->pPlatformName); - if (aPlatform != "wayland") + if (pEnvData->platform != SystemEnvData::Platform::Wayland) return nullptr; GstElement* pVideosink = pSymbol("qwidget5videosink", "qwidget5videosink"); diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx index 4deffda7d18e..5bbfef5a5870 100644 --- a/vcl/qt5/Qt5Object.cxx +++ b/vcl/qt5/Qt5Object.cxx @@ -45,17 +45,17 @@ Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow) //m_aSystemData.pSalFrame = this; m_aSystemData.pWidget = m_pQWidget; //m_aSystemData.nScreen = m_nXScreen.getXScreen(); - m_aSystemData.pToolkit = "qt5"; - m_aSystemData.pPlatformName = "xcb"; + m_aSystemData.toolkit = SystemEnvData::Toolkit::Qt5; + m_aSystemData.platform = SystemEnvData::Platform::Xcb; const bool bWayland = QGuiApplication::platformName() == "wayland"; if (!bWayland) { - m_aSystemData.pPlatformName = "xcb"; + m_aSystemData.platform = SystemEnvData::Platform::Xcb; m_aSystemData.aWindow = m_pQWindow->winId(); // ID of the embedded window } else { - m_aSystemData.pPlatformName = "wayland"; + m_aSystemData.platform = SystemEnvData::Platform::Wayland; // TODO implement as needed for Wayland, // s.a. commit c0d4f3ad3307c which did this for gtk3 // QPlatformNativeInterface* native = QGuiApplication::platformNativeInterface(); -- cgit