From 167b9e712ff38da16db1380af60dfa273372ea6a Mon Sep 17 00:00:00 2001 From: Julien Cabieces Date: Thu, 7 May 2020 10:43:30 +0200 Subject: [PATCH] Fixes #36191 : remove qrichtext meta from expression description html --- src/gui/qgsexpressionstoredialog.cpp | 7 +++++++ src/gui/qgsexpressionstoredialog.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/qgsexpressionstoredialog.cpp b/src/gui/qgsexpressionstoredialog.cpp index c87d70bd03f2..36f496e47d4a 100644 --- a/src/gui/qgsexpressionstoredialog.cpp +++ b/src/gui/qgsexpressionstoredialog.cpp @@ -59,3 +59,10 @@ QgsExpressionStoreDialog::QgsExpressionStoreDialog( const QString &label, const mLabel->setText( labelFixed ); } +QString QgsExpressionStoreDialog::helpText() +{ + // remove meta qrichtext instruction from html. It fails rendering + // when mixing with other html content + // see issue https://github.com/qgis/QGIS/issues/36191 + return mHelpText->toHtml().replace( "", QString() ); +} diff --git a/src/gui/qgsexpressionstoredialog.h b/src/gui/qgsexpressionstoredialog.h index 811087c8f257..1c0ca1bd1139 100644 --- a/src/gui/qgsexpressionstoredialog.h +++ b/src/gui/qgsexpressionstoredialog.h @@ -55,7 +55,7 @@ class GUI_EXPORT QgsExpressionStoreDialog : public QDialog, private Ui::QgsExpre /** * Returns the help text */ - QString helpText() { return mHelpText->toHtml(); } + QString helpText(); private: