Fem: Fix Gmsh preferences file chooser

This commit is contained in:
marioalexis
2025-09-08 20:09:33 -03:00
parent 1ee3992436
commit d1dae5af1c
3 changed files with 5 additions and 10 deletions

View File

@@ -86,7 +86,7 @@
</size>
</property>
<property name="text">
<string>Gmsh binary path</string>
<string>Gmsh path</string>
</property>
</widget>
</item>

View File

@@ -83,15 +83,10 @@ void DlgSettingsFemGmshImp::changeEvent(QEvent* e)
}
}
void DlgSettingsFemGmshImp::onfileNameSelected(QString FileName)
void DlgSettingsFemGmshImp::onfileNameSelected(const QString& fileName)
{
if (!FileName.isEmpty() && QStandardPaths::findExecutable(FileName).isEmpty()) {
QMessageBox::critical(
this,
tr("Not an executable binary"),
tr("The specified file \n'%1'\n does not exist or is not executable.\n"
"Specify another file.")
.arg(FileName));
if (!fileName.isEmpty() && QStandardPaths::findExecutable(fileName).isEmpty()) {
QMessageBox::critical(this, tr("Gmsh"), tr("Executable '%1' not found").arg(fileName));
}
}

View File

@@ -41,7 +41,7 @@ public:
~DlgSettingsFemGmshImp() override;
protected Q_SLOTS:
void onfileNameSelected(QString FileName);
void onfileNameSelected(const QString& fileName);
protected:
void saveSettings() override;