mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix slash to backslash conversions in url hashes for opening links in incognito (#4307)
* Pass link as argument instead of in command string when opening incognito links * Update CHANGELOG.md * Make changelog message more user facing * Remove now unused argument for getCommand
This commit is contained in:
parent
d1690943d4
commit
6ba1cf6ca3
|
@ -23,6 +23,7 @@
|
|||
- Bugfix: Fixed crash that could occur when closing down a split at the wrong time. (#4277)
|
||||
- Bugfix: Fixed crash that could occur when closing down the last of a channel when reloading emotes. (#4278)
|
||||
- Bugfix: Fixed scrollbar highlight colors when changing message history limit. (#4288)
|
||||
- Bugfix: Fixed an issue on Windows when opening links in incognito mode that contained forward slashes in hash (#4307)
|
||||
- Dev: Remove protocol from QApplication's Organization Domain (so changed from `https://www.chatterino.com` to `chatterino.com`). (#4256)
|
||||
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
|
||||
- Dev: Migrated to C++ 20 (#4252, #4257)
|
||||
|
|
|
@ -45,7 +45,7 @@ QString injectPrivateSwitch(QString command)
|
|||
return QString();
|
||||
}
|
||||
|
||||
QString getCommand(const QString &link)
|
||||
QString getCommand()
|
||||
{
|
||||
// get default browser prog id
|
||||
auto browserId = QSettings("HKEY_CURRENT_"
|
||||
|
@ -74,9 +74,6 @@ QString getCommand(const QString &link)
|
|||
return QString();
|
||||
}
|
||||
|
||||
// link
|
||||
command += " " + link;
|
||||
|
||||
return command;
|
||||
}
|
||||
#endif
|
||||
|
@ -88,7 +85,7 @@ namespace chatterino {
|
|||
bool supportsIncognitoLinks()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
return !getCommand("").isNull();
|
||||
return !getCommand().isNull();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
@ -97,10 +94,10 @@ bool supportsIncognitoLinks()
|
|||
bool openLinkIncognito(const QString &link)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
auto command = getCommand(link);
|
||||
auto command = getCommand();
|
||||
|
||||
// TODO: split command into program path and incognito argument
|
||||
return QProcess::startDetached(command, {});
|
||||
return QProcess::startDetached(command, {link});
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue