vcl/Library_vclplug_qt5.mk        |    1 
 vcl/Library_vclplug_qt6.mk        |    1 
 vcl/inc/qt5/QtData.hxx            |   41 --------------------------------------
 vcl/inc/qt5/QtInstance.hxx        |    3 ++
 vcl/inc/qt6/QtData.hxx            |   12 -----------
 vcl/inc/unx/salinst.h             |    2 -
 vcl/qt5/QtData.cxx                |   41 --------------------------------------
 vcl/qt5/QtFrame.cxx               |    3 --
 vcl/qt5/QtGraphics.cxx            |    4 +--
 vcl/qt5/QtInstance.cxx            |   20 ++++++++++++++----
 vcl/qt5/QtInstanceDrawingArea.cxx |    1 
 vcl/qt5/QtSvpGraphics.cxx         |    4 +--
 vcl/qt6/QtData.cxx                |   12 -----------
 vcl/unx/kf5/KFSalInstance.cxx     |    2 -
 14 files changed, 24 insertions(+), 123 deletions(-)

New commits:
commit 8343a04db4e3ae9a6ebacf55cdff7d1623be90a8
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Feb 25 23:21:20 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Feb 27 08:20:53 2026 +0100

    vcl: Drop now unused X11SalInstance::SetLib
    
    Unused after
    
        Change-Id: Iec3ca05a3b39e10cdd8c01d8c363c2676811e75e
        Author: Michael Weghorn <[email protected]>
        Date:   Wed Feb 25 14:25:27 2026 +0100
    
            vcl: Rework/Unify how SalData is set/unset
    
    Change-Id: I165468e12bf2286237332f18e52edaa3445af737
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200372
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index 9431ec6d86c5..71bfec19b79e 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -78,8 +78,6 @@ public:
     virtual bool                AnyInput( VclInputFlags nType ) override;
     virtual bool                IsMainThread() const override { return true; }
 
-    void                        SetLib( SalXLib *pXLib ) { mpXLib = pXLib; }
-
     virtual void                AfterAppInit() override;
 
     // dtrans implementation
commit 49bf76427a11cef70314414365bebc1cee8a62d7
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Feb 25 16:20:16 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Feb 27 08:20:41 2026 +0100

    qt: Move remaining QtData logic to QtInstance, drop QtData
    
    Evaluating these 2 environment variables to detect
    whether or not Qt theming/native widgets should be
    used isn't related to what the GenericUnixSalData
    base class does. Move the 2 methods to
    QtInstance instead. Drop the QtData class
    and use the plain GenericUnixSalData instead.
    
    Change-Id: Ifc621333098d6282ffbf286b5d7ae48e924b3d29
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200348
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index f8b173eb80e6..708dfff67fab 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -86,7 +86,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
     vcl/qt5/QtBuilder \
     vcl/qt5/QtClipboard \
     vcl/qt5/QtCustomStyle \
-    vcl/qt5/QtData \
     vcl/qt5/QtDoubleSpinBox \
     vcl/qt5/QtDragAndDrop \
     vcl/qt5/QtExpander \
diff --git a/vcl/Library_vclplug_qt6.mk b/vcl/Library_vclplug_qt6.mk
index 52afca3ddb07..aa301c453db2 100644
--- a/vcl/Library_vclplug_qt6.mk
+++ b/vcl/Library_vclplug_qt6.mk
@@ -85,7 +85,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt6,\
     vcl/qt6/QtBuilder \
     vcl/qt6/QtClipboard \
     vcl/qt6/QtCustomStyle \
-    vcl/qt6/QtData \
     vcl/qt6/QtDoubleSpinBox \
     vcl/qt6/QtDragAndDrop \
     vcl/qt6/QtExpander \
diff --git a/vcl/inc/qt5/QtData.hxx b/vcl/inc/qt5/QtData.hxx
deleted file mode 100644
index 44404b2b7c09..000000000000
--- a/vcl/inc/qt5/QtData.hxx
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include <unx/gendata.hxx>
-
-#include <vclpluginapi.h>
-
-class QCursor;
-
-class VCLPLUG_QT_PUBLIC QtData final : public GenericUnixSalData
-{
-public:
-    explicit QtData();
-    virtual ~QtData() override;
-
-    static bool noNativeControls();
-
-    static bool noWeldedWidgets();
-};
-
-inline QtData* GetQtData() { return static_cast<QtData*>(GetSalData()); }
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/qt5/QtInstance.hxx b/vcl/inc/qt5/QtInstance.hxx
index 081c55d77c88..1a688be5c3ef 100644
--- a/vcl/inc/qt5/QtInstance.hxx
+++ b/vcl/inc/qt5/QtInstance.hxx
@@ -246,6 +246,9 @@ public:
 
     QtFrame* activePopup() const { return m_pActivePopup; }
     void setActivePopup(QtFrame*);
