Fix the version string for PEP440, and some Qt6 enum accesses
This PR addresses two issues I encountered attempting to install and run videomorph from the repo sources:
- The version string
1.5-canelodoesn't conform to PEP440, and is therefore invalid.pip installwill abort with a traceback due to apackaging.version.InvalidVersionexception. But,1.5+canelois perfectly valid, so use that instead. - Some enum accesses were still relying on PyQt5 compatibility symbols that are no longer present in PyQt6. Little things like: Edit trigger names are now members of
QAbstractItemView.EditTriggerinstead ofQAbstractItemView; Model roles are now members ofQt.ItemDataRole; TheQMessageBox"OK" button is now found atQMessageBox.StandardButton.Ok.
I can't promise I got all of the enum access issues, in the second commit, there could be more. I addressed only the ones I either personally experienced, or saw were guilty of the same issue that caused problems for me.
Also, NOT addressed in this PR is another crash I hit in the converter, specifically in converter.reader.OutputReader.bitrate due to an IndexError:
Traceback (most recent call last):
File ".../videomorph/forms/videomorph.py", line 1140, in _ready_read
self._update_conversion_progress()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File ".../videomorph/forms/videomorph.py", line 1178, in _update_conversion_progress
self._update_status_bar()
~~~~~~~~~~~~~~~~~~~~~~~^^
File ".../videomorph/forms/videomorph.py", line 1221, in _update_status_bar
br=self.library.reader.bitrate,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../videomorph/converter/reader.py", line 63, in bitrate
return bitrate_read[0].split("=")[-1].strip()
~~~~~~~~~~~~^^^
IndexError: list index out of range
[1] 3239129 IOT instruction (core dumped) videomorph
So, it looks like additional defensive coding and sanity checks are needed there.
Oh, and let me know if I should target the develop branch instead. (Though, if so, it would be good to set that branch as the repo's default branch so all PRs are automatically targeted there.)