File indexing completed on 2024-12-08 04:34:37
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "accountinfosource.h" 0008 #include "accountmanager.h" 0009 #include "ruqola.h" 0010 #include <KLocalizedString> 0011 #include <QVariant> 0012 0013 AccountInfoSource::AccountInfoSource() 0014 : KUserFeedback::AbstractDataSource(QStringLiteral("accounts"), KUserFeedback::Provider::DetailedSystemInformation) 0015 { 0016 } 0017 0018 AccountInfoSource::~AccountInfoSource() = default; 0019 0020 QString AccountInfoSource::name() const 0021 { 0022 return i18n("Account information"); 0023 } 0024 0025 QString AccountInfoSource::description() const 0026 { 0027 return i18n("Return the number of account."); 0028 } 0029 0030 QVariant AccountInfoSource::data() 0031 { 0032 QVariantMap m; 0033 m.insert(QStringLiteral("value"), Ruqola::self()->accountManager()->accountNumber()); 0034 return m; 0035 }