mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2022-04-29 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDNotification::dump()' method. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -23000,3 +23000,5 @@
|
|||||||
* Fixed a regression in rdcatch(1) where creating a new event
|
* Fixed a regression in rdcatch(1) where creating a new event
|
||||||
using the 'Save As' button would fail to send notifications of
|
using the 'Save As' button would fail to send notifications of
|
||||||
the added event.
|
the added event.
|
||||||
|
2022-04-29 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added an 'RDNotification::dump()' method.
|
||||||
|
|||||||
@@ -190,6 +190,34 @@ QString RDNotification::write() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString RDNotification::dump() const
|
||||||
|
{
|
||||||
|
QString ret;
|
||||||
|
|
||||||
|
switch((QMetaType::Type)id().type()) {
|
||||||
|
case QMetaType::Int:
|
||||||
|
ret+=QString::asprintf("id: %d",id().toInt());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QMetaType::UInt:
|
||||||
|
ret+=QString::asprintf("id: %u",id().toUInt());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QMetaType::QString:
|
||||||
|
ret+="id: "+id().toString();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
ret+="Unknown QMetaType type value: %u\n",id().type();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ret+="type: "+RDNotification::typeString(type());
|
||||||
|
ret+="action: "+RDNotification::actionString(action());
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString RDNotification::typeString(RDNotification::Type type)
|
QString RDNotification::typeString(RDNotification::Type type)
|
||||||
{
|
{
|
||||||
QString ret="UNKNOWN";
|
QString ret="UNKNOWN";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A container class for a Rivendell Notification message.
|
// A container class for a Rivendell Notification message.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2018-2020 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -42,6 +42,7 @@ class RDNotification
|
|||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
bool read(const QString &str);
|
bool read(const QString &str);
|
||||||
QString write() const;
|
QString write() const;
|
||||||
|
QString dump() const;
|
||||||
static QString typeString(Type type);
|
static QString typeString(Type type);
|
||||||
static QString actionString(Action action);
|
static QString actionString(Action action);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user