Bug 382160

Summary: Cannot edit name of contacts
Product: [Applications] trojita Reporter: Elvis Angelaccio <elvis.angelaccio>
Component: Desktop GUIAssignee: Trojita default assignee <trojita-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Elvis Angelaccio 2017-07-09 15:21:16 UTC
To reproduce:

* IMAP -> Address Book
* Double-click some contact and type a new name
* Close the window

When the "Save changes?" messagebox pops up, the contact name in the view gets reverted to the old name and the change is lost.
Comment 1 Jan Kundrát 2017-07-10 07:15:10 UTC
Patches welcome. I'm quite surprised that this widget allows editing. I've always used the main widget at the right for changing the contact details (and I'm always annoyed that they are not using default QLineEdit UI because the current version probably doesn't look like an editable thing to the user).

Anyway, the easiest fix is probably to ensure that the EditRole is missing from the list model.
Comment 2 Thomas Lübking 2017-07-14 17:12:09 UTC
Putting a ton of lineedits there makes the thing look terribly crowded (and it's rather meant to be looked at)
How would you feel about altering the look of only the focused label? Like passing it a solid background and poosibly a frame?
Comment 3 Jan Kundrát 2017-07-17 13:08:33 UTC
Git commit a96e5e0b5516a8f548d893dd221b08dca33b2255 by Jan Kundrát, on behalf of Thomas Lübking.
Committed on 14/07/2017 at 17:51.
Pushed by gerrit into branch 'master'.

change contact name on list edit
Change-Id: Ibd5d4aa5a4f8d7dd3068fc1a142e1bdeac01cf2d

M  +3    -0    src/Plugins/AbookAddressbook/be-contacts.cpp

https://commits.kde.org/trojita/a96e5e0b5516a8f548d893dd221b08dca33b2255
Comment 4 Jan Kundrát 2017-07-17 13:12:43 UTC
(In reply to Thomas Lübking from comment #2)
> Putting a ton of lineedits there makes the thing look terribly crowded (and
> it's rather meant to be looked at)

My problem with this approach is that Trojita is "different" than any other app that I use.

I'm not so unhappy about it as to change the code, but I still think that the discoverability is kinda limited. Yup, the [markings] help in case the data have not been filed and are empty, but that's not all, IMHO.

> How would you feel about altering the look of only the focused label? Like
> passing it a solid background and poosibly a frame?

Sounds good I think, patches welcome.