- 
                Notifications
    You must be signed in to change notification settings 
- Fork 94
cxx-qt-build: improve support for qmlls qmllint #1343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
cxx-qt-build: improve support for qmlls qmllint #1343
Conversation
| Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff            @@
##              main     #1343   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           75        75           
  Lines        13038     13082   +44     
=========================================
+ Hits         13038     13082   +44     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
481be2d    to
    d131194      
    Compare
  
    d131194    to
    b96068e      
    Compare
  
    It becomes confused about the QQuickPaintedItem parent that is not exposed through to .qmltypes
b96068e    to
    cc86524      
    Compare
  
    | // TODO: clean the old module target | ||
| // however if there is a sub uri this cleans that too | ||
| // so we should only remove files and not sub folders? | ||
| // dir::clean(dir::module_target(&qml_uri)) | ||
| // .expect("Failed to clean qml module export directory!"); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we now produce a/b/qmldir etc if we also had a sub qml module of a/b/c/qmldir that is removed by the clean of the other module, so we would only remove the files from within the export directory and not any sub folders?
| MESSAGE(STATUS "qmllint not found. Please install it") | ||
| else() | ||
| file(GLOB QMLLINT_QML_FILES ${CMAKE_CURRENT_SOURCE_DIR}/qml/**/*.qml) | ||
| add_test(NAME example_qml_features_qmllint_check COMMAND ${QMLLINT_COMMAND} --max-warnings 0 -I ${CMAKE_CURRENT_BINARY_DIR}/cxxqt/qml_modules ${QMLLINT_QML_FILES}) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be disabled for Qt 5 as the qmllint tool doesn't have --max-warnings as we only likely want to support Qt 6 for linting and language server anyway...
| QmlModule::new("com.kdab.cxx_qt.demo") | ||
| .qml_files([ | ||
| "../qml/main.qml", | ||
| "../qml/pages/ContainersPage.qml", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these files potentially end up being specified wrong in the qmldir?
Warning: 9:1: ../qml/pages/InvokablesPage.qml is listed as component in /home/runner/work/cxx-qt/cxx-qt/build/examples/qml_features/cxxqt/qml_modules/com/kdab/cxx_qt/demo/qmldir but does not exist.
And we might need to copy them into the resultant qml module folder like CMake does.
Related to #975