From db4034d2d948c5f025f687a5d594201e7b909d63 Mon Sep 17 00:00:00 2001 From: fourtf Date: Tue, 16 Oct 2018 16:25:48 +0200 Subject: [PATCH] vivaldi and opera support for incognito links --- src/util/IncognitoBrowser.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/util/IncognitoBrowser.cpp b/src/util/IncognitoBrowser.cpp index 81cb2ffd..2b6cdc22 100644 --- a/src/util/IncognitoBrowser.cpp +++ b/src/util/IncognitoBrowser.cpp @@ -14,19 +14,18 @@ namespace { { // list of command line switches to turn on private browsing in browsers static auto switches = std::vector>{ - {"firefox", "-private-window"}, {"chrome", "-incognito"}, - {"vivaldi", "--private"}, {"opera", "-newprivatetab"}, - {"iexplore", "-private"}, + {"firefox", "-private-window"}, {"chrome", "-incognito"}, + {"vivaldi", "-incognito"}, {"opera", "-newprivatetab"}, + {"opera\\\\launcher", "--private"}, {"iexplore", "-private"}, }; // transform into regex and replacement string std::vector> replacers; for (const auto &switch_ : switches) { replacers.emplace_back( - QRegularExpression("(" + switch_.first + "\\.exe\"?).*"), + QRegularExpression("(" + switch_.first + "\\.exe\"?).*", + QRegularExpression::CaseInsensitiveOption), "\\1 " + switch_.second); - - log("(" + switch_.first + "\\.exe\"?).*"); } // try to find matching regex and apply it