summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-08-09 14:45:49 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-08-10 09:47:19 +0200
commite7a9e653027407a0cb2bb6dd88241f809a3929d9 (patch)
tree88ca855c77b3e66475d2ecbdbbe69f0ff460f4e7 /vcl
parent3e52c6512e8f00c7f1481a09b50c9c8d5ac1aca5 (diff)
Qt5 disable native draw via SAL_VCL_QT5_NO_NATIVE
Primary as a debugging measure to compare output for Qt5Graphics. Checks mpToolkitName, so we just disable it for qt5 not kde5. Change-Id: Ib7a67c4bec16d81dd87b6351ba106f655d37948b Reviewed-on: https://gerrit.libreoffice.org/58790 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl')
-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