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

upgrading to 3.16.4 installation form issue #311

Open
tudorbarascu opened this issue Feb 26, 2021 · 5 comments
Open

upgrading to 3.16.4 installation form issue #311

tudorbarascu opened this issue Feb 26, 2021 · 5 comments

Comments

@tudorbarascu
Copy link
Member

tudorbarascu commented Feb 26, 2021

upgrading to 3.16.4 crashes the installation form as the dialog.findChild outputs different results between 3.10 and 3.16

The code:

def formOpen(dialog, layer, feature):
    subForms = []
    typeSelector = dialog.findChild(QComboBox, 'installation_type')

has different results between 3.10 and 3.16. For example:

For 3.10:

Count of objects in subForms found in 3.10:  6
WidgetName:  chamber
WidgetName:  pump
WidgetName:  pressurecontrol
WidgetName:  tank
WidgetName:  source
WidgetName:  treatment
Subforms:  [<PyQt5.QtWidgets.QGroupBox object at 0x7f9919f8d9d0>,
 <PyQt5.QtWidgets.QGroupBox object at 0x7f9919f8de50>,
 <PyQt5.QtWidgets.QGroupBox object at 0x7f9919f8ddc0>,
 <PyQt5.QtWidgets.QTabWidget object at 0x7f9919f8dd30>,
 <PyQt5.QtWidgets.QGroupBox object at 0x7f9919f8dca0>,
 <PyQt5.QtWidgets.QGroupBox object at 0x7f9919f8dee0>]

For 3.16:

Count of objects in subForms found in 3.16: 7
WidgetName:  chamber
WidgetName:  pump
WidgetName:  pressurecontrol
WidgetName:  tank
WidgetName:  source
WidgetName:  treatment
WidgetName:  {2839923C-8B7D-419E-B84B-CA2FE9B80EC7} -- THE EXTRA STUFF.. something tied to the NULL value

Subforms:  [<PyQt5.QtWidgets.QGroupBox object at 0x7f46e4a7bd30>,
 <PyQt5.QtWidgets.QGroupBox object at 0x7f46e46a7040>,
 <PyQt5.QtWidgets.QGroupBox object at 0x7f46e46a70d0>,
 <PyQt5.QtWidgets.QTabWidget object at 0x7f46e46a7160>,
 <PyQt5.QtWidgets.QGroupBox object at 0x7f46e46a71f0>, 
<PyQt5.QtWidgets.QGroupBox object at 0x7f46e46a7280>, 
None]  -- HERE THERE's an extra None.. 

Currently investigating. Anyone else has this problem?

@tudorbarascu
Copy link
Member Author

There's the 2839923C-8B7D-419E-B84B-CA2FE9B80EC7 magic value that appears but shouldn't be there as it is tied with the value map widget and I'm pretty sure it has no place in the result of dialog.findChild output.

See https://github.com/qgis/QGIS/search?q=2839923C-8B7D-419E-B84B-CA2FE9B80EC7&type=code

@tudorbarascu
Copy link
Member Author

Wel.. actually.. that's if you use the installation.ui file :). So.. if nobody else uses it.. I'll close this down and not do any followup.

@lbartoletti
Copy link
Collaborator

mmm. I think insteallation.ui file is used by some groups ( @kandre @ponceta ?).
We have to filter this magic value @tudorbarascu ?

@ponceta
Copy link
Member

ponceta commented Mar 1, 2021

@tudorbarascu good catch!

We still have to update the qwat.qgs project to 3.16 (New LTR).

In Pully and SIGE we don't use .ui files anymore but the project has to be updated, either by removing or fixing this ui file definition.

Linked to #312

@tudorbarascu
Copy link
Member Author

tudorbarascu commented Mar 1, 2021

mmm. I think insteallation.ui file is used by some groups ( @kandre @ponceta ?).
We have to filter this magic value @tudorbarascu ?

Well.. I thought about filtering in the python logic that but IMHO it's not the correct thing to do as that magic value shouldn't be there, the correct fix would be in the core so that the None widget doesn't appear when finding children so that we don't stumble on it later on. If there's a bug in the core it could bite us elsewhere where we maybe wouldn't catch it or it will be too late and maybe data errors will already be introduced.

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

No branches or pull requests

3 participants