Bug 141671 - KTorrent Web Browser: Clicking a link does not scroll to the top of the page
Summary: KTorrent Web Browser: Clicking a link does not scroll to the top of the page
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-14 09:12 UTC by Thomas
Modified: 2007-02-14 20:51 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 Thomas 2007-02-14 09:12:12 UTC
Version:           2.1 (using KDE 3.5.5, Kubuntu (edgy) 4:3.5.5-0ubuntu3.1)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17.14-ubuntu1-thor-6

When a link on a webpage in the ktorrent search plugin is clicked, the new webpage show up scrolled to where the previous page was. The top of the page should be displayed.
Comment 1 Joris Guisson 2007-02-14 20:51:31 UTC
SVN commit 633675 by guisson:

Fixed bug 141671 : Clicking a link does not scroll to the top of the page in search plugin

BUG: 141671



 M  +1 -1      ktorrent.kdevelop  
 M  +4 -2      libktorrent/torrent/authenticationmonitor.cpp  
 M  +2 -0      plugins/search/htmlpart.cpp  


--- trunk/extragear/network/ktorrent/ktorrent.kdevelop #633674:633675
@@ -20,7 +20,7 @@
   </general>
   <kdevautoproject>
     <general>
-      <activetarget>plugins/webinterface/ktwebinterfaceplugin.la</activetarget>
+      <activetarget>libktorrent/net/libnet.la</activetarget>
       <useconfiguration>debug</useconfiguration>
       <useactivetarget>true</useactivetarget>
     </general>
--- trunk/extragear/network/ktorrent/libktorrent/torrent/authenticationmonitor.cpp #633674:633675
@@ -48,7 +48,8 @@
 		while (itr != auths.end())
 		{
 			AuthenticateBase* ab = *itr;
-			ab->deleteLater();
+			if (ab)
+				ab->deleteLater();
 			itr++;
 		}
 		auths.clear();
@@ -136,7 +137,8 @@
 			
 			if (!ab || ab->isFinished())
 			{
-				ab->deleteLater();
+				if (ab)
+					ab->deleteLater();
 				itr = auths.erase(itr);
 			}
 			else
--- trunk/extragear/network/ktorrent/plugins/search/htmlpart.cpp #633674:633675
@@ -28,6 +28,7 @@
 #include <kfiledialog.h>
 #include <kparts/browserextension.h>
 #include <util/constants.h>
+#include <khtmlview.h>
 #include "htmlpart.h"
 
 using namespace bt;
@@ -177,6 +178,7 @@
 				begin(curr_url);
 				write(curr_data.data(),curr_data.size());
 				end();
+				view()->ensureVisible(0,0);
 				searchFinished();
 			}
 		}