-
Notifications
You must be signed in to change notification settings - Fork 75
QGIS Auth db import #4249
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: master
Are you sure you want to change the base?
QGIS Auth db import #4249
Conversation
tomasMizera
left a comment
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.
The exercise with the new AuthSync class is now feeling a bit too much - it's basically just calling the import method 🙃 I suggest we get rid of it altogether. In addition to that, the PR:
- is missing autotests
- missed project reload in case the auth file is changed
- missed to reset auth entries before loading the auth db
Good job with the ossl linking fix.
core/merginapi.cpp
Outdated
| ProjectDiff diff = transaction.diff; | ||
| int newVersion = syncSuccessful ? transaction.version : -1; | ||
|
|
||
| // TODO check if the xml configuration has been changed |
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.
TODO?
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 tried to only modify the xml configuration file from QGIS. Upon syncing, it was already detected by that function, which emitted a force reload of the project. So I don't think we should specifically check for the cfg modification at all.
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.
Check this video.
8c4755a to
2281cca
Compare
|
Some ideas for testing:
|
Pull Request Test Coverage Report for Build 21581403561Details
💛 - Coveralls |
|
Windows build is failing because of the QCA_OSSL_PLUGIN lookup |
📦 Build Artifacts Ready
|
📦 Build Artifacts Ready
|
Withalion
left a comment
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.
The loading of QGIS auth DB didn't work on Windows. Same project worked on Android.
Changed logic in auth sync
Added unit tests to handle the import of configuration file
9697596 to
fe5119e
Compare
📦 Build Artifacts Ready
|
Upgraded qca version for windows functionality Removed unnecessary lines of code in main
|
I upgraded the QCA version, and the authentication worked on Windows as well. |
📦 Build Artifacts Ready
|
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.
Looks good. Please adjust the unit test so that it includes at least one happy-case scenario though - success import of auth data, but not directly via auth manager API (like now), rather through activeProject.load() so it tests your new code.
| QString projectName = QStringLiteral( "auth-test.qgz" ); | ||
| QString authFile = QDir( projectDir ).filePath( AUTH_CONFIG_FILENAME ); | ||
|
|
||
| QgsApplication::initQgis(); |
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.
Why do we need to explicitly initQgis here?
|
Off topic: We should try to build the app with cmake 4.0+ now, last time QCA was the thing not letting us build it |
I think you could create a ticket for it to be in the backlog 😉 |
📦 Build Artifacts Ready
|
Ready for review.
Added Auth sync class that handles the importation of authentication database configuration file.