Skip to content

Commit

Permalink
qucs/main.cpp: fix variable 'S4Q_workdir' when first time it is run
Browse files Browse the repository at this point in the history
The variable must be assigned after QucsWorkDir is set, otherwise
the wrong path '/spice4qucs' will be assigned the first time it is run.
See: https://bugzilla.altlinux.org/42122
  • Loading branch information
antohami committed Oct 18, 2023
1 parent 5e5d5ee commit 7ac8da7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qucs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ bool loadSettings()
else QucsSettings.SpiceOpusExecutable = "spiceopus";
if(settings.contains("Nprocs")) QucsSettings.NProcs = settings.value("Nprocs").toInt();
else QucsSettings.NProcs = 4;
if(settings.contains("S4Q_workdir")) QucsSettings.S4Qworkdir = settings.value("S4Q_workdir").toString();
else QucsSettings.S4Qworkdir = QDir::toNativeSeparators(QucsSettings.QucsWorkDir.absolutePath()+"/spice4qucs");
if(settings.contains("SimParameters")) QucsSettings.SimParameters = settings.value("SimParameters").toString();
else QucsSettings.SimParameters = "";
if(settings.contains("OctaveExecutable")) {
Expand All @@ -174,6 +172,8 @@ bool loadSettings()
if(settings.value("QucsHomeDir").toString() != "")
QucsSettings.QucsHomeDir.setPath(settings.value("QucsHomeDir").toString());
QucsSettings.QucsWorkDir = QucsSettings.QucsHomeDir;
if(settings.contains("S4Q_workdir")) QucsSettings.S4Qworkdir = settings.value("S4Q_workdir").toString();
else QucsSettings.S4Qworkdir = QDir::toNativeSeparators(QucsSettings.QucsWorkDir.absolutePath()+"/spice4qucs");

if (settings.contains("IgnoreVersion")) QucsSettings.IgnoreFutureVersion = settings.value("IgnoreVersion").toBool();
// check also for old setting name with typo...
Expand Down

0 comments on commit 7ac8da7

Please sign in to comment.