MCPcopy
hub / github.com/ravendevteam/talon / show_error_popup

Function show_error_popup

utilities/util_error_popup.py:85–107  ·  view source on GitHub ↗
(message, allow_continue=False)

Source from the content-addressed store, hash-verified

83
84
85def show_error_popup(message, allow_continue=False):
86 app = QApplication.instance() or QApplication(sys.argv)
87 overlay_states = []
88 for w in app.topLevelWidgets():
89 if w.objectName().startswith("overlay_"):
90 overlay_states.append((w, w.isVisible()))
91 w.hide()
92 if QThread.currentThread() == QCoreApplication.instance().thread():
93 result = _show_dialog_direct(message, allow_continue)
94 else:
95 manager = _get_manager()
96 event = threading.Event()
97 event.result = False
98 manager.showDialog.emit(message, allow_continue, event)
99 event.wait()
100 result = event.result
101 if result:
102 for w, was_visible in overlay_states:
103 if was_visible:
104 w.show()
105 if not result:
106 sys.exit(1)
107 return True

Callers 15

run_screenFunction · 0.90
mainFunction · 0.90
debloat_sequenceFunction · 0.90
_check_temp_writableFunction · 0.90
_run_scriptMethod · 0.90
set_valueFunction · 0.90
get_valueFunction · 0.90
delete_valueFunction · 0.90
create_keyFunction · 0.90
delete_keyFunction · 0.90
run_as_adminFunction · 0.90

Calls 3

_show_dialog_directFunction · 0.85
_get_managerFunction · 0.85
showMethod · 0.80

Tested by

no test coverage detected