summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetecontactlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/kopetecontactlist.cpp')
-rw-r--r--kopete/libkopete/kopetecontactlist.cpp260
1 files changed, 130 insertions, 130 deletions
diff --git a/kopete/libkopete/kopetecontactlist.cpp b/kopete/libkopete/kopetecontactlist.cpp
index 1a16b04d..95c625c3 100644
--- a/kopete/libkopete/kopetecontactlist.cpp
+++ b/kopete/libkopete/kopetecontactlist.cpp
@@ -378,14 +378,14 @@ void ContactList::loadXML()
// don't save when we're in the middle of this...
d->loaded = false;
- TQString filename = locateLocal( "appdata", TQString::tqfromLatin1( "contactlist.xml" ) );
+ TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) );
if( filename.isEmpty() )
{
d->loaded=true;
return ;
}
- TQDomDocument contactList( TQString::tqfromLatin1( "kopete-contact-list" ) );
+ TQDomDocument contactList( TQString::fromLatin1( "kopete-contact-list" ) );
TQFile contactListFile( filename );
contactListFile.open( IO_ReadOnly );
@@ -393,10 +393,10 @@ void ContactList::loadXML()
TQDomElement list = contactList.documentElement();
- TQString versionString = list.attribute( TQString::tqfromLatin1( "version" ), TQString() );
+ TQString versionString = list.attribute( TQString::fromLatin1( "version" ), TQString() );
uint version = 0;
- if( TQRegExp( TQString::tqfromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) )
- version = versionString.replace( TQString::tqfromLatin1( "." ), TQString() ).toUInt();
+ if( TQRegExp( TQString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) )
+ version = versionString.replace( TQString::fromLatin1( "." ), TQString() ).toUInt();
if( version < Private::ContactListVersion )
{
@@ -410,7 +410,7 @@ void ContactList::loadXML()
convertContactList( filename, version, Private::ContactListVersion );
- contactList = TQDomDocument ( TQString::tqfromLatin1( "kopete-contact-list" ) );
+ contactList = TQDomDocument ( TQString::fromLatin1( "kopete-contact-list" ) );
contactListFile.open( IO_ReadOnly );
contactList.setContent( &contactListFile );
@@ -423,7 +423,7 @@ void ContactList::loadXML()
TQDomElement element = list.firstChild().toElement();
while( !element.isNull() )
{
- if( element.tagName() == TQString::tqfromLatin1("meta-contact") )
+ if( element.tagName() == TQString::fromLatin1("meta-contact") )
{
//TODO: id isn't used
//TQString id = element.attribute( "id", TQString() );
@@ -439,7 +439,7 @@ void ContactList::loadXML()
metaContact );
}
}
- else if( element.tagName() == TQString::tqfromLatin1("kopete-group") )
+ else if( element.tagName() == TQString::fromLatin1("kopete-group") )
{
Kopete::Group *group = new Kopete::Group();
if( !group->fromXML( element ) )
@@ -453,7 +453,7 @@ void ContactList::loadXML()
}
}
// Only load myself metacontact information when Global Identity is enabled.
- else if( element.tagName() == TQString::tqfromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() )
+ else if( element.tagName() == TQString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() )
{
if( !myself()->fromXML( element ) )
{
@@ -479,19 +479,19 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
// changes to allow incremental (multi-pass) conversion so we don't have
// to rewrite the whole conversion code for each change.
- TQDomDocument contactList( TQString::tqfromLatin1( "messaging-contact-list" ) );
+ TQDomDocument contactList( TQString::fromLatin1( "messaging-contact-list" ) );
TQFile contactListFile( fileName );
contactListFile.open( IO_ReadOnly );
contactList.setContent( &contactListFile );
TQDomElement oldList = contactList.documentElement();
- TQDomDocument newList( TQString::tqfromLatin1( "kopete-contact-list" ) );
- newList.appendChild( newList.createProcessingInstruction( TQString::tqfromLatin1( "xml" ), TQString::tqfromLatin1( "version=\"1.0\"" ) ) );
+ TQDomDocument newList( TQString::fromLatin1( "kopete-contact-list" ) );
+ newList.appendChild( newList.createProcessingInstruction( TQString::fromLatin1( "xml" ), TQString::fromLatin1( "version=\"1.0\"" ) ) );
- TQDomElement newRoot = newList.createElement( TQString::tqfromLatin1( "kopete-contact-list" ) );
+ TQDomElement newRoot = newList.createElement( TQString::fromLatin1( "kopete-contact-list" ) );
newList.appendChild( newRoot );
- newRoot.setAttribute( TQString::tqfromLatin1( "version" ), TQString::tqfromLatin1( "1.0" ) );
+ newRoot.setAttribute( TQString::fromLatin1( "version" ), TQString::fromLatin1( "1.0" ) );
TQDomNode oldNode = oldList.firstChild();
while( !oldNode.isNull() )
@@ -499,10 +499,10 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
TQDomElement oldElement = oldNode.toElement();
if( !oldElement.isNull() )
{
- if( oldElement.tagName() == TQString::tqfromLatin1("meta-contact") )
+ if( oldElement.tagName() == TQString::fromLatin1("meta-contact") )
{
// Ignore ID, it is not used in the current list anyway
- TQDomElement newMetaContact = newList.createElement( TQString::tqfromLatin1( "meta-contact" ) );
+ TQDomElement newMetaContact = newList.createElement( TQString::fromLatin1( "meta-contact" ) );
newRoot.appendChild( newMetaContact );
// Plugin data is stored completely different, and requires
@@ -518,48 +518,48 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
while( !oldContactNode.isNull() )
{
TQDomElement oldContactElement = oldContactNode.toElement();
- if( !oldContactElement.isNull() && oldContactElement.tagName() == TQString::tqfromLatin1("address-book-field") )
+ if( !oldContactElement.isNull() && oldContactElement.tagName() == TQString::fromLatin1("address-book-field") )
{
// Convert address book fields.
// Jabber will be called "xmpp", Aim/Toc and Aim/Oscar both will
// 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::tqfromLatin1( "id" ), TQString() );
+ TQString id = oldContactElement.attribute( TQString::fromLatin1( "id" ), TQString() );
TQString data = oldContactElement.text();
TQString app, key, val;
- TQString separator = TQString::tqfromLatin1( "," );
- if( id == TQString::tqfromLatin1( "messaging/gadu" ) )
- separator = TQString::tqfromLatin1( "\n" );
- else if( id == TQString::tqfromLatin1( "messaging/icq" ) )
- separator = TQString::tqfromLatin1( ";" );
- else if( id == TQString::tqfromLatin1( "messaging/jabber" ) )
- id = TQString::tqfromLatin1( "messaging/xmpp" );
-
- if( id == TQString::tqfromLatin1( "messaging/gadu" ) || id == TQString::tqfromLatin1( "messaging/icq" ) ||
- id == TQString::tqfromLatin1( "messaging/winpopup" ) || id == TQString::tqfromLatin1( "messaging/xmpp" ) )
+ TQString separator = TQString::fromLatin1( "," );
+ if( id == TQString::fromLatin1( "messaging/gadu" ) )
+ separator = TQString::fromLatin1( "\n" );
+ else if( id == TQString::fromLatin1( "messaging/icq" ) )
+ separator = TQString::fromLatin1( ";" );
+ else if( id == TQString::fromLatin1( "messaging/jabber" ) )
+ id = TQString::fromLatin1( "messaging/xmpp" );
+
+ if( id == TQString::fromLatin1( "messaging/gadu" ) || id == TQString::fromLatin1( "messaging/icq" ) ||
+ id == TQString::fromLatin1( "messaging/winpopup" ) || id == TQString::fromLatin1( "messaging/xmpp" ) )
{
app = id;
- key = TQString::tqfromLatin1( "All" );
+ key = TQString::fromLatin1( "All" );
val = data.replace( separator, TQChar( 0xE000 ) );
}
if( !app.isEmpty() )
{
- TQDomElement addressBookField = newList.createElement( TQString::tqfromLatin1( "address-book-field" ) );
+ TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) );
newMetaContact.appendChild( addressBookField );
- addressBookField.setAttribute( TQString::tqfromLatin1( "app" ), app );
- addressBookField.setAttribute( TQString::tqfromLatin1( "key" ), key );
+ addressBookField.setAttribute( TQString::fromLatin1( "app" ), app );
+ addressBookField.setAttribute( TQString::fromLatin1( "key" ), key );
addressBookField.appendChild( newList.createTextNode( val ) );
// ICQ didn't store the contactId locally, only in the address
// book fields, so we need to be able to access it later
- if( id == TQString::tqfromLatin1( "messaging/icq" ) )
+ if( id == TQString::fromLatin1( "messaging/icq" ) )
icqData = TQStringList::split( TQChar( 0xE000 ), val );
- else if( id == TQString::tqfromLatin1("messaging/gadu") )
+ else if( id == TQString::fromLatin1("messaging/gadu") )
gaduData = TQStringList::split( TQChar( 0xE000 ), val );
}
}
@@ -573,103 +573,103 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
TQDomElement oldContactElement = oldContactNode.toElement();
if( !oldContactElement.isNull() )
{
- if( oldContactElement.tagName() == TQString::tqfromLatin1("display-name") )
+ if( oldContactElement.tagName() == TQString::fromLatin1("display-name") )
{
- TQDomElement displayName = newList.createElement( TQString::tqfromLatin1( "display-name" ) );
+ TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) );
displayName.appendChild( newList.createTextNode( oldContactElement.text() ) );
newMetaContact.appendChild( displayName );
}
- else if( oldContactElement.tagName() == TQString::tqfromLatin1("groups") )
+ else if( oldContactElement.tagName() == TQString::fromLatin1("groups") )
{
- TQDomElement groups = newList.createElement( TQString::tqfromLatin1( "groups" ) );
+ TQDomElement groups = newList.createElement( TQString::fromLatin1( "groups" ) );
newMetaContact.appendChild( groups );
TQDomNode oldGroup = oldContactElement.firstChild();
while( !oldGroup.isNull() )
{
TQDomElement oldGroupElement = oldGroup.toElement();
- if ( oldGroupElement.tagName() == TQString::tqfromLatin1("group") )
+ if ( oldGroupElement.tagName() == TQString::fromLatin1("group") )
{
- TQDomElement group = newList.createElement( TQString::tqfromLatin1( "group" ) );
+ TQDomElement group = newList.createElement( TQString::fromLatin1( "group" ) );
group.appendChild( newList.createTextNode( oldGroupElement.text() ) );
groups.appendChild( group );
}
- else if ( oldGroupElement.tagName() == TQString::tqfromLatin1("top-level") )
+ else if ( oldGroupElement.tagName() == TQString::fromLatin1("top-level") )
{
- TQDomElement group = newList.createElement( TQString::tqfromLatin1( "top-level" ) );
+ TQDomElement group = newList.createElement( TQString::fromLatin1( "top-level" ) );
groups.appendChild( group );
}
oldGroup = oldGroup.nextSibling();
}
}
- else if( oldContactElement.tagName() == TQString::tqfromLatin1( "plugin-data" ) )
+ else if( oldContactElement.tagName() == TQString::fromLatin1( "plugin-data" ) )
{
// Convert the plugin data
- TQString id = oldContactElement.attribute( TQString::tqfromLatin1( "plugin-id" ), TQString() );
+ TQString id = oldContactElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString() );
TQString data = oldContactElement.text();
bool convertOldAim = false;
uint fieldCount = 1;
TQString addressBookLabel;
- if( id == TQString::tqfromLatin1("MSNProtocol") )
+ if( id == TQString::fromLatin1("MSNProtocol") )
{
fieldCount = 3;
- addressBookLabel = TQString::tqfromLatin1("msn");
+ addressBookLabel = TQString::fromLatin1("msn");
}
- else if( id == TQString::tqfromLatin1("IRCProtocol") )
+ else if( id == TQString::fromLatin1("IRCProtocol") )
{
fieldCount = 3;
- addressBookLabel = TQString::tqfromLatin1("irc");
+ addressBookLabel = TQString::fromLatin1("irc");
}
- else if( id == TQString::tqfromLatin1("OscarProtocol") )
+ else if( id == TQString::fromLatin1("OscarProtocol") )
{
fieldCount = 2;
- addressBookLabel = TQString::tqfromLatin1("aim");
+ addressBookLabel = TQString::fromLatin1("aim");
}
- else if( id == TQString::tqfromLatin1("AIMProtocol") )
+ else if( id == TQString::fromLatin1("AIMProtocol") )
{
- id = TQString::tqfromLatin1("OscarProtocol");
+ id = TQString::fromLatin1("OscarProtocol");
convertOldAim = true;
- addressBookLabel = TQString::tqfromLatin1("aim");
+ addressBookLabel = TQString::fromLatin1("aim");
}
- else if( id == TQString::tqfromLatin1("ICTQProtocol") || id == TQString::tqfromLatin1("WPProtocol") || id == TQString::tqfromLatin1("GaduProtocol") )
+ else if( id == TQString::fromLatin1("ICTQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") )
{
fieldCount = 1;
}
- else if( id == TQString::tqfromLatin1("JabberProtocol") )
+ else if( id == TQString::fromLatin1("JabberProtocol") )
{
fieldCount = 4;
}
- else if( id == TQString::tqfromLatin1("SMSProtocol") )
+ else if( id == TQString::fromLatin1("SMSProtocol") )
{
// SMS used a variable serializing using a dot as delimiter.
// The minimal count is three though (id, name, delimiter).
fieldCount = 2;
- addressBookLabel = TQString::tqfromLatin1("sms");
+ addressBookLabel = TQString::fromLatin1("sms");
}
if( pluginData[ id ].isNull() )
{
- pluginData[ id ] = newList.createElement( TQString::tqfromLatin1( "plugin-data" ) );
- pluginData[ id ].setAttribute( TQString::tqfromLatin1( "plugin-id" ), id );
+ pluginData[ id ] = newList.createElement( TQString::fromLatin1( "plugin-data" ) );
+ pluginData[ id ].setAttribute( TQString::fromLatin1( "plugin-id" ), id );
newMetaContact.appendChild( pluginData[ id ] );
}
// Do the actual conversion
- if( id == TQString::tqfromLatin1( "MSNProtocol" ) || id == TQString::tqfromLatin1( "OscarProtocol" ) ||
- id == TQString::tqfromLatin1( "AIMProtocol" ) || id == TQString::tqfromLatin1( "IRCProtocol" ) ||
- id == TQString::tqfromLatin1( "ICTQProtocol" ) || id == TQString::tqfromLatin1( "JabberProtocol" ) ||
- id == TQString::tqfromLatin1( "SMSProtocol" ) || id == TQString::tqfromLatin1( "WPProtocol" ) ||
- id == TQString::tqfromLatin1( "GaduProtocol" ) )
+ if( id == TQString::fromLatin1( "MSNProtocol" ) || id == TQString::fromLatin1( "OscarProtocol" ) ||
+ id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) ||
+ id == TQString::fromLatin1( "ICTQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) ||
+ id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) ||
+ id == TQString::fromLatin1( "GaduProtocol" ) )
{
- TQStringList strList = TQStringList::split( TQString::tqfromLatin1( "||" ), data );
+ TQStringList strList = TQStringList::split( TQString::fromLatin1( "||" ), data );
// Unescape '||'
for( TQStringList::iterator it = strList.begin(); it != strList.end(); ++it )
{
- ( *it ).replace( TQString::tqfromLatin1( "\\|;" ), TQString::tqfromLatin1( "|" ) ).
- replace( TQString::tqfromLatin1( "\\\\" ), TQString::tqfromLatin1( "\\" ) );
+ ( *it ).replace( TQString::fromLatin1( "\\|;" ), TQString::fromLatin1( "|" ) ).
+ replace( TQString::fromLatin1( "\\\\" ), TQString::fromLatin1( "\\" ) );
}
uint idx = 0;
@@ -677,65 +677,65 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
{
TQDomElement dataField;
- dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "contactId" ) );
- if( id == TQString::tqfromLatin1("ICTQProtocol") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "contactId" ) );
+ if( id == TQString::fromLatin1("ICTQProtocol") )
dataField.appendChild( newList.createTextNode( icqData[ idx ] ) );
- else if( id == TQString::tqfromLatin1("GaduProtocol") )
+ else if( id == TQString::fromLatin1("GaduProtocol") )
dataField.appendChild( newList.createTextNode( gaduData[ idx ] ) );
- else if( id == TQString::tqfromLatin1("JabberProtocol") )
+ else if( id == TQString::fromLatin1("JabberProtocol") )
dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) );
else
dataField.appendChild( newList.createTextNode( strList[ idx ] ) );
- dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "displayName" ) );
- if( convertOldAim || id == TQString::tqfromLatin1("ICTQProtocol") || id == TQString::tqfromLatin1("WPProtocol") || id == TQString::tqfromLatin1("GaduProtocol") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "displayName" ) );
+ if( convertOldAim || id == TQString::fromLatin1("ICTQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") )
dataField.appendChild( newList.createTextNode( strList[ idx ] ) );
- else if( id == TQString::tqfromLatin1("JabberProtocol") )
+ else if( id == TQString::fromLatin1("JabberProtocol") )
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
else
dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) );
- if( id == TQString::tqfromLatin1("MSNProtocol") )
+ if( id == TQString::fromLatin1("MSNProtocol") )
{
- dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "groups" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
}
- else if( id == TQString::tqfromLatin1("IRCProtocol") )
+ else if( id == TQString::fromLatin1("IRCProtocol") )
{
- dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "serverName" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serverName" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
}
- else if( id == TQString::tqfromLatin1("JabberProtocol") )
+ else if( id == TQString::fromLatin1("JabberProtocol") )
{
- dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "accountId" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "accountId" ) );
dataField.appendChild( newList.createTextNode( strList[ idx ] ) );
- dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "groups" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) );
}
- else if( id == TQString::tqfromLatin1( "SMSProtocol" ) &&
- ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != TQString::tqfromLatin1( "." ) )
+ else if( id == TQString::fromLatin1( "SMSProtocol" ) &&
+ ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != TQString::fromLatin1( "." ) )
{
- dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "serviceName" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serviceName" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
- dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "servicePrefs" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "servicePrefs" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) );
// Add extra fields
@@ -744,30 +744,30 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
// MSN, AIM, IRC, Oscar and SMS didn't store address book fields up
// to now, so create one
- if( id != TQString::tqfromLatin1("ICTQProtocol") && id != TQString::tqfromLatin1("JabberProtocol") && id != TQString::tqfromLatin1("WPProtocol") && id != TQString::tqfromLatin1("GaduProtocol") )
+ if( id != TQString::fromLatin1("ICTQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") )
{
- TQDomElement addressBookField = newList.createElement( TQString::tqfromLatin1( "address-book-field" ) );
+ TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) );
newMetaContact.appendChild( addressBookField );
- addressBookField.setAttribute( TQString::tqfromLatin1( "app" ),
- TQString::tqfromLatin1( "messaging/" ) + addressBookLabel );
- addressBookField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "All" ) );
+ addressBookField.setAttribute( TQString::fromLatin1( "app" ),
+ TQString::fromLatin1( "messaging/" ) + addressBookLabel );
+ addressBookField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "All" ) );
addressBookField.appendChild( newList.createTextNode( strList[ idx ] ) );
}
idx += fieldCount;
}
}
- else if( id == TQString::tqfromLatin1("ContactNotesPlugin") || id == TQString::tqfromLatin1("CryptographyPlugin") || id == TQString::tqfromLatin1("TranslatorPlugin") )
+ else if( id == TQString::fromLatin1("ContactNotesPlugin") || id == TQString::fromLatin1("CryptographyPlugin") || id == TQString::fromLatin1("TranslatorPlugin") )
{
- TQDomElement dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) );
+ TQDomElement dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- if( id == TQString::tqfromLatin1("ContactNotesPlugin") )
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "notes" ) );
- else if( id == TQString::tqfromLatin1("CryptographyPlugin") )
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "gpgKey" ) );
- else if( id == TQString::tqfromLatin1("TranslatorPlugin") )
- dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "languageKey" ) );
+ if( id == TQString::fromLatin1("ContactNotesPlugin") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "notes" ) );
+ else if( id == TQString::fromLatin1("CryptographyPlugin") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "gpgKey" ) );
+ else if( id == TQString::fromLatin1("TranslatorPlugin") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "languageKey" ) );
dataField.appendChild( newList.createTextNode( data ) );
}
@@ -776,9 +776,9 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
oldContactNode = oldContactNode.nextSibling();
}
}
- else if( oldElement.tagName() == TQString::tqfromLatin1("kopete-group") )
+ else if( oldElement.tagName() == TQString::fromLatin1("kopete-group") )
{
- TQDomElement newGroup = newList.createElement( TQString::tqfromLatin1( "kopete-group" ) );
+ TQDomElement newGroup = newList.createElement( TQString::fromLatin1( "kopete-group" ) );
newRoot.appendChild( newGroup );
TQDomNode oldGroupNode = oldNode.firstChild();
@@ -786,38 +786,38 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
{
TQDomElement oldGroupElement = oldGroupNode.toElement();
- if( oldGroupElement.tagName() == TQString::tqfromLatin1("display-name") )
+ if( oldGroupElement.tagName() == TQString::fromLatin1("display-name") )
{
- TQDomElement displayName = newList.createElement( TQString::tqfromLatin1( "display-name" ) );
+ TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) );
displayName.appendChild( newList.createTextNode( oldGroupElement.text() ) );
newGroup.appendChild( displayName );
}
- if( oldGroupElement.tagName() == TQString::tqfromLatin1("type") )
+ if( oldGroupElement.tagName() == TQString::fromLatin1("type") )
{
- if( oldGroupElement.text() == TQString::tqfromLatin1("Temporary") )
- newGroup.setAttribute( TQString::tqfromLatin1( "type" ), TQString::tqfromLatin1( "temporary" ) );
- else if( oldGroupElement.text() == TQString::tqfromLatin1( "TopLevel" ) )
- newGroup.setAttribute( TQString::tqfromLatin1( "type" ), TQString::tqfromLatin1( "top-level" ) );
+ if( oldGroupElement.text() == TQString::fromLatin1("Temporary") )
+ newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "temporary" ) );
+ else if( oldGroupElement.text() == TQString::fromLatin1( "TopLevel" ) )
+ newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "top-level" ) );
else
- newGroup.setAttribute( TQString::tqfromLatin1( "type" ), TQString::tqfromLatin1( "standard" ) );
+ newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) );
}
- if( oldGroupElement.tagName() == TQString::tqfromLatin1("view") )
+ if( oldGroupElement.tagName() == TQString::fromLatin1("view") )
{
- if( oldGroupElement.text() == TQString::tqfromLatin1("collapsed") )
- newGroup.setAttribute( TQString::tqfromLatin1( "view" ), TQString::tqfromLatin1( "collapsed" ) );
+ if( oldGroupElement.text() == TQString::fromLatin1("collapsed") )
+ newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "collapsed" ) );
else
- newGroup.setAttribute( TQString::tqfromLatin1( "view" ), TQString::tqfromLatin1( "expanded" ) );
+ newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) );
}
- else if( oldGroupElement.tagName() == TQString::tqfromLatin1("plugin-data") )
+ else if( oldGroupElement.tagName() == TQString::fromLatin1("plugin-data") )
{
// Per-group plugin data
// FIXME: This needs updating too, ideally, convert this in a later
// contactlist.xml version
- TQDomElement groupPluginData = newList.createElement( TQString::tqfromLatin1( "plugin-data" ) );
+ TQDomElement groupPluginData = newList.createElement( TQString::fromLatin1( "plugin-data" ) );
newGroup.appendChild( groupPluginData );
- groupPluginData.setAttribute( TQString::tqfromLatin1( "plugin-id" ),
- oldGroupElement.attribute( TQString::tqfromLatin1( "plugin-id" ), TQString() ) );
+ groupPluginData.setAttribute( TQString::fromLatin1( "plugin-id" ),
+ oldGroupElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString() ) );
groupPluginData.appendChild( newList.createTextNode( oldGroupElement.text() ) );
}
@@ -836,7 +836,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers
// Close the file, and save the new file
contactListFile.close();
- TQDir().rename( fileName, fileName + TQString::tqfromLatin1( ".bak" ) );
+ TQDir().rename( fileName, fileName + TQString::fromLatin1( ".bak" ) );
// kdDebug( 14010 ) << k_funcinfo << "XML output:\n" << newList.toString( 2 ) << endl;
@@ -862,7 +862,7 @@ void Kopete::ContactList::saveXML()
return;
}
- TQString contactListFileName = locateLocal( "appdata", TQString::tqfromLatin1( "contactlist.xml" ) );
+ TQString contactListFileName = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) );
KSaveFile contactListFile( contactListFileName );
if( contactListFile.status() == 0 )
{
@@ -894,8 +894,8 @@ void Kopete::ContactList::saveXML()
const TQDomDocument ContactList::toXML()
{
TQDomDocument doc;
- doc.appendChild( doc.createElement( TQString::tqfromLatin1("kopete-contact-list") ) );
- doc.documentElement().setAttribute( TQString::tqfromLatin1("version"), TQString::tqfromLatin1("1.0"));
+ doc.appendChild( doc.createElement( TQString::fromLatin1("kopete-contact-list") ) );
+ doc.documentElement().setAttribute( TQString::fromLatin1("version"), TQString::fromLatin1("1.0"));
// Save group information. ie: Open/Closed, pehaps later icons? Who knows.
for( Kopete::Group *g = d->groups.first(); g; g = d->groups.next() )
@@ -910,7 +910,7 @@ const TQDomDocument ContactList::toXML()
if( Kopete::Config::enableGlobalIdentity() )
{
TQDomElement myselfElement = myself()->toXML(true); // Save minimal information.
- myselfElement.setTagName( TQString::tqfromLatin1("myself-meta-contact") );
+ myselfElement.setTagName( TQString::fromLatin1("myself-meta-contact") );
doc.documentElement().appendChild( doc.importNode( myselfElement, true ) );
}
@@ -934,7 +934,7 @@ TQStringList ContactList::contactStatuses() const
TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
- meta_contacts.append( TQString::tqfromLatin1( "%1 (%2)" ).
+ meta_contacts.append( TQString::fromLatin1( "%1 (%2)" ).
arg( it.current()->displayName(), it.current()->statusString() ));
}
return meta_contacts;