Take into account the deletion of entries on a combobox in more cases
ClosedPublic

Authored by asensi on Apr 20 2020, 10:13 PM.

Details

Summary

Take into account the deletion of entries on a combobox in more cases

In the "Host" comboBox on the "New Network Connection" dialog: if e.g. the user
has deleted a host address from the url list, that's taken into account even if
afterwards a connection to a host is not made.

Test Plan

Press Ctrl+N to open the "New Network Connection" dialog. Using the "Host"
comboBox on the "New Network Connection" dialog, several times: add a new host
address (e.g. a non-existent one like "example.com"), press the «Connect»
button. Open the "New Network Connection" dialog again, delete the recently
added host address:
a) using Shift+Del when the popup list is seen;
b) or using the arrow keys and Shift+Del when the popup list is not visible;

Try to delete all the host addresses until the list is empty, press Shift+Del
again. Press the «Cancel» button.

Open the "New Network Connection" dialog again, check that the list is empty.

Start a new connection (e.g. an FTP one), just in case.

Note: Those changes are designed to be tried after applying the ones
described in https://phabricator.kde.org/D29000

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asensi requested review of this revision.Apr 20 2020, 10:13 PM
asensi created this revision.
asensi edited the test plan for this revision. (Show Details)

Thanks, tested to work as expected.

+1

krusader/Dialogs/newftpgui.cpp
156

This depends on D28961 and is unrelated.

asensi marked an inline comment as done.Apr 21 2020, 10:17 PM
asensi added inline comments.Apr 21 2020, 10:20 PM
krusader/Dialogs/newftpgui.cpp
156

Thanks for writing, perhaps I should have stated that this code review is part of the latest group of code reviews, and has to be applied after e.g.:

In Krusader's source code, after applying the proposed changes, instead of using (and mentioning) the KHistoryComboBox class: is the KrHistoryComboBox class which is mentioned and used.
That is a factor that also improves dealing with Krusader's source code :-)

asensi edited the summary of this revision. (Show Details)Apr 21 2020, 10:39 PM
asensi edited the test plan for this revision. (Show Details)
asensi updated this revision to Diff 81054.Apr 23 2020, 11:11 PM
asensi edited the test plan for this revision. (Show Details)

Reduce the source code.

asensi updated this revision to Diff 81056.Apr 23 2020, 11:34 PM
This comment was removed by asensi.
asensi updated this revision to Diff 81057.Apr 23 2020, 11:42 PM

Improve the source code only adding override to the destructor.

gengisdave accepted this revision.Apr 30 2020, 9:50 AM
gengisdave added a subscriber: gengisdave.

Compiled and tested, no problems found

This revision is now accepted and ready to land.Apr 30 2020, 9:50 AM
This revision was automatically updated to reflect the committed changes.

Thanks for testing and informing, Yuri and Davide!