mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-17 08:01:13 +02:00
2022-04-30 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdcatch(1) that caused changes in events to fail to be propagated to other rdcatch(1) instances. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Data model for Rivendell RDCatch events.
|
||||
//
|
||||
// (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2021-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -439,6 +439,8 @@ bool RecordListModel::refresh(unsigned id)
|
||||
for(int i=0;i<d_texts.size();i++) {
|
||||
if(d_ids.at(i)==id) {
|
||||
updateRowLine(i);
|
||||
emit dataChanged(createIndex(i,0),
|
||||
createIndex(i,columnCount()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -455,6 +457,30 @@ void RecordListModel::setFilterSql(const QString &sql)
|
||||
}
|
||||
|
||||
|
||||
void RecordListModel::notificationReceivedData(RDNotification *notify)
|
||||
{
|
||||
if(notify->type()==RDNotification::CatchEventType) {
|
||||
switch(notify->action()) {
|
||||
case RDNotification::AddAction:
|
||||
addRecord(notify->id().toUInt());
|
||||
break;
|
||||
|
||||
case RDNotification::ModifyAction:
|
||||
refresh(notify->id().toUInt());
|
||||
break;
|
||||
|
||||
case RDNotification::DeleteAction:
|
||||
removeRecord(notify->id().toUInt());
|
||||
break;
|
||||
|
||||
case RDNotification::NoAction:
|
||||
case RDNotification::LastAction:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RecordListModel::updateModel()
|
||||
{
|
||||
QList<QVariant> texts;
|
||||
|
Reference in New Issue
Block a user