mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #13192 from druiz17/fix-spaming-set-host
fix case sensitive comparison in AddressManager::setHost
This commit is contained in:
commit
168edb1cde
1 changed files with 3 additions and 3 deletions
|
@ -767,10 +767,10 @@ bool AddressManager::handleUsername(const QString& lookupString) {
|
|||
}
|
||||
|
||||
bool AddressManager::setHost(const QString& host, LookupTrigger trigger, quint16 port) {
|
||||
if (host != _domainURL.host() || port != _domainURL.port()) {
|
||||
bool hostHasChanged = QString::compare(host, _domainURL.host(), Qt::CaseInsensitive);
|
||||
if (hostHasChanged || port != _domainURL.port()) {
|
||||
addCurrentAddressToHistory(trigger);
|
||||
|
||||
bool emitHostChanged = host != _domainURL.host();
|
||||
_domainURL = QUrl();
|
||||
_domainURL.setScheme(URL_SCHEME_HIFI);
|
||||
_domainURL.setHost(host);
|
||||
|
@ -781,7 +781,7 @@ bool AddressManager::setHost(const QString& host, LookupTrigger trigger, quint16
|
|||
// any host change should clear the shareable place name
|
||||
_shareablePlaceName.clear();
|
||||
|
||||
if (emitHostChanged) {
|
||||
if (hostHasChanged) {
|
||||
emit hostChanged(host);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue