2015-12-05 22:11:57 +00:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2015 Holger Kaelberer <holger.k@elberer.de>
|
2015-12-05 22:11:57 +00:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2015-12-05 22:11:57 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "notifyingapplication.h"
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QDataStream>
|
|
|
|
|
2017-09-03 20:39:44 +01:00
|
|
|
QDataStream& operator<<(QDataStream& out, const NotifyingApplication& app)
|
2015-12-05 22:11:57 +00:00
|
|
|
{
|
|
|
|
out << app.name << app.icon << app.active << app.blacklistExpression.pattern();
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
2017-09-03 20:39:44 +01:00
|
|
|
QDataStream& operator>>(QDataStream& in, NotifyingApplication& app)
|
2015-12-05 22:11:57 +00:00
|
|
|
{
|
|
|
|
QString pattern;
|
|
|
|
in >> app.name;
|
|
|
|
in >> app.icon;
|
|
|
|
in >> app.active;
|
|
|
|
in >> pattern;
|
|
|
|
app.blacklistExpression.setPattern(pattern);
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
|
|
|
|
QDebug operator<<(QDebug dbg, const NotifyingApplication& a) {
|
|
|
|
dbg.nospace() << "{ name=" << a.name
|
|
|
|
<< ", icon=" << a.icon
|
|
|
|
<< ", active=" << a.active
|
|
|
|
<< ", blacklistExpression =" << a.blacklistExpression
|
|
|
|
<< " }";
|
|
|
|
return dbg.space();
|
|
|
|
}
|