QtPass icon indicating copy to clipboard operation
QtPass copied to clipboard

Code re-organization

Open tezeb opened this issue 8 years ago • 6 comments

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?

tezeb avatar Mar 12 '17 21:03 tezeb

This sounds very nice . . I like the separation of concerns idea a lot!

annejan avatar Mar 13 '17 09:03 annejan

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.

FiloSpaTeam avatar Apr 18 '18 08:04 FiloSpaTeam

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

FiloSpaTeam avatar Apr 19 '18 14:04 FiloSpaTeam

I have to say I love the QML idea and wish I had more time to play with it . . Thanks @FiloSpaTeam

annejan avatar Jun 13 '18 13:06 annejan

I will do it later C++ cleanup/refactor. We need a better business logic separation first :+1:

FiloSpaTeam avatar Jun 13 '18 14:06 FiloSpaTeam

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:

FiloSpaTeam avatar Jul 05 '18 22:07 FiloSpaTeam