[pim/kdepim-runtime] agents/newmailnotifier: Use directly joinHistory()
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit a3bc99aafdba06300d586fce28f4169dc4c2fa54 by Laurent Montel.
Committed on 16/08/2026 at 11:39.
Pushed by mlaurent into branch 'master'.
Use directly joinHistory()
M +0 -1 agents/newmailnotifier/autotests/newmailnotificationhistorymanagertest.cpp
M +0 -10 agents/newmailnotifier/newmailnotificationhistorymanager.cpp
M +0 -3 agents/newmailnotifier/newmailnotificationhistorymanager.h
M +1 -1 agents/newmailnotifier/newmailnotificationhistorywidget.cpp
https://invent.kde.org/pim/kdepim-runtime/-/commit/a3bc99aafdba06300d586fce28f4169dc4c2fa54
diff --git a/agents/newmailnotifier/autotests/newmailnotificationhistorymanagertest.cpp b/agents/newmailnotifier/autotests/newmailnotificationhistorymanagertest.cpp
index 8ad98a787..4e1414416 100644
--- a/agents/newmailnotifier/autotests/newmailnotificationhistorymanagertest.cpp
+++ b/agents/newmailnotifier/autotests/newmailnotificationhistorymanagertest.cpp
@@ -16,7 +16,6 @@ NewMailNotificationHistoryManagerTest::NewMailNotificationHistoryManagerTest(QOb
void NewMailNotificationHistoryManagerTest::shouldHaveDefaultValues()
{
NewMailNotificationHistoryManager w;
- QVERIFY(w.history().isEmpty());
QVERIFY(w.joinHistory().isEmpty());
}
diff --git a/agents/newmailnotifier/newmailnotificationhistorymanager.cpp b/agents/newmailnotifier/newmailnotificationhistorymanager.cpp
index de99219cc..a4039a83c 100644
--- a/agents/newmailnotifier/newmailnotificationhistorymanager.cpp
+++ b/agents/newmailnotifier/newmailnotificationhistorymanager.cpp
@@ -23,11 +23,6 @@ NewMailNotificationHistoryManager *NewMailNotificationHistoryManager::self()
return &s_self;
}
-QStringList NewMailNotificationHistoryManager::history() const
-{
- return mHistory;
-}
-
QString NewMailNotificationHistoryManager::generateOpenFolderStr(Akonadi::Collection::Id id)
{
return QStringLiteral(" <a href=\"%1\">%2</a>").arg(QStringLiteral("openfolder:%1").arg(id), i18n("[Open Folder]"));
@@ -87,11 +82,6 @@ void NewMailNotificationHistoryManager::addHeader()
}
}
-void NewMailNotificationHistoryManager::setHistory(const QStringList &newHistory)
-{
- mHistory = newHistory;
-}
-
void NewMailNotificationHistoryManager::clear()
{
mHistory.clear();
diff --git a/agents/newmailnotifier/newmailnotificationhistorymanager.h b/agents/newmailnotifier/newmailnotificationhistorymanager.h
index 9d028dbcd..8d6ae30ef 100644
--- a/agents/newmailnotifier/newmailnotificationhistorymanager.h
+++ b/agents/newmailnotifier/newmailnotificationhistorymanager.h
@@ -28,9 +28,6 @@ public:
static NewMailNotificationHistoryManager *self();
- [[nodiscard]] QStringList history() const;
- void setHistory(const QStringList &newHistory);
-
void clear();
void addEmailInfoNotificationHistory(const NewMailNotificationHistoryManager::HistoryMailInfo &info);
diff --git a/agents/newmailnotifier/newmailnotificationhistorywidget.cpp b/agents/newmailnotifier/newmailnotificationhistorywidget.cpp
index cacae179d..083f268af 100644
--- a/agents/newmailnotifier/newmailnotificationhistorywidget.cpp
+++ b/agents/newmailnotifier/newmailnotificationhistorywidget.cpp
@@ -39,7 +39,7 @@ NewMailNotificationHistoryWidget::NewMailNotificationHistoryWidget(QWidget *pare
this,
&NewMailNotificationHistoryWidget::slotHistoryAdded);
- mTextBrowser->setHtml(NewMailNotificationHistoryManager::self()->history().join(QStringLiteral("<br>")));
+ mTextBrowser->setHtml(NewMailNotificationHistoryManager::self()->joinHistory());
connect(mTextBrowser, &NewMailNotificationHistoryBrowserTextWidget::clearHistory, this, [this]() {
NewMailNotificationHistoryManager::self()->clear();
mTextBrowser->clear();