Skip to content

refactor(gui/search): build as a proper QML module - #10360

Merged
mgallien merged 1 commit into
masterfrom
feature/noid/searchdialog-qml-module
Jul 17, 2026
Merged

refactor(gui/search): build as a proper QML module#10360
mgallien merged 1 commit into
masterfrom
feature/noid/searchdialog-qml-module

Conversation

@nilsding

@nilsding nilsding commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

Inspired by #9005, but with just one module at a time.

This change allows for immediate feedback during build if any QML file is broken, e.g. a missing closing brace will now fail the build with the following error message:

Error compiling qml file: /home/jyrki/src/nextcloud/desktop/src/gui/search/UnifiedSearchResultListItem.qml:75:1: error: Expected token `}'

This should also resolve any issues we had in the past with the local QML cache being outdated but still used, as the QML scenes are precompiled at the build time instead of at the runtime.

The QML files need to be in the same subdirectory as the module as per https://doc.qt.io/qt-6/qt-add-qml-module.html#adding-sources-and-resources-to-the-module; otherwise the build fails with Error: [...]build/src/gui/search/meta_types/qt6nextcloudguisearch_metatypes.json:: Failed to parse JSON: 5 illegal value, apparently due to some limitations with CMake (https://qt-project.atlassian.net/browse/QTBUG-122702)

Checklist

AI (if applicable)

@nilsding nilsding added this to the 35.0.0 milestone Jul 13, 2026
@nilsding nilsding self-assigned this Jul 13, 2026
@nilsding

Copy link
Copy Markdown
Member Author

/backport to stable-34.0 please

@nilsding
nilsding force-pushed the feature/noid/searchdialog-qml-module branch 3 times, most recently from d139163 to b7c271b Compare July 15, 2026 08:56

@claucambra claucambra left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@mgallien
mgallien enabled auto-merge July 17, 2026 07:19
the QML files need to be in the same subdirectory as the module as per
https://doc.qt.io/qt-6/qt-add-qml-module.html#adding-sources-and-resources-to-the-module

otherwise cmake is unhappy and fails in a similar way to https://qt-project.atlassian.net/browse/QTBUG-122702
with `Error: [...]build/src/gui/search/meta_types/qt6nextcloudguisearch_metatypes.json:: Failed to parse JSON: 5 illegal value`

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
@mgallien
mgallien force-pushed the feature/noid/searchdialog-qml-module branch from b7c271b to d5b617d Compare July 17, 2026 07:19
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10360.zip

Digest: sha256:6e429ebaf754af506b7fe9732ff6abf8d432bfe9ba65e631a108edde5e594b0e

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Maintainability Rating on New Code (required ≥ A)
19 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

@mgallien
mgallien merged commit 098d681 into master Jul 17, 2026
21 of 23 checks passed
@mgallien
mgallien deleted the feature/noid/searchdialog-qml-module branch July 17, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants