-
Notifications
You must be signed in to change notification settings - Fork 72
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
Refactor of DbImporters/Changes in DB access #207
base: master
Are you sure you want to change the base?
Conversation
app/medInria/medBrowserArea.cpp
Outdated
QList<medDataIndex> indexes = medDatabaseNonPersistentController::instance()->availableItems(); | ||
QList<medDataIndex> patients = medDatabaseController::instance()->patients(); | ||
if (indexes.isEmpty() && patients.isEmpty()) | ||
if (medDataManager::instance()->empty(medDataManager::AllDatabases)) |
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.
I would prefer isEmpty() to empty(), one is clearly a boolean test whereas the other sounds like an action (a call to it will "empty" the database rather than test for emptiness)
I just noticed you renamed |
4c80d99
to
8285a0b
Compare
Seems to be a good refactor of the DB. But i have some troubleshooting while loading some plugins (some methods of some class are not implemented anymore I guess) Anyway, it doesn't fix any bug or improve something for a user point of view, so I think it would be safer to look for merge this one after the next release. ;) |
Forget what I said, It's just a matter of rebase on the master. |
Should this be in 3.0? Clear milestone if not |
Med logger back in app
Removed derived importers : Database and NonPersistent. We now only have one importer class, preliminarily named medImporter.
Changed how we import data : controllers are no longer responsible for the creation of the importer, and are instead passed as an argument. Importer doesn't take ownership as the controllers are singletons.
All access to the DB should (in theory) go via the DataManager now. There are a few remaining cases where this isn't true, but I want to analyse how to handle them first.
Please give feedback - I'm aware the medImporter file is now massively bloated, and some further code cleanup can/should be done, but from an architectural perspective we've cut out some unnecessary problems and reduced coupling in the database handling.