[pim/kmail] src/searchdialog: Make sure that folder id is the same
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 319f3f80eb72d592319a70f2415277ca2c76e925 by Laurent Montel.
Committed on 13/08/2026 at 18:13.
Pushed by mlaurent into branch 'master'.
Make sure that folder id is the same
M +3 -4 src/searchdialog/searchwindowdialog.cpp
https://invent.kde.org/pim/kmail/-/commit/319f3f80eb72d592319a70f2415277ca2c76e925
diff --git a/src/searchdialog/searchwindowdialog.cpp b/src/searchdialog/searchwindowdialog.cpp
index fff6e9f4f..262b9df91 100644
--- a/src/searchdialog/searchwindowdialog.cpp
+++ b/src/searchdialog/searchwindowdialog.cpp
@@ -289,11 +289,10 @@ void SearchWindowDialog::setEnabledSearchButton(bool)
void SearchWindowDialog::updateCollectionStatistic(Akonadi::Collection::Id id, const Akonadi::CollectionStatistics &statistic)
{
- QString genMsg;
- if (id == mFolder.id()) {
- genMsg = i18np("%1 match", "%1 matches", statistic.count());
+ if (id != mFolder.id()) {
+ return;
}
- mUi.mStatusLbl->setText(genMsg);
+ mUi.mStatusLbl->setText(i18np("%1 match", "%1 matches", statistic.count()));
}
void SearchWindowDialog::keyPressEvent(QKeyEvent *event)