Bug 334997

Summary: kgpg shows multiple default key servers
Product: kgpg Reporter: Tristan Miller <psychonaut>
Component: generalAssignee: Rolf Eike Beer <kde>
Severity: minor    
Priority: NOR    
Version: 2.12.x   
Target Milestone: ---   
Platform: openSUSE RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.14.0

Description Tristan Miller 2014-05-18 19:20:35 UTC
In the "Key Servers" section of the Configure dialog, specifying a new default key server does not remove the "(Default)" annotation from the old one(s).

Reproducible: Always

Steps to Reproduce:
1. Assuming you already have a default key server set, go to Settings->Configure KGpg…->Key Servers.
2. Select a key server other than the default key server.
3. Click on "Set as Default".
4. If desired, repeat from Step 2.
Actual Results:  
3a. The new default key server gets a "(Default)" annotation next to its name, but this annotation is not removed from the previous default key server.  So it now looks like there are two (or more) default key servers.

Expected Results:  
3a. The new default key server should get a "(Default)" annotation next to its name, and this annotation should be removed from the previous default key server.

If the Configure dialog is closed (via "OK") and then reopened, there will be only one "(Default)" annotation, and it will be on the most recently selected default key server.
Comment 1 Tristan Miller 2014-05-19 07:23:19 UTC
Further information: I am using KGpg 2.12.1 (KDE 4.13.1) on openSUSE 13.1.

Also, I note that the "Set as Default" button doesn't get greyed out when selecting the default server, or when using the "Set as Default" button to set a new default server.  If this isn't related to the problem described above let me know and I'll open a new report.
Comment 2 Rolf Eike Beer 2014-05-19 21:20:45 UTC
Git commit 57f6bea4a967ed65643b2fd7b0ee0b7f10e1bdfd by Rolf Eike Beer.
Committed on 19/05/2014 at 19:22.
Pushed by dakon into branch 'master'.

put the list of keyservers in a model

This simplifies the handling a lot, especially marking one of them as the
default one.
Related: bug 328539

M  +1    -0    CMakeLists.txt
M  +1    -10   conf_servers.ui
M  +47   -103  kgpgoptions.cpp
M  +14   -13   kgpgoptions.h
A  +104  -0    model/gpgservermodel.cpp     [License: GPL (v2/3)]
A  +56   -0    model/gpgservermodel.h     [License: GPL (v2/3)]