Replace setting name; remove QSettings.SimParameters

This commit is contained in:
Vadim Kuznetsov 2025-01-06 17:29:20 +03:00
parent 171bb805fe
commit 008895cb65
4 changed files with 4 additions and 7 deletions

View File

@ -19,6 +19,7 @@
# include <config.h>
#endif
#include "settings.h"
#include "externsimdialog.h"
#include "simsettingsdialog.h"
#include "main.h"
@ -119,7 +120,7 @@ void ExternSimDialog::slotSetSimulator()
} else {
a_ngspice->setSimulatorCmd(QucsSettings.NgspiceExecutable); //rely on $PATH
}
a_ngspice->setSimulatorParameters(QucsSettings.SimParameters);
a_ngspice->setSimulatorParameters(_settings::Get().item<QString>("NgspiceParams"));
}
break;
case spicecompat::simXyce: {
@ -127,7 +128,7 @@ void ExternSimDialog::slotSetSimulator()
connect(a_xyce,SIGNAL(started()),this,SLOT(slotNgspiceStarted()));
connect(a_xyce,SIGNAL(finished()),this,SLOT(slotProcessOutput()));
connect(a_xyce,SIGNAL(errors(QProcess::ProcessError)),this,SLOT(slotNgspiceStartError(QProcess::ProcessError)));
a_xyce->setSimulatorParameters(QucsSettings.SimParameters);
a_xyce->setSimulatorParameters(_settings::Get().item<QString>("XyceParams"));
}
break;
// case spicecompat::simXycePar: {
@ -149,7 +150,7 @@ void ExternSimDialog::slotSetSimulator()
connect(a_ngspice,SIGNAL(finished()),this,SLOT(slotProcessOutput()),Qt::UniqueConnection);
connect(a_ngspice,SIGNAL(errors(QProcess::ProcessError)),this,SLOT(slotNgspiceStartError(QProcess::ProcessError)),Qt::UniqueConnection);
a_ngspice->setSimulatorCmd(QucsSettings.SpiceOpusExecutable);
a_ngspice->setSimulatorParameters(QucsSettings.SimParameters);
a_ngspice->setSimulatorParameters(_settings::Get().item<QString>("NgspiceParams"));
}
break;
default: break;

View File

@ -187,7 +187,6 @@ void SimSettingsDialog::slotApply()
QucsSettings.SpiceOpusExecutable = a_edtSpiceOpus->text();
QucsSettings.Qucsator = a_edtQucsator->text();
//QucsSettings.NProcs = a_spbNprocs->value();
QucsSettings.SimParameters = a_edtNgspiceSimParam->text();
// if ((QucsSettings.DefaultSimulator != a_cbxSimulator->currentIndex())&&
// (QucsSettings.DefaultSimulator != spicecompat::simNotSpecified)) {
// QMessageBox::warning(this,tr("Simulator settings"),tr("Default simulator engine was changed!\n"

View File

@ -129,7 +129,6 @@ bool loadSettings()
if (QucsSettings.S4Qworkdir == "")
QucsSettings.S4Qworkdir = QDir::toNativeSeparators(QucsSettings.QucsWorkDir.absolutePath()+"/spice4qucs");
QucsSettings.SimParameters = _settings::Get().item<QString>("SimParameters");
QucsSettings.OctaveExecutable = _settings::Get().item<QString>("OctaveExecutable");
QucsSettings.OpenVAFExecutable = _settings::Get().item<QString>("OpenVAFExecutable");
@ -209,7 +208,6 @@ bool saveApplSettings()
qs.setItem<QString>("Qucsator",QucsSettings.Qucsator);
qs.setItem<int>("Nprocs",QucsSettings.NProcs);
qs.setItem<QString>("S4Q_workdir",QucsSettings.S4Qworkdir);
qs.setItem<QString>("SimParameters",QucsSettings.SimParameters);
qs.setItem<QString>("OctaveExecutable",QucsSettings.OctaveExecutable);
qs.setItem<QString>("OpenVAFExecutable",QucsSettings.OpenVAFExecutable);
qs.setItem<QString>("QucsHomeDir", QucsSettings.qucsWorkspaceDir.canonicalPath());

View File

@ -83,7 +83,6 @@ struct tQucsSettings {
QString XyceParExecutable;
QString SpiceOpusExecutable;
QString S4Qworkdir;
QString SimParameters;
unsigned int NProcs; // Number of processors for Xyce
QString OctaveExecutable; // OctaveExecutable location
QString QucsOctave; // OUCS_OCTAVE variable