Review Request 125484: Allow to clear completion history

Laurent Montel montel at kde.org
Sat Oct 3 15:20:20 UTC 2015



> On oct. 2, 2015, 8:43 après-midi, David Faure wrote:
> > Looks ok to me, except that KHistoryComboBox also adds such a menu item to the KLineEdit popup. Can you check if it has it twice now? I would expect so. In that case you could remove the action+slot from KHistoryComboBox then? (compare the slots to be sure it's the same logic).
> 
> Laurent Montel wrote:
>     it's not totally the same logic
>     
>     it will clear the combobox + textline too.
>     
>     I will add a test application for khistorycombobox soon to test it.
>     
>     void KHistoryComboBox::clearHistory()
>     {
>         const QString temp = currentText();
>         KComboBox::clear();
>         if (useCompletion()) {
>             completionObject()->clear();
>         }
>         setEditText(temp);
>     }
>     
>     void KHistoryComboBoxPrivate::_k_addContextMenuItems(QMenu *menu)
>     {
>         Q_Q(KHistoryComboBox);
>         if (menu) {
>             menu->addSeparator();
>             QAction *clearHistory = menu->addAction(QIcon::fromTheme("edit-clear-history"),
>                                                     KHistoryComboBox::tr("Clear &History"),
>                                                     q, SLOT(_k_clear()));
>             if (!q->count()) {
>                 clearHistory->setEnabled(false);
>             }
>         }
>     }
> 
> Laurent Montel wrote:
>     There is a test in source "kcompletionuitest"
>     so not necessary to create a new test.

indeed it create 2 "clear history"
I will investigate how to replace it.


- Laurent


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125484/#review86250
-----------------------------------------------------------


On oct. 2, 2015, 8:14 après-midi, Laurent Montel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125484/
> -----------------------------------------------------------
> 
> (Updated oct. 2, 2015, 8:14 après-midi)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kcompletion
> 
> 
> Description
> -------
> 
> In a application we can't remove history until we close it. It can be problematic when we add a critical word as password etc.
> 
> 
> Diffs
> -----
> 
>   src/klineedit.h 59cec4e 
>   src/klineedit.cpp 37c079d 
>   src/klineedit_p.h c7b63c6 
> 
> Diff: https://git.reviewboard.kde.org/r/125484/diff/
> 
> 
> Testing
> -------
> 
> Tested in kdepim from long time ago.
> Tested in klineedittest apps.
> 
> 
> Thanks,
> 
> Laurent Montel
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151003/920f17af/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list