Kaydet (Commit) e7a9e653 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

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: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst 3e52c651
......@@ -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: */
......@@ -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);
}
......
......@@ -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: */
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment