Change: Use gdb server is not checkable in linux/mac

This commit is contained in:
Roy Qu 2023-10-23 19:24:23 +08:00
parent 510ebe5555
commit 4b6fcd2e90
3 changed files with 9 additions and 4 deletions

View File

@ -5496,7 +5496,8 @@ void MainWindow::on_actionNew_triggered()
if (QMessageBox::question(this, if (QMessageBox::question(this,
tr("New Project File?"), tr("New Project File?"),
tr("Do you want to add the new file to the project?"), tr("Do you want to add the new file to the project?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes) == QMessageBox::Yes) {
if (mProject->options().isCpp) if (mProject->options().isCpp)
newProjectUnitFile("cpp"); newProjectUnitFile("cpp");
else else
@ -9864,7 +9865,8 @@ void MainWindow::on_actionNew_GAS_File_triggered()
if (QMessageBox::question(this, if (QMessageBox::question(this,
tr("New Project File?"), tr("New Project File?"),
tr("Do you want to add the new file to the project?"), tr("Do you want to add the new file to the project?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes) == QMessageBox::Yes) {
newProjectUnitFile("s"); newProjectUnitFile("s");
return; return;
} }
@ -9931,7 +9933,8 @@ void MainWindow::on_actionNew_Text_File_triggered()
if (QMessageBox::question(this, if (QMessageBox::question(this,
tr("New Project File?"), tr("New Project File?"),
tr("Do you want to add the new file to the project?"), tr("Do you want to add the new file to the project?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes) == QMessageBox::Yes) {
newProjectUnitFile("txt"); newProjectUnitFile("txt");
return; return;
} }

View File

@ -4452,7 +4452,7 @@ void Settings::Debugger::doLoad()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
mUseGDBServer = boolValue("use_gdb_server", false); mUseGDBServer = boolValue("use_gdb_server", false);
#else #else
mUseGDBServer = boolValue("use_gdb_server", true); mUseGDBServer = true;
#endif #endif
mGDBServerPort = intValue("gdb_server_port",41234); mGDBServerPort = intValue("gdb_server_port",41234);
mMemoryViewRows = intValue("memory_view_rows",16); mMemoryViewRows = intValue("memory_view_rows",16);

View File

@ -53,6 +53,8 @@ void DebugGeneralWidget::doLoad()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
ui->grpUseGDBServer->setCheckable(true); ui->grpUseGDBServer->setCheckable(true);
ui->grpUseGDBServer->setChecked(pSettings->debugger().useGDBServer()); ui->grpUseGDBServer->setChecked(pSettings->debugger().useGDBServer());
#else
ui->grpUseGDBServer->setCheckable(false);
#endif #endif
ui->spinGDBServerPort->setValue(pSettings->debugger().GDBServerPort()); ui->spinGDBServerPort->setValue(pSettings->debugger().GDBServerPort());
ui->spinMemoryViewRows->setValue(pSettings->debugger().memoryViewRows()); ui->spinMemoryViewRows->setValue(pSettings->debugger().memoryViewRows());