mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-02-10 05:13:08 +00:00
2.3 KiB
2.3 KiB
Cleanup Notes
2026-01-25
This file tracks cleanup/refactor steps taken during a “deep cleanup” pass, with the goal of reducing dead/duplicate code without changing application functionality.
Applied changes
1) Remove duplicate QML type registration in src/main.cpp
- What changed
- Removed manual
qmlRegisterSingletonType/qmlRegisterType/qmlRegisterUncreatableTypecalls for types already marked withQML_ELEMENT/QML_SINGLETON.
- Removed manual
- Why
- The project uses
ecm_add_qml_module(...)and the generated QML type registration (based onQML_ELEMENT/QML_SINGLETON) already registers these types. - Keeping both mechanisms is redundant and risks divergence.
- The project uses
- Files
src/main.cpp
2) Remove dead QML state in src/qml/SettingsPage.qml
- What changed
- Removed unused
pendingDisableImportDelegatestate. - Simplified
requestDisableImport(...)to no longer accept an unuseddelegateparameter.
- Removed unused
- Why
- The variable was assigned/cleared but never read.
- Files
src/qml/SettingsPage.qml
3) Stop shipping FocusableCard.qml in the QML module (but keep the file)
- What changed
- Removed
qml/components/FocusableCard.qmlfrom theQML_FILESlist inecm_add_qml_module(...).
- Removed
- Why
- The component is not referenced anywhere in QML currently.
- We want to keep the implementation around because it may be useful later (e.g. Desktop/Couch mode), but avoid shipping unused module contents.
- Files
src/CMakeLists.txt- Note:
src/qml/components/FocusableCard.qmlstill exists in the repository.
Verification performed
- Built successfully:
cmake --build build-debug
- Quick run smoke test:
- Launches without QML type registration errors.
- Only the existing Kirigami
StackView has detected conflicting anchorswarning was observed.
Intentional non-changes (paused items)
- Do not delete
src/qml/components/FocusableCard.qmlyet. - Do not remove or migrate any persisted
Configsettings or public QML API fields yet.
How to revert / resume later
- To re-ship
FocusableCard.qml:- Add it back to
ecm_add_qml_module(... QML_FILES ...)insrc/CMakeLists.txt.
- Add it back to
- To fully remove it:
git rm src/qml/components/FocusableCard.qml(only after confirming it is not needed for future UI modes).