File indexing completed on 2024-04-28 16:43:18

0001 /*
0002     SPDX-FileCopyrightText: 2015 David Rosca <nowrep@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "notify.h"
0008 
0009 #include <QIcon>
0010 
0011 #include <KNotification>
0012 
0013 Notify::Notify(QObject *parent)
0014     : QObject(parent)
0015 {
0016 }
0017 
0018 void Notify::connectionFailed(const QString &title, const QString &text)
0019 {
0020     KNotification *notification = new KNotification(QStringLiteral("ConnectionFailed"), KNotification::CloseOnTimeout, this);
0021     notification->setComponentName(QStringLiteral("bluedevil"));
0022     notification->setTitle(title);
0023     notification->setText(text);
0024     notification->sendEvent();
0025 }