Commit c3baf89a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Prepare to implement security config module

parent e246b3ce
Pipeline #65724 canceled with stage
......@@ -147,3 +147,25 @@ if (TARGET KUserFeedbackWidgets)
kcoreaddons_desktop_to_json(akregator_config_userfeedback akregator_config_userfeedback.desktop SERVICE_TYPES kcmodule.desktop)
install(TARGETS akregator_config_userfeedback DESTINATION ${KDE_INSTALL_PLUGINDIR})
endif()
###########
add_library(akregator_config_security MODULE)
target_sources(akregator_config_security PRIVATE
akregator_config_security.cpp
)
target_link_libraries(akregator_config_security
akregatorinterfaces
KF5::KCMUtils
KF5::I18n
KF5::WebEngineViewer
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akregator_config_security PROPERTIES UNITY_BUILD ON)
endif()
kcoreaddons_desktop_to_json(akregator_config_security akregator_config_security.desktop SERVICE_TYPES kcmodule.desktop)
install(FILES akregator_config_security.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS akregator_config_security DESTINATION ${KDE_INSTALL_PLUGINDIR})
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "akregator_config_security.h"
#include "akregatorconfig.h"
#include <KAboutData>
#include <KLocalizedString>
#include <KPluginFactory>
#include <QHBoxLayout>
using namespace Akregator;
K_PLUGIN_FACTORY(KCMAkregatorSecurityConfigFactory, registerPlugin<KCMAkregatorSecurityConfig>();)
KCMAkregatorSecurityConfig::KCMAkregatorSecurityConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
auto lay = new QHBoxLayout(this);
lay->setContentsMargins({});
auto about = new KAboutData(QStringLiteral("kcmakrsecutiryconfig"),
i18n("Configure Plugins"),
QString(),
QString(),
KAboutLicense::GPL,
i18n("(c), 2021 Laurent Montel"));
about->addAuthor(i18n("Laurent Montel"), QString(), QStringLiteral("montel@kde.org"));
setAboutData(about);
// mConfigurePluginWidget = new PimCommon::ConfigurePluginsWidget(new AkregatorConfigurePluginListWidget(this), this);
// mConfigurePluginWidget->setObjectName(QStringLiteral("configurePluginWidget"));
// connect(mConfigurePluginWidget, &PimCommon::ConfigurePluginsWidget::changed, this, &KCMAkregatorSecurityConfig::slotConfigChanged);
// lay->addWidget(mConfigurePluginWidget);
}
void KCMAkregatorSecurityConfig::slotConfigChanged()
{
Q_EMIT changed(true);
}
void KCMAkregatorSecurityConfig::save()
{
// mConfigurePluginWidget->save();
}
void KCMAkregatorSecurityConfig::load()
{
// mConfigurePluginWidget->doLoadFromGlobalSettings();
}
void KCMAkregatorSecurityConfig::defaults()
{
// mConfigurePluginWidget->doResetToDefaultsOther();
}
#include "akregator_config_security.moc"
[Desktop Entry]
Icon=security-high
Type=Service
X-KDE-ServiceTypes=KCModule
X-DocPath=akregator/index.html#general-tab
X-KDE-Library=akregator_config_security
X-KDE-ParentApp=akregator
X-KDE-ParentComponents=akregator,kontact_akregatorplugin
X-KDE-CfgDlgHierarchy=Akregator
X-KDE-Weight=260
Name=Security
Comment=Configure Security
X-KDE-Keywords=akregator, configure, settings, security
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <KCModule>
#include <QVariant>
namespace Akregator
{
class KCMAkregatorSecurityConfig : public KCModule
{
Q_OBJECT
public:
explicit KCMAkregatorSecurityConfig(QWidget *parent, const QVariantList &args);
void load() override;
void save() override;
void defaults() override;
private Q_SLOTS:
void slotConfigChanged();
private:
// PimCommon::ConfigurePluginsWidget *mConfigurePluginWidget = nullptr;
};
}
......@@ -616,6 +616,7 @@ void Part::showOptions()
#ifdef WITH_KUSERFEEDBACK
m_dialog->addModule(QStringLiteral("akregator_config_userfeedback"));
#endif
m_dialog->addModule(QStringLiteral("akregator_config_security"));
}
m_dialog->show();
......
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