From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/oscar/icq/icqprotocol.cpp | 98 +++++++++++++++--------------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'kopete/protocols/oscar/icq/icqprotocol.cpp') diff --git a/kopete/protocols/oscar/icq/icqprotocol.cpp b/kopete/protocols/oscar/icq/icqprotocol.cpp index 42616e32..79fd2848 100644 --- a/kopete/protocols/oscar/icq/icqprotocol.cpp +++ b/kopete/protocols/oscar/icq/icqprotocol.cpp @@ -23,15 +23,15 @@ #include // for ntohl() -#include +#include /* -#include -#include -#include -#include +#include +#include +#include +#include #include */ -#include +#include #include /* #include @@ -66,10 +66,10 @@ K_EXPORT_COMPONENT_FACTORY( kopete_icq, ICQProtocolFactory( "kopete_icq" ) ) ICQProtocolHandler::ICQProtocolHandler() : Kopete::MimeTypeHandler(false) { - registerAsMimeHandler(QString::fromLatin1("application/x-icq")); + registerAsMimeHandler(TQString::fromLatin1("application/x-icq")); } -void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) const +void ICQProtocolHandler::handleURL(const TQString &mimeType, const KURL & url) const { if (mimeType != "application/x-icq") return; @@ -96,21 +96,21 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co ICQProtocol *proto = ICQProtocol::protocol(); - QString uin = file.readEntry("UIN"); + TQString uin = file.readEntry("UIN"); if (uin.isEmpty()) return; - QString nick = file.readEntry("NickName"); - QString first = file.readEntry("FirstName"); - QString last = file.readEntry("LastName"); - QString email = file.readEntry("Email"); + TQString nick = file.readEntry("NickName"); + TQString first = file.readEntry("FirstName"); + TQString last = file.readEntry("LastName"); + TQString email = file.readEntry("Email"); Kopete::Account *account = 0; - QDict accounts = Kopete::AccountManager::self()->accounts(proto); + TQDict accounts = Kopete::AccountManager::self()->accounts(proto); // do not show chooser if we only have one account to "choose" from if (accounts.count() == 1) { - QDictIterator it(accounts); + TQDictIterator it(accounts); account = it.current(); } else @@ -126,7 +126,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co account = accSelector->selectedItem(); delete chooser; - if (ret == QDialog::Rejected || account == 0) + if (ret == TQDialog::Rejected || account == 0) { kdDebug(14153) << k_funcinfo << "Cancelled" << endl; return; @@ -140,12 +140,12 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co return; } - QString nickuin = nick.isEmpty() ? + TQString nickuin = nick.isEmpty() ? i18n("'%1'").arg(uin) : i18n("'%1' (%2)").arg(nick, uin); if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), - i18n("Do you want to add %1 to your contact list?").arg(nickuin), QString::null, i18n("Add"), i18n("Do Not Add")) + i18n("Do you want to add %1 to your contact list?").arg(nickuin), TQString::null, i18n("Add"), i18n("Do Not Add")) != KMessageBox::Yes) { kdDebug(14153) << k_funcinfo << "Cancelled" << endl; @@ -173,7 +173,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co ICQProtocol* ICQProtocol::protocolStatic_ = 0L; -ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&) +ICQProtocol::ICQProtocol(TQObject *parent, const char *name, const TQStringList&) : Kopete::Protocol( ICQProtocolFactory::instance(), parent, name ), firstName(Kopete::Global::Properties::self()->firstName()), lastName(Kopete::Global::Properties::self()->lastName()), @@ -181,8 +181,8 @@ ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&) emailAddress(Kopete::Global::Properties::self()->emailAddress()), ipAddress("ipAddress", i18n("IP Address") ), clientFeatures("clientFeatures", i18n("Client Features"), 0, false), - buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true), - contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), QString::null, true, false, true ) + buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true), + contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), TQString::null, true, false, true ) { if (protocolStatic_) @@ -219,7 +219,7 @@ void ICQProtocol::initGenders() void ICQProtocol::initCountries() { mCountries.insert(0, ""); // unspecified - KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete")); + KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete")); mCountries.insert(93, kl->twoAlphaToCountryName("af")); mCountries.insert(355, kl->twoAlphaToCountryName("al")); @@ -468,7 +468,7 @@ void ICQProtocol::initCountries() void ICQProtocol::initLang() { - KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete")); + KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete")); mLanguages.insert(0 , ""); mLanguages.insert(1 , kl->twoAlphaToLanguageName("ar") /*i18n("Arabic")*/); @@ -660,19 +660,19 @@ void ICQProtocol::initInterests() } -void ICQProtocol::fillComboFromTable(QComboBox *box, const QMap &map) +void ICQProtocol::fillComboFromTable(TQComboBox *box, const TQMap &map) { // kdDebug(14153) << k_funcinfo << "Called." << endl; - QStringList list = map.values(); + TQStringList list = map.values(); list.sort(); box->insertStringList(list); } -void ICQProtocol::setComboFromTable(QComboBox *box, const QMap &map, int value) +void ICQProtocol::setComboFromTable(TQComboBox *box, const TQMap &map, int value) { // kdDebug(14153) << k_funcinfo << "Called." << endl; - QMap::ConstIterator it; + TQMap::ConstIterator it; it = map.find(value); if (!(*it)) return; @@ -687,11 +687,11 @@ void ICQProtocol::setComboFromTable(QComboBox *box, const QMap &ma } } -int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap &map) +int ICQProtocol::getCodeForCombo(TQComboBox *cmb, const TQMap &map) { - const QString curText = cmb->currentText(); + const TQString curText = cmb->currentText(); - QMap::ConstIterator it; + TQMap::ConstIterator it; for(it = map.begin(); it != map.end(); ++it) { if(it.data() == curText) @@ -701,10 +701,10 @@ int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap &map) } #if 0 -void ICQProtocol::fillTZCombo(QComboBox *combo) +void ICQProtocol::fillTZCombo(TQComboBox *combo) { - QTime time(12, 0); - QTime done(0, 0); + TQTime time(12, 0); + TQTime done(0, 0); while(time > done) { @@ -713,8 +713,8 @@ void ICQProtocol::fillTZCombo(QComboBox *combo) time = time.addSecs(-30 * 60); } - time = QTime(0, 0); - done = QTime(12, 0); + time = TQTime(0, 0); + done = TQTime(12, 0); while(time <= done) { @@ -724,7 +724,7 @@ void ICQProtocol::fillTZCombo(QComboBox *combo) } } -void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz) +void ICQProtocol::setTZComboValue(TQComboBox *combo, const char &tz) { kdDebug(14153) << k_funcinfo << "tz=" << int(tz) << endl; if ((tz < -24) || (tz > 24)) @@ -733,7 +733,7 @@ void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz) combo->setCurrentItem(24 + tz); } -char ICQProtocol::getTZComboValue(QComboBox *combo) +char ICQProtocol::getTZComboValue(TQComboBox *combo) { char ret = combo->currentItem() - 24; // kdDebug(14153) << k_funcinfo << "return value=" << int(ret) << endl; @@ -752,11 +752,11 @@ bool ICQProtocol::canSendOffline() const } Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &/*addressBookData*/ ) + const TQMap &serializedData, + const TQMap &/*addressBookData*/ ) { - QString accountId = serializedData["accountId"]; - QDict accounts = Kopete::AccountManager::self()->accounts(this); + TQString accountId = serializedData["accountId"]; + TQDict accounts = Kopete::AccountManager::self()->accounts(this); ICQAccount *account = static_cast(accounts[accountId]); if(!account) @@ -766,16 +766,16 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta return 0; } - QString contactId=serializedData["contactId"]; + TQString contactId=serializedData["contactId"]; uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF; - QString ssiName; + TQString ssiName; bool ssiWaitingAuth = false; if ( serializedData.contains( "ssi_name" ) ) ssiName = serializedData["ssi_name"]; if ( serializedData.contains( "ssi_waitingAuth" ) ) { - QString authStatus = serializedData["ssi_waitingAuth"]; + TQString authStatus = serializedData["ssi_waitingAuth"]; if ( authStatus == "true" ) ssiWaitingAuth = true; } @@ -787,23 +787,23 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta if ( serializedData.contains( "ssi_type" ) ) ssiType = serializedData["ssi_type"].toUInt(); - Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, QValueList(), 0 ); + Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList(), 0 ); item.setWaitingAuth( ssiWaitingAuth ); - ICQContact *c = new ICQContact( account, contactId, metaContact, QString::null, item ); + ICQContact *c = new ICQContact( account, contactId, metaContact, TQString::null, item ); return c; } -AddContactPage *ICQProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *ICQProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return new ICQAddContactPage( static_cast( account ), parent); } -KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new ICQEditAccountWidget(this, account, parent); } -Kopete::Account *ICQProtocol::createNewAccount(const QString &accountId) +Kopete::Account *ICQProtocol::createNewAccount(const TQString &accountId) { return new ICQAccount(this, accountId); } -- cgit v1.2.1