+
+    static bool noNativeControls();
+    static bool noWeldedWidgets();
 };
 
 inline QtInstance& GetQtInstance()
diff --git a/vcl/inc/qt6/QtData.hxx b/vcl/inc/qt6/QtData.hxx
deleted file mode 100644
index 0569f41b2999..000000000000
--- a/vcl/inc/qt6/QtData.hxx
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include "../qt5/QtData.hxx"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/qt5/QtData.cxx b/vcl/qt5/QtData.cxx
deleted file mode 100644
index 3a05b38625e1..000000000000
--- a/vcl/qt5/QtData.cxx
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <QtData.hxx>
-
-QtData::QtData()
-    : GenericUnixSalData()
-{
-}
-
-// outline dtor b/c of FreetypeManager incomplete type
-QtData::~QtData() {}
-
-bool QtData::noNativeControls()
-{
-    static const bool bNoNative = (getenv("SAL_VCL_QT_NO_NATIVE") != nullptr);
-    return bNoNative;
-}
-
-bool QtData::noWeldedWidgets()
-{
-    static const bool bNoWeldedWidgets = 
(getenv("SAL_VCL_QT_NO_WELDED_WIDGETS") != nullptr);
-    return bNoWeldedWidgets;
-}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 7c87daff9c33..b4aadc53a493 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -21,7 +21,6 @@
 #include <QtFrame.hxx>
 #include <QtFrame.moc>
 
-#include <QtData.hxx>
 #include <QtDragAndDrop.hxx>
 #include <QtGraphics.hxx>
 #include <QtInstance.hxx>
