biolab / orange-canvas-core

Orange Canvas core workflow editor
GNU General Public License v3.0
36 stars 62 forks source link

[FIX] addons.py: Fix a type error with PyQt6 CheckState #262

Closed ales-erjavec closed 1 year ago

ales-erjavec commented 1 year ago

Issue

Ref: https://github.com/biolab/orange-canvas-core/pull/260#issuecomment-1463716149

A type error in addon dialog when toggling between installed/update/remove action states.

----------------------------- TypeError Exception -----------------------------
Traceback (most recent call last):
  File "/home/ales/devel/orange-canvas-core/orangecanvas/application/addons.py", line 319, in editorEvent
    checkstate = self.nextCheckState(checkstate, index)
  File "/home/ales/devel/orange-canvas-core/orangecanvas/application/addons.py", line 332, in nextCheckState
    return Qt.CheckState((state + 1) % 3)
TypeError: unsupported operand type(s) for +: 'CheckState' and 'int'
-------------------------------------------------------------------------------

Changes

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.10 :tada:

Comparison is base (f398e6d) 74.80% compared to head (f8b2321) 74.90%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #262 +/- ## ========================================== + Coverage 74.80% 74.90% +0.10% ========================================== Files 97 97 Lines 20696 20696 ========================================== + Hits 15482 15503 +21 + Misses 5214 5193 -21 ``` | [Impacted Files](https://codecov.io/gh/biolab/orange-canvas-core/pull/262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab) | Coverage Δ | | |---|---|---| | [orangecanvas/application/addons.py](https://codecov.io/gh/biolab/orange-canvas-core/pull/262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2FwcGxpY2F0aW9uL2FkZG9ucy5weQ==) | `75.71% <100.00%> (+3.77%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

PrimozGodec commented 1 year ago

@ales-erjavec, thanks for this fix. I planed to dig in tomorrow. :)