Skip to content

Commit

Permalink
[iss-189]
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 56087d9
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Wed Oct 26 10:17:31 2022 -0300

    Use QString::number in log messages.
  • Loading branch information
joaquinffernandez committed Oct 26, 2022
1 parent 13cec1c commit 11dcd14
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/gui/mmomegui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void MmomeGui::run_finished(int exitCode, QProcess::ExitStatus exitStatus)
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\n") + _proc->readAllStandardError());
QByteArray logs = _proc->readAllStandardOutput();
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\n") + logs);
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + "Simulation failed. Exit code: " + QString("%1").arg(exitCode));
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + "Simulation failed. Exit code: " + QString::number(exitCode));
}
delete _proc;
_proc = NULL;
Expand Down Expand Up @@ -580,7 +580,7 @@ void MmomeGui::importFinished(int exitCode, QProcess::ExitStatus exitStatus)
editModel(_sbmlFile);
addVariables();
} else {
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nCan not import SBML file.") + QString(exitCode));
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nCan not import SBML file.") + QString::number(exitCode));
}
_sbmlFile.clear();
delete _proc;
Expand All @@ -598,15 +598,15 @@ void MmomeGui::make_finished(int exitCode, QProcess::ExitStatus exitStatus)
QFileInfo exefi(execName);
if (!exefi.exists()) {
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\n") + _proc->readAllStandardError());
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nCan't generate binary file.") + QString(exitCode));
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nCan't generate binary file.") + QString::number(exitCode));
enableActions(true);
_settings_only = false;
return;
} else {
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nBinary file generated, ready to start simulation."));
}
} else {
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nError generating binary file.).") + QString(exitCode));
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nError generating binary file.).") + QString::number(exitCode));
enableActions(true);
_settings_only = false;
return;
Expand Down Expand Up @@ -675,7 +675,7 @@ void MmomeGui::comp_finished(int exitCode, QProcess::ExitStatus exitStatus)
} else {
delete _proc;
_proc = NULL;
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nError during compilation.") + QString(exitCode));
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + QString("\nError during compilation.") + QString::number(exitCode));
enableActions(true);
_settings_only = false;
}
Expand Down Expand Up @@ -925,7 +925,7 @@ void MmomeGui::plot_finished(int exitCode, QProcess::ExitStatus exitStatus)
{
QString msgs = _plot->readAllStandardError();
if (exitStatus == QProcess::NormalExit && !msgs.isEmpty()) {
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + "\nPlot script error: " + QString(exitCode) + "\n" + msgs);
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + "\nPlot script error: " + QString::number(exitCode) + "\n" + msgs);
}
delete _plot;
_plot = NULL;
Expand Down Expand Up @@ -965,7 +965,7 @@ void MmomeGui::log_finished(int exitCode, QProcess::ExitStatus exitStatus)
editModel(logfi.absoluteFilePath());
} else if (exitStatus == QProcess::NormalExit) {
QString msgs = _log->readAllStandardError();
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + "\nLog file error: " + QString(exitCode) + "\n" + msgs);
_compiler_msg->setPlainText(_compiler_msg->toPlainText() + "\nLog file error: " + QString::number(exitCode) + "\n" + msgs);
}
delete _log;
_log = NULL;
Expand Down

0 comments on commit 11dcd14

Please sign in to comment.