diff options
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 26248da5..903ec12b 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -314,7 +314,7 @@ WebTab *MainView::newWebTab(bool focused) // connecting webview with mainview connect(tab->view(), SIGNAL(loadStarted()), this, SLOT(webViewLoadStarted())); connect(tab->view(), SIGNAL(loadFinished(bool)), this, SLOT(webViewLoadFinished(bool))); - connect(tab->view(), SIGNAL(titleChanged(const QString &)), this, SLOT(webViewTitleChanged(const QString &))); + connect(tab, SIGNAL(titleChanged(const QString &)), this, SLOT(webViewTitleChanged(const QString &))); connect(tab->view(), SIGNAL(urlChanged(const QUrl &)), this, SLOT(webViewUrlChanged(const QUrl &))); connect(tab->view(), SIGNAL(iconChanged()), this, SLOT(webViewIconChanged())); @@ -584,8 +584,8 @@ void MainView::webViewTitleChanged(const QString &title) QString tabTitle = viewTitle; tabTitle.replace('&', "&&"); - WebView *view = qobject_cast<WebView *>(sender()); - int index = indexOf(view->parentWidget()); + WebTab *tab = qobject_cast<WebTab *>(sender()); + int index = indexOf(tab); if (-1 != index) { setTabText(index, tabTitle); @@ -594,7 +594,7 @@ void MainView::webViewTitleChanged(const QString &title) { emit currentTitle(viewTitle); } - Application::historyManager()->updateHistoryEntry(view->url(), tabTitle); + Application::historyManager()->updateHistoryEntry(tab->url(), tabTitle); } |