From 3bfeffed04e3fd315afcaf93788aa19893803571 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 25 Oct 2009 10:58:16 +0100 Subject: cloneTab patch I could find references about this QtWebkit bug. But this patch surely has no downsides for us :) --- src/mainview.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index 80753bbf..0956e3ff 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -383,8 +383,15 @@ void MainView::slotCloneTab(int index) index = currentIndex(); if (index < 0 || index >= count()) return; - WebView *tab = newWebView(); - tab->setUrl(webView(index)->url()); + + WebView *tab = newWebView(); + KUrl url = webView(index)->url(); + + // workaround against bug in webkit: + // only set url if it is not empty + // otherwise the current working directory will be used + if (!url.isEmpty()) + tab->setUrl(url); updateTabBar(); } -- cgit v1.2.1