[Libreoffice-commits] core.git: vcl/inc vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Aug 10 07:47:47 UTC 2018
vcl/inc/qt5/Qt5Data.hxx | 2 ++
vcl/inc/qt5/Qt5Graphics.hxx | 3 +++
vcl/qt5/Qt5Data.cxx | 9 +++++++++
vcl/qt5/Qt5Frame.cxx | 3 +++
4 files changed, 17 insertions(+)
New commits:
commit e7a9e653027407a0cb2bb6dd88241f809a3929d9
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Thu Aug 9 14:45:49 2018 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Fri Aug 10 09:47:19 2018 +0200
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 at fbihome.de>
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
More information about the Libreoffice-commits
mailing list