Commit 066569a0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add account info source

parent 42c8e82f
......@@ -19,7 +19,6 @@ include_directories(
if (TARGET KUserFeedbackWidgets)
add_definitions(-DWITH_KUSERFEEDBACK)
# TODO add KUserFeedbackWidgets to lib
endif()
add_subdirectory(pics)
......@@ -185,6 +184,13 @@ set(kmailprivate_undosend_LIB_SRCS
undosend/undosendcreatejob.cpp
)
set(kmailprivate_userfeedback_LIB_SRCS)
if (TARGET KUserFeedbackWidgets)
set(kmailprivate_userfeedback_LIB_SRCS ${kmailprivate_userfeedback_LIB_SRCS}
userfeedback/accountinfosource.cpp
)
endif()
set(kmail_common_SRCS)
ecm_qt_declare_logging_category(kmail_common_SRCS HEADER kmail_debug.h IDENTIFIER KMAIL_LOG CATEGORY_NAME org.kde.pim.kmail)
set(kmailprivate_LIB_SRCS
......@@ -227,6 +233,7 @@ set(kmailprivate_LIB_SRCS
${kmailprivate_checkindexing_LIB_SRCS}
${kmailprivate_sieveimapinstanceinterface_LIB_SRCS}
${kmailprivate_undosend_LIB_SRCS}
${kmailprivate_userfeedback_LIB_SRCS}
)
qt5_add_dbus_adaptor(kmailprivate_LIB_SRCS
......
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "accountinfosource.h"
#include <QVariant>
#include <KUserFeedback/Provider>
#include <KLocalizedString>
AccountInfoSource::AccountInfoSource()
: KUserFeedback::AbstractDataSource(QStringLiteral("account"), KUserFeedback::Provider::DetailedSystemInformation)
{
}
//TODO add account type
QString AccountInfoSource::name() const
{
//TODO
return {};
}
QString AccountInfoSource::description() const
{
return i18n("Account configurated in KMail (reveiver and sender).");
}
QVariant AccountInfoSource::data()
{
return i18n("Account information");
}
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef ACCOUNTINFOSOURCE_H
#define ACCOUNTINFOSOURCE_H
#include <KUserFeedback/AbstractDataSource>
class AccountInfoSource : public KUserFeedback::AbstractDataSource
{
public:
AccountInfoSource();
Q_REQUIRED_RESULT QString name() const override;
Q_REQUIRED_RESULT QString description() const override;
Q_REQUIRED_RESULT QVariant data() override;
};
#endif // ACCOUNTINFOSOURCE_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment