File indexing completed on 2024-04-14 04:51:49

0001 /**
0002  * SPDX-FileCopyrightText: 2015 Holger Kaelberer <holger.k@elberer.de>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #include "notifyingapplication.h"
0008 
0009 #include <QDataStream>
0010 #include <QDebug>
0011 
0012 QDataStream &operator<<(QDataStream &out, const NotifyingApplication &app)
0013 {
0014     out << app.name << app.icon << app.active << app.blacklistExpression.pattern();
0015     return out;
0016 }
0017 
0018 QDataStream &operator>>(QDataStream &in, NotifyingApplication &app)
0019 {
0020     QString pattern;
0021     in >> app.name;
0022     in >> app.icon;
0023     in >> app.active;
0024     in >> pattern;
0025     app.blacklistExpression.setPattern(pattern);
0026     return in;
0027 }
0028 
0029 QDebug operator<<(QDebug dbg, const NotifyingApplication &a)
0030 {
0031     dbg.nospace() << "{ name=" << a.name << ", icon=" << a.icon << ", active=" << a.active << ", blacklistExpression =" << a.blacklistExpression << " }";
0032     return dbg.space();
0033 }