diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-25 10:58:16 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-25 10:58:16 +0100 |
commit | 3bfeffed04e3fd315afcaf93788aa19893803571 (patch) | |
tree | c8ddcbbaa04b343f33ef512f3297457141e67334 /src/mainview.cpp | |
parent | Last Krazy fixes (diff) | |
download | rekonq-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/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 11 |
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(); } |