Skip to content

Commit 093c9b6

Browse files
committed
Let the user know whether disconnecting from the debug server works
1 parent 8407d7f commit 093c9b6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

ui/ui.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)
433433
}
434434
else
435435
{
436-
QMessageBox::information(context->mainWindow(), "Failed to connect",
436+
QMessageBox::warning(context->mainWindow(), "Failed to connect",
437437
"Cannot connect to the debug server. Please check the connection configuration.");
438438
}
439439
}, notConnectedToDebugServer));
@@ -447,7 +447,16 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)
447447
if (!controller)
448448
return;
449449

450-
controller->DisconnectDebugServer();
450+
if (controller->DisconnectDebugServer())
451+
{
452+
QMessageBox::information(context->mainWindow(), "Successfully disconnected",
453+
"Successfully disconnected from the debug server");
454+
}
455+
else
456+
{
457+
QMessageBox::warning(context->mainWindow(), "Failed to disconnect",
458+
"Cannot disconnect from the debug server.");
459+
}
451460
}, connectedToDebugServer));
452461
debuggerMenu->addAction("Disconnect from Debug Server", "Launch");
453462

0 commit comments

Comments
 (0)