summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/icq/icqprotocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/oscar/icq/icqprotocol.cpp')
-rw-r--r--kopete/protocols/oscar/icq/icqprotocol.cpp98
1 files changed, 49 insertions, 49 deletions
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 <netinet/in.h> // for ntohl()
-#include <qcombobox.h>
+#include <tqcombobox.h>
/*
-#include <qhostaddress.h>
-#include <qlistbox.h>
-#include <qspinbox.h>
-#include <qtextedit.h>
+#include <tqhostaddress.h>
+#include <tqlistbox.h>
+#include <tqspinbox.h>
+#include <tqtextedit.h>
#include <kdatewidget.h>*/
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdialogbase.h>
/*
#include <klineedit.h>
@@ -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<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto);
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto);
// do not show chooser if we only have one account to "choose" from
if (accounts.count() == 1)
{
- QDictIterator<Kopete::Account> it(accounts);
+ TQDictIterator<Kopete::Account> 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<int, QString> &map)
+void ICQProtocol::fillComboFromTable(TQComboBox *box, const TQMap<int, TQString> &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<int, QString> &map, int value)
+void ICQProtocol::setComboFromTable(TQComboBox *box, const TQMap<int, TQString> &map, int value)
{
// kdDebug(14153) << k_funcinfo << "Called." << endl;
- QMap<int, QString>::ConstIterator it;
+ TQMap<int, TQString>::ConstIterator it;
it = map.find(value);
if (!(*it))
return;
@@ -687,11 +687,11 @@ void ICQProtocol::setComboFromTable(QComboBox *box, const QMap<int, QString> &ma
}
}
-int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap<int, QString> &map)
+int ICQProtocol::getCodeForCombo(TQComboBox *cmb, const TQMap<int, TQString> &map)
{
- const QString curText = cmb->currentText();
+ const TQString curText = cmb->currentText();
- QMap<int, QString>::ConstIterator it;
+ TQMap<int, TQString>::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<int, QString> &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<QString, QString> &serializedData,
- const QMap<QString, QString> &/*addressBookData*/ )
+ const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> &/*addressBookData*/ )
{
- QString accountId = serializedData["accountId"];
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(this);
+ TQString accountId = serializedData["accountId"];
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(this);
ICQAccount *account = static_cast<ICQAccount*>(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<TLV>(), 0 );
+ Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList<TLV>(), 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<ICQAccount*>( 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);
}