mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
refs #316 Removed no longer used static status message methods in CSettingUtilities.
This commit is contained in:
@@ -6,84 +6,6 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
namespace Settings
|
namespace Settings
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* Wrong path name message
|
|
||||||
*/
|
|
||||||
BlackMisc::CStatusMessage CSettingUtilities::wrongPathMessage(const QString &path)
|
|
||||||
{
|
|
||||||
QString msg = "wrong path";
|
|
||||||
if (!path.isEmpty())
|
|
||||||
{
|
|
||||||
msg.append(": ").append(path);
|
|
||||||
}
|
|
||||||
BlackMisc::CStatusMessage rp(BlackMisc::CStatusMessage::TypeValidation,
|
|
||||||
BlackMisc::CStatusMessage::SeverityError, msg);
|
|
||||||
return rp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Wrong cmd message
|
|
||||||
*/
|
|
||||||
BlackMisc::CStatusMessage CSettingUtilities::wrongCommandMessage(const QString &command)
|
|
||||||
{
|
|
||||||
QString msg = "wrong command";
|
|
||||||
if (!command.isEmpty())
|
|
||||||
{
|
|
||||||
msg.append(": ").append(command);
|
|
||||||
}
|
|
||||||
BlackMisc::CStatusMessage rc(BlackMisc::CStatusMessage::TypeValidation,
|
|
||||||
BlackMisc::CStatusMessage::SeverityError, msg);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Wrong path name messages
|
|
||||||
*/
|
|
||||||
CStatusMessageList CSettingUtilities::wrongPathMessages(const QString &path)
|
|
||||||
{
|
|
||||||
BlackMisc::CStatusMessageList wrongPath;
|
|
||||||
wrongPath.push_back(CSettingUtilities::wrongPathMessage(path));
|
|
||||||
return wrongPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Wrong command message
|
|
||||||
*/
|
|
||||||
CStatusMessageList CSettingUtilities::wrongCommandMessages(const QString &command)
|
|
||||||
{
|
|
||||||
BlackMisc::CStatusMessageList wrongCmds;
|
|
||||||
wrongCmds.push_back(CSettingUtilities::wrongCommandMessage(command));
|
|
||||||
return wrongCmds;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Value not changed
|
|
||||||
*/
|
|
||||||
CStatusMessage CSettingUtilities::valueNotChangedMessage(const QString &valueName)
|
|
||||||
{
|
|
||||||
return CStatusMessage(CStatusMessage::TypeSettings, CStatusMessage::SeverityWarning,
|
|
||||||
QString("Value '%1' not changed").arg(valueName));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Value changed
|
|
||||||
*/
|
|
||||||
CStatusMessage CSettingUtilities::valueChangedMessage(const QString &valueName)
|
|
||||||
{
|
|
||||||
return CStatusMessage(CStatusMessage::TypeSettings, CStatusMessage::SeverityInfo,
|
|
||||||
QString("Value '%1' changed").arg(valueName));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Value changed
|
|
||||||
*/
|
|
||||||
CStatusMessage CSettingUtilities::valueChangedMessage(bool changed, const QString &valueName)
|
|
||||||
{
|
|
||||||
return changed ?
|
|
||||||
valueChangedMessage(valueName) :
|
|
||||||
valueNotChangedMessage(valueName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* leading path
|
* leading path
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -77,27 +77,6 @@ namespace BlackMisc
|
|||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Wrong path message
|
|
||||||
static BlackMisc::CStatusMessage wrongPathMessage(const QString &path = "");
|
|
||||||
|
|
||||||
//! Wrong path messages
|
|
||||||
static BlackMisc::CStatusMessageList wrongPathMessages(const QString &path = "");
|
|
||||||
|
|
||||||
//! Wrong command message
|
|
||||||
static BlackMisc::CStatusMessage wrongCommandMessage(const QString &command);
|
|
||||||
|
|
||||||
//! Wrong command messages
|
|
||||||
static BlackMisc::CStatusMessageList wrongCommandMessages(const QString &command);
|
|
||||||
|
|
||||||
//! Value not changed message
|
|
||||||
static BlackMisc::CStatusMessage valueNotChangedMessage(const QString &valueName);
|
|
||||||
|
|
||||||
//! Value changed message with flag
|
|
||||||
static CStatusMessage valueChangedMessage(bool changed, const QString &valueName);
|
|
||||||
|
|
||||||
//! Value changed message
|
|
||||||
static BlackMisc::CStatusMessage valueChangedMessage(const QString &valueName);
|
|
||||||
|
|
||||||
//! Remove leading path
|
//! Remove leading path
|
||||||
static QString removeLeadingPath(const QString &path);
|
static QString removeLeadingPath(const QString &path);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user