summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/qt5/Qt5Data.hxx2
-rw-r--r--vcl/inc/qt5/Qt5Graphics.hxx3
-rw-r--r--vcl/qt5/Qt5Data.cxx9
-rw-r--r--vcl/qt5/Qt5Frame.cxx3
4 files changed, 17 insertions, 0 deletions
diff --git a/vcl/inc/qt5/Qt5Data.hxx b/vcl/inc/qt5/Qt5Data.hxx
index 631e66f31f3a..ef537d0c040f 100644
--- a/vcl/inc/qt5/Qt5Data.hxx
+++ b/vcl/inc/qt5/Qt5Data.hxx
@@ -40,6 +40,8 @@ public:
virtual bool ErrorTrapPop(bool bIgnoreError = true) override;
QCursor& getCursor(PointerStyle ePointerStyle);
+
+ static bool noNativeControls();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/qt5/Qt5Graphics.hxx b/vcl/inc/qt5/Qt5Graphics.hxx
index 4a9ff20c137d..88382a0c11f3 100644
--- a/vcl/inc/qt5/Qt5Graphics.hxx
+++ b/vcl/inc/qt5/Qt5Graphics.hxx
@@ -27,6 +27,7 @@
#include <QtGui/QPainterPath>
#include <QtGui/QRegion>
+#include "Qt5Data.hxx"
#include "Qt5Graphics_Controls.hxx"
class PhysicalFontCollection;
@@ -216,6 +217,8 @@ public:
inline bool Qt5Graphics::IsNativeControlSupported(ControlType nType, ControlPart nPart)
{
+ if (Qt5Data::noNativeControls())
+ return false;
return m_aControl.IsNativeControlSupported(nType, nPart);
}
diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx
index 1d1d3ece1de7..9a2117f91a55 100644
--- a/vcl/qt5/Qt5Data.cxx
+++ b/vcl/qt5/Qt5Data.cxx
@@ -309,4 +309,13 @@ void Qt5Data::ErrorTrapPush() {}
bool Qt5Data::ErrorTrapPop(bool /*bIgnoreError*/) { return false; }
+bool Qt5Data::noNativeControls()
+{
+ static const bool bNoNative
+ = ((nullptr != getenv("SAL_VCL_QT5_NO_NATIVE")) && (nullptr != ImplGetSVData())
+ && (nullptr != ImplGetSVData()->maAppData.mpToolkitName)
+ && ImplGetSVData()->maAppData.mpToolkitName->match("qt5"));
+ return bNoNative;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 86854c9b3fd8..1a66799d2548 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -483,6 +483,9 @@ static Color toColor(const QColor& rColor)
void Qt5Frame::UpdateSettings(AllSettings& rSettings)
{
+ if (Qt5Data::noNativeControls())
+ return;
+
StyleSettings style(rSettings.GetStyleSettings());
// General settings