Bug 135632 - [PATCH] proxy setting "connect directly" ignored
Summary: [PATCH] proxy setting "connect directly" ignored
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-14 13:15 UTC by Felix Geyer
Modified: 2006-10-14 14:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Geyer 2006-10-14 13:15:37 UTC
Version:           1.4.3 (using KDE KDE 3.5.4)
Installed from:    Fedora RPMs

Amarok wrongly uses a proxy when you manually set a proxy in the kde control center but then choose "Connect to the Internet directly".

This bug affects the lyrics_lyrc script and maybe others.

The problem is in src/scriptmanger.cpp, it doesn't check useProxy().
Here is a patch against svn tags/1.4.4

Index: scriptmanager.cpp
===================================================================
--- scriptmanager.cpp   (revision 595392)
+++ scriptmanager.cpp   (working copy)
@@ -97,7 +97,12 @@
     QString
     proxyForProtocol(const QString& protocol)
     {
-        return KProtocolManager::proxyFor ( protocol );
+        if ( KProtocolManager::useProxy() ) {
+            return KProtocolManager::proxyFor ( protocol );
+        }
+        else {
+            return QString::null;
+        }
     }
Comment 1 Mark Kretschmann 2006-10-14 13:53:26 UTC
Awesome, thanks for spotting this! I'll commit it as soon as I get a chance. If someone else beats me to it, that's fine too :)
Comment 2 Andrew Turner 2006-10-14 14:35:19 UTC
Patch applied in SVN commit 595474.

Index: ChangeLog
===================================================================
--- ChangeLog   (revision 595466)
+++ ChangeLog   (working copy)
@@ -51,6 +51,8 @@
     * Show a proper tag dialog when viewing information for DAAP music shares.

   BUGFIXES:
+    * Stop scripts using a proxy when it's disabled in KDE. Patch by Felix Geyer
+      <sniperbeamer_disc1@fobos.de>.
     * While playing Last.fm Streams, sometimes metadata wouldn't be updated
       on track changes. Patch by Tom Kaitchuck <tkaitchuck@comcast.net>.
     * Speed patch to load playlist columns from statistic tables on population
Index: src/scriptmanager.cpp
===================================================================
--- src/scriptmanager.cpp       (revision 595466)
+++ src/scriptmanager.cpp       (working copy)
@@ -97,7 +97,9 @@
     QString
     proxyForProtocol(const QString& protocol)
     {
-        return KProtocolManager::proxyFor ( protocol );
+        if ( KProtocolManager::useProxy() )
+            return KProtocolManager::proxyFor( protocol );
+        return QString::null;
     }