fix(studio): Qt6 compat + Ctrl+C signal handler
- flash_console: setTextFormat(Qt.TextFormat.RichText) — int overload removed in Qt6 - installer_widget: same fix + add Qt to QtCore import - project_editor/installer_widget: Session.has() → Session.can() - app.py: signal.signal(SIGINT, SIG_DFL) so Ctrl+C kills the process from terminal AR_electronics — AR-Autopilot Project
This commit is contained in:
@@ -20,7 +20,7 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from PySide6.QtCore import QObject, QThread, Signal
|
||||
from PySide6.QtCore import QObject, Qt, QThread, Signal
|
||||
from PySide6.QtWidgets import (
|
||||
QCheckBox,
|
||||
QFileDialog,
|
||||
@@ -129,7 +129,7 @@ class InstallerWidget(QWidget):
|
||||
"<span style='color:#8899AA;font-size:11px'>"
|
||||
"Genera un pendrive USB con las apps AR Electronics y la licencia del buque.</span>"
|
||||
)
|
||||
hdr.setTextFormat(1) # RichText
|
||||
hdr.setTextFormat(Qt.TextFormat.RichText) # RichText
|
||||
hdr.setWordWrap(True)
|
||||
root.addWidget(hdr)
|
||||
|
||||
@@ -220,7 +220,7 @@ class InstallerWidget(QWidget):
|
||||
root.addWidget(self._log, 1)
|
||||
|
||||
# RBAC gate
|
||||
can_build = self._session.has(Capability.EDIT_COMMISSIONING)
|
||||
can_build = self._session.can(Capability.EDIT_COMMISSIONING)
|
||||
if not can_build:
|
||||
self._build_btn.setEnabled(False)
|
||||
self._build_btn.setToolTip("Requiere rol Engineer o Super Admin.")
|
||||
@@ -321,7 +321,7 @@ class InstallerWidget(QWidget):
|
||||
self._set_running(False)
|
||||
|
||||
def _set_running(self, running: bool) -> None:
|
||||
can_build = self._session.has(Capability.EDIT_COMMISSIONING)
|
||||
can_build = self._session.can(Capability.EDIT_COMMISSIONING)
|
||||
self._build_btn.setEnabled(not running and can_build)
|
||||
self._cancel_btn.setEnabled(running)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user