Commit 8f1ef877 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Clean up code

parent d1f09a9e
Pipeline #23757 failed with stage
in 8 minutes and 54 seconds
...@@ -55,8 +55,6 @@ using PimCommon::BroadcastStatus; ...@@ -55,8 +55,6 @@ using PimCommon::BroadcastStatus;
SummaryViewPart::SummaryViewPart(KontactInterface::Core *core, const KAboutData &aboutData, QObject *parent) SummaryViewPart::SummaryViewPart(KontactInterface::Core *core, const KAboutData &aboutData, QObject *parent)
: KParts::Part(parent) : KParts::Part(parent)
, mCore(core) , mCore(core)
, mFrame(nullptr)
, mConfigAction(nullptr)
{ {
Q_UNUSED(aboutData); Q_UNUSED(aboutData);
setComponentName(QStringLiteral("kontactsummary"), i18n("Kontact Summary")); setComponentName(QStringLiteral("kontactsummary"), i18n("Kontact Summary"));
...@@ -118,7 +116,7 @@ void SummaryViewPart::updateWidgets() ...@@ -118,7 +116,7 @@ void SummaryViewPart::updateWidgets()
const KIdentityManagement::Identity &id = KIdentityManagement::IdentityManager::self()->defaultIdentity(); const KIdentityManagement::Identity &id = KIdentityManagement::IdentityManager::self()->defaultIdentity();
QString currentUser = i18n("Summary for %1", id.fullName()); const QString currentUser = i18n("Summary for %1", id.fullName());
mUsernameLabel->setText(QStringLiteral("<b>%1</b>").arg(currentUser)); mUsernameLabel->setText(QStringLiteral("<b>%1</b>").arg(currentUser));
mSummaries.clear(); mSummaries.clear();
...@@ -128,11 +126,9 @@ void SummaryViewPart::updateWidgets() ...@@ -128,11 +126,9 @@ void SummaryViewPart::updateWidgets()
mMainLayout->insertWidget(2, mFrame); mMainLayout->insertWidget(2, mFrame);
QStringList activeSummaries;
KConfig config(QStringLiteral("kontact_summaryrc")); KConfig config(QStringLiteral("kontact_summaryrc"));
KConfigGroup grp(&config, QString()); KConfigGroup grp(&config, QString());
activeSummaries = grp.readEntry("ActiveSummaries", QStringList()); QStringList activeSummaries;
if (grp.hasKey("ActiveSummaries")) { if (grp.hasKey("ActiveSummaries")) {
activeSummaries = grp.readEntry("ActiveSummaries", QStringList()); activeSummaries = grp.readEntry("ActiveSummaries", QStringList());
} else { } else {
......
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