mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Ref T231, Ref T236, Ref T238 made command parsing function mandatory for contexts
* we can send commands to any context * to send to all contexts use the facade * application relays to facade
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BlackMisc { class CLogCategoryList; }
|
||||
namespace BlackCore
|
||||
@@ -125,9 +126,16 @@ namespace BlackCore
|
||||
//! Debug enabled?
|
||||
bool isDebugEnabled() const;
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// All context must implement those functions
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
//! Id and path name for round trip protection
|
||||
virtual QString getPathAndContextId() const = 0;
|
||||
|
||||
//! Parse a given command line
|
||||
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) = 0;
|
||||
|
||||
signals:
|
||||
//! Log or debug values changed
|
||||
void changedLogOrDebugSettings();
|
||||
@@ -145,7 +153,7 @@ namespace BlackCore
|
||||
//! Path and context id
|
||||
QString buildPathAndContextId(const QString &path) const
|
||||
{
|
||||
return QString(path) + ":" + QString::number(this->getUniqueId());
|
||||
return path % QStringLiteral(":") % QString::number(this->getUniqueId());
|
||||
}
|
||||
|
||||
//! Relay signals from this class
|
||||
|
||||
Reference in New Issue
Block a user