diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp
index b99b96fe6..78af54f79 100644
--- a/src/blackcore/application.cpp
+++ b/src/blackcore/application.cpp
@@ -866,6 +866,15 @@ namespace BlackCore
fputs(qPrintable(this->m_parser.helpText()), stderr);
}
+ void CApplication::cmdLineErrorMessage(const CStatusMessageList &msgs) const
+ {
+ if (msgs.isEmpty()) { return; }
+ if (!msgs.hasErrorMessages()) { return; }
+ return CApplication::cmdLineErrorMessage(
+ msgs.toFormattedQString(true)
+ );
+ }
+
void CApplication::cmdLineHelpMessage()
{
this->m_parser.showHelp(); // terminates
diff --git a/src/blackcore/application.h b/src/blackcore/application.h
index 3f0f4924f..8f52dbb37 100644
--- a/src/blackcore/application.h
+++ b/src/blackcore/application.h
@@ -241,15 +241,18 @@ namespace BlackCore
//! Delegates to QCommandLineParser::value
QString getParserValue(const QCommandLineOption &option) const;
- //! Display parser error message
- virtual void cmdLineErrorMessage(const QString &cmdLineErrorMessage) const;
-
//! Parses and handles the standard options such as help, version, parse error
//! \note in some cases (error, version, help) application is terminated during this step
//! \sa parsingHookIn
bool parse();
//! @}
+ //! Display error message
+ virtual void cmdLineErrorMessage(const QString &cmdLineErrorMessage) const;
+
+ //! Display error message
+ virtual void cmdLineErrorMessage(const BlackMisc::CStatusMessageList &msgs) const;
+
// ----------------------- contexts ----------------------------------------
//! \name Context / core facade related
diff --git a/src/blackgui/guiapplication.cpp b/src/blackgui/guiapplication.cpp
index 54538382a..48769d93c 100644
--- a/src/blackgui/guiapplication.cpp
+++ b/src/blackgui/guiapplication.cpp
@@ -226,7 +226,7 @@ namespace BlackGui
}
if (!tableMode)
{
- html += l;
+ html += l.toHtmlEscaped();
html += "
";
}
else
@@ -246,7 +246,7 @@ namespace BlackGui
else
{
html += " ";
- html += l.simplified();
+ html += l.simplified().toHtmlEscaped();
}
}
}
@@ -261,7 +261,7 @@ namespace BlackGui
const QString helpText(beautifyHelpMessage(this->m_parser.helpText()));
QMessageBox::warning(nullptr,
QGuiApplication::applicationDisplayName(),
- "