-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Settings registry qep124 #42239
Closed
Closed
Settings registry qep124 #42239
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello @elpaso and @nyalldawson , could you please take a look at this new proposed solution and let me know your thoughts? Thank you! |
gentle ping @nyalldawson and @elpaso |
This means, someone still cares. We will still need to take care of manually removing the "feedback" label
shape out into a new class so that it can be reused elsewhere
…rpendicular direction by a set offset amount
Renders a nice cartographically pleasing curved line between the labels and features. Options include selecting a specific curve orientation (clockwise or counterclockwise), or an automatic orientation option which determines optimal orientation for each individual label. Users also have control over the amount of curvature applied to the callout lines.
- Remove extra indentation of code blocks that made copy'n'pasting ugly - Probably fixed in indentation bug for `~/.config/QtProject/qtlogging.ini` - Some homogenization of code markup, didn't look through all parts of the document though - Turn inline comments into actual `#` comments - In Server part: - Use "example.com" for example domains - Be more explicite about paths - I also tried to fix some formatting markup
long long vs int
QMatrix is dead
for QTextStream and QSettings
QgsAbstractRelationEditorWidget need to update/insert the referenced layer field also when an nm relation is used. This was not the case for addFeature and linkFeature methods.
Replace deprecated QgsCodeEditor setMarginVisible() with setLineNumbersVisible() for SQL dialog windows
The compile flag prevents the Qt plugins from being loaded in the debug build. The flag is automatically set by the Qt cmake module for release builds.
show a combo box for the default date choice instead of a free-form date widget This makes it easier for users to pick a valid default date for the layer, corresponding to a value where data actually exists...
QgsMapToolExtent Otherwise plugins have no way to remove this from the canvas
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
Unfortunately QgsVectorFileWriter::writeAsVectorFormatV2 is missing SIP_OUT arguments necessary to get the desired output arguments, and it's not possible to add these now without breaking existing PyQGIS code. Solution = v3!
Sorry I screwed up my git branch and opened a new clean pr here: #42597 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As of Enhancement proposal #124 and as followup to closed pr #41830 the goals of this pull request are to make the usage of settings less prone to errors.
In this proposed solution a new class QgsSettingsEntry is introduced. One instance will correspond to a single settings entry (or key) in QSettings.
The idea is to declare settings by subclassing QgsSettingsEntry in the class of appartenance of the settings like this for QgsLayout.h:
and used like this:
QgsLayout::Settings::SearchPathForTemplates().setValue( QStringList() << "/path1" << "/path2" );
The declaration will be shortened with a macro:
For settings with a dynamic key a placeholder can be inserted in the key:
and can be accessed providing the dynamic part of the key as argument:
QgsLocator::Settings::LocatorFilterEnabled().setValue( it.value(), filter->name() );
The settings registry in this solution would be needed only for introspection and it is simply implemented as a list of QgsSettingsEntry instances. Each module or plugin would have his own registry and add the settings to the main registry on load/startup.
This approach is more flexible as the one proposed in pr #41830 as it permit to keep the key and section as they are now. No migration will be needed as result of this work. Nonetheless it addresses all the issues exposed in the QEP.