mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 13:55:26 +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: {
|
case R_EVENT_DEBUG_PROCESS_FINISHED: {
|
||||||
auto ev = reinterpret_cast<REventDebugProcessFinished*>(data);
|
auto ev = reinterpret_cast<REventDebugProcessFinished*>(data);
|
||||||
QMessageBox msgBox;
|
emit debugProcessFinished(ev->pid);
|
||||||
msgBox.setText(tr("Debugged process exited (") + QString::number(ev->pid) + ")");
|
|
||||||
msgBox.exec();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -531,6 +531,11 @@ signals:
|
|||||||
void classRenamed(const QString &oldName, const QString &newName);
|
void classRenamed(const QString &oldName, const QString &newName);
|
||||||
void classAttrsChanged(const QString &cls);
|
void classAttrsChanged(const QString &cls);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief end of current debug event received
|
||||||
|
*/
|
||||||
|
void debugProcessFinished(int pid);
|
||||||
|
|
||||||
void attachedRemote(bool successfully);
|
void attachedRemote(bool successfully);
|
||||||
|
|
||||||
void projectSaved(bool successfully, const QString &name);
|
void projectSaved(bool successfully, const QString &name);
|
||||||
|
@ -110,6 +110,12 @@ DebugActions::DebugActions(QToolBar *toolBar, MainWindow *main) :
|
|||||||
actionContinueUntilCall, actionContinueUntilSyscall};
|
actionContinueUntilCall, actionContinueUntilSyscall};
|
||||||
toggleConnectionActions = {actionAttach, actionStartRemote};
|
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, [ = ]() {
|
connect(Core(), &CutterCore::debugTaskStateChanged, this, [ = ]() {
|
||||||
bool disableToolbar = Core()->isDebugTaskInProgress();
|
bool disableToolbar = Core()->isDebugTaskInProgress();
|
||||||
if (Core()->currentlyDebugging) {
|
if (Core()->currentlyDebugging) {
|
||||||
|
Loading…
Reference in New Issue
Block a user