drop active flag for alerts
This commit is contained in:
parent
1a1e675745
commit
892d170791
|
@ -27,8 +27,8 @@ Alert::Alert() :
|
|||
d(nullptr)
|
||||
{}
|
||||
|
||||
Alert::Alert(const QString &name, const Icon &icon, bool active):
|
||||
d(new AlertData(name, icon, active))
|
||||
Alert::Alert(const QString &name, const Icon &icon):
|
||||
d(new AlertData(name, icon))
|
||||
{}
|
||||
|
||||
Alert::Alert(const Alert &other):
|
||||
|
@ -58,11 +58,6 @@ const Icon &Alert::icon() const
|
|||
return d->m_icon;
|
||||
}
|
||||
|
||||
bool Alert::isActive() const
|
||||
{
|
||||
return d->m_active;
|
||||
}
|
||||
|
||||
bool Alert::isValid() const
|
||||
{
|
||||
return d;
|
||||
|
|
|
@ -44,11 +44,9 @@ public:
|
|||
* Creates an alert
|
||||
* @param name the name of the Alert
|
||||
* @param icon the Icon of the Alert
|
||||
* @param active whether the alert is active, not used yet
|
||||
* @todo is isActive of any use?
|
||||
*/
|
||||
|
||||
explicit Alert(const QString &name, const Icon &icon, bool active = true);
|
||||
explicit Alert(const QString &name, const Icon &icon);
|
||||
/**
|
||||
* Creates a copy of other
|
||||
* @param other
|
||||
|
@ -74,12 +72,6 @@ public:
|
|||
*/
|
||||
const Icon &icon() const;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return whether the Alert is active
|
||||
*/
|
||||
bool isActive() const;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return whether the Alert is valid.
|
||||
|
|
|
@ -20,10 +20,9 @@
|
|||
|
||||
using namespace Snore;
|
||||
|
||||
AlertData::AlertData(const QString &name, const Icon &icon, bool active):
|
||||
AlertData::AlertData(const QString &name, const Icon &icon):
|
||||
m_name(name),
|
||||
m_icon(icon),
|
||||
m_active(active)
|
||||
m_icon(icon)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -31,12 +31,11 @@ class AlertData : public QSharedData
|
|||
{
|
||||
friend class Alert;
|
||||
public:
|
||||
AlertData(const QString &name, const Icon &icon, bool active);
|
||||
AlertData(const QString &name, const Icon &icon);
|
||||
~AlertData();
|
||||
|
||||
QString m_name;
|
||||
Icon m_icon;
|
||||
bool m_active;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(AlertData)
|
||||
|
|
|
@ -113,9 +113,6 @@ void Parser::parse(Notification &sNotification, const QString &msg, QTcpSocket *
|
|||
SnoreCore::instance().registerApplication(app);
|
||||
}
|
||||
|
||||
if (!alert.isActive()) {
|
||||
break;
|
||||
}
|
||||
sNotification = Notification(app, alert, title, text, icon, timeout);
|
||||
sNotification.hints().setPrivateValue(snarl, "clientSocket", QVariant::fromValue(QPointer<QTcpSocket>(client)));
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue