summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/analyzer/analyzerpanel.cpp7
-rw-r--r--src/webinspectorpanel.cpp8
-rw-r--r--src/webinspectorpanel.h1
3 files changed, 8 insertions, 8 deletions
diff --git a/src/analyzer/analyzerpanel.cpp b/src/analyzer/analyzerpanel.cpp
index 60f2c612..5be5aa27 100644
--- a/src/analyzer/analyzerpanel.cpp
+++ b/src/analyzer/analyzerpanel.cpp
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010-2011 by Matthieu Gicquel <matgic78 at gmail dot com>
+* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -74,17 +75,15 @@ void NetworkAnalyzerPanel::toggle(bool enable)
connect(page, SIGNAL(loadStarted()), _viewer, SLOT(clear()));
connect(manager, SIGNAL(networkData(QNetworkAccessManager::Operation, const QNetworkRequest &, QNetworkReply *)),
_viewer, SLOT(addRequest(QNetworkAccessManager::Operation, const QNetworkRequest &, QNetworkReply *)));
-
- show();
}
else
{
disconnect(page, SIGNAL(loadStarted()), _viewer, SLOT(clear()));
disconnect(manager, SIGNAL(networkData(QNetworkAccessManager::Operation, const QNetworkRequest &, QNetworkReply *)),
_viewer, SLOT(addRequest(QNetworkAccessManager::Operation, const QNetworkRequest &, QNetworkReply *)));
-
- hide();
}
+
+ setVisible(enable);
}
diff --git a/src/webinspectorpanel.cpp b/src/webinspectorpanel.cpp
index b3454ccb..59e95167 100644
--- a/src/webinspectorpanel.cpp
+++ b/src/webinspectorpanel.cpp
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010 by Matthieu Gicquel <matgic78 at gmail dot com>
+* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -57,6 +58,7 @@ void WebInspectorPanel::toggle(bool enable)
{
MainWindow *w = qobject_cast<MainWindow *>(parent());
w->actionByName(QL1S("web_inspector"))->setChecked(enable);
+
if (enable)
{
w->currentTab()->page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
@@ -66,15 +68,13 @@ void WebInspectorPanel::toggle(bool enable)
_inspector->setPage(w->currentTab()->page());
setWidget(_inspector);
}
- show();
}
else
{
w->currentTab()->page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);
- delete _inspector;
- _inspector = 0;
- hide();
}
+
+ setVisible(enable);
}
diff --git a/src/webinspectorpanel.h b/src/webinspectorpanel.h
index 70776a77..92da538b 100644
--- a/src/webinspectorpanel.h
+++ b/src/webinspectorpanel.h
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010-2011 by Matthieu Gicquel <matgic78 at gmail dot com>
+* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or