vcl/README.vars.md | 4 ++-- vcl/qt5/QtData.cxx | 5 +---- vcl/qt5/QtGraphics_Text.cxx | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-)
New commits: commit 792b6fec15099242ad93e0b6a341c02035f049fe Author: Michael Weghorn <[email protected]> AuthorDate: Sun Dec 24 00:18:40 2023 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Sun Dec 24 10:16:29 2023 +0100 qt: Rename SAL_VCL_{QT5 -> QT}_NO_NATIVE Similar to Change-Id: I01b427648ef14f918cc692b30c80a7427455324f Author: Michael Weghorn <[email protected]> Date: Sun Dec 24 00:13:25 2023 +0100 qt: Rename SAL_VCL_QT5_NO_NATIVE and use for all Qt-based VCLs , drop the version name in the env var to evaluate to decide whether to use fontconfig or not, since there's no reason this should only apply for qt5-based VCLs and not qt6-based ones. (Other than for the above-mentioned commit, the env variable would already be evaluated for all Qt-based VCL plugins, not just the qt5 one.) Change-Id: I2e239bf78916c37133f3992f49bb5dfa385c5801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161263 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/README.vars.md b/vcl/README.vars.md index 72fa32cd8ae5..5d16941aaa6b 100644 --- a/vcl/README.vars.md +++ b/vcl/README.vars.md @@ -65,7 +65,7 @@ will be used to write the log under `instdir/uitest/`. ## Qt * `QT_SCALE_FACTOR=2` - for HiDPI testing (also supports float) -* `SAL_VCL_QT5_NO_FONTCONFIG` - ignore fontconfig provided font substitutions +* `SAL_VCL_QT_NO_FONTCONFIG` - ignore fontconfig provided font substitutions * `SAL_VCL_QT_NO_NATIVE` - disable `QStyle`'d controls * `SAL_VCL_QT_USE_QFONT` - use `QFont` for text layout and rendering (default is to use cairo) diff --git a/vcl/qt5/QtGraphics_Text.cxx b/vcl/qt5/QtGraphics_Text.cxx index 19837d510f13..55613a625a3b 100644 --- a/vcl/qt5/QtGraphics_Text.cxx +++ b/vcl/qt5/QtGraphics_Text.cxx @@ -85,7 +85,7 @@ bool QtGraphics::GetFontCapabilities(vcl::FontCapabilities& rFontCapabilities) c void QtGraphics::GetDevFontList(vcl::font::PhysicalFontCollection* pPFC) { - static const bool bUseFontconfig = (nullptr == getenv("SAL_VCL_QT5_NO_FONTCONFIG")); + static const bool bUseFontconfig = (nullptr == getenv("SAL_VCL_QT_NO_FONTCONFIG")); if (pPFC->Count()) return; commit 0b3e088d4888307c0beb3d4e670560e45459f4b2 Author: Michael Weghorn <[email protected]> AuthorDate: Sun Dec 24 00:13:25 2023 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Sun Dec 24 10:16:21 2023 +0100 qt: Rename SAL_VCL_QT5_NO_NATIVE and use for all Qt-based VCLs Instead of evaluating a `SAL_VCL_QT5_NO_NATIVE` environment variable to determine whether to disable drawing of widgets using the `QStyle`, evaluate `SAL_VCL_QT_NO_NATIVE` (i.e. without a Qt version number in the name), and do this for all Qt-based VCL plugins (qt5, qt6, kf5, kf6), not only qt5. I don't see a reason why this should be qt5-specific. Change-Id: I01b427648ef14f918cc692b30c80a7427455324f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161262 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/README.vars.md b/vcl/README.vars.md index 92931b51f170..72fa32cd8ae5 100644 --- a/vcl/README.vars.md +++ b/vcl/README.vars.md @@ -66,7 +66,7 @@ will be used to write the log under `instdir/uitest/`. * `QT_SCALE_FACTOR=2` - for HiDPI testing (also supports float) * `SAL_VCL_QT5_NO_FONTCONFIG` - ignore fontconfig provided font substitutions -* `SAL_VCL_QT5_NO_NATIVE` - disable `QStyle`'d controls +* `SAL_VCL_QT_NO_NATIVE` - disable `QStyle`'d controls * `SAL_VCL_QT_USE_QFONT` - use `QFont` for text layout and rendering (default is to use cairo) ## Mac diff --git a/vcl/qt5/QtData.cxx b/vcl/qt5/QtData.cxx index cc2883ae80ca..2df26d05481e 100644 --- a/vcl/qt5/QtData.cxx +++ b/vcl/qt5/QtData.cxx @@ -217,10 +217,7 @@ bool QtData::ErrorTrapPop(bool /*bIgnoreError*/) { return false; } bool QtData::noNativeControls() { - static const bool bNoNative - = ((nullptr != getenv("SAL_VCL_QT5_NO_NATIVE")) && (nullptr != ImplGetSVData()) - && ImplGetSVData()->maAppData.mxToolkitName - && ImplGetSVData()->maAppData.mxToolkitName->match("qt5")); + static const bool bNoNative = (getenv("SAL_VCL_QT_NO_NATIVE") != nullptr); return bNoNative; }
