From 90cdcb86ea7da0d46379fb7db6170ea173714d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D0=B8?= =?UTF-8?q?=D0=BD=20=D0=9C=D0=B0=D0=BA=D0=B0=D1=80=D0=B5=D0=BD=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2?= Date: Fri, 18 Apr 2025 10:47:42 +0300 Subject: [PATCH] Fixed warnings --- limereport/items/lrtextitem.cpp | 12 ++++++------ limereport/lrdatasourcemanager.cpp | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index 1134d32..5a20ef3 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -365,15 +365,15 @@ void TextItem::updateLayout() bool TextItem::isNeedExpandContent() const { -#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) - QRegExp rx("$*\\{[^{]*\\}"); -#else bool result = false; - QRegularExpression rx("\\$*\\{[^{]*\\}"); + const QString pattern = "\\$*\\{[^{]*\\}"; +#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) + QRegExp rx(pattern); +#else + QRegularExpression rx(pattern); +#endif result = content().contains(rx) || isContentBackedUp(); return result; -#endif - return content().contains(rx) || isContentBackedUp(); } QString TextItem::replaceBR(QString text) const { return text.replace("
", "\n"); } diff --git a/limereport/lrdatasourcemanager.cpp b/limereport/lrdatasourcemanager.cpp index eb07c01..d3472ab 100644 --- a/limereport/lrdatasourcemanager.cpp +++ b/limereport/lrdatasourcemanager.cpp @@ -489,7 +489,6 @@ QString DataSourceManager::replaceVariables(QString value) } return value; #endif - return QString(); } QString DataSourceManager::replaceVariables(QString query, QMap& aliasesToParam)