diff options
Diffstat (limited to 'kopete/kopete/kconf_update/kopete-account-kconf_update.cpp')
-rw-r--r-- | kopete/kopete/kconf_update/kopete-account-kconf_update.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp b/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp index fe1c3351..5e35c9e2 100644 --- a/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp +++ b/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp @@ -17,41 +17,41 @@ ************************************************************************* */ -#include <qmap.h> -#include <qtextstream.h> -#include <qregexp.h> +#include <tqmap.h> +#include <tqtextstream.h> +#include <tqregexp.h> -static QTextStream qcin ( stdin, IO_ReadOnly ); -static QTextStream qcout( stdout, IO_WriteOnly ); -static QTextStream qcerr( stderr, IO_WriteOnly ); +static TQTextStream qcin ( stdin, IO_ReadOnly ); +static TQTextStream qcout( stdout, IO_WriteOnly ); +static TQTextStream qcerr( stderr, IO_WriteOnly ); // Group cache. Yes, I know global vars are ugly :) bool needFlush = false; -QString accountId; -QString password; -QString autoConnect; -QString protocol; -QMap<QString, QString> pluginData; +TQString accountId; +TQString password; +TQString autoConnect; +TQString protocol; +TQMap<TQString, TQString> pluginData; // Global vars to hold separate IRC vars until we have read all of them -QString ircNick; -QString ircServer; -QString ircPort; +TQString ircNick; +TQString ircServer; +TQString ircPort; /* * Function for (en/de)crypting strings for config file, taken from KMail * Author: Stefan Taferner <[email protected]> */ -QString cryptStr(const QString &aStr) +TQString cryptStr(const TQString &aStr) { - QString result; + TQString result; for (unsigned int i = 0; i < aStr.length(); i++) result += (aStr[i].unicode() < 0x20) ? aStr[i] : - QChar(0x1001F - aStr[i].unicode()); + TQChar(0x1001F - aStr[i].unicode()); return result; } -void parseGroup( const QString &group, const QString &rawLine ) +void parseGroup( const TQString &group, const TQString &rawLine ) { // Groups that are converted can almost certainly be removed entirely @@ -65,7 +65,7 @@ void parseGroup( const QString &group, const QString &rawLine ) else protocol = group + "Protocol"; - password = QString::null; + password = TQString::null; pluginData.clear(); needFlush = true; @@ -79,7 +79,7 @@ void parseGroup( const QString &group, const QString &rawLine ) } } -void parseKey( const QString &group, const QString &key, const QString &value, const QString &rawLine ) +void parseKey( const TQString &group, const TQString &key, const TQString &value, const TQString &rawLine ) { //qcerr << "*** group='" << group << "'" << endl; if ( group == "MSN" ) @@ -154,9 +154,9 @@ void parseKey( const QString &group, const QString &key, const QString &value, c !ircPort.isEmpty() ) { #if QT_VERSION < 0x030200 - accountId = QString::fromLatin1( "%1@%2:%3" ).arg( ircNick ).arg( ircServer ).arg( ircPort ); + accountId = TQString::fromLatin1( "%1@%2:%3" ).arg( ircNick ).arg( ircServer ).arg( ircPort ); #else - accountId = QString::fromLatin1( "%1@%2:%3" ).arg( ircNick, ircServer, ircPort ); + accountId = TQString::fromLatin1( "%1@%2:%3" ).arg( ircNick, ircServer, ircPort ); #endif } } @@ -165,7 +165,7 @@ void parseKey( const QString &group, const QString &key, const QString &value, c */ else if ( key == "Modules" ) { - QString newValue = value; + TQString newValue = value; newValue.replace ( ".plugin", ".desktop" ); qcout << "Plugins=" << newValue; } @@ -176,7 +176,7 @@ void parseKey( const QString &group, const QString &key, const QString &value, c } } -void flushData( const QString &group ) +void flushData( const TQString &group ) { qcout << "[Account_" << protocol << "_" << accountId << "]" << endl; @@ -190,7 +190,7 @@ void flushData( const QString &group ) qcout << "Password=" << cryptStr( password ) << endl; qcout << "AutoConnect=" << autoConnect << endl; - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString>::ConstIterator it; for ( it = pluginData.begin(); it != pluginData.end(); ++it ) qcout << "PluginData_" << protocol << "_" << it.key() << "=" << it.data() << endl; @@ -198,18 +198,18 @@ void flushData( const QString &group ) int main() { - qcin.setEncoding( QTextStream::UnicodeUTF8 ); - qcout.setEncoding( QTextStream::UnicodeUTF8 ); + qcin.setEncoding( TQTextStream::UnicodeUTF8 ); + qcout.setEncoding( TQTextStream::UnicodeUTF8 ); - QString curGroup; + TQString curGroup; - QRegExp groupRegExp( "^\\[(.*)\\]" ); - QRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); - QRegExp commentRegExp( "^(#.*)?$" ); + TQRegExp groupRegExp( "^\\[(.*)\\]" ); + TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); + TQRegExp commentRegExp( "^(#.*)?$" ); while ( !qcin.atEnd() ) { - QString line = qcin.readLine(); + TQString line = qcin.readLine(); if ( commentRegExp.exactMatch( line ) ) { |