summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2013-09-14 20:55:23 (GMT)
committerSwift Review <review@swift.im>2013-09-16 17:57:45 (GMT)
commit10f91c4973c8d464b06149525c6eb7be979453f9 (patch)
tree164873da2d5766f75c51db5748e2152ad4591ba4 /Swift/QtUI/QtChatView.cpp
parentb1d6c4a6f8aaedcb69ed111dff87cba87ccc96cc (diff)
downloadswift-10f91c4973c8d464b06149525c6eb7be979453f9.zip
swift-10f91c4973c8d464b06149525c6eb7be979453f9.tar.bz2
Enable WebKit's Inspector if Swift is run in debug mode.
Change-Id: I758eb9e7df06887e9946d2a1fa56efed41796bb6 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/QtUI/QtChatView.cpp')
-rw-r--r--Swift/QtUI/QtChatView.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp
index 2536d39..31b9915 100644
--- a/Swift/QtUI/QtChatView.cpp
+++ b/Swift/QtUI/QtChatView.cpp
@@ -58,7 +58,9 @@ QtChatView::QtChatView(QtChatTheme* theme, QWidget* parent, bool disableAutoScro
webPage_ = new QWebPage(this);
webPage_->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
- //webPage_->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+ if (Log::getLogLevel() == Log::debug) {
+ webPage_->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+ }
webView_->setPage(webPage_);
connect(webPage_, SIGNAL(selectionChanged()), SLOT(copySelectionToClipboard()));
connect(webPage_, SIGNAL(scrollRequested(int, int, const QRect&)), SLOT(handleScrollRequested(int, int, const QRect&)));