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 <QDataStream>
|
2022-09-10 22:23:52 +01:00
|
|
|
#include <QDebug>
|
2015-12-05 22:11:57 +00:00
|
|
|
|
2022-09-10 22:23:52 +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;
|
|
|
|
}
|
|
|
|
|
2022-09-10 22:23:52 +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;
|
|
|
|
}
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
QDebug operator<<(QDebug dbg, const NotifyingApplication &a)
|
|
|
|
{
|
|
|
|
dbg.nospace() << "{ name=" << a.name << ", icon=" << a.icon << ", active=" << a.active << ", blacklistExpression =" << a.blacklistExpression << " }";
|
2015-12-05 22:11:57 +00:00
|
|
|
return dbg.space();
|
|
|
|
}
|