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)