Review Request: Fix paste operation using mouse middle click in KLineEdit, when selected text is not cleared before paste

Dawit Alemayehu adawit at kde.org
Mon Jun 13 04:34:29 BST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101583/#review3854
-----------------------------------------------------------



kdeui/widgets/klineedit.cpp
<http://git.reviewboard.kde.org/r/101583/#comment3133>

    Unnecessary extra white space.



kdeui/widgets/klineedit.cpp
<http://git.reviewboard.kde.org/r/101583/#comment3136>

    This should be 
    
    if (e->button() == Qt::MidButton && hasSelectedText())
    
    to avoid deep nested if statements and also skip the clipboard content lookup when there is no selected text.



kdeui/widgets/klineedit.cpp
<http://git.reviewboard.kde.org/r/101583/#comment3135>

    Extra white space here too and perhaps you can check the clipboard to make sure it supports selection as well (QApplication::clipboard().supportsSelection()).



kdeui/widgets/klineedit.cpp
<http://git.reviewboard.kde.org/r/101583/#comment3134>

    It is the same thing but I think using del() instead improves readability here.


- Dawit


On June 11, 2011, 9:33 p.m., Valentin Rusu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101583/
> -----------------------------------------------------------
> 
> (Updated June 11, 2011, 9:33 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> KLineEdit : Clear selected text when middle click occurs to prepare for paste operation.
> 
> NOTE : I came accross this when investigating a crash in Kate when opening files. It crashes if you middle click the file name KLineEdit to paste a filename previously selected in the konsole. I'm working in fixing that also.
> 
> 
> Diffs
> -----
> 
>   kdeui/widgets/klineedit.cpp 0dd3690 
> 
> Diff: http://git.reviewboard.kde.org/r/101583/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Valentin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110613/9bb50e5c/attachment.htm>


More information about the kde-core-devel mailing list