Bug 201093

Summary: Popup note editor has to be closed twice
Product: [Unmaintained] kdelibs Reporter: Georg Wittenburg <georg.wittenburg>
Component: kdeuiAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: christophe, deus_ex_machin, rossi.f, steffen.ohrendorf, winter, yyc1992
Priority: NOR    
Version: 4.9.4   
Target Milestone: ---   
Platform: Debian testing   
OS: Unspecified   
Latest Commit: Version Fixed In: 4.10
Sentry Crash Report:

Description Georg Wittenburg 2009-07-22 12:04:55 UTC
Version:            (using KDE 4.2.96)
Installed from:    Debian testing/unstable Packages

In 4.3 RC2, the popup note editor has to be closed twice.

How to reproduce:
1) Open popup note for editing in Kontact's Popup Notes component by double-clicking on it.
2) Close popup note editor by clicking on OK or Cancel.
-> The editor is closed, but opens up again immediately afterwards; closing works as expected the second time.
Comment 1 Christophe Marin 2009-07-22 20:47:57 UTC
ok, confirmed in trunk.

RMB/Edit works as expected, only editing using a double click will require to click twice on ok or cancel.
Comment 2 Georg Wittenburg 2010-03-07 08:47:49 UTC
Still present in 4.4.1. Actually, now you have to close the dialog _three_ times.
Comment 3 Fabio Rossi 2010-03-08 21:17:24 UTC
(In reply to comment #2)
> Still present in 4.4.1. Actually, now you have to close the dialog _three_
> times.

No, here we need always to close it twice.
Comment 4 Christophe Marin 2011-02-01 00:51:41 UTC
*** Bug 214357 has been marked as a duplicate of this bug. ***
Comment 5 Steffen Ohrendorf 2012-01-11 20:33:03 UTC
This bug is open for more than 2 years now, is there any progress? The current behaviour is very annoying. I would try to fix that bug myself, but I simply cannot find the right source file containing the notes component.
Comment 6 Yichao Yu 2012-12-22 19:07:29 UTC
(In reply to comment #5)
> This bug is open for more than 2 years now, is there any progress? The
> current behaviour is very annoying. I would try to fix that bug myself, but
> I simply cannot find the right source file containing the notes component.

I have also recently found this bug in 4.9.90-95. After tracing down a little bit, it turns out to be a but in kdelibs-kdeui. A signal is triggered twice if you are using double click (and another similar but probably less useful signal is not triggered at all if you are using single click).
I have a patch on the review board that can fix the problem here[1], please give it a try if possible. (NOTE, you will need to recompile both kdeui and kontact in order to test it.)

[1] https://git.reviewboard.kde.org/r/107829/

P.S. Can anyone move this bug to kdelibs?
Comment 7 Allen Winter 2012-12-22 21:54:52 UTC
Reassigning to kdelibs.
Might be a bug in KListWidget, and there is a possible patch for resolving this at  https://git.reviewboard.kde.org/r/107829/
Comment 8 David Faure 2013-01-16 14:54:14 UTC
Git commit 7c668da61748938f13cf16bf1068748f38280df1 by David Faure.
Committed on 15/01/2013 at 18:44.
Pushed by dfaure into branch 'KDE/4.10'.

Correctly trigger executed signal of KListWidget for both single click and double click.

Patch by Yichao Yu.
FIXED-IN: 4.10
REVIEW: 107829

M  +21   -16   kdeui/itemviews/klistwidget.cpp
M  +3    -1    kdeui/itemviews/klistwidget.h

http://commits.kde.org/kdelibs/7c668da61748938f13cf16bf1068748f38280df1