[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [messagelib/Applications/16.08] messagelist/src/core: Fix giving focus back to the messagelist from 
From:       David Faure <faure () kde ! org>
Date:       2016-07-25 17:42:17
Message-ID: E1bRjtR-0004Z0-Oa () code ! kde ! org
[Download RAW message or body]

Git commit 69c06a7a251b3e18c13498096d8373887cb8d917 by David Faure.
Committed on 25/07/2016 at 15:53.
Pushed by dfaure into branch 'Applications/16.08'.

Fix giving focus back to the messagelist from the search lineedit.

Typing a filter and then clicking back into the messagelist (to be able to use
Left/Right or Del shortcuts for instance) only worked when clicking on a
*different* current item (because slotSelectionChanged ends up calling setFocus).
Clicking on the existing current item had no effect.

The simplest fix is to just use ClickFocus as focus policy, but
of course tabbing should work too, so rather StrongFocus, which is
actually the default, so just removing the line is best.

In kdepim4 the default focus policy was used too, c626f4c added this
NoFocus line by error: it doesn't actually fix the dual-color-issue for
selected messagelist items.

M  +0    -2    messagelist/src/core/view.cpp

http://commits.kde.org/messagelib/69c06a7a251b3e18c13498096d8373887cb8d917

diff --git a/messagelist/src/core/view.cpp b/messagelist/src/core/view.cpp
index 19935e1..21ff7f5 100644
--- a/messagelist/src/core/view.cpp
+++ b/messagelist/src/core/view.cpp
@@ -85,8 +85,6 @@ public:
 View::View(Widget *pParent)
     : QTreeView(pParent), d(new Private(this, pParent))
 {
-    setFocusPolicy(Qt::NoFocus);
-
     d->mSaveThemeColumnStateTimer = new QTimer();
     connect(d->mSaveThemeColumnStateTimer, &QTimer::timeout, this, &View::saveThemeColumnState);
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic