mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-22 16:59:58 +01:00
sipjreen: hopefully fix a bug that could happen with visible:false peers
This commit is contained in:
parent
7330c9364d
commit
137c608fa2
@ -363,8 +363,7 @@ JabberPlugin::sendMsg(const QString& to, const QString& msg)
|
||||
sipMessage = new TomahawkSipMessage(m["ip"].toString(),
|
||||
m["port"].toInt(),
|
||||
m["uniqname"].toString(),
|
||||
m["key"].toString(),
|
||||
m["visible"].toBool()
|
||||
m["key"].toString()
|
||||
);
|
||||
}
|
||||
else
|
||||
|
@ -26,14 +26,14 @@ public:
|
||||
bool visible;
|
||||
};
|
||||
|
||||
TomahawkSipMessage::TomahawkSipMessage(QString ip, unsigned int port, QString uniqname, QString key, bool visible) : d_ptr(new TomahawkSipMessagePrivate)
|
||||
TomahawkSipMessage::TomahawkSipMessage(QString ip, unsigned int port, QString uniqname, QString key) : d_ptr(new TomahawkSipMessagePrivate)
|
||||
{
|
||||
Q_D(TomahawkSipMessage);
|
||||
d->ip = ip;
|
||||
d->port = port;
|
||||
d->uniqname = uniqname;
|
||||
d->key = key;
|
||||
d->visible = visible;
|
||||
d->visible = true;
|
||||
}
|
||||
|
||||
TomahawkSipMessage::TomahawkSipMessage() : d_ptr(new TomahawkSipMessagePrivate)
|
||||
|
@ -11,7 +11,9 @@ class TomahawkSipMessage : public Jreen::StanzaExtension
|
||||
J_EXTENSION(TomahawkSipMessage, "")
|
||||
Q_DECLARE_PRIVATE(TomahawkSipMessage)
|
||||
public:
|
||||
TomahawkSipMessage(QString ip, unsigned int port, QString uniqname, QString key, bool visible);
|
||||
// sets visible to true
|
||||
TomahawkSipMessage(QString ip, unsigned int port, QString uniqname, QString key);
|
||||
|
||||
// sets visible to false as we dont have any extra information
|
||||
TomahawkSipMessage();
|
||||
~TomahawkSipMessage();
|
||||
|
@ -120,5 +120,8 @@ void TomahawkSipMessageFactory::serialize(StanzaExtension *extension, QXmlStream
|
||||
|
||||
StanzaExtension::Ptr TomahawkSipMessageFactory::createExtension()
|
||||
{
|
||||
return StanzaExtension::Ptr(new TomahawkSipMessage(m_ip, m_port, m_uniqname, m_key, m_visible));
|
||||
if(m_visible)
|
||||
return StanzaExtension::Ptr(new TomahawkSipMessage(m_ip, m_port, m_uniqname, m_key));
|
||||
else
|
||||
return StanzaExtension::Ptr(new TomahawkSipMessage());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user