summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 6d282e0c..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();
}
@@ -418,7 +425,7 @@ void MainView::slotCloseTab(int index)
hasFocus = tab->hasFocus();
//store close tab except homepage
- if (!tab->url().prettyUrl().startsWith("rekonq:") && !tab->url().isEmpty())
+ if (!tab->url().prettyUrl().startsWith( QLatin1String("rekonq:") ) && !tab->url().isEmpty())
{
QString title = tab->title();
QString url = tab->url().prettyUrl();