From b4cb6ffccb359682781df7d40df584adcf0329fe Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 17 Jun 2010 00:50:23 +0200 Subject: Fix Network Analyzer Panel switch.. --- src/analyzer/analyzerpanel.cpp | 6 ++++-- src/analyzer/analyzerpanel.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/analyzer') diff --git a/src/analyzer/analyzerpanel.cpp b/src/analyzer/analyzerpanel.cpp index 9198cade..311f460f 100644 --- a/src/analyzer/analyzerpanel.cpp +++ b/src/analyzer/analyzerpanel.cpp @@ -63,7 +63,7 @@ void NetworkAnalyzerPanel::closeEvent(QCloseEvent *event) MainWindow* NetworkAnalyzerPanel::mainWindow() { - return qobject_cast< MainWindow* >(parentWidget()); + return qobject_cast(parentWidget()); } @@ -73,9 +73,11 @@ void NetworkAnalyzerPanel::toggle(bool enable) WebPage *page = mainWindow()->currentTab()->page(); NetworkAccessManager *manager = qobject_cast(page->networkAccessManager()); + page->enableNetworkAnalyzer(enable); + if (enable) { - connect(page, SIGNAL(loadStarted()), _viewer, SLOT(clear())); + connect(page, SIGNAL(loadStarted()), _viewer, SLOT(clear())); connect(manager, SIGNAL(networkData(QNetworkAccessManager::Operation, const QNetworkRequest &, QNetworkReply *)), _viewer, SLOT(addRequest(QNetworkAccessManager::Operation, const QNetworkRequest &, QNetworkReply *) ) ); diff --git a/src/analyzer/analyzerpanel.h b/src/analyzer/analyzerpanel.h index d98206f1..99d39309 100644 --- a/src/analyzer/analyzerpanel.h +++ b/src/analyzer/analyzerpanel.h @@ -48,11 +48,11 @@ class NetworkAnalyzer; class REKONQ_TESTS_EXPORT NetworkAnalyzerPanel : public QDockWidget { Q_OBJECT + public: NetworkAnalyzerPanel(const QString &title, QWidget *parent); ~NetworkAnalyzerPanel(); - public slots: void toggle(bool enable); void changeCurrentPage(); -- cgit v1.2.1