mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Qml token manager removed unuseful debug message
This commit is contained in:
parent
2d00532e00
commit
6e093c74c0
@ -35,29 +35,7 @@ QtObject
|
||||
return
|
||||
}
|
||||
|
||||
if (Array.isArray(tokens[token]))
|
||||
{
|
||||
if(QT_DEBUG)
|
||||
{
|
||||
/* Haven't properly investigated yet if it may happen in normal
|
||||
* situations that a callback is registered more then once, so
|
||||
* if we are in a debug session and that happens print warning
|
||||
* and stacktrace */
|
||||
var arrLen = tokens[token].length
|
||||
for(var i=0; i<arrLen; ++i)
|
||||
{
|
||||
if(callback === tokens[token][i])
|
||||
{
|
||||
console.warn("tokensManager.registerToken(token," +
|
||||
" callback) Attempt to register same" +
|
||||
" callback twice for:",
|
||||
i, token, callback.name)
|
||||
console.trace()
|
||||
}
|
||||
}
|
||||
}
|
||||
tokens[token].push(callback)
|
||||
}
|
||||
if (Array.isArray(tokens[token])) tokens[token].push(callback)
|
||||
else tokens[token] = [callback]
|
||||
}
|
||||
function unRegisterToken(token, callback)
|
||||
|
Loading…
Reference in New Issue
Block a user