diff --git a/src/app/commandlineoptions.cpp b/src/app/commandlineoptions.cpp index 7f34d92c2..964d4d7e1 100644 --- a/src/app/commandlineoptions.cpp +++ b/src/app/commandlineoptions.cpp @@ -80,9 +80,9 @@ void CommandLineOptions::parseActions() } if (arg == "-v" || arg == "--version") { cout << "QupZilla v" << QupZilla::VERSION.toUtf8().data() - #ifdef GIT_REVISION +#ifdef GIT_REVISION << " rev " << GIT_REVISION << " " - #endif +#endif << "(build " << QupZilla::BUILDTIME.toUtf8().data() << ")" << endl; found = true; diff --git a/src/webview/webinspectordockwidget.cpp b/src/webview/webinspectordockwidget.cpp index e1c344a7d..6a8cfff6d 100644 --- a/src/webview/webinspectordockwidget.cpp +++ b/src/webview/webinspectordockwidget.cpp @@ -36,7 +36,9 @@ WebInspectorDockWidget::WebInspectorDockWidget(QupZilla* mainClass) void WebInspectorDockWidget::close() { +#if (QTWEBKIT_VERSION < QTWEBKIT_VERSION_CHECK(2, 2, 0)) delete m_inspector.data(); +#endif p_QupZilla->weView()->webTab()->setInspectorVisible(false); hide(); diff --git a/src/webview/webtab.cpp b/src/webview/webtab.cpp index a72e38dea..af7328d9a 100644 --- a/src/webview/webtab.cpp +++ b/src/webview/webtab.cpp @@ -50,6 +50,41 @@ WebTab::WebTab(QupZilla* mainClass, LocationBar* locationBar) connect(m_locationBar.data(), SIGNAL(loadUrl(QUrl)), m_view.data(), SLOT(load(QUrl))); } +WebView* WebTab::view() +{ + return m_view.data(); +} + +bool WebTab::isPinned() +{ + return m_pinned; +} + +void WebTab::setPinned(bool state) +{ + m_pinned = state; +} + +void WebTab::setLocationBar(LocationBar* bar) +{ + m_locationBar = bar; +} + +LocationBar* WebTab::locationBar() +{ + return m_locationBar.data(); +} + +bool WebTab::inspectorVisible() +{ + return m_inspectorVisible; +} + +void WebTab::setInspectorVisible(bool v) +{ + m_inspectorVisible = v; +} + void WebTab::showNotification(QWidget* notif) { if (m_layout->count() > 1) { diff --git a/src/webview/webtab.h b/src/webview/webtab.h index 7f27c6a13..32a7fddaf 100644 --- a/src/webview/webtab.h +++ b/src/webview/webtab.h @@ -32,16 +32,16 @@ class WebTab : public QWidget public: explicit WebTab(QupZilla* mainClass, LocationBar* locationBar); ~WebTab(); - WebView* view() { return m_view.data(); } - bool isPinned() { return m_pinned; } + WebView* view(); + bool isPinned(); void pinTab(int index); - void setPinned(bool state) { m_pinned = state; } + void setPinned(bool state); - void setLocationBar(LocationBar* bar) { m_locationBar = bar; } - LocationBar* locationBar() { return m_locationBar.data(); } + void setLocationBar(LocationBar* bar); + LocationBar* locationBar(); - bool inspectorVisible() { return m_inspectorVisible; } - void setInspectorVisible(bool v) { m_inspectorVisible = v; } + bool inspectorVisible(); + void setInspectorVisible(bool v); private slots: void showNotification(QWidget* notif);