fix: Register QTextCursor meta type to eliminate Qt warning

- Add qRegisterMetaType(QTextCursor) to prevent Qt threading warning
- Import QTextCursor and qRegisterMetaType from PyQt5
- Resolves "Cannot queue arguments of type 'QTextCursor'" warning
- Ensures thread-safe GUI updates for terminal display

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Masonmason 2025-07-24 19:26:37 +08:00
parent 24d5726ee2
commit 260668ceb8

View File

@ -32,8 +32,8 @@ from PyQt5.QtWidgets import (
QCheckBox, QGroupBox, QScrollArea, QTableWidget, QTableWidgetItem, QCheckBox, QGroupBox, QScrollArea, QTableWidget, QTableWidgetItem,
QHeaderView, QMessageBox, QSplitter, QFrame QHeaderView, QMessageBox, QSplitter, QFrame
) )
from PyQt5.QtCore import Qt, QThread, pyqtSignal, QTimer from PyQt5.QtCore import Qt, QThread, pyqtSignal, QTimer, qRegisterMetaType
from PyQt5.QtGui import QFont, QColor, QPalette, QImage, QPixmap from PyQt5.QtGui import QFont, QColor, QPalette, QImage, QPixmap, QTextCursor
# Import our converter and pipeline system # Import our converter and pipeline system
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'core', 'functions')) sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'core', 'functions'))
@ -317,6 +317,9 @@ class DeploymentDialog(QDialog):
def __init__(self, pipeline_data: Dict[str, Any], parent=None): def __init__(self, pipeline_data: Dict[str, Any], parent=None):
super().__init__(parent) super().__init__(parent)
# Register QTextCursor for thread-safe signal passing
qRegisterMetaType(QTextCursor)
self.pipeline_data = pipeline_data self.pipeline_data = pipeline_data
self.deployment_worker = None self.deployment_worker = None
self.pipeline_config = None self.pipeline_config = None