make $LAUNCHER_VER actually work
This commit is contained in:
parent
5930acc418
commit
4cecba8787
@ -1557,9 +1557,9 @@ QString Application::getCurseKey()
|
||||
|
||||
QString Application::getUserAgent()
|
||||
{
|
||||
QString keyOverride = m_settings->get("UserAgentOverride").toString();
|
||||
if (!keyOverride.isEmpty()) {
|
||||
return keyOverride;
|
||||
QString uaOverride = m_settings->get("UserAgentOverride").toString();
|
||||
if (!uaOverride.isEmpty()) {
|
||||
return uaOverride.replace("$LAUNCHER_VER", BuildConfig.printableVersionString());
|
||||
}
|
||||
|
||||
return BuildConfig.USER_AGENT;
|
||||
@ -1567,9 +1567,9 @@ QString Application::getUserAgent()
|
||||
|
||||
QString Application::getUserAgentUncached()
|
||||
{
|
||||
QString keyOverride = m_settings->get("UserAgentOverride").toString();
|
||||
if (!keyOverride.isEmpty()) {
|
||||
return keyOverride;
|
||||
QString uaOverride = m_settings->get("UserAgentOverride").toString();
|
||||
if (!uaOverride.isEmpty()) {
|
||||
return uaOverride.replace("$LAUNCHER_VER", BuildConfig.printableVersionString());
|
||||
}
|
||||
|
||||
return BuildConfig.USER_AGENT_UNCACHED;
|
||||
|
@ -265,7 +265,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="userAgentLabel">
|
||||
<property name="text">
|
||||
<string>Enter a custom User Agent here. The special string ${launcher_version} will be replaced with the version of the launcher.</string>
|
||||
<string>Enter a custom User Agent here. The special string $LAUNCHER_VER will be replaced with the version of the launcher.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user