summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetecontactlist.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-12-11 01:41:26 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-12-11 02:23:35 +0100
commit73f00336178a9f312bac2992649120d462e0ac2d (patch)
tree8672519cb50cb0e642af0817188ad28f810338ee /kopete/libkopete/kopetecontactlist.cpp
parent914254104c50dec222fb31ce7a25a21870e90f16 (diff)
downloadtdenetwork-73f00336178a9f312bac2992649120d462e0ac2d.tar.gz
tdenetwork-73f00336178a9f312bac2992649120d462e0ac2d.zip
kopete: Restore the MSN protocol because a replacement MSN server was created.
This reverts commits 0486034738 - 2d5f9c55da and f6fd4ab6c0. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kopete/libkopete/kopetecontactlist.cpp')
-rw-r--r--kopete/libkopete/kopetecontactlist.cpp27
1 files changed, 22 insertions, 5 deletions
diff --git a/kopete/libkopete/kopetecontactlist.cpp b/kopete/libkopete/kopetecontactlist.cpp
index dc8cdeb1..f8aecb32 100644
--- a/kopete/libkopete/kopetecontactlist.cpp
+++ b/kopete/libkopete/kopetecontactlist.cpp
@@ -358,6 +358,11 @@ void ContactList::slotPhotoChanged()
emit globalIdentityChanged(Kopete::Global::Properties::self()->photo().key(), myself()->picture().path());
mutex=false;
+ /* The mutex is usefull to don't have such as stack overflow
+ Kopete::ContactList::slotPhotoChanged -> Kopete::ContactList::globalIdentityChanged
+ MSNAccount::slotGlobalIdentityChanged -> Kopete::Contact::propertyChanged
+ Kopete::MetaContact::slotPropertyChanged -> Kopete::MetaContact::photoChanged -> Kopete::ContactList::slotPhotoChanged
+ */
}
///////////////////////////////////////////////////////////////////////////////////////////////
@@ -517,7 +522,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
{
// Convert address book fields.
// Jabber will be called "xmpp", Aim/Toc and Aim/Oscar both will
- // be called "aim". AIM, IRC, Oscar and SMS don't use address
+ // be called "aim". MSN, AIM, IRC, Oscar and SMS don't use address
// book fields yet; Gadu and ICQ can be converted as-is.
// As Yahoo is unfinished we won't try to convert at all.
TQString id = oldContactElement.attribute( TQString::fromLatin1( "id" ), TQString() );
@@ -607,7 +612,12 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
bool convertOldAim = false;
uint fieldCount = 1;
TQString addressBookLabel;
- if( id == TQString::fromLatin1("IRCProtocol") )
+ if( id == TQString::fromLatin1("MSNProtocol") )
+ {
+ fieldCount = 3;
+ addressBookLabel = TQString::fromLatin1("msn");
+ }
+ else if( id == TQString::fromLatin1("IRCProtocol") )
{
fieldCount = 3;
addressBookLabel = TQString::fromLatin1("irc");
@@ -647,7 +657,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
}
// Do the actual conversion
- if ( id == TQString::fromLatin1( "OscarProtocol" ) ||
+ if( id == TQString::fromLatin1( "MSNProtocol" ) || id == TQString::fromLatin1( "OscarProtocol" ) ||
id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) ||
id == TQString::fromLatin1( "ICQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) ||
id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) ||
@@ -689,7 +699,14 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
else
dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) );
- if( id == TQString::fromLatin1("IRCProtocol") )
+ if( id == TQString::fromLatin1("MSNProtocol") )
+ {
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
+ pluginData[ id ].appendChild( dataField );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) );
+ dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
+ }
+ else if( id == TQString::fromLatin1("IRCProtocol") )
{
dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
@@ -725,7 +742,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
idx += 2;
}
- // AIM, IRC, Oscar and SMS didn't store address book fields up
+ // MSN, AIM, IRC, Oscar and SMS didn't store address book fields up
// to now, so create one
if( id != TQString::fromLatin1("ICQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") )
{