qtvcp: fix PyQt5 ≥ 5.15 and PyQt6 compatibility#3943
Open
bgermann wants to merge 2 commits intoLinuxCNC:masterfrom
Open
qtvcp: fix PyQt5 ≥ 5.15 and PyQt6 compatibility#3943bgermann wants to merge 2 commits intoLinuxCNC:masterfrom
bgermann wants to merge 2 commits intoLinuxCNC:masterfrom
Conversation
Replace removed Qt APIs and fix strict enum type checking: - Replace QRegExp/QRegExpValidator with QRegularExpression/ QRegularExpressionValidator - Fix QDialogButtonBox.addButton() calls passing bare int 3 instead of QDialogButtonBox.ActionRole - Fix setSortIndicator() passing bare int instead of Qt.SortOrder enum - Fix QLinearGradient() rejecting QPoint arguments (requires QPointF) - Fix QVariant usage in table models: replace QVariant() returns with None, QVariant(x) returns with x, and QVariant.Double/Int type ID constants with a try/except fallback to Qt metatype integers - Add try/except fallback for QEnum import (qtpy ≥ 2.0.0) with fallback to Q_ENUM and Q_ENUMS for older versions
GCodeGraphics._hal_cleanup() never stopped the QTimer or the positionlogger background thread before HAL.exit() freed LinuxCNC's shared memory. The C logger loop continued accessing NML/status memory that had already been deallocated, causing a use-after-free segfault. Stop the Qt poll timer and call logger.stop() at the start of _hal_cleanup(), mirroring the shutdown sequence used by AXIS.
Collaborator
|
I suggest adding: on about line 171 in qtvcp.py, so we know what bindings are being used. you can force pyqt6 by adding: os.environ['QT_API'] = 'pyqt6' on about line 11 in qtvcp.py |
Collaborator
|
In indicatorMixin.py I get erros related to using toPointF() need to switch to QPointF instead eg: gradient = QtGui.QLinearGradient((top_bot + QtCore.QPointF(size, 0)), top_bot) |
This file contains hidden or 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
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.
This is a follow-up on #3881