mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2018-03-24 Fred Gleason <fredg@paravelsystems.com>
* Added a 'LogType' value to the 'RDNotification::Type enumeration. * Added support for notifications to rdlogedit(1).
This commit is contained in:
@@ -92,7 +92,19 @@ bool RDNotification::read(const QString &str)
|
||||
RDNotification::Type type=(RDNotification::Type)i;
|
||||
if(args[1]==RDNotification::typeString(type)) {
|
||||
notify_type=type;
|
||||
notify_id=QVariant(args[3].toUInt());
|
||||
switch(type) {
|
||||
case RDNotification::CartType:
|
||||
notify_id=QVariant(args[3].toUInt());
|
||||
break;
|
||||
|
||||
case RDNotification::LogType:
|
||||
notify_id=QVariant(args[3]);
|
||||
break;
|
||||
|
||||
case RDNotification::NullType:
|
||||
case RDNotification::LastType:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(notify_type==RDNotification::NullType) {
|
||||
@@ -124,6 +136,10 @@ QString RDNotification::write() const
|
||||
ret+=QString().sprintf("%u",notify_id.toUInt());
|
||||
break;
|
||||
|
||||
case RDNotification::LogType:
|
||||
ret+=notify_id.toString();
|
||||
break;
|
||||
|
||||
case RDNotification::NullType:
|
||||
case RDNotification::LastType:
|
||||
break;
|
||||
@@ -141,6 +157,10 @@ QString RDNotification::typeString(RDNotification::Type type)
|
||||
ret="CART";
|
||||
break;
|
||||
|
||||
case RDNotification::LogType:
|
||||
ret="LOG";
|
||||
break;
|
||||
|
||||
case RDNotification::NullType:
|
||||
case RDNotification::LastType:
|
||||
break;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
class RDNotification
|
||||
{
|
||||
public:
|
||||
enum Type {NullType=0,CartType=1,LastType=2};
|
||||
enum Type {NullType=0,CartType=1,LogType=2,LastType=3};
|
||||
enum Action {NoAction=0,AddAction=1,DeleteAction=2,ModifyAction=3,
|
||||
LastAction=4};
|
||||
RDNotification(Type type,Action action,const QVariant &id);
|
||||
|
||||
Reference in New Issue
Block a user