KMail: fix selecting a favorite that is filtered out in the foldertreeview.
ClosedPublic

Authored by dfaure on Jul 15 2018, 5:05 PM.

Details

Summary

Instead of reacting to a selection change in the foldertreeview's
selection model (which won't happen, if the newly selected folder is
filtered out in that view), let's make Pane react on the explicit call
to setCurrentFolder. For this we need the QModelIndex in the arguments
to that method (=> corresponding kmail change coming up).

Side fix: set mPreferEmptyTab to false in case setCurrentFolder is
called twice; but in the end I fixed that in
KMMainWidget::slotFolderChanged so that it's not called twice.

Test Plan

Type "zzz" in the filter-lineedit for the folder-tree-view,
so everything disappears. Then try to select a favorite folder.

Diff Detail

Repository
R94 PIM: Message Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dfaure created this revision.Jul 15 2018, 5:05 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptJul 15 2018, 5:05 PM
Restricted Application edited subscribers, added: kde-pim; removed: KDE PIM. · View Herald Transcript
dfaure requested review of this revision.Jul 15 2018, 5:05 PM
mlaurent requested changes to this revision.Jul 16 2018, 7:10 AM

Increase CMakeLists.txt version as you add new api

This revision now requires changes to proceed.Jul 16 2018, 7:10 AM

We can't apply on master

About master: just a minor conflict in pane.h. Here's a version of the commit that will apply to master: http://www.davidfaure.fr/2018/0001-KMail-fix-selecting-a-favorite-that-is-filtered-out-.patch

Which version number should I increase in this commit?

  • set(MESSAGELIB_LIB_VERSION ${PIM_VERSION})

+ set(MESSAGELIB_LIB_VERSION 5.8.4)
??

5.8.81 as it's master no 5.8 branch which is closed now.

dfaure updated this revision to Diff 37929.Jul 17 2018, 7:50 AM

Rebase to master; increase version number

mlaurent accepted this revision.Jul 17 2018, 11:27 AM
This revision is now accepted and ready to land.Jul 17 2018, 11:27 AM

You need to increase messagelib dependancy . After all you can commit.

thanks :)

This revision was automatically updated to reflect the committed changes.