Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

consolidate firefox incognitobrowser logic (and deprecate opera/launcher) #5805

Merged
merged 11 commits into from
Jan 11, 2025
Prev Previous commit
Next Next commit
nit: revert namechange of lowercasedBrowserExecutable
[skip ci]
  • Loading branch information
pajlada committed Jan 11, 2025
commit d2c124715833248aee8828ce32fe96dcca37289c
10 changes: 5 additions & 5 deletions src/util/IncognitoBrowser.cpp
Original file line number Diff line number Diff line change
@@ -32,26 +32,26 @@ QString getPrivateSwitch(const QString &browserExecutable)

// the browser executable may be a full path, strip it to its basename and
// compare case insensitively
auto lowercasedExecutable =
auto lowercasedBrowserExecutable =
QFileInfo(browserExecutable).baseName().toLower();

#ifdef Q_OS_WINDOWS
if (lowercasedExecutable.endsWith(".exe"))
if (lowercasedBrowserExecutable.endsWith(".exe"))
{
lowercasedExecutable.chop(4);
lowercasedBrowserExecutable.chop(4);
}
#endif

for (const auto &switch_ : switches)
pajlada marked this conversation as resolved.
Show resolved Hide resolved
{
if (lowercasedExecutable == switch_.first)
if (lowercasedBrowserExecutable == switch_.first)
{
return switch_.second;
}
}

// catch all mozilla distributed variants
if (lowercasedExecutable.startsWith("firefox"))
if (lowercasedBrowserExecutable.startsWith("firefox"))
{
return "-private-window";
}