forked from blue/squawk
some debug, message changing in messageFeed
This commit is contained in:
parent
3a7735b192
commit
48e498be25
10 changed files with 107 additions and 35 deletions
|
@ -456,3 +456,23 @@ void Shared::Message::setAttachPath(const QString& path)
|
|||
{
|
||||
attachPath = path;
|
||||
}
|
||||
|
||||
Shared::Message::Change::Change(const QMap<QString, QVariant>& _data):
|
||||
data(_data),
|
||||
idModified(false) {}
|
||||
|
||||
void Shared::Message::Change::operator()(Shared::Message& msg)
|
||||
{
|
||||
idModified = msg.change(data);
|
||||
}
|
||||
|
||||
void Shared::Message::Change::operator()(Shared::Message* msg)
|
||||
{
|
||||
idModified = msg->change(data);
|
||||
}
|
||||
|
||||
bool Shared::Message::Change::hasIdBeenModified() const
|
||||
{
|
||||
return idModified;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,18 @@ public:
|
|||
static const State StateHighest = State::error;
|
||||
static const State StateLowest = State::pending;
|
||||
|
||||
struct Change //change functor, stores in idModified if ID has been modified during change
|
||||
{
|
||||
Change(const QMap<QString, QVariant>& _data);
|
||||
void operator() (Message& msg);
|
||||
void operator() (Message* msg);
|
||||
bool hasIdBeenModified() const;
|
||||
|
||||
private:
|
||||
const QMap<QString, QVariant>& data;
|
||||
bool idModified;
|
||||
};
|
||||
|
||||
Message(Type p_type);
|
||||
Message();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue