diff --git a/src/app/qupzilla.cpp b/src/app/qupzilla.cpp index b3e44d8ff..b10169283 100644 --- a/src/app/qupzilla.cpp +++ b/src/app/qupzilla.cpp @@ -634,6 +634,7 @@ void QupZilla::aboutToShowToolsMenu() m_menuTools->addAction(QIcon(":/icons/menu/rss.png"), tr("RSS &Reader"), this, SLOT(showRSSManager())); m_menuTools->addAction(QIcon::fromTheme("edit-clear"), tr("Clear Recent &History"), this, SLOT(showClearPrivateData())); m_actionPrivateBrowsing = new QAction(tr("&Private Browsing"), this); + m_actionPrivateBrowsing->setShortcut(QKeySequence("Ctrl+Shift+P")); m_actionPrivateBrowsing->setCheckable(true); m_actionPrivateBrowsing->setChecked(mApp->webSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled)); connect(m_actionPrivateBrowsing, SIGNAL(triggered(bool)), this, SLOT(startPrivate(bool))); diff --git a/src/webview/tabbar.cpp b/src/webview/tabbar.cpp index 50bfaf3be..694c386f0 100644 --- a/src/webview/tabbar.cpp +++ b/src/webview/tabbar.cpp @@ -233,13 +233,13 @@ void TabBar::mouseDoubleClickEvent(QMouseEvent* event) void TabBar::mousePressEvent(QMouseEvent* event) { - TabWidget* tabWidget = qobject_cast(parentWidget()); - if (!tabWidget) - return; - int id = tabAt(event->pos()); if (id != -1 && event->buttons() == Qt::MiddleButton) { - tabWidget->closeTab(id); + m_tabWidget->closeTab(id); + return; + } + if (id == -1 && event->buttons() == Qt::MiddleButton) { + m_tabWidget->addView(QUrl(), tr("New tab"), TabWidget::NewSelectedTab, true); return; } QTabBar::mousePressEvent(event);