mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #846, allow to display cmdLineErrorMessage by BlackMisc::CStatusMessageList
Improved formatting and HTL escape message
This commit is contained in:
committed by
Mathew Sutcliffe
parent
62f2593486
commit
d6235d901e
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user