summaryrefslogtreecommitdiff
path: root/src/webinspectorpanel.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-12-29 18:21:49 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-12-29 18:21:49 +0100
commit34d58e16dd7c8ce7c72a15d180238c350c9eeac5 (patch)
tree9492732a0fd1c0598a5882eb265367ab6ea248e7 /src/webinspectorpanel.cpp
parentRevert "Revert "Fix OpenSearchEngine crash call"" (diff)
downloadrekonq-34d58e16dd7c8ce7c72a15d180238c350c9eeac5.tar.xz
Fix crash webinspector related
it seems qtwebkit is managing the webinspector on its own, so DON'T try to delete it ourselves...
Diffstat (limited to 'src/webinspectorpanel.cpp')
-rw-r--r--src/webinspectorpanel.cpp8
1 files changed, 4 insertions, 4 deletions
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);
}