kopete: Fix unintended renaming ICQ => ICTQ

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 7 years ago
parent 2d5f9c55da
commit c49165ddb7

@ -107,7 +107,7 @@ k_dcop:
* Get the KABC uid corresponding to the supplied IM address * Get the KABC uid corresponding to the supplied IM address
* Protocols should be * Protocols should be
* @param contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC. * @param contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC.
* @param protocol the protocol, eg one of "AIMProtocol", "ICTQProtocol", * @param protocol the protocol, eg one of "AIMProtocol", "ICQProtocol",
* @return a KABC uid or null if none found/ * @return a KABC uid or null if none found/
*/ */
virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0; virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0;
@ -167,7 +167,7 @@ k_dcop:
/** /**
* Add a contact to the contact list * Add a contact to the contact list
* @param contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC. * @param contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC.
* @param protocol the protocol, eg one of "AIMProtocol", "ICTQProtocol", ... * @param protocol the protocol, eg one of "AIMProtocol", "ICQProtocol", ...
* @return whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported. * @return whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported.
*/ */
virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0; virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0;

@ -623,7 +623,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
convertOldAim = true; convertOldAim = true;
addressBookLabel = TQString::fromLatin1("aim"); addressBookLabel = TQString::fromLatin1("aim");
} }
else if( id == TQString::fromLatin1("ICTQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) else if( id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") )
{ {
fieldCount = 1; fieldCount = 1;
} }
@ -649,7 +649,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
// Do the actual conversion // Do the actual conversion
if ( id == TQString::fromLatin1( "OscarProtocol" ) || if ( id == TQString::fromLatin1( "OscarProtocol" ) ||
id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) || id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) ||
id == TQString::fromLatin1( "ICTQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) || id == TQString::fromLatin1( "ICQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) ||
id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) || id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) ||
id == TQString::fromLatin1( "GaduProtocol" ) ) id == TQString::fromLatin1( "GaduProtocol" ) )
{ {
@ -670,7 +670,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField ); pluginData[ id ].appendChild( dataField );
dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "contactId" ) ); dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "contactId" ) );
if( id == TQString::fromLatin1("ICTQProtocol") ) if( id == TQString::fromLatin1("ICQProtocol") )
dataField.appendChild( newList.createTextNode( icqData[ idx ] ) ); dataField.appendChild( newList.createTextNode( icqData[ idx ] ) );
else if( id == TQString::fromLatin1("GaduProtocol") ) else if( id == TQString::fromLatin1("GaduProtocol") )
dataField.appendChild( newList.createTextNode( gaduData[ idx ] ) ); dataField.appendChild( newList.createTextNode( gaduData[ idx ] ) );
@ -682,7 +682,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField ); pluginData[ id ].appendChild( dataField );
dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "displayName" ) ); dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "displayName" ) );
if( convertOldAim || id == TQString::fromLatin1("ICTQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) if( convertOldAim || id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") )
dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); dataField.appendChild( newList.createTextNode( strList[ idx ] ) );
else if( id == TQString::fromLatin1("JabberProtocol") ) else if( id == TQString::fromLatin1("JabberProtocol") )
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
@ -727,7 +727,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
// AIM, IRC, Oscar and SMS didn't store address book fields up // AIM, IRC, Oscar and SMS didn't store address book fields up
// to now, so create one // to now, so create one
if( id != TQString::fromLatin1("ICTQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") ) if( id != TQString::fromLatin1("ICQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") )
{ {
TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) );
newMetaContact.appendChild( addressBookField ); newMetaContact.appendChild( addressBookField );

