mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Moved the debug exit dialog to DebugActions
Qt may crash or freeze if a window is created outside of the main loop
This commit is contained in:
parent
fcb0ca6319
commit
45f7c78726
@ -3123,9 +3123,7 @@ void CutterCore::handleREvent(int type, void *data)
|
||||
}
|
||||
case R_EVENT_DEBUG_PROCESS_FINISHED: {
|
||||
auto ev = reinterpret_cast<REventDebugProcessFinished*>(data);
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(tr("Debugged process exited (") + QString::number(ev->pid) + ")");
|
||||
msgBox.exec();
|
||||
emit debugProcessFinished(ev->pid);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -531,6 +531,11 @@ signals:
|
||||
void classRenamed(const QString &oldName, const QString &newName);
|
||||
void classAttrsChanged(const QString &cls);
|
||||
|
||||
/**
|
||||
* @brief end of current debug event received
|
||||
*/
|
||||
void debugProcessFinished(int pid);
|
||||
|
||||
void attachedRemote(bool successfully);
|
||||
|
||||
void projectSaved(bool successfully, const QString &name);
|
||||
|
@ -110,6 +110,12 @@ DebugActions::DebugActions(QToolBar *toolBar, MainWindow *main) :
|
||||
actionContinueUntilCall, actionContinueUntilSyscall};
|
||||
toggleConnectionActions = {actionAttach, actionStartRemote};
|
||||
|
||||
connect(Core(), &CutterCore::debugProcessFinished, this, [ = ](int pid) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(tr("Debugged process exited (") + QString::number(pid) + ")");
|
||||
msgBox.exec();
|
||||
});
|
||||
|
||||
connect(Core(), &CutterCore::debugTaskStateChanged, this, [ = ]() {
|
||||
bool disableToolbar = Core()->isDebugTaskInProgress();
|
||||
if (Core()->currentlyDebugging) {
|
||||
|
Loading…
Reference in New Issue
Block a user