summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-25 10:58:16 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-10-25 10:58:16 +0100
commit3bfeffed04e3fd315afcaf93788aa19893803571 (patch)
treec8ddcbbaa04b343f33ef512f3297457141e67334 /src
parentLast Krazy fixes (diff)
downloadrekonq-3bfeffed04e3fd315afcaf93788aa19893803571.tar.xz
cloneTab patch
I could find references about this QtWebkit bug. But this patch surely has no downsides for us :)
Diffstat (limited to 'src')
-rw-r--r--src/mainview.cpp11
1 files changed, 9 insertions, 2 deletions
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();
}