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 Application::getUserAgent()
|
||||||
{
|
{
|
||||||
QString keyOverride = m_settings->get("UserAgentOverride").toString();
|
QString uaOverride = m_settings->get("UserAgentOverride").toString();
|
||||||
if (!keyOverride.isEmpty()) {
|
if (!uaOverride.isEmpty()) {
|
||||||
return keyOverride;
|
return uaOverride.replace("$LAUNCHER_VER", BuildConfig.printableVersionString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return BuildConfig.USER_AGENT;
|
return BuildConfig.USER_AGENT;
|
||||||
@ -1567,9 +1567,9 @@ QString Application::getUserAgent()
|
|||||||
|
|
||||||
QString Application::getUserAgentUncached()
|
QString Application::getUserAgentUncached()
|
||||||
{
|
{
|
||||||
QString keyOverride = m_settings->get("UserAgentOverride").toString();
|
QString uaOverride = m_settings->get("UserAgentOverride").toString();
|
||||||
if (!keyOverride.isEmpty()) {
|
if (!uaOverride.isEmpty()) {
|
||||||
return keyOverride;
|
return uaOverride.replace("$LAUNCHER_VER", BuildConfig.printableVersionString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return BuildConfig.USER_AGENT_UNCACHED;
|
return BuildConfig.USER_AGENT_UNCACHED;
|
||||||
|
@ -265,7 +265,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="userAgentLabel">
|
<widget class="QLabel" name="userAgentLabel">
|
||||||
<property name="text">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user