Code re-organization
Another idea to put under discussion, that came to my mind while working on code coverage.
Right now, when building tests some object files are rebuild(ie. moc generated from headers). I believe that it adds unnecessary complexity(and dependencies into .pro files). From what I've found the Qt way of dealing with unit-testing is to create static library, which is then linked into unit-testing(or main) app. Using this method there is no need to add object files to compilation when adding new unit-tests.
I think that we can further split repository like this:
QtPass/
- main/ # just main function as it can't be in shared lib
- ui/ # ui files, to loosen the dependencies and ease GUI unit-testing
- backend/ # everything else
- localization/
- tests/
- headers/ # headers common for main/ui/backend
# as few as possible
What are your thoughts?
This sounds very nice . . I like the separation of concerns idea a lot!
I think today it's a good idea to separate backend from ui and translate all to QML. I'm working on cleanup up MainWindow code and a first implementation of QML.
https://github.com/UnitooTeam/QtPass here you can see the branch QML. I'm working on QML interface, i divided with a compilation flag the old one MainWindow and the new one. I'll try to divide the business logic from gui so we can choose which ui during compilation
I have to say I love the QML idea and wish I had more time to play with it . . Thanks @FiloSpaTeam
I will do it later C++ cleanup/refactor. We need a better business logic separation first :+1:
I created a QtPass class handler to connect MainWindow to Pass singleton. Now i'm trying to cleanup things to separate better business logic from gui :+1: