Skip to content
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

More work on settings editor #59006

Closed
wants to merge 4 commits into from
Closed

More work on settings editor #59006

wants to merge 4 commits into from

Conversation

3nids
Copy link
Member

@3nids 3nids commented Oct 8, 2024

  • move QgsSettingsEditorWidgetWrapper to core
  • allow to specify a specific editor for a setting
  • fix crash with use of PyQgsSettingsEntryEnumFlag in settings tree widget
  • Python implementation of enum settings editor widget wrapper (df21a64)

otherwise, QgsSettingsEditorWidgetRegistry is creating a wrapper for this setting type and expects the cpp implemetnation
(QgsSettingsEntryBaseTemplate and not QgsSettingsEntryBase)
@github-actions github-actions bot added this to the 3.40.0 milestone Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit dacb2e7)

🪟 Windows Qt6 builds

Download Windows Qt6builds of this PR for testing.
(Built from commit dacb2e7)

@nyalldawson
Copy link
Collaborator

move QgsSettingsEditorWidgetWrapper to core

I'm -1 to this -- it's definitely a GUI focused class, and is full of qwidget references. Why should it be in core?

@3nids
Copy link
Member Author

3nids commented Oct 8, 2024

To be able to set an editor for a setting (and avoid creating a registry for this).

It follows the same logic than QgsEditorWidgetWrapper which is in core. Then all the implementations are in gui.

There is no GUI includes in the header, and only QDialog and QWidget in the source.

@nyalldawson
Copy link
Collaborator

nyalldawson commented Oct 8, 2024

@3nids

That still screams of bad API to me. I personally think a registry in the GUI lib would be the correct approach

It follows the same logic than QgsEditorWidgetWrapper which is in core. Then all the implementations are in gui.

Actually, it's in GUI. The field config class is in core but that doesn't directly reference widgets at all

@3nids
Copy link
Member Author

3nids commented Oct 8, 2024

OK, I'll have another look. In the mean time, I opened another PR with the still relevant stuff.

@3nids 3nids closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants