From df56f95128c03a35a02b06144a6a8e3679e5cc8f Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 19 Apr 2023 16:31:13 +0200 Subject: [PATCH] QmlDesigner: Fix build for Qt < 6.5 Change-Id: I943b42e3536a2705dfcee5620e84ea5ddf4fc828 Reviewed-by: Tim Jenssen Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- .../qmldesigner/designercore/projectstorage/modulescanner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/projectstorage/modulescanner.cpp b/src/plugins/qmldesigner/designercore/projectstorage/modulescanner.cpp index f2c248182df..f6c0f2449c1 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/modulescanner.cpp +++ b/src/plugins/qmldesigner/designercore/projectstorage/modulescanner.cpp @@ -15,6 +15,7 @@ namespace QmlDesigner { namespace { +#ifdef QDS_HAS_QMLPRIVATE std::optional contentAsQString(const QString &filePath) { QFile file{filePath}; @@ -24,7 +25,6 @@ std::optional contentAsQString(const QString &filePath) return {}; } -#ifdef QDS_HAS_QMLPRIVATE QString createVersion(const QMultiHash &components) { auto found = std::max_element(components.begin(), components.end(), [](auto &&first, auto &&second) { @@ -46,7 +46,7 @@ void ModuleScanner::scan(const QStringList &modulePaths) scan(modulePath.toStdString()); } -void ModuleScanner::scan(std::string_view modulePath) +void ModuleScanner::scan([[maybe_unused]] std::string_view modulePath) { #ifdef QDS_HAS_QMLPRIVATE try {