Bug 190901 - Small bug in Proxy/Exceptions for servers with similar names
Summary: Small bug in Proxy/Exceptions for servers with similar names
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_proxy (show other bugs)
Version: 0.2
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Dawit Alemayehu
URL:
Keywords:
: 196044 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-28 10:57 UTC by Romain
Modified: 2011-10-20 06:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Romain 2009-04-28 10:57:47 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Steps to reproduce:

1. Open Konqueror Settings Proxy
2. Select "Manual configuration"
3. configure my proxy: proxy.mycompany.com:3128, same proxy for all protocols
4. add an exception for server "src2"
5. add an exception for server "src", an error dialog pops up and tells me that I already have this server in my exception list. 

If I add "src" first and *then* "src2", then it works. 


Expected behavior:

"src" != "src2", so I'd expect to be able to add either one first and then the other.
Comment 1 Dario Andres 2009-05-16 05:08:28 UTC
From the code:

        QListWidgetItem* item = mDlg->lbExceptions->item(rowIndex);

        if ( item->text().lastIndexOf( site ) != -1 &&
             item != mDlg->lbExceptions->currentItem() )
        {
            QString msg = i18n("You entered a duplicate address. "
                               "Please try again.");
            QString details = i18n("<qt><center><b>%1</b></center> "
                                   "is already in the list.</qt>", site);
            KMessageBox::detailedError( this, msg, details, i18n("Duplicate Entry") );
            return true;
        }


It looks for the new added string inside the current strings.. That is why "src" is called duplicate of "src2". I guess this should have some explanation/possible valid case

Thanks
Comment 2 Dario Andres 2009-06-12 01:08:53 UTC
*** Bug 196044 has been marked as a duplicate of this bug. ***
Comment 3 Romain 2010-03-23 13:54:59 UTC
Still there in 4.4.1.

The fix seems simple, why not use "==" instead of lastIndexOf ??
Comment 4 Dawit Alemayehu 2011-04-25 22:04:28 UTC
Will try to fix this as part of the proxy configuration overhaul for the upcoming KDE 4.7.
Comment 5 Dawit Alemayehu 2011-10-20 06:16:32 UTC
Git commit f90f318f2162df18a08b889d24ae8bbeab3b834c by Dawit Alemayehu.
Committed on 01/08/2011 at 07:44.
Pushed by adawit into branch 'master'.

Rewrote the proxy configuration dialog to include missing SOCKS
proxy entry and make it much simpler to use.

BUG:82352
BUG:115704
BUG:139789
BUG:147340
BUG:164460
BUG:189019
BUG:190149
BUG:190901
BUG:205594
BUG:258196
BUG:283226
FIXED-IN:4.8

REVIEW: 102802

GUI:  Proxy configuration dialog rewrite.

M  +0    -5    konqueror/settings/kio/CMakeLists.txt
D  +0    -251  konqueror/settings/kio/envvarproxy.ui
D  +0    -310  konqueror/settings/kio/kenvvarproxydlg.cpp
D  +0    -71   konqueror/settings/kio/kenvvarproxydlg.h
D  +0    -496  konqueror/settings/kio/kmanualproxydlg.cpp
D  +0    -86   konqueror/settings/kio/kmanualproxydlg.h
M  +410  -215  konqueror/settings/kio/kproxydlg.cpp
M  +30   -18   konqueror/settings/kio/kproxydlg.h
M  +833  -248  konqueror/settings/kio/kproxydlg.ui
D  +0    -79   konqueror/settings/kio/kproxydlgbase.cpp
D  +0    -69   konqueror/settings/kio/kproxydlgbase.h
M  +77   -88   konqueror/settings/kio/ksaveioconfig.cpp
M  +28   -32   konqueror/settings/kio/ksaveioconfig.h
D  +0    -291  konqueror/settings/kio/manualproxy.ui

http://commits.kde.org/kde-baseapps/f90f318f2162df18a08b889d24ae8bbeab3b834c