// Add the custom actions.
QAction *newTabActionPointer = actionCollectionPointer->addAction(QLatin1String("new_tab"));
QAction *newWindowActionPointer = actionCollectionPointer->addAction(QLatin1String("new_window"));
+ QAction *reloadAndBypassCacheActionPointer = actionCollectionPointer->addAction(QLatin1String("reload_and_bypass_cache"));
userAgentPrivacyBrowserActionPointer = actionCollectionPointer->addAction(QLatin1String("user_agent_privacy_browser"));
userAgentWebEngineDefaultActionPointer = actionCollectionPointer->addAction(QLatin1String("user_agent_webengine_default"));
userAgentFirefoxLinuxActionPointer = actionCollectionPointer->addAction(QLatin1String("user_agent_firefox_linux"));
// Set the action text.
newTabActionPointer->setText(i18nc("New tab action", "New Tab"));
newWindowActionPointer->setText(i18nc("New window action", "New Window"));
+ reloadAndBypassCacheActionPointer->setText(i18nc("Reload and bypass cache action", "Reload and Bypass Cache"));
userAgentPrivacyBrowserActionPointer->setText(userAgentHelperPointer->PRIVACY_BROWSER_TRANSLATED);
userAgentWebEngineDefaultActionPointer->setText(userAgentHelperPointer->WEB_ENGINE_DEFAULT_TRANSLATED);
userAgentFirefoxLinuxActionPointer->setText(userAgentHelperPointer->FIREFOX_LINUX_TRANSLATED);
// The toolbar icons don't pick up unless the size is explicit, probably because the toolbar ends up being an intermediate size.
newTabActionPointer->setIcon(QIcon::fromTheme(QLatin1String("tab-new")));
newWindowActionPointer->setIcon(QIcon::fromTheme(QLatin1String("window-new")));
+ reloadAndBypassCacheActionPointer->setIcon(QIcon::fromTheme(QLatin1String("view-refresh")));
userAgentPrivacyBrowserActionPointer->setIcon(QIcon(":/icons/privacy-mode.svg"));
userAgentWebEngineDefaultActionPointer->setIcon(QIcon::fromTheme(QLatin1String("qtlogo"), QIcon::fromTheme(QLatin1String("user-group-properties"),
QIcon::fromTheme(QLatin1String("contact-new")))));
// Create the key sequences.
QKeySequence ctrlTKeySequence = QKeySequence(i18nc("The open new tab key sequence.", "Ctrl+T"));
QKeySequence ctrlNKeySequence = QKeySequence(i18nc("The open new window key sequence.", "Ctrl+N"));
+ QKeySequence ctrlF5KeySequence = QKeySequence(i18nc("The reload and bypass cache key sequence.", "Ctrl+F5"));
QKeySequence ctrlShiftPKeySequence = QKeySequence(i18nc("The print preview key sequence.", "Ctrl+Shift+P"));
QKeySequence ctrlAltPKeySequence = QKeySequence(i18nc("The Privacy Browser user agent key sequence.", "Ctrl+Alt+P"));
QKeySequence ctrlAltWKeySequence = QKeySequence(i18nc("The WebEngine Default user agent key sequence.", "Ctrl+Alt+W"));
// Set the action key sequences.
actionCollectionPointer->setDefaultShortcut(newTabActionPointer, ctrlTKeySequence);
actionCollectionPointer->setDefaultShortcut(newWindowActionPointer, ctrlNKeySequence);
+ actionCollectionPointer->setDefaultShortcut(reloadAndBypassCacheActionPointer, ctrlF5KeySequence);
actionCollectionPointer->setDefaultShortcut(printPreviewActionPointer, ctrlShiftPKeySequence);
actionCollectionPointer->setDefaultShortcut(userAgentPrivacyBrowserActionPointer, ctrlAltPKeySequence);
actionCollectionPointer->setDefaultShortcut(userAgentWebEngineDefaultActionPointer, ctrlAltWKeySequence);
// Execute the actions.
connect(newTabActionPointer, SIGNAL(triggered()), tabWidgetPointer, SLOT(addTab()));
connect(newWindowActionPointer, SIGNAL(triggered()), this, SLOT(newWindow()));
+ connect(reloadAndBypassCacheActionPointer, SIGNAL(triggered()), this, SLOT(reloadAndBypassCache()));
connect(zoomFactorActionPointer, SIGNAL(triggered()), this, SLOT(getZoomFactorFromUser()));
connect(cookiesActionPointer, SIGNAL(triggered()), this, SLOT(showCookiesDialog()));
connect(domainSettingsActionPointer, SIGNAL(triggered()), this, SLOT(showDomainSettingsDialog()));
tabWidgetPointer->refresh();
}
+void BrowserWindow::reloadAndBypassCache() const
+{
+ // Remove the focus from the URL line edit.
+ urlLineEditPointer->clearFocus();
+
+ // Refresh the web page.
+ tabWidgetPointer->refresh();
+}
+
void BrowserWindow::showCookiesDialog()
{
// Remove the focus from the URL line edit.