+
+ if (globalFirefoxInstalled || globalChromiumInstalled)
+ {
+ // Add the open with Firefox action if Firefox is installed.
+ if (globalFirefoxInstalled)
+ {
+ // Create an open with Firefox action.
+ QAction *openWithFirefoxActionPointer = new QAction(QIcon::fromTheme(QLatin1String("firefox-esr")), i18nc("Open with Firefox context menu action", "Open with Firefox"), contextMenu);
+
+ // Add the open with Firefox action above the back action.
+ contextMenu->insertAction(webEnginePagePointer->action(QWebEnginePage::Back), openWithFirefoxActionPointer);
+
+ // Connect the action.
+ connect(openWithFirefoxActionPointer, SIGNAL(triggered()), this, SLOT(openWithFirefox()));
+ }
+
+ // Add the open with Chromium action if Chromium is installed.
+ if (globalChromiumInstalled)
+ {
+ // Create an open with Chromium action.
+ QAction *openWithChromiumActionPointer = new QAction(QIcon::fromTheme(QLatin1String("chromium")), i18nc("Open with Chromium context menu action", "Open with Chromium"), contextMenu);
+
+ // Add the open with Chromium action above the back action.
+ contextMenu->insertAction(webEnginePagePointer->action(QWebEnginePage::Back), openWithChromiumActionPointer);
+
+ // Connect the action.
+ connect(openWithChromiumActionPointer, SIGNAL(triggered()), this, SLOT(openWithChromium()));
+ }
+
+
+ // Add a separator above the back action.
+ contextMenu->insertSeparator(webEnginePagePointer->action(QWebEnginePage::Back));
+ }