From fe21365ffafb922a6b24959f3d1096e4c6171427 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 19 Nov 2010 01:32:04 +0100 Subject: Print && Find actions for the parts :) - handle print & find with different signals in mainwindow - show right tab title (moving titleChanged signal from view to tab) --- src/mainview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mainview.cpp') 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(sender()); - int index = indexOf(view->parentWidget()); + WebTab *tab = qobject_cast(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); } -- cgit v1.2.1