@ -68,9 +68,9 @@ void HistoryPlugin::convertOldHistory()
if(accountId.isNull() || protocolId.isNull()) if(accountId.isNull() || protocolId.isNull())
{ {
if(fi->fileName() == "ICTQProtocol" || fi->fileName() == "icq_logs" ) if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" )
{ {
protocolId="ICTQProtocol"; protocolId="ICQProtocol";
TDEGlobal::config()->setGroup("ICQ"); TDEGlobal::config()->setGroup("ICQ");
accountId=TDEGlobal::config()->readEntry( "UIN" ); accountId=TDEGlobal::config()->readEntry( "UIN" );
} }
@ -319,7 +319,7 @@ bool HistoryPlugin::detectOldHistory()
if( dynamic_cast<Kopete::Protocol *>( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) ) if( dynamic_cast<Kopete::Protocol *>( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) )
return true; return true;
if(fi->fileName() == "ICTQProtocol" || fi->fileName() == "icq_logs" ) if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" )
return true; return true;
else if(fi->fileName() == "AIMProtocol" || fi->fileName() == "aim_logs" ) else if(fi->fileName() == "AIMProtocol" || fi->fileName() == "aim_logs" )
return true; return true;

@ -2273,7 +2273,7 @@ void Level::flush()
/* /*
const char *encoding = NULL; const char *encoding = NULL;
if (m_nEncoding){ if (m_nEncoding){
for (const ENCODING *c = ICTQPlugin::core->encodings; c->language; c++){ for (const ENCODING *c = ICQPlugin::core->encodings; c->language; c++){
if (!c->bMain) if (!c->bMain)
continue; continue;
if ((unsigned)c->rtf_code == m_nEncoding){ if ((unsigned)c->rtf_code == m_nEncoding){
@ -2285,7 +2285,7 @@ void Level::flush()
if (encoding == NULL) if (encoding == NULL)
encoding = p->encoding; encoding = p->encoding;
TQTextCodec *codec = ICTQClient::_getCodec(encoding); TQTextCodec *codec = ICQClient::_getCodec(encoding);
*/ */
//p->PrintQuoted(codec->toUnicode(text.c_str(), text.length())); //p->PrintQuoted(codec->toUnicode(text.c_str(), text.length()));
p->PrintQuoted(text.c_str()); p->PrintQuoted(text.c_str());
@ -2374,15 +2374,15 @@ TQString RTF2HTML::Parse(const char *rtf, const char *_encoding)
} }
case IMG:{ case IMG:{
cur_level.flush(); cur_level.flush();
const char ICTQIMAGE[] = "icqimage"; const char ICQIMAGE[] = "icqimage";
const char *smiles[] = { ":-)" , ":-O" , ":-|" , ":-/" , // 0-3 const char *smiles[] = { ":-)" , ":-O" , ":-|" , ":-/" , // 0-3
":-(" , ":-*" , ":-/" , ":'(" , // 4-7 ":-(" , ":-*" , ":-/" , ":'(" , // 4-7
";-)" , ":-@" , ":-$" , ":-X" , // 8-B ";-)" , ":-@" , ":-$" , ":-X" , // 8-B
":-P" , "8-)" , "O:)" , ":-D" }; // C-F ":-P" , "8-)" , "O:)" , ":-D" }; // C-F
const char *p = rtftext + 3; const char *p = rtftext + 3;
if ((strlen(p) > strlen(ICTQIMAGE)) && !memcmp(p, ICTQIMAGE, strlen(ICTQIMAGE))){ if ((strlen(p) > strlen(ICQIMAGE)) && !memcmp(p, ICQIMAGE, strlen(ICQIMAGE))){
unsigned n = 0; unsigned n = 0;
for (p += strlen(ICTQIMAGE); *p; p++){ for (p += strlen(ICQIMAGE); *p; p++){
if ((*p >= '0') && (*p <= '9')){ if ((*p >= '0') && (*p <= '9')){
n = n << 4; n = n << 4;
n += (*p - '0'); n += (*p - '0');
@ -2516,7 +2516,7 @@ TQString RTF2HTML::Parse(const char *rtf, const char *_encoding)
} }
/* /*
bool ICTQClient::parseRTF(const char *rtf, const char *encoding, TQString &res) bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res)
{ {
char _RTF[] = "{\\rtf"; char _RTF[] = "{\\rtf";
if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){ if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){
@ -2524,7 +2524,7 @@ bool ICTQClient::parseRTF(const char *rtf, const char *encoding, TQString &res)
res = p.Parse(rtf, encoding); res = p.Parse(rtf, encoding);
return true; return true;
} }
TQTextCodec *codec = ICTQClient::_getCodec(encoding); TQTextCodec *codec = ICQClient::_getCodec(encoding);
res = codec->toUnicode(rtf, strlen(rtf)); res = codec->toUnicode(rtf, strlen(rtf));
return false; return false;
} }

Loading…
Cancel
Save