diff options
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 1848e682..0956e3ff 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -307,7 +307,7 @@ void MainView::newTab() switch(ReKonfig::newTabsBehaviour()) { case 0: - if(Application::instance()->homePage()) + if(Application::instance()->mainWindow()->homePage()) break; case 1: urlBar()->setUrl(KUrl("")); @@ -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(); @@ -595,4 +602,4 @@ void MainView::resizeEvent(QResizeEvent *event) { updateTabBar(); KTabWidget::resizeEvent(event); -}
\ No newline at end of file +} |