@@ -1000,7 +999,7 @@ void QtFrame::UpdateSettings(AllSettings& rSettings)
 {
     SolarMutexGuard g;
     GetQtInstance().RunInMainThread([&] {
-        if (QtData::noNativeControls())
+        if (QtInstance::noNativeControls())
             return;
         QtCustomStyle::LoadCustomStyle(GetUseDarkMode());
 
diff --git a/vcl/qt5/QtGraphics.cxx b/vcl/qt5/QtGraphics.cxx
index 5922df18f866..edc4317e23eb 100644
--- a/vcl/qt5/QtGraphics.cxx
+++ b/vcl/qt5/QtGraphics.cxx
@@ -19,10 +19,10 @@
 
 #include <QtGraphics.hxx>
 
-#include <QtData.hxx>
 #include <QtFont.hxx>
 #include <QtFrame.hxx>
 #include <QtGraphics_Controls.hxx>
+#include <QtInstance.hxx>
 #include <QtPainter.hxx>
 
 #include <QtGui/QImage>
@@ -39,7 +39,7 @@ QtGraphics::QtGraphics( QtFrame *pFrame, QImage *pQImage )
 
     if (!initWidgetDrawBackends(false))
     {
-        if (!QtData::noNativeControls())
+        if (!QtInstance::noNativeControls())
             m_pWidgetDraw.reset(new QtGraphics_Controls(*this));
     }
     if (m_pFrame)
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 6afddbc06685..8f47df7e8e09 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -26,7 +26,6 @@
 #include <QtAccessibleInterimChildWidget.hxx>
 #include <QtBitmap.hxx>
 #include <QtClipboard.hxx>
-#include <QtData.hxx>
 #include <QtDragAndDrop.hxx>
 #include <QtFilePicker.hxx>
 #include <QtFrame.hxx>
@@ -44,6 +43,7 @@
 
 #include <headless/svpvd.hxx>
 #include <salvtables.hxx>
+#include <unx/gendata.hxx>
 
 #include <QtCore/QAbstractEventDispatcher>
 #include <QtCore/QLibraryInfo>
@@ -268,7 +268,7 @@ OUString QtInstance::constructToolkitID(std::u16string_view 
sTKname)
 }
 
 QtInstance::QtInstance(std::unique_ptr<QApplication>& pQApp)
-    : SalGenericInstance(std::make_unique<QtYieldMutex>(), new QtData)
+    : SalGenericInstance(std::make_unique<QtYieldMutex>(), new 
GenericUnixSalData)
     , m_bUseCairo(nullptr == getenv("SAL_VCL_QT_USE_QFONT"))
     , m_pTimer(nullptr)
     , m_bSleeping(false)
@@ -908,6 +908,18 @@ void QtInstance::setActivePopup(QtFrame* pFrame)
     m_pActivePopup = pFrame;
 }
 
+bool QtInstance::noNativeControls()
+{
+    static const bool bNoNative = (getenv("SAL_VCL_QT_NO_NATIVE") != nullptr);
+    return bNoNative;
+}
+
+bool QtInstance::noWeldedWidgets()
+{
+    static const bool bNoWeldedWidgets = 
(getenv("SAL_VCL_QT_NO_WELDED_WIDGETS") != nullptr);
+    return bNoWeldedWidgets;
+}
+
 QWidget* QtInstance::GetNativeParentFromWeldParent(weld::Widget* pParent)
 {
     if (!pParent)
@@ -934,7 +946,7 @@ QtInstance::CreateBuilder(weld::Widget* pParent, const 
OUString& rUIRoot, const
 {
     // for now, require explicitly enabling use of QtInstanceBuilder via 
SAL_VCL_QT_USE_WELDED_WIDGETS
     static const bool bUseWeldedWidgets = 
(getenv("SAL_VCL_QT_USE_WELDED_WIDGETS") != nullptr);
-    if (bUseWeldedWidgets && !QtData::noWeldedWidgets()
+    if (bUseWeldedWidgets && !QtInstance::noWeldedWidgets()
         && QtInstanceBuilder::IsUIFileSupported(rUIFile, pParent))
     {
         QWidget* pQtParent = GetNativeParentFromWeldParent(pParent);
@@ -992,7 +1004,7 @@ weld::MessageDialog* 
QtInstance::CreateMessageDialog(weld::Widget* pParent,
         return pDialog;
     }
 
-    if (QtData::noWeldedWidgets())
+    if (QtInstance::noWeldedWidgets())
     {
         return SalInstance::CreateMessageDialog(pParent, eMessageType, 
eButtonsType,
                                                 rPrimaryMessage);
diff --git a/vcl/qt5/QtInstanceDrawingArea.cxx 
b/vcl/qt5/QtInstanceDrawingArea.cxx
index c7db3c83de81..343ac58dbae2 100644
--- a/vcl/qt5/QtInstanceDrawingArea.cxx
+++ b/vcl/qt5/QtInstanceDrawingArea.cxx
@@ -11,7 +11,6 @@
 #include <QtInstanceDrawingArea.moc>
 
 #include <QtAccessibleWidget.hxx>
-#include <QtData.hxx>
 
 #include <vcl/qt/QtUtils.hxx>
 
diff --git a/vcl/qt5/QtSvpGraphics.cxx b/vcl/qt5/QtSvpGraphics.cxx
index f0538fd3f89e..ae8eae249e9b 100644
--- a/vcl/qt5/QtSvpGraphics.cxx
+++ b/vcl/qt5/QtSvpGraphics.cxx
@@ -11,9 +11,9 @@
 
 #include <config_cairo_canvas.h>
 
-#include <QtData.hxx>
 #include <QtFrame.hxx>
 #include <QtGraphics_Controls.hxx>
+#include <QtInstance.hxx>
 #include <QtSvpGraphics.hxx>
 #include <QtSvpSurface.hxx>
 #include <QtTools.hxx>
@@ -23,7 +23,7 @@
 QtSvpGraphics::QtSvpGraphics(QtFrame* pFrame)
     : m_pFrame(pFrame)
 {
-    if (!QtData::noNativeControls())
+    if (!QtInstance::noNativeControls())
         m_pWidgetDraw.reset(new QtGraphics_Controls(*this));
     if (m_pFrame)
         setDevicePixelRatioF(m_pFrame->devicePixelRatioF());
diff --git a/vcl/qt6/QtData.cxx b/vcl/qt6/QtData.cxx
deleted file mode 100644
index fcac0ad44be4..000000000000
--- a/vcl/qt6/QtData.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include "../qt5/QtData.cxx"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/unx/kf5/KFSalInstance.cxx b/vcl/unx/kf5/KFSalInstance.cxx
index a52e48abbaa5..8f9f8d46aafd 100644
--- a/vcl/unx/kf5/KFSalInstance.cxx
+++ b/vcl/unx/kf5/KFSalInstance.cxx
@@ -27,8 +27,6 @@
 
 #include <sal/log.hxx>
 
-#include <QtData.hxx>
-
 #include "KFFilePicker.hxx"
 #include "KFSalInstance.hxx"
 

Reply via email to