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/addaccountwizard/addaccountwizard.cpp | 44 +- kopete/kopete/addaccountwizard/addaccountwizard.h | 10 +- .../kopete/addcontactwizard/addcontactwizard.cpp | 76 +- kopete/kopete/addcontactwizard/addcontactwizard.h | 20 +- .../addcontactwizard/fastaddcontactwizard.cpp | 32 +- .../kopete/addcontactwizard/fastaddcontactwizard.h | 14 +- kopete/kopete/chatwindow/chatmemberslistwidget.cpp | 74 +- kopete/kopete/chatwindow/chatmemberslistwidget.h | 20 +- kopete/kopete/chatwindow/chatmessagepart.cpp | 366 +++++----- kopete/kopete/chatwindow/chatmessagepart.h | 36 +- kopete/kopete/chatwindow/chattexteditpart.cpp | 114 +-- kopete/kopete/chatwindow/chattexteditpart.h | 16 +- kopete/kopete/chatwindow/chatview.cpp | 252 +++---- kopete/kopete/chatwindow/chatview.h | 54 +- kopete/kopete/chatwindow/emoticonselector.cpp | 50 +- kopete/kopete/chatwindow/emoticonselector.h | 28 +- kopete/kopete/chatwindow/kopetechatwindow.cpp | 294 ++++---- kopete/kopete/chatwindow/kopetechatwindow.h | 36 +- kopete/kopete/chatwindow/kopetechatwindowstyle.cpp | 148 ++-- kopete/kopete/chatwindow/kopetechatwindowstyle.h | 36 +- .../chatwindow/kopetechatwindowstylemanager.cpp | 68 +- .../chatwindow/kopetechatwindowstylemanager.h | 16 +- kopete/kopete/chatwindow/kopeteemailwindow.cpp | 156 ++--- kopete/kopete/chatwindow/kopeteemailwindow.h | 8 +- kopete/kopete/chatwindow/kopeteemoticonaction.cpp | 46 +- kopete/kopete/chatwindow/kopeteemoticonaction.h | 8 +- kopete/kopete/chatwindow/krichtexteditpart.cpp | 128 ++-- kopete/kopete/chatwindow/krichtexteditpart.h | 32 +- .../chatwindow/tests/chatwindowstyle_test.cpp | 34 +- .../tests/chatwindowstylerendering_test.cpp | 98 +-- .../kopete/config/accounts/kopeteaccountconfig.cpp | 48 +- .../kopete/config/accounts/kopeteaccountconfig.h | 8 +- .../kopete/config/appearance/appearanceconfig.cpp | 290 ++++---- kopete/kopete/config/appearance/appearanceconfig.h | 8 +- .../config/appearance/emoticonseditdialog.cpp | 102 +-- .../kopete/config/appearance/emoticonseditdialog.h | 28 +- .../kopete/config/appearance/tooltipeditdialog.cpp | 72 +- .../kopete/config/appearance/tooltipeditdialog.h | 8 +- kopete/kopete/config/avdevice/avdeviceconfig.cpp | 52 +- kopete/kopete/config/avdevice/avdeviceconfig.h | 20 +- kopete/kopete/config/behavior/behaviorconfig.cpp | 166 ++--- kopete/kopete/config/behavior/behaviorconfig.h | 8 +- .../config/identity/globalidentitiesmanager.cpp | 72 +- .../config/identity/globalidentitiesmanager.h | 26 +- .../config/identity/kopeteidentityconfig.cpp | 130 ++-- .../kopete/config/identity/kopeteidentityconfig.h | 6 +- .../kopete/config/plugins/kopetepluginconfig.cpp | 16 +- kopete/kopete/config/plugins/kopetepluginconfig.h | 2 +- .../kopete/contactlist/customnotificationprops.cpp | 28 +- .../kopete/contactlist/customnotificationprops.h | 6 +- kopete/kopete/contactlist/kabcexport.cpp | 60 +- kopete/kopete/contactlist/kabcexport.h | 8 +- kopete/kopete/contactlist/kopeteaddrbookexport.cpp | 46 +- kopete/kopete/contactlist/kopeteaddrbookexport.h | 18 +- .../kopete/contactlist/kopetecontactlistview.cpp | 352 +++++----- kopete/kopete/contactlist/kopetecontactlistview.h | 62 +- .../kopete/contactlist/kopetegrouplistaction.cpp | 18 +- kopete/kopete/contactlist/kopetegrouplistaction.h | 6 +- kopete/kopete/contactlist/kopetegroupviewitem.cpp | 36 +- kopete/kopete/contactlist/kopetegroupviewitem.h | 16 +- kopete/kopete/contactlist/kopetelviprops.cpp | 148 ++-- kopete/kopete/contactlist/kopetelviprops.h | 10 +- kopete/kopete/contactlist/kopetemetacontactlvi.cpp | 226 +++--- kopete/kopete/contactlist/kopetemetacontactlvi.h | 40 +- .../contactlist/kopetestatusgroupviewitem.cpp | 6 +- .../kopete/contactlist/kopetestatusgroupviewitem.h | 4 +- .../kconf_update/kopete-account-kconf_update.cpp | 64 +- kopete/kopete/kconf_update/kopete-nameTracking.cpp | 74 +- .../kopete/kconf_update/kopete-pluginloader2.cpp | 30 +- kopete/kopete/kimiface.h | 48 +- kopete/kopete/kimifaceimpl.cpp | 120 ++-- kopete/kopete/kimifaceimpl.h | 50 +- kopete/kopete/kopeteaccountstatusbaricon.cpp | 20 +- kopete/kopete/kopeteaccountstatusbaricon.h | 14 +- kopete/kopete/kopeteapplication.cpp | 44 +- kopete/kopete/kopeteapplication.h | 6 +- kopete/kopete/kopeteballoon.cpp | 104 +-- kopete/kopete/kopeteballoon.h | 14 +- kopete/kopete/kopeteeditglobalidentitywidget.cpp | 74 +- kopete/kopete/kopeteeditglobalidentitywidget.h | 14 +- kopete/kopete/kopeteiface.cpp | 78 +-- kopete/kopete/kopeteiface.h | 50 +- kopete/kopete/kopetewindow.cpp | 304 ++++---- kopete/kopete/kopetewindow.h | 54 +- kopete/kopete/systemtray.cpp | 92 +-- kopete/kopete/systemtray.h | 32 +- kopete/libkopete/avdevice/kxv.cpp | 32 +- kopete/libkopete/avdevice/kxv.h | 40 +- kopete/libkopete/avdevice/qvideo.cpp | 4 +- kopete/libkopete/avdevice/qvideostream.cpp | 82 +-- kopete/libkopete/avdevice/qvideostream.h | 24 +- kopete/libkopete/avdevice/videocontrol.h | 6 +- kopete/libkopete/avdevice/videodevice.cpp | 44 +- kopete/libkopete/avdevice/videodevice.h | 36 +- kopete/libkopete/avdevice/videodevicemodelpool.cpp | 2 +- kopete/libkopete/avdevice/videodevicemodelpool.h | 10 +- kopete/libkopete/avdevice/videodevicepool.cpp | 78 +-- kopete/libkopete/avdevice/videodevicepool.h | 16 +- kopete/libkopete/avdevice/videoinput.h | 8 +- kopete/libkopete/clientiface.h | 14 +- .../compat/kpixmapregionselectordialog.cpp | 50 +- .../libkopete/compat/kpixmapregionselectordialog.h | 12 +- .../compat/kpixmapregionselectorwidget.cpp | 104 +-- .../libkopete/compat/kpixmapregionselectorwidget.h | 40 +- kopete/libkopete/connectionmanager.cpp | 18 +- kopete/libkopete/connectionmanager.h | 16 +- kopete/libkopete/kabcpersistence.cpp | 96 +-- kopete/libkopete/kabcpersistence.h | 6 +- kopete/libkopete/kautoconfig.cpp | 224 +++--- kopete/libkopete/kautoconfig.h | 44 +- kopete/libkopete/kcautoconfigmodule.cpp | 30 +- kopete/libkopete/kcautoconfigmodule.h | 14 +- kopete/libkopete/knotification.cpp | 150 ++-- kopete/libkopete/knotification.h | 40 +- kopete/libkopete/kopeteaccount.cpp | 116 ++-- kopete/libkopete/kopeteaccount.h | 64 +- kopete/libkopete/kopeteaccountmanager.cpp | 84 +-- kopete/libkopete/kopeteaccountmanager.h | 22 +- kopete/libkopete/kopeteaway.cpp | 52 +- kopete/libkopete/kopeteaway.h | 24 +- kopete/libkopete/kopeteawayaction.cpp | 42 +- kopete/libkopete/kopeteawayaction.h | 18 +- kopete/libkopete/kopeteawaydialog.cpp | 10 +- kopete/libkopete/kopeteawaydialog.h | 8 +- kopete/libkopete/kopeteblacklister.cpp | 26 +- kopete/libkopete/kopeteblacklister.h | 18 +- kopete/libkopete/kopetechatsession.cpp | 92 +-- kopete/libkopete/kopetechatsession.h | 32 +- kopete/libkopete/kopetechatsessionmanager.cpp | 44 +- kopete/libkopete/kopetechatsessionmanager.h | 18 +- kopete/libkopete/kopetecommandhandler.cpp | 152 ++-- kopete/libkopete/kopetecommandhandler.h | 60 +- kopete/libkopete/kopetecontact.cpp | 220 +++--- kopete/libkopete/kopetecontact.h | 76 +- kopete/libkopete/kopetecontactlist.cpp | 496 ++++++------- kopete/libkopete/kopetecontactlist.h | 66 +- kopete/libkopete/kopetecontactlistelement.cpp | 120 ++-- kopete/libkopete/kopetecontactlistelement.h | 30 +- kopete/libkopete/kopetecontactproperty.cpp | 20 +- kopete/libkopete/kopetecontactproperty.h | 26 +- kopete/libkopete/kopeteeventpresentation.cpp | 18 +- kopete/libkopete/kopeteeventpresentation.h | 12 +- kopete/libkopete/kopeteglobal.cpp | 92 +-- kopete/libkopete/kopeteglobal.h | 18 +- kopete/libkopete/kopetegroup.cpp | 80 +-- kopete/libkopete/kopetegroup.h | 20 +- kopete/libkopete/kopetemessage.cpp | 262 +++---- kopete/libkopete/kopetemessage.h | 82 +-- kopete/libkopete/kopetemessageevent.cpp | 6 +- kopete/libkopete/kopetemessageevent.h | 4 +- kopete/libkopete/kopetemessagehandler.cpp | 6 +- kopete/libkopete/kopetemessagehandler.h | 8 +- kopete/libkopete/kopetemessagehandlerchain.cpp | 16 +- kopete/libkopete/kopetemessagehandlerchain.h | 4 +- kopete/libkopete/kopetemetacontact.cpp | 334 ++++----- kopete/libkopete/kopetemetacontact.h | 72 +- kopete/libkopete/kopetemimesourcefactory.cpp | 32 +- kopete/libkopete/kopetemimesourcefactory.h | 4 +- kopete/libkopete/kopetemimetypehandler.cpp | 40 +- kopete/libkopete/kopetemimetypehandler.h | 16 +- kopete/libkopete/kopetenotifydataobject.cpp | 86 +-- kopete/libkopete/kopetenotifydataobject.h | 16 +- kopete/libkopete/kopetenotifyevent.cpp | 34 +- kopete/libkopete/kopetenotifyevent.h | 10 +- kopete/libkopete/kopeteonlinestatus.cpp | 50 +- kopete/libkopete/kopeteonlinestatus.h | 42 +- kopete/libkopete/kopeteonlinestatusmanager.cpp | 90 +-- kopete/libkopete/kopeteonlinestatusmanager.h | 16 +- kopete/libkopete/kopetepassword.cpp | 98 +-- kopete/libkopete/kopetepassword.h | 28 +- kopete/libkopete/kopetepasswordedaccount.cpp | 22 +- kopete/libkopete/kopetepasswordedaccount.h | 10 +- kopete/libkopete/kopetepicture.cpp | 50 +- kopete/libkopete/kopetepicture.h | 40 +- kopete/libkopete/kopeteplugin.cpp | 30 +- kopete/libkopete/kopeteplugin.h | 26 +- kopete/libkopete/kopetepluginmanager.cpp | 124 ++-- kopete/libkopete/kopetepluginmanager.h | 30 +- kopete/libkopete/kopeteprefs.cpp | 92 +-- kopete/libkopete/kopeteprefs.h | 108 +-- kopete/libkopete/kopeteproperties.cpp | 12 +- kopete/libkopete/kopeteproperties.h | 42 +- kopete/libkopete/kopeteprotocol.cpp | 98 +-- kopete/libkopete/kopeteprotocol.h | 16 +- kopete/libkopete/kopetesimplemessagehandler.cpp | 8 +- kopete/libkopete/kopetesimplemessagehandler.h | 2 +- kopete/libkopete/kopetetask.cpp | 26 +- kopete/libkopete/kopetetask.h | 12 +- kopete/libkopete/kopetetransfermanager.cpp | 48 +- kopete/libkopete/kopetetransfermanager.h | 44 +- kopete/libkopete/kopeteuiglobal.cpp | 8 +- kopete/libkopete/kopeteuiglobal.h | 6 +- kopete/libkopete/kopeteutils.cpp | 52 +- kopete/libkopete/kopeteutils.h | 36 +- kopete/libkopete/kopetewalletmanager.cpp | 26 +- kopete/libkopete/kopetewalletmanager.h | 4 +- kopete/libkopete/managedconnectionaccount.cpp | 14 +- kopete/libkopete/managedconnectionaccount.h | 10 +- kopete/libkopete/networkstatuscommon.cpp | 4 +- kopete/libkopete/networkstatuscommon.h | 12 +- kopete/libkopete/private/kopetecommand.cpp | 34 +- kopete/libkopete/private/kopetecommand.h | 30 +- kopete/libkopete/private/kopeteemoticons.cpp | 170 ++--- kopete/libkopete/private/kopeteemoticons.h | 36 +- kopete/libkopete/private/kopeteutils_private.cpp | 6 +- kopete/libkopete/private/kopeteutils_private.h | 14 +- kopete/libkopete/private/kopeteviewmanager.cpp | 62 +- kopete/libkopete/private/kopeteviewmanager.h | 2 +- kopete/libkopete/tests/kopetecontactlist_test.cpp | 10 +- kopete/libkopete/tests/kopeteemoticontest.cpp | 42 +- kopete/libkopete/tests/kopetemessage_test.cpp | 110 +-- .../libkopete/tests/kopetepasswordtest_program.cpp | 32 +- .../libkopete/tests/kopetepasswordtest_program.h | 6 +- kopete/libkopete/tests/kopetepropertiestest.cpp | 12 +- .../libkopete/tests/kopetewallettest_program.cpp | 24 +- kopete/libkopete/tests/kopetewallettest_program.h | 2 +- kopete/libkopete/tests/mock/kopeteaccount_mock.cpp | 6 +- kopete/libkopete/tests/mock/kopeteaccount_mock.h | 6 +- kopete/libkopete/tests/mock/kopetecontact_mock.cpp | 2 +- kopete/libkopete/tests/mock/kopetecontact_mock.h | 2 +- .../libkopete/tests/mock/kopeteprotocol_mock.cpp | 8 +- kopete/libkopete/tests/mock/kopeteprotocol_mock.h | 8 +- kopete/libkopete/ui/accountselector.cpp | 36 +- kopete/libkopete/ui/accountselector.h | 8 +- kopete/libkopete/ui/addcontactpage.cpp | 2 +- kopete/libkopete/ui/addcontactpage.h | 4 +- kopete/libkopete/ui/addressbooklinkwidget.cpp | 22 +- kopete/libkopete/ui/addressbooklinkwidget.h | 8 +- kopete/libkopete/ui/addressbookselectordialog.cpp | 22 +- kopete/libkopete/ui/addressbookselectordialog.h | 6 +- kopete/libkopete/ui/addressbookselectorwidget.cpp | 46 +- kopete/libkopete/ui/addressbookselectorwidget.h | 8 +- kopete/libkopete/ui/addresseeitem.cpp | 18 +- kopete/libkopete/ui/addresseeitem.h | 8 +- kopete/libkopete/ui/contactaddednotifydialog.cpp | 38 +- kopete/libkopete/ui/contactaddednotifydialog.h | 14 +- kopete/libkopete/ui/editaccountwidget.h | 2 +- kopete/libkopete/ui/kopetecontactaction.cpp | 8 +- kopete/libkopete/ui/kopetecontactaction.h | 2 +- kopete/libkopete/ui/kopetefileconfirmdialog.cpp | 22 +- kopete/libkopete/ui/kopetefileconfirmdialog.h | 8 +- kopete/libkopete/ui/kopetelistview.cpp | 60 +- kopete/libkopete/ui/kopetelistview.h | 10 +- kopete/libkopete/ui/kopetelistviewitem.cpp | 246 +++---- kopete/libkopete/ui/kopetelistviewitem.h | 70 +- kopete/libkopete/ui/kopetelistviewsearchline.cpp | 18 +- kopete/libkopete/ui/kopetelistviewsearchline.h | 12 +- kopete/libkopete/ui/kopetepasswordwidget.cpp | 32 +- kopete/libkopete/ui/kopetepasswordwidget.h | 8 +- kopete/libkopete/ui/kopetestdaction.cpp | 50 +- kopete/libkopete/ui/kopetestdaction.h | 46 +- kopete/libkopete/ui/kopeteview.cpp | 4 +- kopete/libkopete/ui/kopeteview.h | 20 +- kopete/libkopete/ui/kopeteviewplugin.cpp | 2 +- kopete/libkopete/ui/kopeteviewplugin.h | 2 +- kopete/libkopete/ui/kopetewidgets.cpp | 92 +-- kopete/libkopete/ui/metacontactselectorwidget.cpp | 74 +- kopete/libkopete/ui/metacontactselectorwidget.h | 12 +- kopete/libkopete/ui/userinfodialog.cpp | 82 +-- kopete/libkopete/ui/userinfodialog.h | 32 +- kopete/libkopete/webcamwidget.cpp | 36 +- kopete/libkopete/webcamwidget.h | 18 +- kopete/plugins/addbookmarks/addbookmarksplugin.cpp | 48 +- kopete/plugins/addbookmarks/addbookmarksplugin.h | 20 +- .../addbookmarks/addbookmarkspreferences.cpp | 42 +- .../plugins/addbookmarks/addbookmarkspreferences.h | 2 +- .../addbookmarks/addbookmarksprefssettings.cpp | 6 +- .../addbookmarks/addbookmarksprefssettings.h | 14 +- kopete/plugins/alias/aliasplugin.cpp | 2 +- kopete/plugins/alias/aliasplugin.h | 2 +- kopete/plugins/alias/aliaspreferences.cpp | 142 ++-- kopete/plugins/alias/aliaspreferences.h | 14 +- kopete/plugins/alias/editaliasdialog.cpp | 14 +- kopete/plugins/alias/editaliasdialog.h | 2 +- kopete/plugins/autoreplace/autoreplaceconfig.cpp | 18 +- kopete/plugins/autoreplace/autoreplaceconfig.h | 10 +- kopete/plugins/autoreplace/autoreplaceplugin.cpp | 28 +- kopete/plugins/autoreplace/autoreplaceplugin.h | 10 +- .../plugins/autoreplace/autoreplacepreferences.cpp | 62 +- .../plugins/autoreplace/autoreplacepreferences.h | 6 +- .../connectionstatus/connectionstatusplugin.cpp | 18 +- .../connectionstatus/connectionstatusplugin.h | 6 +- kopete/plugins/contactnotes/contactnotesedit.cpp | 12 +- kopete/plugins/contactnotes/contactnotesedit.h | 10 +- kopete/plugins/contactnotes/contactnotesplugin.cpp | 14 +- kopete/plugins/contactnotes/contactnotesplugin.h | 12 +- .../plugins/cryptography/cryptographyguiclient.cpp | 10 +- .../plugins/cryptography/cryptographyguiclient.h | 4 +- kopete/plugins/cryptography/cryptographyplugin.cpp | 88 +-- kopete/plugins/cryptography/cryptographyplugin.h | 16 +- .../cryptography/cryptographypreferences.cpp | 8 +- .../plugins/cryptography/cryptographypreferences.h | 2 +- .../cryptography/cryptographyselectuserkey.cpp | 16 +- .../cryptography/cryptographyselectuserkey.h | 6 +- kopete/plugins/cryptography/kgpginterface.cpp | 48 +- kopete/plugins/cryptography/kgpginterface.h | 24 +- kopete/plugins/cryptography/kgpgselkey.cpp | 58 +- kopete/plugins/cryptography/kgpgselkey.h | 32 +- kopete/plugins/cryptography/popuppublic.cpp | 170 ++--- kopete/plugins/cryptography/popuppublic.h | 18 +- kopete/plugins/highlight/filter.h | 14 +- kopete/plugins/highlight/highlightconfig.cpp | 104 +-- kopete/plugins/highlight/highlightconfig.h | 8 +- kopete/plugins/highlight/highlightplugin.cpp | 16 +- kopete/plugins/highlight/highlightplugin.h | 8 +- kopete/plugins/highlight/highlightpreferences.cpp | 64 +- kopete/plugins/highlight/highlightpreferences.h | 6 +- kopete/plugins/history/converter.cpp | 140 ++-- kopete/plugins/history/historydialog.cpp | 208 +++--- kopete/plugins/history/historydialog.h | 30 +- kopete/plugins/history/historyguiclient.cpp | 22 +- kopete/plugins/history/historyguiclient.h | 4 +- kopete/plugins/history/historylogger.cpp | 276 ++++---- kopete/plugins/history/historylogger.h | 42 +- kopete/plugins/history/historyplugin.cpp | 38 +- kopete/plugins/history/historyplugin.h | 10 +- kopete/plugins/history/historypreferences.cpp | 24 +- kopete/plugins/history/historypreferences.h | 6 +- kopete/plugins/latex/latexguiclient.cpp | 18 +- kopete/plugins/latex/latexguiclient.h | 4 +- kopete/plugins/latex/latexplugin.cpp | 88 +-- kopete/plugins/latex/latexplugin.h | 14 +- kopete/plugins/latex/latexpreferences.cpp | 10 +- kopete/plugins/latex/latexpreferences.h | 4 +- kopete/plugins/motionautoaway/motionawayplugin.cpp | 16 +- kopete/plugins/motionautoaway/motionawayplugin.h | 18 +- .../motionautoaway/motionawaypreferences.cpp | 16 +- .../plugins/motionautoaway/motionawaypreferences.h | 2 +- kopete/plugins/netmeeting/netmeetingguiclient.cpp | 8 +- kopete/plugins/netmeeting/netmeetingguiclient.h | 4 +- kopete/plugins/netmeeting/netmeetinginvitation.cpp | 44 +- kopete/plugins/netmeeting/netmeetinginvitation.h | 16 +- kopete/plugins/netmeeting/netmeetingplugin.cpp | 20 +- kopete/plugins/netmeeting/netmeetingplugin.h | 4 +- .../plugins/netmeeting/netmeetingpreferences.cpp | 10 +- kopete/plugins/netmeeting/netmeetingpreferences.h | 4 +- kopete/plugins/nowlistening/nlamarok.cpp | 26 +- kopete/plugins/nowlistening/nljuk.cpp | 42 +- kopete/plugins/nowlistening/nlkaffeine.cpp | 18 +- kopete/plugins/nowlistening/nlkscd.cpp | 22 +- kopete/plugins/nowlistening/nlmediaplayer.h | 16 +- kopete/plugins/nowlistening/nlnoatun.cpp | 36 +- kopete/plugins/nowlistening/nlnoatun.h | 4 +- kopete/plugins/nowlistening/nlxmms.cpp | 2 +- .../plugins/nowlistening/nowlisteningguiclient.cpp | 10 +- .../plugins/nowlistening/nowlisteningguiclient.h | 4 +- kopete/plugins/nowlistening/nowlisteningplugin.cpp | 102 +-- kopete/plugins/nowlistening/nowlisteningplugin.h | 16 +- .../nowlistening/nowlisteningpreferences.cpp | 24 +- .../plugins/nowlistening/nowlisteningpreferences.h | 2 +- kopete/plugins/smpppdcs/detectordcop.cpp | 4 +- kopete/plugins/smpppdcs/detectordcop.h | 4 +- kopete/plugins/smpppdcs/detectornetstat.cpp | 12 +- kopete/plugins/smpppdcs/detectornetstat.h | 6 +- kopete/plugins/smpppdcs/detectornetworkstatus.cpp | 6 +- kopete/plugins/smpppdcs/detectornetworkstatus.h | 6 +- kopete/plugins/smpppdcs/detectorsmpppd.cpp | 2 +- kopete/plugins/smpppdcs/detectorsmpppd.h | 2 +- kopete/plugins/smpppdcs/kinternetiface.h | 2 +- .../smpppdcs/libsmpppdclient/smpppdclient.cpp | 22 +- .../smpppdcs/libsmpppdclient/smpppdclient.h | 24 +- .../smpppdcs/libsmpppdclient/smpppdready.cpp | 24 +- .../plugins/smpppdcs/libsmpppdclient/smpppdready.h | 4 +- .../smpppdcs/libsmpppdclient/smpppdstate.cpp | 18 +- .../plugins/smpppdcs/libsmpppdclient/smpppdstate.h | 18 +- .../smpppdcs/libsmpppdclient/smpppdunsettled.cpp | 36 +- .../smpppdcs/libsmpppdclient/smpppdunsettled.h | 4 +- kopete/plugins/smpppdcs/smpppdcsiface.h | 2 +- kopete/plugins/smpppdcs/smpppdcsplugin.cpp | 30 +- kopete/plugins/smpppdcs/smpppdcsplugin.h | 8 +- kopete/plugins/smpppdcs/smpppdcspreferences.cpp | 58 +- kopete/plugins/smpppdcs/smpppdcspreferences.h | 10 +- kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp | 32 +- kopete/plugins/smpppdcs/smpppdcsprefsimpl.h | 6 +- kopete/plugins/smpppdcs/smpppdlocationwidget.cpp | 4 +- kopete/plugins/smpppdcs/smpppdlocationwidget.h | 4 +- kopete/plugins/smpppdcs/smpppdsearcher.cpp | 30 +- kopete/plugins/smpppdcs/smpppdsearcher.h | 6 +- kopete/plugins/smpppdcs/unittest/clienttest.cpp | 10 +- kopete/plugins/statistics/statisticscontact.cpp | 128 ++-- kopete/plugins/statistics/statisticscontact.h | 40 +- kopete/plugins/statistics/statisticsdb.cpp | 36 +- kopete/plugins/statistics/statisticsdb.h | 4 +- kopete/plugins/statistics/statisticsdcopiface.h | 20 +- kopete/plugins/statistics/statisticsdialog.cpp | 164 ++--- kopete/plugins/statistics/statisticsdialog.h | 12 +- kopete/plugins/statistics/statisticsplugin.cpp | 98 +-- kopete/plugins/statistics/statisticsplugin.h | 36 +- kopete/plugins/texteffect/texteffectconfig.cpp | 10 +- kopete/plugins/texteffect/texteffectconfig.h | 8 +- kopete/plugins/texteffect/texteffectplugin.cpp | 18 +- kopete/plugins/texteffect/texteffectplugin.h | 8 +- .../plugins/texteffect/texteffectpreferences.cpp | 66 +- kopete/plugins/texteffect/texteffectpreferences.h | 4 +- kopete/plugins/translator/translatordialog.cpp | 4 +- kopete/plugins/translator/translatordialog.h | 6 +- kopete/plugins/translator/translatorguiclient.cpp | 22 +- kopete/plugins/translator/translatorguiclient.h | 6 +- kopete/plugins/translator/translatorlanguages.cpp | 6 +- kopete/plugins/translator/translatorlanguages.h | 34 +- kopete/plugins/translator/translatorplugin.cpp | 108 +-- kopete/plugins/translator/translatorplugin.h | 30 +- kopete/plugins/translator/translatorprefs.cpp | 8 +- kopete/plugins/webpresence/webpresenceplugin.cpp | 98 +-- kopete/plugins/webpresence/webpresenceplugin.h | 16 +- .../plugins/webpresence/webpresencepreferences.cpp | 10 +- .../plugins/webpresence/webpresencepreferences.h | 2 +- kopete/protocols/gadu/gaduaccount.cpp | 226 +++--- kopete/protocols/gadu/gaduaccount.h | 32 +- kopete/protocols/gadu/gaduaddcontactpage.cpp | 34 +- kopete/protocols/gadu/gaduaddcontactpage.h | 10 +- kopete/protocols/gadu/gaduaway.cpp | 10 +- kopete/protocols/gadu/gaduaway.h | 6 +- kopete/protocols/gadu/gaducommands.cpp | 46 +- kopete/protocols/gadu/gaducommands.h | 34 +- kopete/protocols/gadu/gaducontact.cpp | 42 +- kopete/protocols/gadu/gaducontact.h | 24 +- kopete/protocols/gadu/gaducontactlist.cpp | 44 +- kopete/protocols/gadu/gaducontactlist.h | 36 +- kopete/protocols/gadu/gadudcc.cpp | 20 +- kopete/protocols/gadu/gadudcc.h | 8 +- kopete/protocols/gadu/gadudccserver.cpp | 18 +- kopete/protocols/gadu/gadudccserver.h | 16 +- kopete/protocols/gadu/gadudcctransaction.cpp | 40 +- kopete/protocols/gadu/gadudcctransaction.h | 16 +- kopete/protocols/gadu/gadueditaccount.cpp | 56 +- kopete/protocols/gadu/gadueditaccount.h | 4 +- kopete/protocols/gadu/gadueditcontact.cpp | 34 +- kopete/protocols/gadu/gadueditcontact.h | 6 +- kopete/protocols/gadu/gaduprotocol.cpp | 28 +- kopete/protocols/gadu/gaduprotocol.h | 14 +- kopete/protocols/gadu/gadupubdir.cpp | 78 +-- kopete/protocols/gadu/gadupubdir.h | 8 +- kopete/protocols/gadu/gaduregisteraccount.cpp | 54 +- kopete/protocols/gadu/gaduregisteraccount.h | 16 +- kopete/protocols/gadu/gadurichtextformat.cpp | 74 +- kopete/protocols/gadu/gadurichtextformat.h | 14 +- kopete/protocols/gadu/gadusession.cpp | 62 +- kopete/protocols/gadu/gadusession.h | 66 +- kopete/protocols/groupwise/gwaccount.cpp | 262 +++---- kopete/protocols/groupwise/gwaccount.h | 44 +- kopete/protocols/groupwise/gwbytestream.cpp | 20 +- kopete/protocols/groupwise/gwbytestream.h | 4 +- kopete/protocols/groupwise/gwconnector.cpp | 14 +- kopete/protocols/groupwise/gwconnector.h | 8 +- kopete/protocols/groupwise/gwcontact.cpp | 30 +- kopete/protocols/groupwise/gwcontact.h | 24 +- kopete/protocols/groupwise/gwcontactlist.cpp | 80 +-- kopete/protocols/groupwise/gwcontactlist.h | 24 +- kopete/protocols/groupwise/gwmessagemanager.cpp | 88 +-- kopete/protocols/groupwise/gwmessagemanager.h | 8 +- kopete/protocols/groupwise/gwprotocol.cpp | 60 +- kopete/protocols/groupwise/gwprotocol.h | 16 +- .../groupwise/libgroupwise/bytestream.cpp | 34 +- .../protocols/groupwise/libgroupwise/bytestream.h | 28 +- .../groupwise/libgroupwise/chatroommanager.cpp | 26 +- .../groupwise/libgroupwise/chatroommanager.h | 4 +- kopete/protocols/groupwise/libgroupwise/client.cpp | 182 ++--- kopete/protocols/groupwise/libgroupwise/client.h | 52 +- .../protocols/groupwise/libgroupwise/connector.cpp | 10 +- .../protocols/groupwise/libgroupwise/connector.h | 14 +- .../groupwise/libgroupwise/coreprotocol.cpp | 84 +-- .../groupwise/libgroupwise/coreprotocol.h | 22 +- .../groupwise/libgroupwise/eventprotocol.cpp | 32 +- .../groupwise/libgroupwise/eventprotocol.h | 8 +- .../groupwise/libgroupwise/eventtransfer.cpp | 14 +- .../groupwise/libgroupwise/eventtransfer.h | 26 +- .../protocols/groupwise/libgroupwise/gwchatrooms.h | 34 +- .../groupwise/libgroupwise/gwclientstream.cpp | 96 +-- .../groupwise/libgroupwise/gwclientstream.h | 26 +- .../protocols/groupwise/libgroupwise/gwerror.cpp | 6 +- kopete/protocols/groupwise/libgroupwise/gwerror.h | 46 +- .../protocols/groupwise/libgroupwise/gwfield.cpp | 34 +- kopete/protocols/groupwise/libgroupwise/gwfield.h | 50 +- .../protocols/groupwise/libgroupwise/gwglobal.cpp | 6 +- .../groupwise/libgroupwise/inputprotocolbase.cpp | 18 +- .../groupwise/libgroupwise/inputprotocolbase.h | 14 +- .../groupwise/libgroupwise/privacymanager.cpp | 64 +- .../groupwise/libgroupwise/privacymanager.h | 34 +- .../groupwise/libgroupwise/qca/src/qca.cpp | 298 ++++---- .../protocols/groupwise/libgroupwise/qca/src/qca.h | 150 ++-- .../groupwise/libgroupwise/qca/src/qcaprovider.h | 92 +-- .../groupwise/libgroupwise/qcatlshandler.cpp | 20 +- .../groupwise/libgroupwise/qcatlshandler.h | 8 +- .../protocols/groupwise/libgroupwise/request.cpp | 4 +- kopete/protocols/groupwise/libgroupwise/request.h | 6 +- .../groupwise/libgroupwise/requestfactory.cpp | 2 +- .../groupwise/libgroupwise/requestfactory.h | 4 +- .../protocols/groupwise/libgroupwise/response.cpp | 2 +- .../groupwise/libgroupwise/responseprotocol.cpp | 54 +- .../groupwise/libgroupwise/responseprotocol.h | 8 +- kopete/protocols/groupwise/libgroupwise/rtf.cc | 42 +- kopete/protocols/groupwise/libgroupwise/rtf2html.h | 20 +- .../groupwise/libgroupwise/safedelete.cpp | 16 +- .../protocols/groupwise/libgroupwise/safedelete.h | 16 +- .../groupwise/libgroupwise/securestream.cpp | 108 +-- .../groupwise/libgroupwise/securestream.h | 40 +- kopete/protocols/groupwise/libgroupwise/stream.cpp | 4 +- kopete/protocols/groupwise/libgroupwise/stream.h | 22 +- kopete/protocols/groupwise/libgroupwise/task.cpp | 42 +- kopete/protocols/groupwise/libgroupwise/task.h | 14 +- .../libgroupwise/tasks/chatcountstask.cpp | 6 +- .../groupwise/libgroupwise/tasks/chatcountstask.h | 6 +- .../libgroupwise/tasks/chatpropertiestask.cpp | 4 +- .../libgroupwise/tasks/chatpropertiestask.h | 30 +- .../libgroupwise/tasks/conferencetask.cpp | 32 +- .../groupwise/libgroupwise/tasks/conferencetask.h | 6 +- .../libgroupwise/tasks/createconferencetask.cpp | 6 +- .../libgroupwise/tasks/createconferencetask.h | 2 +- .../tasks/createcontactinstancetask.cpp | 14 +- .../libgroupwise/tasks/createcontactinstancetask.h | 16 +- .../libgroupwise/tasks/createcontacttask.cpp | 24 +- .../libgroupwise/tasks/createcontacttask.h | 20 +- .../libgroupwise/tasks/createfoldertask.cpp | 6 +- .../libgroupwise/tasks/createfoldertask.h | 2 +- .../libgroupwise/tasks/deleteitemtask.cpp | 4 +- .../groupwise/libgroupwise/tasks/eventtask.h | 4 +- .../tasks/getchatsearchresultstask.cpp | 2 +- .../libgroupwise/tasks/getchatsearchresultstask.h | 6 +- .../libgroupwise/tasks/getdetailstask.cpp | 14 +- .../groupwise/libgroupwise/tasks/getdetailstask.h | 2 +- .../groupwise/libgroupwise/tasks/getstatustask.cpp | 6 +- .../groupwise/libgroupwise/tasks/getstatustask.h | 6 +- .../groupwise/libgroupwise/tasks/joinchattask.cpp | 12 +- .../groupwise/libgroupwise/tasks/joinchattask.h | 14 +- .../libgroupwise/tasks/joinconferencetask.cpp | 24 +- .../libgroupwise/tasks/joinconferencetask.h | 10 +- .../groupwise/libgroupwise/tasks/logintask.cpp | 24 +- .../groupwise/libgroupwise/tasks/logintask.h | 4 +- .../libgroupwise/tasks/movecontacttask.cpp | 6 +- .../groupwise/libgroupwise/tasks/movecontacttask.h | 6 +- .../libgroupwise/tasks/needfoldertask.cpp | 8 +- .../groupwise/libgroupwise/tasks/needfoldertask.h | 2 +- .../libgroupwise/tasks/pollsearchresultstask.cpp | 16 +- .../libgroupwise/tasks/pollsearchresultstask.h | 8 +- .../libgroupwise/tasks/privacyitemtask.cpp | 10 +- .../groupwise/libgroupwise/tasks/privacyitemtask.h | 14 +- .../groupwise/libgroupwise/tasks/requesttask.cpp | 4 +- .../groupwise/libgroupwise/tasks/requesttask.h | 2 +- .../libgroupwise/tasks/searchchattask.cpp | 14 +- .../groupwise/libgroupwise/tasks/searchchattask.h | 6 +- .../libgroupwise/tasks/searchusertask.cpp | 20 +- .../groupwise/libgroupwise/tasks/searchusertask.h | 10 +- .../libgroupwise/tasks/sendinvitetask.cpp | 6 +- .../groupwise/libgroupwise/tasks/sendinvitetask.h | 4 +- .../libgroupwise/tasks/sendmessagetask.cpp | 6 +- .../groupwise/libgroupwise/tasks/sendmessagetask.h | 2 +- .../groupwise/libgroupwise/tasks/setstatustask.cpp | 8 +- .../groupwise/libgroupwise/tasks/setstatustask.h | 10 +- .../groupwise/libgroupwise/tasks/statustask.cpp | 2 +- .../groupwise/libgroupwise/tasks/statustask.h | 2 +- .../groupwise/libgroupwise/tasks/typingtask.cpp | 2 +- .../libgroupwise/tasks/updatecontacttask.cpp | 10 +- .../libgroupwise/tasks/updatecontacttask.h | 6 +- .../libgroupwise/tasks/updatefoldertask.cpp | 2 +- .../libgroupwise/tasks/updatefoldertask.h | 2 +- .../libgroupwise/tests/clientstream_test.cpp | 14 +- .../libgroupwise/tests/clientstream_test.h | 6 +- .../libgroupwise/tests/coreprotocol_test.cpp | 2 +- .../groupwise/libgroupwise/tests/field_test.cpp | 12 +- .../groupwise/libgroupwise/tlshandler.cpp | 4 +- .../protocols/groupwise/libgroupwise/tlshandler.h | 26 +- .../protocols/groupwise/libgroupwise/transfer.cpp | 2 +- .../groupwise/libgroupwise/userdetailsmanager.cpp | 42 +- .../groupwise/libgroupwise/userdetailsmanager.h | 24 +- kopete/protocols/groupwise/ui/gwaddcontactpage.cpp | 34 +- kopete/protocols/groupwise/ui/gwaddcontactpage.h | 8 +- .../protocols/groupwise/ui/gwchatpropsdialog.cpp | 38 +- kopete/protocols/groupwise/ui/gwchatpropsdialog.h | 4 +- .../protocols/groupwise/ui/gwchatsearchdialog.cpp | 28 +- kopete/protocols/groupwise/ui/gwchatsearchdialog.h | 2 +- .../protocols/groupwise/ui/gwcontactproperties.cpp | 42 +- .../protocols/groupwise/ui/gwcontactproperties.h | 10 +- .../protocols/groupwise/ui/gweditaccountwidget.cpp | 28 +- .../protocols/groupwise/ui/gweditaccountwidget.h | 8 +- kopete/protocols/groupwise/ui/gwprivacydialog.cpp | 90 +-- kopete/protocols/groupwise/ui/gwprivacydialog.h | 4 +- .../groupwise/ui/gwreceiveinvitationdialog.cpp | 14 +- .../groupwise/ui/gwreceiveinvitationdialog.h | 2 +- kopete/protocols/groupwise/ui/gwsearch.cpp | 52 +- kopete/protocols/groupwise/ui/gwsearch.h | 10 +- kopete/protocols/irc/ircaccount.cpp | 224 +++--- kopete/protocols/irc/ircaccount.h | 108 +-- kopete/protocols/irc/ircaddcontactpage.cpp | 30 +- kopete/protocols/irc/ircaddcontactpage.h | 6 +- kopete/protocols/irc/ircchannelcontact.cpp | 122 ++-- kopete/protocols/irc/ircchannelcontact.h | 60 +- kopete/protocols/irc/irccontact.cpp | 134 ++-- kopete/protocols/irc/irccontact.h | 38 +- kopete/protocols/irc/irccontactmanager.cpp | 90 +-- kopete/protocols/irc/irccontactmanager.h | 48 +- kopete/protocols/irc/ircguiclient.cpp | 18 +- kopete/protocols/irc/ircguiclient.h | 6 +- kopete/protocols/irc/ircprotocol.cpp | 488 ++++++------- kopete/protocols/irc/ircprotocol.h | 86 +-- kopete/protocols/irc/ircservercontact.cpp | 64 +- kopete/protocols/irc/ircservercontact.h | 22 +- kopete/protocols/irc/ircsignalhandler.cpp | 88 +-- kopete/protocols/irc/ircsignalhandler.h | 100 +-- kopete/protocols/irc/irctransferhandler.cpp | 36 +- kopete/protocols/irc/irctransferhandler.h | 6 +- kopete/protocols/irc/ircusercontact.cpp | 146 ++-- kopete/protocols/irc/ircusercontact.h | 52 +- kopete/protocols/irc/kcodecaction.cpp | 38 +- kopete/protocols/irc/kcodecaction.h | 14 +- kopete/protocols/irc/ksparser.cpp | 96 +-- kopete/protocols/irc/ksparser.h | 38 +- kopete/protocols/irc/libkirc/kircengine.cpp | 110 +-- kopete/protocols/irc/libkirc/kircengine.h | 336 ++++----- .../protocols/irc/libkirc/kircengine_commands.cpp | 102 +-- kopete/protocols/irc/libkirc/kircengine_ctcp.cpp | 134 ++-- .../irc/libkirc/kircengine_numericreplies.cpp | 132 ++-- kopete/protocols/irc/libkirc/kircentity.cpp | 34 +- kopete/protocols/irc/libkirc/kircentity.h | 52 +- kopete/protocols/irc/libkirc/kircmessage.cpp | 118 ++-- kopete/protocols/irc/libkirc/kircmessage.h | 84 +-- .../irc/libkirc/kircmessageredirector.cpp | 16 +- .../protocols/irc/libkirc/kircmessageredirector.h | 24 +- kopete/protocols/irc/libkirc/kirctransfer.cpp | 100 +-- kopete/protocols/irc/libkirc/kirctransfer.h | 58 +- .../protocols/irc/libkirc/kirctransferhandler.cpp | 22 +- kopete/protocols/irc/libkirc/kirctransferhandler.h | 24 +- .../protocols/irc/libkirc/kirctransferserver.cpp | 44 +- kopete/protocols/irc/libkirc/kirctransferserver.h | 16 +- kopete/protocols/irc/libkirc/ksslsocket.cpp | 82 +-- kopete/protocols/irc/libkirc/ksslsocket.h | 12 +- kopete/protocols/irc/ui/channellist.cpp | 166 ++--- kopete/protocols/irc/ui/channellist.h | 38 +- kopete/protocols/irc/ui/channellistdialog.cpp | 16 +- kopete/protocols/irc/ui/channellistdialog.h | 4 +- kopete/protocols/irc/ui/irceditaccountwidget.cpp | 116 ++-- kopete/protocols/irc/ui/irceditaccountwidget.h | 12 +- kopete/protocols/irc/ui/networkconfig.ui.h | 4 +- kopete/protocols/jabber/jabberaccount.cpp | 190 ++--- kopete/protocols/jabber/jabberaccount.h | 34 +- kopete/protocols/jabber/jabberbasecontact.cpp | 68 +- kopete/protocols/jabber/jabberbasecontact.h | 8 +- kopete/protocols/jabber/jabberbookmarks.cpp | 38 +- kopete/protocols/jabber/jabberbookmarks.h | 14 +- kopete/protocols/jabber/jabberbytestream.cpp | 20 +- kopete/protocols/jabber/jabberbytestream.h | 4 +- .../protocols/jabber/jabbercapabilitiesmanager.cpp | 148 ++-- .../protocols/jabber/jabbercapabilitiesmanager.h | 36 +- kopete/protocols/jabber/jabberchatsession.cpp | 44 +- kopete/protocols/jabber/jabberchatsession.h | 8 +- kopete/protocols/jabber/jabberclient.cpp | 218 +++--- kopete/protocols/jabber/jabberclient.h | 70 +- kopete/protocols/jabber/jabberconnector.cpp | 14 +- kopete/protocols/jabber/jabberconnector.h | 8 +- kopete/protocols/jabber/jabbercontact.cpp | 192 ++--- kopete/protocols/jabber/jabbercontact.h | 24 +- kopete/protocols/jabber/jabbercontactpool.cpp | 14 +- kopete/protocols/jabber/jabbercontactpool.h | 6 +- kopete/protocols/jabber/jabberfiletransfer.cpp | 32 +- kopete/protocols/jabber/jabberfiletransfer.h | 10 +- kopete/protocols/jabber/jabberformlineedit.cpp | 4 +- kopete/protocols/jabber/jabberformlineedit.h | 12 +- kopete/protocols/jabber/jabberformtranslator.cpp | 20 +- kopete/protocols/jabber/jabberformtranslator.h | 6 +- kopete/protocols/jabber/jabbergroupchatmanager.cpp | 12 +- kopete/protocols/jabber/jabbergroupchatmanager.h | 2 +- kopete/protocols/jabber/jabbergroupcontact.cpp | 34 +- kopete/protocols/jabber/jabbergroupcontact.h | 10 +- .../protocols/jabber/jabbergroupmembercontact.cpp | 18 +- kopete/protocols/jabber/jabbergroupmembercontact.h | 4 +- kopete/protocols/jabber/jabberprotocol.cpp | 92 +-- kopete/protocols/jabber/jabberprotocol.h | 22 +- kopete/protocols/jabber/jabberresource.cpp | 16 +- kopete/protocols/jabber/jabberresource.h | 8 +- kopete/protocols/jabber/jabberresourcepool.cpp | 20 +- kopete/protocols/jabber/jabberresourcepool.h | 6 +- kopete/protocols/jabber/jabbertransport.cpp | 46 +- kopete/protocols/jabber/jabbertransport.h | 10 +- kopete/protocols/jabber/jingle/jinglesession.cpp | 4 +- kopete/protocols/jabber/jingle/jinglesession.h | 12 +- .../jabber/jingle/jinglesessionmanager.cpp | 16 +- .../protocols/jabber/jingle/jinglesessionmanager.h | 14 +- .../protocols/jabber/jingle/jinglevoicecaller.cpp | 48 +- kopete/protocols/jabber/jingle/jinglevoicecaller.h | 6 +- .../protocols/jabber/jingle/jinglevoicesession.cpp | 32 +- .../protocols/jabber/jingle/jinglevoicesession.h | 8 +- .../jabber/jingle/jinglevoicesessiondialog.cpp | 46 +- .../jabber/jingle/jinglevoicesessiondialog.h | 2 +- .../jabber/jingle/jinglewatchsessiontask.cpp | 12 +- .../jabber/jingle/jinglewatchsessiontask.h | 4 +- kopete/protocols/jabber/kioslave/jabberdisco.cpp | 32 +- kopete/protocols/jabber/kioslave/jabberdisco.h | 16 +- .../jabber/libiris/cutestuff/network/bsocket.cpp | 74 +- .../jabber/libiris/cutestuff/network/bsocket.h | 20 +- .../libiris/cutestuff/network/httpconnect.cpp | 68 +- .../jabber/libiris/cutestuff/network/httpconnect.h | 10 +- .../jabber/libiris/cutestuff/network/httppoll.cpp | 158 ++--- .../jabber/libiris/cutestuff/network/httppoll.h | 22 +- .../jabber/libiris/cutestuff/network/ndns.cpp | 68 +- .../jabber/libiris/cutestuff/network/ndns.h | 24 +- .../jabber/libiris/cutestuff/network/servsock.cpp | 12 +- .../jabber/libiris/cutestuff/network/servsock.h | 6 +- .../jabber/libiris/cutestuff/network/socks.cpp | 234 +++---- .../jabber/libiris/cutestuff/network/socks.h | 46 +- .../libiris/cutestuff/network/srvresolver.cpp | 70 +- .../jabber/libiris/cutestuff/network/srvresolver.h | 14 +- .../jabber/libiris/cutestuff/util/base64.cpp | 36 +- .../jabber/libiris/cutestuff/util/base64.h | 12 +- .../jabber/libiris/cutestuff/util/bytestream.cpp | 34 +- .../jabber/libiris/cutestuff/util/bytestream.h | 28 +- .../jabber/libiris/cutestuff/util/cipher.cpp | 68 +- .../jabber/libiris/cutestuff/util/cipher.h | 24 +- .../jabber/libiris/cutestuff/util/qrandom.cpp | 6 +- .../jabber/libiris/cutestuff/util/qrandom.h | 4 +- .../jabber/libiris/cutestuff/util/safedelete.cpp | 16 +- .../jabber/libiris/cutestuff/util/safedelete.h | 16 +- .../jabber/libiris/cutestuff/util/sha1.cpp | 16 +- .../protocols/jabber/libiris/cutestuff/util/sha1.h | 8 +- .../jabber/libiris/cutestuff/util/showtextdlg.cpp | 32 +- .../jabber/libiris/cutestuff/util/showtextdlg.h | 4 +- kopete/protocols/jabber/libiris/iris/include/im.h | 388 +++++------ .../protocols/jabber/libiris/iris/include/xmpp.h | 224 +++--- .../jabber/libiris/iris/jabber/filetransfer.cpp | 190 ++--- .../jabber/libiris/iris/jabber/filetransfer.h | 34 +- .../protocols/jabber/libiris/iris/jabber/s5b.cpp | 386 +++++------ kopete/protocols/jabber/libiris/iris/jabber/s5b.h | 112 +-- .../jabber/libiris/iris/jabber/xmpp_ibb.cpp | 134 ++-- .../jabber/libiris/iris/jabber/xmpp_ibb.h | 58 +- .../jabber/libiris/iris/jabber/xmpp_jidlink.cpp | 34 +- .../jabber/libiris/iris/jabber/xmpp_jidlink.h | 10 +- .../jabber/libiris/iris/xmpp-core/connector.cpp | 88 +-- .../jabber/libiris/iris/xmpp-core/hash.cpp | 8 +- .../jabber/libiris/iris/xmpp-core/jid.cpp | 102 +-- .../jabber/libiris/iris/xmpp-core/parser.cpp | 174 ++--- .../jabber/libiris/iris/xmpp-core/parser.h | 32 +- .../jabber/libiris/iris/xmpp-core/protocol.cpp | 322 ++++----- .../jabber/libiris/iris/xmpp-core/protocol.h | 132 ++-- .../jabber/libiris/iris/xmpp-core/qcaprovider.h | 92 +-- .../jabber/libiris/iris/xmpp-core/securestream.cpp | 116 ++-- .../jabber/libiris/iris/xmpp-core/securestream.h | 24 +- .../jabber/libiris/iris/xmpp-core/simplesasl.cpp | 122 ++-- .../jabber/libiris/iris/xmpp-core/stream.cpp | 298 ++++---- .../protocols/jabber/libiris/iris/xmpp-core/td.h | 12 +- .../jabber/libiris/iris/xmpp-core/tlshandler.cpp | 24 +- .../jabber/libiris/iris/xmpp-core/xmlprotocol.cpp | 108 +-- .../jabber/libiris/iris/xmpp-core/xmlprotocol.h | 54 +- .../jabber/libiris/iris/xmpp-im/client.cpp | 304 ++++---- .../jabber/libiris/iris/xmpp-im/types.cpp | 414 +++++------ .../jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp | 406 +++++------ .../jabber/libiris/iris/xmpp-im/xmpp_tasks.h | 114 +-- .../jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp | 294 ++++---- .../jabber/libiris/iris/xmpp-im/xmpp_vcard.h | 178 ++--- .../jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp | 176 ++--- .../jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h | 60 +- kopete/protocols/jabber/libiris/qca/src/qca.cpp | 298 ++++---- kopete/protocols/jabber/libiris/qca/src/qca.h | 150 ++-- .../protocols/jabber/libiris/qca/src/qcaprovider.h | 92 +-- kopete/protocols/jabber/ui/dlgjabberbrowse.cpp | 18 +- kopete/protocols/jabber/ui/dlgjabberbrowse.h | 4 +- .../jabber/ui/dlgjabberchangepassword.cpp | 14 +- .../protocols/jabber/ui/dlgjabberchangepassword.h | 2 +- kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp | 10 +- kopete/protocols/jabber/ui/dlgjabberchatjoin.h | 2 +- .../protocols/jabber/ui/dlgjabberchatroomslist.cpp | 16 +- .../protocols/jabber/ui/dlgjabberchatroomslist.h | 10 +- kopete/protocols/jabber/ui/dlgjabberregister.cpp | 12 +- kopete/protocols/jabber/ui/dlgjabberregister.h | 10 +- kopete/protocols/jabber/ui/dlgjabbersendraw.cpp | 22 +- kopete/protocols/jabber/ui/dlgjabbersendraw.h | 6 +- kopete/protocols/jabber/ui/dlgjabberservices.cpp | 38 +- kopete/protocols/jabber/ui/dlgjabberservices.h | 16 +- kopete/protocols/jabber/ui/dlgjabbervcard.cpp | 72 +- kopete/protocols/jabber/ui/dlgjabbervcard.h | 6 +- .../protocols/jabber/ui/jabberaddcontactpage.cpp | 32 +- kopete/protocols/jabber/ui/jabberaddcontactpage.h | 8 +- kopete/protocols/jabber/ui/jabberchooseserver.cpp | 22 +- kopete/protocols/jabber/ui/jabberchooseserver.h | 6 +- .../jabber/ui/jabbereditaccountwidget.cpp | 40 +- .../protocols/jabber/ui/jabbereditaccountwidget.h | 4 +- .../protocols/jabber/ui/jabberregisteraccount.cpp | 52 +- kopete/protocols/jabber/ui/jabberregisteraccount.h | 10 +- kopete/protocols/meanwhile/meanwhileaccount.cpp | 36 +- kopete/protocols/meanwhile/meanwhileaccount.h | 20 +- .../meanwhile/meanwhileaddcontactpage.cpp | 16 +- .../protocols/meanwhile/meanwhileaddcontactpage.h | 4 +- kopete/protocols/meanwhile/meanwhilecontact.cpp | 24 +- kopete/protocols/meanwhile/meanwhilecontact.h | 14 +- .../meanwhile/meanwhileeditaccountwidget.cpp | 22 +- .../meanwhile/meanwhileeditaccountwidget.h | 4 +- kopete/protocols/meanwhile/meanwhileplugin.cpp | 10 +- kopete/protocols/meanwhile/meanwhileplugin.h | 6 +- kopete/protocols/meanwhile/meanwhileprotocol.cpp | 30 +- kopete/protocols/meanwhile/meanwhileprotocol.h | 14 +- kopete/protocols/meanwhile/meanwhilesession.cpp | 54 +- kopete/protocols/meanwhile/meanwhilesession.h | 14 +- kopete/protocols/msn/config/msnpreferences.cpp | 2 +- kopete/protocols/msn/dispatcher.cpp | 166 ++--- kopete/protocols/msn/dispatcher.h | 42 +- kopete/protocols/msn/incomingtransfer.cpp | 66 +- kopete/protocols/msn/incomingtransfer.h | 4 +- kopete/protocols/msn/messageformatter.cpp | 36 +- kopete/protocols/msn/messageformatter.h | 8 +- kopete/protocols/msn/msnaccount.cpp | 324 ++++----- kopete/protocols/msn/msnaccount.h | 82 +-- kopete/protocols/msn/msnaddcontactpage.cpp | 16 +- kopete/protocols/msn/msnaddcontactpage.h | 10 +- kopete/protocols/msn/msnchallengehandler.cpp | 38 +- kopete/protocols/msn/msnchallengehandler.h | 18 +- kopete/protocols/msn/msnchatsession.cpp | 182 ++--- kopete/protocols/msn/msnchatsession.h | 34 +- kopete/protocols/msn/msncontact.cpp | 108 +-- kopete/protocols/msn/msncontact.h | 40 +- kopete/protocols/msn/msndebugrawcmddlg.cpp | 14 +- kopete/protocols/msn/msndebugrawcmddlg.h | 8 +- kopete/protocols/msn/msnfiletransfersocket.cpp | 102 +-- kopete/protocols/msn/msnfiletransfersocket.h | 34 +- kopete/protocols/msn/msninvitation.cpp | 34 +- kopete/protocols/msn/msninvitation.h | 20 +- kopete/protocols/msn/msnnotifysocket.cpp | 256 +++---- kopete/protocols/msn/msnnotifysocket.h | 84 +-- kopete/protocols/msn/msnprotocol.cpp | 44 +- kopete/protocols/msn/msnprotocol.h | 20 +- kopete/protocols/msn/msnsecureloginhandler.cpp | 28 +- kopete/protocols/msn/msnsecureloginhandler.h | 14 +- kopete/protocols/msn/msnsocket.cpp | 170 ++--- kopete/protocols/msn/msnsocket.h | 68 +- kopete/protocols/msn/msnswitchboardsocket.cpp | 298 ++++---- kopete/protocols/msn/msnswitchboardsocket.h | 70 +- kopete/protocols/msn/outgoingtransfer.cpp | 68 +- kopete/protocols/msn/outgoingtransfer.h | 16 +- kopete/protocols/msn/p2p.cpp | 50 +- kopete/protocols/msn/p2p.h | 36 +- kopete/protocols/msn/sha1.cpp | 16 +- kopete/protocols/msn/sha1.h | 8 +- kopete/protocols/msn/transport.cpp | 60 +- kopete/protocols/msn/transport.h | 34 +- kopete/protocols/msn/ui/msneditaccountwidget.cpp | 90 +-- kopete/protocols/msn/ui/msneditaccountwidget.h | 6 +- kopete/protocols/msn/webcam.cpp | 196 +++--- kopete/protocols/msn/webcam.h | 20 +- kopete/protocols/msn/webcam/mimicwrapper.cpp | 28 +- kopete/protocols/msn/webcam/mimicwrapper.h | 6 +- kopete/protocols/msn/webcam/msnwebcamdialog.cpp | 24 +- kopete/protocols/msn/webcam/msnwebcamdialog.h | 6 +- kopete/protocols/oscar/aim/aimaccount.cpp | 222 +++--- kopete/protocols/oscar/aim/aimaccount.h | 46 +- kopete/protocols/oscar/aim/aimchatsession.cpp | 6 +- kopete/protocols/oscar/aim/aimchatsession.h | 8 +- kopete/protocols/oscar/aim/aimcontact.cpp | 172 ++--- kopete/protocols/oscar/aim/aimcontact.h | 36 +- kopete/protocols/oscar/aim/aimjoinchat.cpp | 26 +- kopete/protocols/oscar/aim/aimjoinchat.h | 16 +- kopete/protocols/oscar/aim/aimprotocol.cpp | 54 +- kopete/protocols/oscar/aim/aimprotocol.h | 14 +- kopete/protocols/oscar/aim/aimuserinfo.cpp | 70 +- kopete/protocols/oscar/aim/aimuserinfo.h | 8 +- .../protocols/oscar/aim/ui/aimaddcontactpage.cpp | 14 +- kopete/protocols/oscar/aim/ui/aimaddcontactpage.h | 10 +- .../oscar/aim/ui/aimeditaccountwidget.cpp | 34 +- .../protocols/oscar/aim/ui/aimeditaccountwidget.h | 6 +- kopete/protocols/oscar/icq/icqaccount.cpp | 88 +-- kopete/protocols/oscar/icq/icqaccount.h | 24 +- kopete/protocols/oscar/icq/icqcontact.cpp | 154 ++--- kopete/protocols/oscar/icq/icqcontact.h | 30 +- kopete/protocols/oscar/icq/icqpresence.cpp | 14 +- kopete/protocols/oscar/icq/icqprotocol.cpp | 98 +-- kopete/protocols/oscar/icq/icqprotocol.h | 50 +- kopete/protocols/oscar/icq/icqreadaway.cpp | 36 +- kopete/protocols/oscar/icq/icqreadaway.h | 8 +- .../protocols/oscar/icq/ui/icqaddcontactpage.cpp | 30 +- kopete/protocols/oscar/icq/ui/icqaddcontactpage.h | 8 +- .../protocols/oscar/icq/ui/icqauthreplydialog.cpp | 14 +- kopete/protocols/oscar/icq/ui/icqauthreplydialog.h | 8 +- .../oscar/icq/ui/icqeditaccountwidget.cpp | 32 +- .../protocols/oscar/icq/ui/icqeditaccountwidget.h | 8 +- kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp | 72 +- kopete/protocols/oscar/icq/ui/icqsearchdialog.h | 2 +- .../protocols/oscar/icq/ui/icquserinfowidget.cpp | 84 +-- kopete/protocols/oscar/icq/ui/icquserinfowidget.h | 2 +- kopete/protocols/oscar/liboscar/aimlogintask.cpp | 24 +- kopete/protocols/oscar/liboscar/aimlogintask.h | 18 +- kopete/protocols/oscar/liboscar/blmlimitstask.cpp | 2 +- kopete/protocols/oscar/liboscar/buddyicontask.cpp | 28 +- kopete/protocols/oscar/liboscar/buddyicontask.h | 16 +- kopete/protocols/oscar/liboscar/buffer.cpp | 74 +- kopete/protocols/oscar/liboscar/buffer.h | 42 +- kopete/protocols/oscar/liboscar/bytestream.cpp | 34 +- kopete/protocols/oscar/liboscar/bytestream.h | 28 +- .../oscar/liboscar/changevisibilitytask.cpp | 16 +- .../oscar/liboscar/chatnavservicetask.cpp | 36 +- .../protocols/oscar/liboscar/chatnavservicetask.h | 12 +- .../protocols/oscar/liboscar/chatservicetask.cpp | 48 +- kopete/protocols/oscar/liboscar/chatservicetask.h | 14 +- kopete/protocols/oscar/liboscar/client.cpp | 308 ++++----- kopete/protocols/oscar/liboscar/client.h | 154 ++--- .../protocols/oscar/liboscar/clientreadytask.cpp | 8 +- kopete/protocols/oscar/liboscar/clientreadytask.h | 8 +- .../oscar/liboscar/closeconnectiontask.cpp | 20 +- .../protocols/oscar/liboscar/closeconnectiontask.h | 16 +- kopete/protocols/oscar/liboscar/connection.cpp | 22 +- kopete/protocols/oscar/liboscar/connection.h | 22 +- .../protocols/oscar/liboscar/connectionhandler.cpp | 32 +- .../protocols/oscar/liboscar/connectionhandler.h | 14 +- kopete/protocols/oscar/liboscar/connector.cpp | 10 +- kopete/protocols/oscar/liboscar/connector.h | 14 +- kopete/protocols/oscar/liboscar/coreprotocol.cpp | 38 +- kopete/protocols/oscar/liboscar/coreprotocol.h | 18 +- kopete/protocols/oscar/liboscar/flapprotocol.cpp | 12 +- kopete/protocols/oscar/liboscar/flapprotocol.h | 4 +- kopete/protocols/oscar/liboscar/icbmparamstask.cpp | 2 +- kopete/protocols/oscar/liboscar/icqlogintask.cpp | 8 +- kopete/protocols/oscar/liboscar/icqlogintask.h | 2 +- kopete/protocols/oscar/liboscar/icqtask.cpp | 10 +- kopete/protocols/oscar/liboscar/icquserinfo.cpp | 18 +- kopete/protocols/oscar/liboscar/icquserinfo.h | 98 +-- .../protocols/oscar/liboscar/icquserinfotask.cpp | 16 +- kopete/protocols/oscar/liboscar/icquserinfotask.h | 42 +- .../protocols/oscar/liboscar/inputprotocolbase.cpp | 14 +- .../protocols/oscar/liboscar/inputprotocolbase.h | 12 +- .../oscar/liboscar/locationrightstask.cpp | 2 +- kopete/protocols/oscar/liboscar/logintask.cpp | 24 +- kopete/protocols/oscar/liboscar/logintask.h | 28 +- .../oscar/liboscar/messagereceivertask.cpp | 32 +- .../protocols/oscar/liboscar/messagereceivertask.h | 10 +- .../oscar/liboscar/offlinemessagestask.cpp | 12 +- .../oscar/liboscar/onlinenotifiertask.cpp | 4 +- .../protocols/oscar/liboscar/onlinenotifiertask.h | 4 +- .../protocols/oscar/liboscar/oscarbytestream.cpp | 20 +- kopete/protocols/oscar/liboscar/oscarbytestream.h | 4 +- .../protocols/oscar/liboscar/oscarclientstream.cpp | 74 +- .../protocols/oscar/liboscar/oscarclientstream.h | 16 +- kopete/protocols/oscar/liboscar/oscarconnector.cpp | 14 +- kopete/protocols/oscar/liboscar/oscarconnector.h | 8 +- kopete/protocols/oscar/liboscar/oscarmessage.cpp | 56 +- kopete/protocols/oscar/liboscar/oscarmessage.h | 56 +- .../protocols/oscar/liboscar/oscartypeclasses.cpp | 56 +- kopete/protocols/oscar/liboscar/oscartypeclasses.h | 40 +- kopete/protocols/oscar/liboscar/oscartypes.h | 28 +- kopete/protocols/oscar/liboscar/oscarutils.cpp | 38 +- kopete/protocols/oscar/liboscar/oscarutils.h | 26 +- .../protocols/oscar/liboscar/ownuserinfotask.cpp | 10 +- kopete/protocols/oscar/liboscar/ownuserinfotask.h | 4 +- kopete/protocols/oscar/liboscar/prmparamstask.cpp | 2 +- kopete/protocols/oscar/liboscar/profiletask.cpp | 12 +- kopete/protocols/oscar/liboscar/profiletask.h | 8 +- kopete/protocols/oscar/liboscar/rateclass.cpp | 18 +- kopete/protocols/oscar/liboscar/rateclass.h | 18 +- .../protocols/oscar/liboscar/rateclassmanager.cpp | 24 +- kopete/protocols/oscar/liboscar/rateclassmanager.h | 8 +- kopete/protocols/oscar/liboscar/rateinfotask.cpp | 18 +- kopete/protocols/oscar/liboscar/rateinfotask.h | 4 +- kopete/protocols/oscar/liboscar/rtf.cc | 40 +- kopete/protocols/oscar/liboscar/rtf2html.h | 20 +- kopete/protocols/oscar/liboscar/safedelete.cpp | 16 +- kopete/protocols/oscar/liboscar/safedelete.h | 16 +- kopete/protocols/oscar/liboscar/senddcinfotask.cpp | 2 +- .../protocols/oscar/liboscar/sendidletimetask.cpp | 2 +- .../protocols/oscar/liboscar/sendmessagetask.cpp | 12 +- kopete/protocols/oscar/liboscar/sendmessagetask.h | 2 +- .../oscar/liboscar/serverredirecttask.cpp | 14 +- .../protocols/oscar/liboscar/serverredirecttask.h | 22 +- .../oscar/liboscar/serverversionstask.cpp | 4 +- .../protocols/oscar/liboscar/serverversionstask.h | 4 +- .../protocols/oscar/liboscar/servicesetuptask.cpp | 20 +- kopete/protocols/oscar/liboscar/snacprotocol.cpp | 12 +- kopete/protocols/oscar/liboscar/snacprotocol.h | 4 +- .../protocols/oscar/liboscar/ssiactivatetask.cpp | 2 +- kopete/protocols/oscar/liboscar/ssiauthtask.cpp | 26 +- kopete/protocols/oscar/liboscar/ssiauthtask.h | 14 +- kopete/protocols/oscar/liboscar/ssilisttask.cpp | 14 +- kopete/protocols/oscar/liboscar/ssimanager.cpp | 96 +-- kopete/protocols/oscar/liboscar/ssimanager.h | 42 +- kopete/protocols/oscar/liboscar/ssimodifytask.cpp | 54 +- kopete/protocols/oscar/liboscar/ssimodifytask.h | 12 +- kopete/protocols/oscar/liboscar/ssiparamstask.cpp | 4 +- kopete/protocols/oscar/liboscar/stream.cpp | 4 +- kopete/protocols/oscar/liboscar/stream.h | 6 +- kopete/protocols/oscar/liboscar/task.cpp | 36 +- kopete/protocols/oscar/liboscar/task.h | 10 +- .../oscar/liboscar/tests/clientstream_test.cpp | 10 +- .../oscar/liboscar/tests/clientstream_test.h | 6 +- .../protocols/oscar/liboscar/tests/ipaddrtest.cpp | 8 +- kopete/protocols/oscar/liboscar/tests/ipaddrtest.h | 6 +- .../protocols/oscar/liboscar/tests/kunittest.cpp | 30 +- kopete/protocols/oscar/liboscar/tests/kunittest.h | 12 +- .../protocols/oscar/liboscar/tests/logintest.cpp | 8 +- kopete/protocols/oscar/liboscar/tests/logintest.h | 6 +- .../oscar/liboscar/tests/redirecttest.cpp | 6 +- .../protocols/oscar/liboscar/tests/redirecttest.h | 8 +- .../oscar/liboscar/tests/ssigrouptest.cpp | 16 +- .../protocols/oscar/liboscar/tests/ssigrouptest.h | 6 +- kopete/protocols/oscar/liboscar/tests/ssitest.cpp | 24 +- kopete/protocols/oscar/liboscar/tests/ssitest.h | 6 +- kopete/protocols/oscar/liboscar/tests/tester.h | 32 +- .../oscar/liboscar/tests/userinfotest.cpp | 14 +- .../protocols/oscar/liboscar/tests/userinfotest.h | 6 +- kopete/protocols/oscar/liboscar/transfer.cpp | 36 +- kopete/protocols/oscar/liboscar/transfer.h | 12 +- .../protocols/oscar/liboscar/typingnotifytask.cpp | 8 +- kopete/protocols/oscar/liboscar/typingnotifytask.h | 10 +- kopete/protocols/oscar/liboscar/userdetails.cpp | 56 +- kopete/protocols/oscar/liboscar/userdetails.h | 24 +- kopete/protocols/oscar/liboscar/userinfotask.cpp | 22 +- kopete/protocols/oscar/liboscar/userinfotask.h | 16 +- kopete/protocols/oscar/liboscar/usersearchtask.cpp | 4 +- kopete/protocols/oscar/liboscar/usersearchtask.h | 8 +- kopete/protocols/oscar/liboscar/warningtask.cpp | 8 +- kopete/protocols/oscar/liboscar/warningtask.h | 8 +- kopete/protocols/oscar/oscaraccount.cpp | 222 +++--- kopete/protocols/oscar/oscaraccount.h | 40 +- kopete/protocols/oscar/oscarcontact.cpp | 44 +- kopete/protocols/oscar/oscarcontact.h | 24 +- .../oscar/oscarencodingselectiondialog.cpp | 12 +- .../protocols/oscar/oscarencodingselectiondialog.h | 4 +- .../protocols/oscar/oscarlistnonservercontacts.cpp | 10 +- .../protocols/oscar/oscarlistnonservercontacts.h | 8 +- kopete/protocols/oscar/oscarmyselfcontact.cpp | 2 +- kopete/protocols/oscar/oscarversionupdater.cpp | 62 +- kopete/protocols/oscar/oscarversionupdater.h | 12 +- kopete/protocols/oscar/oscarvisibilitydialog.cpp | 42 +- kopete/protocols/oscar/oscarvisibilitydialog.h | 10 +- kopete/protocols/sms/serviceloader.cpp | 6 +- kopete/protocols/sms/serviceloader.h | 8 +- kopete/protocols/sms/services/gsmlib.cpp | 72 +- kopete/protocols/sms/services/gsmlib.h | 46 +- .../protocols/sms/services/kopete_unix_serial.cpp | 6 +- kopete/protocols/sms/services/kopete_unix_serial.h | 6 +- kopete/protocols/sms/services/smsclient.cpp | 60 +- kopete/protocols/sms/services/smsclient.h | 16 +- kopete/protocols/sms/services/smssend.cpp | 68 +- kopete/protocols/sms/services/smssend.h | 22 +- kopete/protocols/sms/services/smssendprovider.cpp | 68 +- kopete/protocols/sms/services/smssendprovider.h | 36 +- kopete/protocols/sms/smsaccount.cpp | 32 +- kopete/protocols/sms/smsaccount.h | 14 +- kopete/protocols/sms/smsaddcontactpage.cpp | 12 +- kopete/protocols/sms/smsaddcontactpage.h | 6 +- kopete/protocols/sms/smscontact.cpp | 32 +- kopete/protocols/sms/smscontact.h | 22 +- kopete/protocols/sms/smseditaccountwidget.cpp | 42 +- kopete/protocols/sms/smseditaccountwidget.h | 12 +- kopete/protocols/sms/smsprotocol.cpp | 26 +- kopete/protocols/sms/smsprotocol.h | 22 +- kopete/protocols/sms/smsservice.cpp | 4 +- kopete/protocols/sms/smsservice.h | 16 +- kopete/protocols/sms/smsuserpreferences.cpp | 2 +- kopete/protocols/sms/smsuserpreferences.h | 4 +- kopete/protocols/testbed/testbedaccount.cpp | 22 +- kopete/protocols/testbed/testbedaccount.h | 10 +- kopete/protocols/testbed/testbedaddcontactpage.cpp | 16 +- kopete/protocols/testbed/testbedaddcontactpage.h | 2 +- kopete/protocols/testbed/testbedcontact.cpp | 22 +- kopete/protocols/testbed/testbedcontact.h | 14 +- .../protocols/testbed/testbededitaccountwidget.cpp | 12 +- .../protocols/testbed/testbededitaccountwidget.h | 6 +- kopete/protocols/testbed/testbedfakeserver.cpp | 12 +- kopete/protocols/testbed/testbedfakeserver.h | 12 +- .../protocols/testbed/testbedincomingmessage.cpp | 2 +- kopete/protocols/testbed/testbedincomingmessage.h | 6 +- kopete/protocols/testbed/testbedprotocol.cpp | 30 +- kopete/protocols/testbed/testbedprotocol.h | 12 +- .../protocols/testbed/ui/testbedwebcamdialog.cpp | 30 +- kopete/protocols/testbed/ui/testbedwebcamdialog.h | 16 +- .../protocols/winpopup/libwinpopup/libwinpopup.cpp | 106 +-- .../protocols/winpopup/libwinpopup/libwinpopup.h | 46 +- kopete/protocols/winpopup/wpaccount.cpp | 34 +- kopete/protocols/winpopup/wpaccount.h | 26 +- kopete/protocols/winpopup/wpaddcontact.cpp | 30 +- kopete/protocols/winpopup/wpaddcontact.h | 4 +- kopete/protocols/winpopup/wpcontact.cpp | 30 +- kopete/protocols/winpopup/wpcontact.h | 20 +- kopete/protocols/winpopup/wpeditaccount.cpp | 12 +- kopete/protocols/winpopup/wpeditaccount.h | 2 +- kopete/protocols/winpopup/wpprotocol.cpp | 42 +- kopete/protocols/winpopup/wpprotocol.h | 28 +- kopete/protocols/winpopup/wpuserinfo.cpp | 20 +- kopete/protocols/winpopup/wpuserinfo.h | 6 +- kopete/protocols/yahoo/libkyahoo/bytestream.cpp | 34 +- kopete/protocols/yahoo/libkyahoo/bytestream.h | 28 +- .../protocols/yahoo/libkyahoo/changestatustask.cpp | 2 +- .../protocols/yahoo/libkyahoo/changestatustask.h | 4 +- .../protocols/yahoo/libkyahoo/chatsessiontask.cpp | 4 +- kopete/protocols/yahoo/libkyahoo/chatsessiontask.h | 4 +- kopete/protocols/yahoo/libkyahoo/client.cpp | 360 +++++----- kopete/protocols/yahoo/libkyahoo/client.h | 182 ++--- .../protocols/yahoo/libkyahoo/conferencetask.cpp | 68 +- kopete/protocols/yahoo/libkyahoo/conferencetask.h | 22 +- kopete/protocols/yahoo/libkyahoo/connector.cpp | 10 +- kopete/protocols/yahoo/libkyahoo/connector.h | 14 +- kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp | 36 +- kopete/protocols/yahoo/libkyahoo/coreprotocol.h | 14 +- .../yahoo/libkyahoo/filetransfernotifiertask.cpp | 32 +- .../yahoo/libkyahoo/filetransfernotifiertask.h | 4 +- .../yahoo/libkyahoo/inputprotocolbase.cpp | 14 +- .../protocols/yahoo/libkyahoo/inputprotocolbase.h | 12 +- kopete/protocols/yahoo/libkyahoo/listtask.cpp | 16 +- kopete/protocols/yahoo/libkyahoo/listtask.h | 4 +- kopete/protocols/yahoo/libkyahoo/logintask.cpp | 92 +-- kopete/protocols/yahoo/libkyahoo/logintask.h | 42 +- kopete/protocols/yahoo/libkyahoo/logofftask.cpp | 2 +- .../protocols/yahoo/libkyahoo/mailnotifiertask.cpp | 14 +- .../protocols/yahoo/libkyahoo/mailnotifiertask.h | 2 +- .../yahoo/libkyahoo/messagereceivertask.cpp | 26 +- .../yahoo/libkyahoo/messagereceivertask.h | 10 +- .../protocols/yahoo/libkyahoo/modifybuddytask.cpp | 8 +- kopete/protocols/yahoo/libkyahoo/modifybuddytask.h | 22 +- kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp | 42 +- kopete/protocols/yahoo/libkyahoo/modifyyabtask.h | 6 +- kopete/protocols/yahoo/libkyahoo/oscartypes.h | 2 +- .../yahoo/libkyahoo/picturenotifiertask.cpp | 8 +- .../yahoo/libkyahoo/picturenotifiertask.h | 10 +- kopete/protocols/yahoo/libkyahoo/pingtask.cpp | 2 +- .../protocols/yahoo/libkyahoo/receivefiletask.cpp | 32 +- kopete/protocols/yahoo/libkyahoo/receivefiletask.h | 14 +- .../yahoo/libkyahoo/requestpicturetask.cpp | 2 +- .../protocols/yahoo/libkyahoo/requestpicturetask.h | 4 +- kopete/protocols/yahoo/libkyahoo/safedelete.cpp | 16 +- kopete/protocols/yahoo/libkyahoo/safedelete.h | 16 +- .../protocols/yahoo/libkyahoo/sendauthresptask.cpp | 6 +- .../protocols/yahoo/libkyahoo/sendauthresptask.h | 8 +- kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp | 34 +- kopete/protocols/yahoo/libkyahoo/sendfiletask.h | 22 +- .../protocols/yahoo/libkyahoo/sendmessagetask.cpp | 6 +- kopete/protocols/yahoo/libkyahoo/sendmessagetask.h | 8 +- .../protocols/yahoo/libkyahoo/sendnotifytask.cpp | 2 +- kopete/protocols/yahoo/libkyahoo/sendnotifytask.h | 4 +- .../protocols/yahoo/libkyahoo/sendpicturetask.cpp | 40 +- kopete/protocols/yahoo/libkyahoo/sendpicturetask.h | 18 +- .../yahoo/libkyahoo/statusnotifiertask.cpp | 32 +- .../protocols/yahoo/libkyahoo/statusnotifiertask.h | 12 +- kopete/protocols/yahoo/libkyahoo/stealthtask.cpp | 4 +- kopete/protocols/yahoo/libkyahoo/stealthtask.h | 4 +- kopete/protocols/yahoo/libkyahoo/stream.cpp | 4 +- kopete/protocols/yahoo/libkyahoo/stream.h | 6 +- kopete/protocols/yahoo/libkyahoo/task.cpp | 40 +- kopete/protocols/yahoo/libkyahoo/task.h | 14 +- .../yahoo/libkyahoo/tests/clientstream_test.cpp | 10 +- .../yahoo/libkyahoo/tests/clientstream_test.h | 6 +- .../protocols/yahoo/libkyahoo/tests/logintest.cpp | 8 +- kopete/protocols/yahoo/libkyahoo/tests/logintest.h | 6 +- kopete/protocols/yahoo/libkyahoo/webcamtask.cpp | 118 ++-- kopete/protocols/yahoo/libkyahoo/webcamtask.h | 44 +- kopete/protocols/yahoo/libkyahoo/yabentry.cpp | 32 +- kopete/protocols/yahoo/libkyahoo/yabentry.h | 10 +- kopete/protocols/yahoo/libkyahoo/yabtask.cpp | 30 +- kopete/protocols/yahoo/libkyahoo/yabtask.h | 4 +- .../yahoo/libkyahoo/yahoobuddyiconloader.cpp | 14 +- .../yahoo/libkyahoo/yahoobuddyiconloader.h | 18 +- .../protocols/yahoo/libkyahoo/yahoobytestream.cpp | 20 +- kopete/protocols/yahoo/libkyahoo/yahoobytestream.h | 4 +- kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp | 50 +- kopete/protocols/yahoo/libkyahoo/yahoochattask.h | 28 +- .../yahoo/libkyahoo/yahooclientstream.cpp | 76 +- .../protocols/yahoo/libkyahoo/yahooclientstream.h | 16 +- .../protocols/yahoo/libkyahoo/yahooconnector.cpp | 14 +- kopete/protocols/yahoo/libkyahoo/yahooconnector.h | 8 +- kopete/protocols/yahoo/libkyahoo/yahootypes.h | 10 +- kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp | 34 +- kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h | 4 +- kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp | 36 +- kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h | 18 +- kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp | 36 +- kopete/protocols/yahoo/ui/yahooinvitelistimpl.h | 24 +- kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp | 60 +- kopete/protocols/yahoo/ui/yahoouserinfodialog.h | 2 +- kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp | 40 +- kopete/protocols/yahoo/ui/yahoowebcamdialog.h | 12 +- kopete/protocols/yahoo/yahooaccount.cpp | 770 ++++++++++----------- kopete/protocols/yahoo/yahooaccount.h | 156 ++--- kopete/protocols/yahoo/yahooaddcontact.cpp | 8 +- kopete/protocols/yahoo/yahooaddcontact.h | 2 +- kopete/protocols/yahoo/yahoochatsession.cpp | 54 +- kopete/protocols/yahoo/yahoochatsession.h | 2 +- .../yahoo/yahooconferencemessagemanager.cpp | 20 +- .../yahoo/yahooconferencemessagemanager.h | 6 +- kopete/protocols/yahoo/yahoocontact.cpp | 144 ++-- kopete/protocols/yahoo/yahoocontact.h | 28 +- kopete/protocols/yahoo/yahooeditaccount.cpp | 44 +- kopete/protocols/yahoo/yahooeditaccount.h | 2 +- kopete/protocols/yahoo/yahooprotocol.cpp | 92 +-- kopete/protocols/yahoo/yahooprotocol.h | 16 +- kopete/protocols/yahoo/yahooverifyaccount.cpp | 18 +- kopete/protocols/yahoo/yahooverifyaccount.h | 4 +- kopete/protocols/yahoo/yahoowebcam.cpp | 28 +- kopete/protocols/yahoo/yahoowebcam.h | 16 +- 1180 files changed, 24314 insertions(+), 24314 deletions(-) (limited to 'kopete') diff --git a/kopete/kopete/addaccountwizard/addaccountwizard.cpp b/kopete/kopete/addaccountwizard/addaccountwizard.cpp index 5518c536..1c42acf2 100644 --- a/kopete/kopete/addaccountwizard/addaccountwizard.cpp +++ b/kopete/kopete/addaccountwizard/addaccountwizard.cpp @@ -18,8 +18,8 @@ #include "addaccountwizard.h" -#include -#include +#include +#include #include #include @@ -37,7 +37,7 @@ #include "kopeteprotocol.h" #include "kopetepluginmanager.h" -AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool modal, bool firstRun ) +AddAccountWizard::AddAccountWizard( TQWidget *parent, const char *name, bool modal, bool firstRun ) : KWizard(parent, name, modal, WDestructiveClose), m_accountPage(0), @@ -58,10 +58,10 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda setFinishEnabled(m_finish, true); // add the available messanger services to the dialogs list - QValueList protocols = Kopete::PluginManager::self()->availablePlugins("Protocols"); - for (QValueList::Iterator it = protocols.begin(); it != protocols.end(); ++it) + TQValueList protocols = Kopete::PluginManager::self()->availablePlugins("Protocols"); + for (TQValueList::Iterator it = protocols.begin(); it != protocols.end(); ++it) { - QListViewItem *pluginItem = new QListViewItem(m_selectService->protocolListView); + TQListViewItem *pluginItem = new TQListViewItem(m_selectService->protocolListView); pluginItem->setPixmap(0, SmallIcon((*it)->icon())); pluginItem->setText(0, (*it)->name()); pluginItem->setText(1, (*it)->comment()); @@ -70,7 +70,7 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda } // focus the ListView and select the first item - QListView &protocol_list = *m_selectService->protocolListView; + TQListView &protocol_list = *m_selectService->protocolListView; protocol_list.setFocus(); if (protocol_list.childCount() > 0) { @@ -78,21 +78,21 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda } // hook up the user input - connect(m_selectService->protocolListView, SIGNAL(clicked(QListViewItem *)), - this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect(m_selectService->protocolListView, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT( slotProtocolListClicked(QListViewItem *))); - connect(m_selectService->protocolListView, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(slotProtocolListDoubleClicked(QListViewItem *))); + connect(m_selectService->protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)), + this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect(m_selectService->protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT( slotProtocolListClicked(TQListViewItem *))); + connect(m_selectService->protocolListView, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + this, TQT_SLOT(slotProtocolListDoubleClicked(TQListViewItem *))); } -void AddAccountWizard::slotProtocolListClicked( QListViewItem * ) +void AddAccountWizard::slotProtocolListClicked( TQListViewItem * ) { // Make sure a protocol is selected before allowing the user to continue setNextEnabled(m_selectService, m_selectService->protocolListView->selectedItem() != 0); } -void AddAccountWizard::slotProtocolListDoubleClicked( QListViewItem *lvi ) +void AddAccountWizard::slotProtocolListDoubleClicked( TQListViewItem *lvi ) { // proceed to the next wizard page if we double click a protocol next(); @@ -100,7 +100,7 @@ void AddAccountWizard::slotProtocolListDoubleClicked( QListViewItem *lvi ) void AddAccountWizard::back() { - if (currentPage() == dynamic_cast(m_accountPage)) + if (currentPage() == dynamic_cast(m_accountPage)) { // Deletes the accountPage, KWizard does not like deleting pages // using different pointers, it only seems to watch its own pointer @@ -122,7 +122,7 @@ void AddAccountWizard::next() if ( currentPage() == m_selectService && ( m_selectService->protocolListView->selectedItem() ) ) { - QListViewItem *lvi = m_selectService->protocolListView->selectedItem(); + TQListViewItem *lvi = m_selectService->protocolListView->selectedItem(); m_proto = dynamic_cast(Kopete::PluginManager::self()->loadPlugin(m_protocolItems[lvi]->pluginName())); if (!m_proto) @@ -142,10 +142,10 @@ void AddAccountWizard::next() return; } - insertPage(dynamic_cast(m_accountPage), i18n("Step Two: Account Information"), indexOf(m_finish)); + insertPage(dynamic_cast(m_accountPage), i18n("Step Two: Account Information"), indexOf(m_finish)); KWizard::next(); } - else if (currentPage() == dynamic_cast(m_accountPage)) + else if (currentPage() == dynamic_cast(m_accountPage)) { // check the data of the page is valid if (!m_accountPage->validateData()) @@ -153,7 +153,7 @@ void AddAccountWizard::next() return; } - QColor col = Kopete::AccountManager::self()->guessColor(m_proto); + TQColor col = Kopete::AccountManager::self()->guessColor(m_proto); m_finish->mColorButton->setColor(col); m_finish->mUseColor->setChecked(col.isValid()); @@ -186,7 +186,7 @@ void AddAccountWizard::accept() } // Make sure the protocol is correctly enabled. This is not really needed, but still good - const QString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower(); + const TQString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower(); Kopete::PluginManager::self()->setPluginEnabled(PROTO_NAME , true); // setup the custom colour @@ -209,7 +209,7 @@ void AddAccountWizard::reject() // if we have a protocol plugin loaded and its not being used, unload it if (m_proto && Kopete::AccountManager::self()->accounts(m_proto).isEmpty()) { - const QString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower(); + const TQString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower(); Kopete::PluginManager::self()->unloadPlugin(PROTO_NAME); } diff --git a/kopete/kopete/addaccountwizard/addaccountwizard.h b/kopete/kopete/addaccountwizard/addaccountwizard.h index f4d204ec..3f8cccbf 100644 --- a/kopete/kopete/addaccountwizard/addaccountwizard.h +++ b/kopete/kopete/addaccountwizard/addaccountwizard.h @@ -19,7 +19,7 @@ #ifndef ADDACCOUNTWIZARD_H #define ADDACCOUNTWIZARD_H -#include +#include #include @@ -44,11 +44,11 @@ class AddAccountWizard : public KWizard Q_OBJECT public: - AddAccountWizard( QWidget *parent = 0, const char *name = 0 , bool modal = false, bool firstRun = false ); + AddAccountWizard( TQWidget *parent = 0, const char *name = 0 , bool modal = false, bool firstRun = false ); private slots: - void slotProtocolListClicked( QListViewItem *item ); - void slotProtocolListDoubleClicked( QListViewItem *lvi ); + void slotProtocolListClicked( TQListViewItem *item ); + void slotProtocolListDoubleClicked( TQListViewItem *lvi ); protected slots: virtual void back(); @@ -57,7 +57,7 @@ protected slots: virtual void reject(); private: - QMap m_protocolItems; + TQMap m_protocolItems; KopeteEditAccountWidget *m_accountPage; AddAccountWizardPage1 *m_selectService; AddAccountWizardPage2 *m_finish; diff --git a/kopete/kopete/addcontactwizard/addcontactwizard.cpp b/kopete/kopete/addcontactwizard/addcontactwizard.cpp index 9b1ca28e..7198d53c 100644 --- a/kopete/kopete/addcontactwizard/addcontactwizard.cpp +++ b/kopete/kopete/addcontactwizard/addcontactwizard.cpp @@ -42,9 +42,9 @@ // Finish // true -#include -#include -#include +#include +#include +#include #include #include #include @@ -71,10 +71,10 @@ #include "kopeteaccount.h" #include "kopetegroup.h" -AddContactWizard::AddContactWizard( QWidget *parent, const char *name ) +AddContactWizard::AddContactWizard( TQWidget *parent, const char *name ) : AddContactWizard_Base( parent, name ) { - //QVBox *kabcPageVbox = new QVBox(this->page(1)); + //TQVBox *kabcPageVbox = new TQVBox(this->page(1)); m_addressbookSelectorWidget = new Kopete::UI::AddressBookSelectorWidget(this->page(1)); selectAddresseeLayout->addWidget(m_addressbookSelectorWidget); @@ -82,21 +82,21 @@ AddContactWizard::AddContactWizard( QWidget *parent, const char *name ) Kopete::GroupList groups=Kopete::ContactList::self()->groups(); for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QString groupname = it->displayName(); + TQString groupname = it->displayName(); if ( !groupname.isEmpty() ) - m_groupItems.insert(new QCheckListItem( groupList, groupname, QCheckListItem::CheckBox) , it ) ; + m_groupItems.insert(new TQCheckListItem( groupList, groupname, TQCheckListItem::CheckBox) , it ) ; } protocolListView->clear(); m_accountItems.clear(); // Populate the accounts list - QCheckListItem* accountLVI = 0; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQCheckListItem* accountLVI = 0; + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() ) { - accountLVI= new QCheckListItem( protocolListView, i->accountLabel(), QCheckListItem::CheckBox); - accountLVI->setText(1,i->protocol()->displayName() + QString::fromLatin1(" ") ); + accountLVI= new TQCheckListItem( protocolListView, i->accountLabel(), TQCheckListItem::CheckBox); + accountLVI->setText(1,i->protocol()->displayName() + TQString::fromLatin1(" ") ); //FIXME - I'm not sure the column 1 is a right place for the colored icon -Olivier accountLVI->setPixmap( 1, i->accountIcon() ); m_accountItems.insert(accountLVI,i); @@ -115,17 +115,17 @@ AddContactWizard::AddContactWizard( QWidget *parent, const char *name ) setFinishEnabled( finis, true ); // Addressee validation connections - connect( chkAddressee, SIGNAL( toggled( bool ) ), - SLOT( slotCheckAddresseeChoice( bool ) ) ); - connect( m_addressbookSelectorWidget, SIGNAL(addresseeListClicked( QListViewItem * )), SLOT(slotAddresseeListClicked( QListViewItem * )) ); + connect( chkAddressee, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotCheckAddresseeChoice( bool ) ) ); + connect( m_addressbookSelectorWidget, TQT_SIGNAL(addresseeListClicked( TQListViewItem * )), TQT_SLOT(slotAddresseeListClicked( TQListViewItem * )) ); // Group manipulation connection - connect( addGroupButton, SIGNAL(clicked()) , SLOT(slotAddGroupClicked()) ); + connect( addGroupButton, TQT_SIGNAL(clicked()) , TQT_SLOT(slotAddGroupClicked()) ); // Account choice validation connections - connect( protocolListView, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect( protocolListView, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect( protocolListView, SIGNAL(spacePressed(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); + connect( protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect( protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect( protocolListView, TQT_SIGNAL(spacePressed(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); // read sticky settings KConfig *config = kapp->config(); @@ -147,7 +147,7 @@ void AddContactWizard::slotCheckAddresseeChoice( bool on ) setAppropriate( selectAddressee, on ); } -void AddContactWizard::slotAddresseeListClicked( QListViewItem */*addressee*/ ) +void AddContactWizard::slotAddresseeListClicked( TQListViewItem */*addressee*/ ) { // enable next if a valid addressee is selected bool selected = m_addressbookSelectorWidget->addresseeSelected(); @@ -159,22 +159,22 @@ void AddContactWizard::slotAddresseeListClicked( QListViewItem */*addressee*/ ) void AddContactWizard::slotAddGroupClicked() { - QString groupName = KInputDialog::getText( + TQString groupName = KInputDialog::getText( i18n( "New Group" ), i18n( "Please enter the name for the new group:" ) ); if ( !groupName.isNull() ) - ( new QCheckListItem( groupList, groupName, QCheckListItem::CheckBox ) )->setOn( true ); + ( new TQCheckListItem( groupList, groupName, TQCheckListItem::CheckBox ) )->setOn( true ); } -void AddContactWizard::slotProtocolListClicked( QListViewItem *) +void AddContactWizard::slotProtocolListClicked( TQListViewItem *) { // Just makes sure a protocol is selected before allowing the user to continue bool oneIsChecked = false; - for (QListViewItemIterator it(protocolListView); it.current(); ++it) + for (TQListViewItemIterator it(protocolListView); it.current(); ++it) { - QCheckListItem *check = dynamic_cast(it.current()); + TQCheckListItem *check = dynamic_cast(it.current()); if (check && check->isOn()) { oneIsChecked = true; @@ -197,9 +197,9 @@ void AddContactWizard::accept() // set the metacontact's groups bool topLevel = true; - for ( QListViewItemIterator it( groupList ); it.current(); ++it ) + for ( TQListViewItemIterator it( groupList ); it.current(); ++it ) { - QCheckListItem *check = dynamic_cast( it.current() ); + TQCheckListItem *check = dynamic_cast( it.current() ); if ( check && check->isOn() ) { if(m_groupItems.contains(check)) @@ -215,7 +215,7 @@ void AddContactWizard::accept() bool ok = protocolPages.isEmpty(); // get each protocol's contact - QMap ::Iterator it; + TQMap ::Iterator it; for ( it = protocolPages.begin(); it != protocolPages.end(); ++it ) ok = ok || it.data()->apply( it.key(), metaContact ); @@ -246,7 +246,7 @@ void AddContactWizard::accept() void AddContactWizard::reject() { - QWizard::reject(); + TQWizard::reject(); } void AddContactWizard::next() @@ -257,11 +257,11 @@ void AddContactWizard::next() if (currentPage() == selectService || (currentPage() == intro && !appropriate( selectService ))) { - QStringList usedAccounts; + TQStringList usedAccounts; // We don't keep track of this pointer because it gets deleted when the wizard does (which is what we want) - for (QListViewItemIterator it(protocolListView); it.current(); ++it) + for (TQListViewItemIterator it(protocolListView); it.current(); ++it) { - QCheckListItem *item = dynamic_cast(it.current()); + TQCheckListItem *item = dynamic_cast(it.current()); if (item && item->isOn()) { Kopete::Account *i=m_accountItems[item]; @@ -278,8 +278,8 @@ void AddContactWizard::next() if (!addPage) continue; - connect(addPage, SIGNAL(dataValid( AddContactPage *, bool )), - this, SLOT( slotDataValid( AddContactPage *, bool ))); + connect(addPage, TQT_SIGNAL(dataValid( AddContactPage *, bool )), + this, TQT_SLOT( slotDataValid( AddContactPage *, bool ))); addPage->show(); insertPage( addPage, i18n( "The user has to select the contact to add to the given account name", @@ -289,7 +289,7 @@ void AddContactWizard::next() } //remove pages that were eventualy added previusely, and needs to be removed if the user pressed back. - QMap ::Iterator it; + TQMap ::Iterator it; for ( it = protocolPages.begin(); it != protocolPages.end(); ++it ) { Kopete::Account *i=it.key(); @@ -299,7 +299,7 @@ void AddContactWizard::next() protocolPages.remove(it); } } - QWizard::next(); + TQWizard::next(); return; } @@ -316,15 +316,15 @@ void AddContactWizard::next() return; } - QWizard::next(); + TQWizard::next(); } -void AddContactWizard::showPage( QWidget *page ) +void AddContactWizard::showPage( TQWidget *page ) { if ( page == intro ) setNextEnabled( page, true); // make sure the first page's Next is always enabled - QWizard::showPage( page ); + TQWizard::showPage( page ); if ( page == finis ) finishButton()->setFocus(); diff --git a/kopete/kopete/addcontactwizard/addcontactwizard.h b/kopete/kopete/addcontactwizard/addcontactwizard.h index 427bb1e3..646353a3 100644 --- a/kopete/kopete/addcontactwizard/addcontactwizard.h +++ b/kopete/kopete/addcontactwizard/addcontactwizard.h @@ -20,9 +20,9 @@ #ifndef ADDCONTACTWIZARD_H #define ADDCONTACTWIZARD_H -#include -#include -#include +#include +#include +#include #include #include @@ -52,30 +52,30 @@ class AddContactWizard : public AddContactWizard_Base Q_OBJECT public: - AddContactWizard( QWidget *parent = 0, const char *name = 0 ); + AddContactWizard( TQWidget *parent = 0, const char *name = 0 ); ~AddContactWizard(); - virtual void showPage( QWidget *page ); + virtual void showPage( TQWidget *page ); private: //Kopete::Protocol *currentProtocol; //AddContactPage *currentDataWidget; - QMap protocolPages; - QMap m_accountItems; - QMap m_groupItems; + TQMap protocolPages; + TQMap m_accountItems; + TQMap m_groupItems; Kopete::UI::AddressBookSelectorWidget *m_addressbookSelectorWidget; public slots: virtual void accept(); virtual void reject(); - void slotProtocolListClicked( QListViewItem * ); + void slotProtocolListClicked( TQListViewItem * ); void slotAddGroupClicked(); protected slots: virtual void next(); void slotCheckAddresseeChoice( bool on ); - void slotAddresseeListClicked( QListViewItem *addressee ); + void slotAddresseeListClicked( TQListViewItem *addressee ); void slotDataValid( AddContactPage *onPage, bool bOn); }; diff --git a/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp b/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp index 43c499d6..48e1b159 100644 --- a/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp +++ b/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp @@ -17,7 +17,7 @@ * * ************************************************************************* */ -#include +#include #include #include @@ -30,18 +30,18 @@ #include "fastaddcontactwizard.h" -FastAddContactWizard::FastAddContactWizard( QWidget *parent, const char *name ) +FastAddContactWizard::FastAddContactWizard( TQWidget *parent, const char *name ) : FastAddContactWizard_Base( parent, name ) { m_accountItems.clear(); // Populate the accounts list - QListViewItem* accountLVI = 0L; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQListViewItem* accountLVI = 0L; + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() ) { - accountLVI= new QListViewItem( protocolListView, i->accountLabel() ); - accountLVI->setText(1,i->protocol()->displayName() + QString::fromLatin1(" ") ); + accountLVI= new TQListViewItem( protocolListView, i->accountLabel() ); + accountLVI->setText(1,i->protocol()->displayName() + TQString::fromLatin1(" ") ); accountLVI->setPixmap( 1, SmallIcon( i->protocol()->pluginIcon() ) ); m_accountItems.insert(accountLVI,i); } @@ -50,9 +50,9 @@ FastAddContactWizard::FastAddContactWizard( QWidget *parent, const char *name ) protocolListView->setCurrentItem( accountLVI ); // Account choice validation connections - connect( protocolListView, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect( protocolListView, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect( protocolListView, SIGNAL(spacePressed(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); + connect( protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect( protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect( protocolListView, TQT_SIGNAL(spacePressed(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); setNextEnabled( selectService, false ); setFinishEnabled(finis, true); @@ -62,7 +62,7 @@ FastAddContactWizard::~FastAddContactWizard() { } -void FastAddContactWizard::slotProtocolListClicked( QListViewItem *account) +void FastAddContactWizard::slotProtocolListClicked( TQListViewItem *account) { setNextEnabled( selectService, account? account->isSelected() : false ); } @@ -74,25 +74,25 @@ void FastAddContactWizard::next() // the chosen protocol if ( currentPage() == selectService ) { - QMap ::Iterator it; + TQMap ::Iterator it; for ( it = protocolPages.begin(); it != protocolPages.end(); ++it ) { delete it.data(); } protocolPages.clear(); - QListViewItem* item = protocolListView->selectedItem(); + TQListViewItem* item = protocolListView->selectedItem(); AddContactPage *addPage = m_accountItems[item]->protocol()->createAddContactWidget(this, m_accountItems[item] ); if (addPage) { - QString title = i18n( "The account name is prepended here", + TQString title = i18n( "The account name is prepended here", "%1 contact information" ) .arg( item->text(0) ); addPage->show(); insertPage( addPage, title, indexOf( finis ) ); protocolPages.insert( m_accountItems[item] , addPage ); } - QWizard::next(); + TQWizard::next(); return; } @@ -105,7 +105,7 @@ void FastAddContactWizard::next() return; } - QWizard::next(); + TQWizard::next(); } void FastAddContactWizard::accept() @@ -117,7 +117,7 @@ void FastAddContactWizard::accept() bool ok = protocolPages.isEmpty(); // get each protocol's contact - QMap ::Iterator it; + TQMap ::Iterator it; for ( it = protocolPages.begin(); it != protocolPages.end(); ++it ) ok |= it.data()->apply( it.key(), metaContact ); diff --git a/kopete/kopete/addcontactwizard/fastaddcontactwizard.h b/kopete/kopete/addcontactwizard/fastaddcontactwizard.h index ac8db23d..496a282f 100644 --- a/kopete/kopete/addcontactwizard/fastaddcontactwizard.h +++ b/kopete/kopete/addcontactwizard/fastaddcontactwizard.h @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -49,14 +49,14 @@ class FastAddContactWizard : public FastAddContactWizard_Base { Q_OBJECT public: - FastAddContactWizard( QWidget *parent = 0, const char *name = 0 ); + FastAddContactWizard( TQWidget *parent = 0, const char *name = 0 ); ~FastAddContactWizard(); private: - QMap protocolPages; - QMap m_accountItems; + TQMap protocolPages; + TQMap m_accountItems; public slots: virtual void accept(); - void slotProtocolListClicked( QListViewItem * ); + void slotProtocolListClicked( TQListViewItem * ); protected slots: virtual void next(); }; diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp index 16e37991..b215bb66 100644 --- a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp +++ b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include //BEGIN ChatMembersListWidget::ToolTip @@ -41,7 +41,7 @@ class ChatMembersListWidget::ToolTip : public QToolTip { public: ToolTip( KListView *parent ) - : QToolTip( parent->viewport() ), m_listView ( parent ) + : TQToolTip( parent->viewport() ), m_listView ( parent ) { } @@ -50,11 +50,11 @@ public: remove( m_listView->viewport() ); } - void maybeTip( const QPoint &pos ) + void maybeTip( const TQPoint &pos ) { - if( QListViewItem *item = m_listView->itemAt( pos ) ) + if( TQListViewItem *item = m_listView->itemAt( pos ) ) { - QRect itemRect = m_listView->itemRect( item ); + TQRect itemRect = m_listView->itemRect( item ); if( itemRect.contains( pos ) ) tip( itemRect, static_cast( item )->contact()->toolTip() ); } @@ -72,21 +72,21 @@ private: ChatMembersListWidget::ContactItem::ContactItem( ChatMembersListWidget *parent, Kopete::Contact *contact ) : KListViewItem( parent ), m_contact( contact ) { - QString nick = m_contact->property(Kopete::Global::Properties::self()->nickName().key()).value().toString(); + TQString nick = m_contact->property(Kopete::Global::Properties::self()->nickName().key()).value().toString(); if ( nick.isEmpty() ) nick = m_contact->contactId(); setText( 0, nick ); setDragEnabled(true); - connect( m_contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( m_contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; setStatus( parent->session()->contactOnlineStatus(m_contact) ); reposition(); } void ChatMembersListWidget::ContactItem::slotPropertyChanged( Kopete::Contact*, - const QString &key, const QVariant&, const QVariant &newValue ) + const TQString &key, const TQVariant&, const TQVariant &newValue ) { if ( key == Kopete::Global::Properties::self()->nickName().key() ) { @@ -109,9 +109,9 @@ void ChatMembersListWidget::ContactItem::reposition() // In particular, this makes adding N items O(N^2) not O(N^2 log N). Kopete::ChatSession *session = static_cast( listView() )->session(); int ourWeight = session->contactOnlineStatus(m_contact).weight(); - QListViewItem *after = 0; + TQListViewItem *after = 0; - for ( QListViewItem *it = KListViewItem::listView()->firstChild(); it; it = it->nextSibling() ) + for ( TQListViewItem *it = KListViewItem::listView()->firstChild(); it; it = it->nextSibling() ) { ChatMembersListWidget::ContactItem *item = static_cast(it); int theirWeight = session->contactOnlineStatus(item->m_contact).weight(); @@ -133,7 +133,7 @@ void ChatMembersListWidget::ContactItem::reposition() //BEGIN ChatMembersListWidget -ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWidget *parent, const char *name ) +ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, TQWidget *parent, const char *name ) : KListView( parent, name ), m_session( session ) { // use our own custom tooltips @@ -142,7 +142,7 @@ ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWid // set up display: no header setAllColumnsShowFocus( true ); - addColumn( QString::null, -1 ); + addColumn( TQString::null, -1 ); header()->setStretchEnabled( true, 0 ); header()->hide(); @@ -151,32 +151,32 @@ ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWid // add chat members slotContactAdded( session->myself() ); - for ( QPtrListIterator it( session->members() ); it.current(); ++it ) + for ( TQPtrListIterator it( session->members() ); it.current(); ++it ) slotContactAdded( *it ); - connect( this, SIGNAL( contextMenu( KListView*, QListViewItem *, const QPoint &) ), - SLOT( slotContextMenu(KListView*, QListViewItem *, const QPoint & ) ) ); - connect( this, SIGNAL( executed( QListViewItem* ) ), - SLOT( slotExecute( QListViewItem * ) ) ); - - connect( session, SIGNAL( contactAdded(const Kopete::Contact*, bool) ), - this, SLOT( slotContactAdded(const Kopete::Contact*) ) ); - connect( session, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ), - this, SLOT( slotContactRemoved(const Kopete::Contact*) ) ); - connect( session, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ) ); + connect( this, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &) ), + TQT_SLOT( slotContextMenu(KListView*, TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQT_SIGNAL( executed( TQListViewItem* ) ), + TQT_SLOT( slotExecute( TQListViewItem * ) ) ); + + connect( session, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ), + this, TQT_SLOT( slotContactAdded(const Kopete::Contact*) ) ); + connect( session, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ), + this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*) ) ); + connect( session, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ) ); } ChatMembersListWidget::~ChatMembersListWidget() { } -void ChatMembersListWidget::slotContextMenu( KListView*, QListViewItem *item, const QPoint &point ) +void ChatMembersListWidget::slotContextMenu( KListView*, TQListViewItem *item, const TQPoint &point ) { if ( ContactItem *contactItem = dynamic_cast(item) ) { KPopupMenu *p = contactItem->contact()->popupMenu( session() ); - connect( p, SIGNAL( aboutToHide() ), p, SLOT( deleteLater() ) ); + connect( p, TQT_SIGNAL( aboutToHide() ), p, TQT_SLOT( deleteLater() ) ); p->popup( point ); } } @@ -203,7 +203,7 @@ void ChatMembersListWidget::slotContactStatusChanged( Kopete::Contact *contact, m_members[contact]->setStatus( status ); } -void ChatMembersListWidget::slotExecute( QListViewItem *item ) +void ChatMembersListWidget::slotExecute( TQListViewItem *item ) { if ( ContactItem *contactItem = dynamic_cast(item ) ) { @@ -216,9 +216,9 @@ void ChatMembersListWidget::slotExecute( QListViewItem *item ) } } -QDragObject *ChatMembersListWidget::dragObject() +TQDragObject *ChatMembersListWidget::dragObject() { - QListViewItem *currentLVI = currentItem(); + TQListViewItem *currentLVI = currentItem(); if( !currentLVI ) return 0L; @@ -228,22 +228,22 @@ QDragObject *ChatMembersListWidget::dragObject() Kopete::Contact *c = lvi->contact(); KMultipleDrag *drag = new KMultipleDrag( this ); - drag->addDragObject( new QStoredDrag("application/x-qlistviewitem", 0L ) ); + drag->addDragObject( new TQStoredDrag("application/x-qlistviewitem", 0L ) ); - QStoredDrag *d = new QStoredDrag("kopete/x-contact", 0L ); - d->setEncodedData( QString( c->protocol()->pluginId()+QChar( 0xE000 )+c->account()->accountId()+QChar( 0xE000 )+ c->contactId() ).utf8() ); + TQStoredDrag *d = new TQStoredDrag("kopete/x-contact", 0L ); + d->setEncodedData( TQString( c->protocol()->pluginId()+TQChar( 0xE000 )+c->account()->accountId()+TQChar( 0xE000 )+ c->contactId() ).utf8() ); drag->addDragObject( d ); KABC::Addressee address = KABC::StdAddressBook::self()->findByUid(c->metaContact()->metaContactId()); if( !address.isEmpty() ) { - drag->addDragObject( new QTextDrag( address.fullEmail(), 0L ) ); + drag->addDragObject( new TQTextDrag( address.fullEmail(), 0L ) ); KABC::VCardConverter converter; - QString vcard = converter.createVCard( address ); + TQString vcard = converter.createVCard( address ); if( !vcard.isNull() ) { - QStoredDrag *vcardDrag = new QStoredDrag("text/x-vcard", 0L ); + TQStoredDrag *vcardDrag = new TQStoredDrag("text/x-vcard", 0L ); vcardDrag->setEncodedData( vcard.utf8() ); drag->addDragObject( vcardDrag ); } diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.h b/kopete/kopete/chatwindow/chatmemberslistwidget.h index 71084554..c8af44a4 100644 --- a/kopete/kopete/chatwindow/chatmemberslistwidget.h +++ b/kopete/kopete/chatwindow/chatmemberslistwidget.h @@ -20,7 +20,7 @@ #include -#include +#include namespace Kopete { @@ -36,7 +36,7 @@ class ChatMembersListWidget : public KListView { Q_OBJECT public: - ChatMembersListWidget( Kopete::ChatSession *session, QWidget *parent, const char *name = 0 ); + ChatMembersListWidget( Kopete::ChatSession *session, TQWidget *parent, const char *name = 0 ); virtual ~ChatMembersListWidget(); Kopete::ChatSession *session() { return m_session; } @@ -49,18 +49,18 @@ protected: /** * Start a drag operation * @return a KMultipleDrag containing: - * 1) A QStoredDrag of type "application/x-qlistviewitem", + * 1) A TQStoredDrag of type "application/x-qlistviewitem", * 2) If the contact is associated with a KABC entry, - * i) a QTextDrag containing their email address, and + * i) a TQTextDrag containing their email address, and * ii) their vCard representation. */ - virtual QDragObject *dragObject(); + virtual TQDragObject *dragObject(); private slots: /** * Show the context menu for @p item at @p point */ - void slotContextMenu( KListView*, QListViewItem *item, const QPoint &point ); + void slotContextMenu( KListView*, TQListViewItem *item, const TQPoint &point ); /** * Called when a contact is added to the chat session. @@ -87,15 +87,15 @@ private slots: * Called when a contact is clicked. * @param item The list view item representing the clicked contact */ - void slotExecute( QListViewItem *contact ); + void slotExecute( TQListViewItem *contact ); private: Kopete::ChatSession *m_session; - QMap m_members; + TQMap m_members; ToolTip *m_toolTip; }; -class ChatMembersListWidget::ContactItem : public QObject, public KListViewItem +class ChatMembersListWidget::ContactItem : public TQObject, public KListViewItem { Q_OBJECT public: @@ -103,7 +103,7 @@ public: Kopete::Contact *contact() const { return m_contact; } private slots: - void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); private: friend class ChatMembersListWidget; diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp index 3cf70b8a..379ead44 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.cpp +++ b/kopete/kopete/chatwindow/chatmessagepart.cpp @@ -26,15 +26,15 @@ #include // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KHTML::DOM includes #include @@ -43,7 +43,7 @@ #include #include #include -#include +#include // KDE includes @@ -155,32 +155,32 @@ public: Kopete::Message::MessageType latestType; // Yep I know it will take memory, but I don't have choice // to enable on-the-fly style changing. - QValueList allMessages; + TQValueList allMessages; }; class ChatMessagePart::ToolTip : public QToolTip { public: - ToolTip( ChatMessagePart *c ) : QToolTip( c->view()->viewport() ) + ToolTip( ChatMessagePart *c ) : TQToolTip( c->view()->viewport() ) { m_chat = c; } - void maybeTip( const QPoint &/*p*/ ) + void maybeTip( const TQPoint &/*p*/ ) { // FIXME: it's wrong to look for the node under the mouse - this makes too many // assumptions about how tooltips work. but there is no nodeAtPoint. DOM::Node node = m_chat->nodeUnderMouse(); Kopete::Contact *contact = m_chat->contactFromNode( node ); - QString toolTipText; + TQString toolTipText; if(node.isNull()) return; // this tooltip is attached to the viewport widget, so translate the node's rect // into its coordinates. - QRect rect = node.getRect(); - rect = QRect( m_chat->view()->contentsToViewport( rect.topLeft() ), + TQRect rect = node.getRect(); + rect = TQRect( m_chat->view()->contentsToViewport( rect.topLeft() ), m_chat->view()->contentsToViewport( rect.bottomRight() ) ); if( contact ) @@ -213,7 +213,7 @@ private: ChatMessagePart *m_chat; }; -ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, QWidget *parent, const char *name) +ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, const char *name) : KHTMLPart( parent, name ), d( new Private ) { d->manager = mgr; @@ -231,40 +231,40 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, QWidget *parent, con // Write the template to KHTMLPart writeTemplate(); - view()->setFocusPolicy( QWidget::NoFocus ); + view()->setFocusPolicy( TQWidget::NoFocus ); d->tt=new ToolTip( this ); // It is not possible to drag and drop on our widget view()->setAcceptDrops(false); - connect( KopetePrefs::prefs(), SIGNAL(messageAppearanceChanged()), - this, SLOT( slotAppearanceChanged() ) ); - connect( KopetePrefs::prefs(), SIGNAL(windowAppearanceChanged()), - this, SLOT( slotRefreshView() ) ); - connect( KopetePrefs::prefs(), SIGNAL(styleChanged(const QString &)), - this, SLOT( setStyle(const QString &) ) ); - connect( KopetePrefs::prefs(), SIGNAL(styleVariantChanged(const QString &)), - this, SLOT( setStyleVariant(const QString &) ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(messageAppearanceChanged()), + this, TQT_SLOT( slotAppearanceChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(windowAppearanceChanged()), + this, TQT_SLOT( slotRefreshView() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(styleChanged(const TQString &)), + this, TQT_SLOT( setStyle(const TQString &) ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(styleVariantChanged(const TQString &)), + this, TQT_SLOT( setStyleVariant(const TQString &) ) ); // Refresh the style if the display name change. - connect( d->manager, SIGNAL(displayNameChanged()), this, SLOT(slotUpdateHeaderDisplayName()) ); - connect( d->manager, SIGNAL(photoChanged()), this, SLOT(slotUpdateHeaderPhoto()) ); + connect( d->manager, TQT_SIGNAL(displayNameChanged()), this, TQT_SLOT(slotUpdateHeaderDisplayName()) ); + connect( d->manager, TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotUpdateHeaderPhoto()) ); - connect ( browserExtension(), SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), - this, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); + connect ( browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), + this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); - connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)), - this, SLOT(slotRightClick(const QString &, const QPoint &)) ); - connect( view(), SIGNAL(contentsMoving(int,int)), - this, SLOT(slotScrollingTo(int,int)) ); + connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), + this, TQT_SLOT(slotRightClick(const TQString &, const TQPoint &)) ); + connect( view(), TQT_SIGNAL(contentsMoving(int,int)), + this, TQT_SLOT(slotScrollingTo(int,int)) ); //initActions - d->copyAction = KStdAction::copy( this, SLOT(copy()), actionCollection() ); - d->saveAction = KStdAction::saveAs( this, SLOT(save()), actionCollection() ); - d->printAction = KStdAction::print( this, SLOT(print()),actionCollection() ); - d->closeAction = KStdAction::close( this, SLOT(slotCloseView()),actionCollection() ); - d->importEmoticon = new KAction( i18n( "Import Emoticon"), QString::fromLatin1( "importemot" ), 0, this, SLOT( slotImportEmoticon() ), actionCollection() ); - d->copyURLAction = new KAction( i18n( "Copy Link Address" ), QString::fromLatin1( "editcopy" ), 0, this, SLOT( slotCopyURL() ), actionCollection() ); + d->copyAction = KStdAction::copy( this, TQT_SLOT(copy()), actionCollection() ); + d->saveAction = KStdAction::saveAs( this, TQT_SLOT(save()), actionCollection() ); + d->printAction = KStdAction::print( this, TQT_SLOT(print()),actionCollection() ); + d->closeAction = KStdAction::close( this, TQT_SLOT(slotCloseView()),actionCollection() ); + d->importEmoticon = new KAction( i18n( "Import Emoticon"), TQString::fromLatin1( "importemot" ), 0, this, TQT_SLOT( slotImportEmoticon() ), actionCollection() ); + d->copyURLAction = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), actionCollection() ); // read formatting override flags readOverrides(); @@ -288,38 +288,38 @@ void ChatMessagePart::slotScrollingTo( int /*x*/, int y ) void ChatMessagePart::slotImportEmoticon() { - QString emoticonString = KInputDialog::getText( i18n("Import Emoticon"), + TQString emoticonString = KInputDialog::getText( i18n("Import Emoticon"), i18n("
Insert the string for the emoticon
separated by space if you want multiple strings
").arg( d->activeElement.getAttribute("src").string() ) ); if (emoticonString.isNull() ) return; - QString emo = d->activeElement.getAttribute("src").string(); - QString themeName = KopetePrefs::prefs()->iconTheme(); + TQString emo = d->activeElement.getAttribute("src").string(); + TQString themeName = KopetePrefs::prefs()->iconTheme(); KIO::copy(emo, KGlobal::dirs()->saveLocation( "emoticons", themeName, false )); - QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); + TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); - QDomDocument themeXml; + TQDomDocument themeXml; if(!fp->exists() || !fp->open( IO_ReadOnly ) || !themeXml.setContent(fp)) return; fp->close(); - QDomNode lc = themeXml.lastChild(); + TQDomNode lc = themeXml.lastChild(); if(lc.isNull()) return; - QDomElement emoticon = themeXml.createElement("emoticon"); - emoticon.setAttribute("file", QFileInfo(emo).baseName()); + TQDomElement emoticon = themeXml.createElement("emoticon"); + emoticon.setAttribute("file", TQFileInfo(emo).baseName()); lc.appendChild(emoticon); - QStringList splitted = QStringList::split(" ", emoticonString); - QStringList::const_iterator constIterator; + TQStringList splitted = TQStringList::split(" ", emoticonString); + TQStringList::const_iterator constIterator; for(constIterator = splitted.begin(); constIterator != splitted.end(); constIterator++) { - QDomElement emotext = themeXml.createElement("string"); - QDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace()); + TQDomElement emotext = themeXml.createElement("string"); + TQDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace()); emotext.appendChild(txt); emoticon.appendChild(emotext); } @@ -327,32 +327,32 @@ void ChatMessagePart::slotImportEmoticon() if(!fp->open( IO_WriteOnly )) return; - QTextStream emoStream(fp); + TQTextStream emoStream(fp); emoStream << themeXml.toString(4); fp->close(); - QTimer::singleShot( 1500, Kopete::Emoticons::self(), SLOT( reload() ) ); + TQTimer::singleShot( 1500, Kopete::Emoticons::self(), TQT_SLOT( reload() ) ); } void ChatMessagePart::save() { - KFileDialog dlg( QString::null, QString::fromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false ); + KFileDialog dlg( TQString::null, TQString::fromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false ); dlg.setCaption( i18n( "Save Conversation" ) ); dlg.setOperationMode( KFileDialog::Saving ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return; KURL saveURL = dlg.selectedURL(); KTempFile tempFile; tempFile.setAutoDelete( true ); - QFile* file = tempFile.file(); + TQFile* file = tempFile.file(); - QTextStream stream ( file ); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream ( file ); + stream.setEncoding(TQTextStream::UnicodeUTF8); - if ( dlg.currentFilter() == QString::fromLatin1( "text/plain" ) ) + if ( dlg.currentFilter() == TQString::fromLatin1( "text/plain" ) ) { - QValueList::ConstIterator it, itEnd = d->allMessages.constEnd(); + TQValueList::ConstIterator it, itEnd = d->allMessages.constEnd(); for(it = d->allMessages.constBegin(); it != itEnd; ++it) { Kopete::Message tempMessage = *it; @@ -392,7 +392,7 @@ void ChatMessagePart::pageDown() void ChatMessagePart::slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/*args*/) { kdDebug(14000) << k_funcinfo << "url=" << url.url() << endl; - if ( url.protocol() == QString::fromLatin1("kopetemessage") ) + if ( url.protocol() == TQString::fromLatin1("kopetemessage") ) { Kopete::Contact *contact = d->manager->account()->contacts()[ url.host() ]; if ( contact ) @@ -413,14 +413,14 @@ void ChatMessagePart::readOverrides() d->rtfOverride = KopetePrefs::prefs()->rtfOverride(); } -void ChatMessagePart::setStyle( const QString &stylePath ) +void ChatMessagePart::setStyle( const TQString &stylePath ) { // Create a new ChatWindowStyle d->currentChatStyle = ChatWindowStyleManager::self()->getStyleFromPool(stylePath); // Do the actual style switch // Wait for the event loop before switching the style - QTimer::singleShot( 0, this, SLOT(changeStyle()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) ); } void ChatMessagePart::setStyle( ChatWindowStyle *style ) @@ -430,14 +430,14 @@ void ChatMessagePart::setStyle( ChatWindowStyle *style ) // Do the actual style switch // Wait for the event loop before switching the style - QTimer::singleShot( 0, this, SLOT(changeStyle()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) ); } -void ChatMessagePart::setStyleVariant( const QString &variantPath ) +void ChatMessagePart::setStyleVariant( const TQString &variantPath ) { - DOM::HTMLElement variantNode = document().getElementById( QString::fromUtf8("mainStyle") ); + DOM::HTMLElement variantNode = document().getElementById( TQString::fromUtf8("mainStyle") ); if( !variantNode.isNull() ) - variantNode.setInnerText( QString("@import url(\"%1\");").arg(variantPath) ); + variantNode.setInnerText( TQString("@import url(\"%1\");").arg(variantPath) ); } void ChatMessagePart::slotAppearanceChanged() @@ -459,10 +459,10 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring ) message.setBody( message.parsedBody() , Kopete::Message::ParsedHTML ); #ifdef STYLE_TIMETEST - QTime beforeMessage = QTime::currentTime(); + TQTime beforeMessage = TQTime::currentTime(); #endif - QString formattedMessageHtml; + TQString formattedMessageHtml; bool isConsecutiveMessage = false; uint bufferLen = (uint)KopetePrefs::prefs()->chatViewBufferSize(); @@ -549,11 +549,11 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring ) // newMessageNode is common to both code path // FIXME: Find a better than to create a dummy span. - DOM::HTMLElement newMessageNode = document().createElement( QString::fromUtf8("span") ); + DOM::HTMLElement newMessageNode = document().createElement( TQString::fromUtf8("span") ); newMessageNode.setInnerHTML( formattedMessageHtml ); // Find the insert Node - DOM::HTMLElement insertNode = document().getElementById( QString::fromUtf8("insert") ); + DOM::HTMLElement insertNode = document().getElementById( TQString::fromUtf8("insert") ); if( isConsecutiveMessage && !insertNode.isNull() ) { @@ -593,16 +593,16 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring ) } if ( !d->scrollPressed ) - QTimer::singleShot( 1, this, SLOT( slotScrollView() ) ); + TQTimer::singleShot( 1, this, TQT_SLOT( slotScrollView() ) ); #ifdef STYLE_TIMETEST - kdDebug(14000) << "Message time: " << beforeMessage.msecsTo( QTime::currentTime()) << endl; + kdDebug(14000) << "Message time: " << beforeMessage.msecsTo( TQTime::currentTime()) << endl; #endif } void ChatMessagePart::slotRefreshView() { - DOM::HTMLElement kopeteNode = document().getElementById( QString::fromUtf8("KopeteStyle") ); + DOM::HTMLElement kopeteNode = document().getElementById( TQString::fromUtf8("KopeteStyle") ); if( !kopeteNode.isNull() ) kopeteNode.setInnerText( styleHTML() ); @@ -613,28 +613,28 @@ void ChatMessagePart::slotRefreshView() void ChatMessagePart::keepScrolledDown() { if ( !d->scrollPressed ) - QTimer::singleShot( 1, this, SLOT( slotScrollView() ) ); + TQTimer::singleShot( 1, this, TQT_SLOT( slotScrollView() ) ); } -const QString ChatMessagePart::styleHTML() const +const TQString ChatMessagePart::styleHTML() const { KopetePrefs *p = KopetePrefs::prefs(); int fontSize = 0; - QString fontSizeCss; - // Use correct font size unit, depending of how the QFont was build. + TQString fontSizeCss; + // Use correct font size unit, depending of how the TQFont was build. if( p->fontFace().pointSize() != -1 ) { fontSize = p->fontFace().pointSize(); - fontSizeCss = QString::fromUtf8("%1pt;").arg(fontSize); + fontSizeCss = TQString::fromUtf8("%1pt;").arg(fontSize); } else if( p->fontFace().pixelSize() != -1 ) { fontSize = p->fontFace().pixelSize(); - fontSizeCss = QString::fromUtf8("%1px;").arg(fontSize); + fontSizeCss = TQString::fromUtf8("%1px;").arg(fontSize); } - QString style = QString::fromLatin1( + TQString style = TQString::fromLatin1( "body{background-color:%1;font-family:%2;font-size:%3;color:%4}" "td{font-family:%5;font-size:%6;color:%7}" "a{color:%8}a.visited{color:%9}" @@ -682,15 +682,15 @@ Kopete::Contact *ChatMessagePart::contactFromNode( const DOM::Node &n ) const if ( element.hasAttribute( "contactid" ) ) { - QString contactId = element.getAttribute( "contactid" ).string(); - for ( QPtrListIterator it ( d->manager->members() ); it.current(); ++it ) + TQString contactId = element.getAttribute( "contactid" ).string(); + for ( TQPtrListIterator it ( d->manager->members() ); it.current(); ++it ) if ( (*it)->contactId() == contactId ) return *it; } else { - QString nick = element.innerText().string().stripWhiteSpace(); - for ( QPtrListIterator it ( d->manager->members() ); it.current(); ++it ) + TQString nick = element.innerText().string().stripWhiteSpace(); + for ( TQPtrListIterator it ( d->manager->members() ); it.current(); ++it ) if ( (*it)->property( Kopete::Global::Properties::self()->nickName().key() ).value().toString() == nick ) return *it; } @@ -698,7 +698,7 @@ Kopete::Contact *ChatMessagePart::contactFromNode( const DOM::Node &n ) const return 0; } -void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) +void ChatMessagePart::slotRightClick( const TQString &, const TQPoint &point ) { // look through parents until we find an Element DOM::Node activeNode = nodeUnderMouse(); @@ -715,7 +715,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) if ( Kopete::Contact *contact = contactFromNode( d->activeElement ) ) { chatWindowPopup = contact->popupMenu( d->manager ); - connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup , SLOT( deleteLater() ) ); + connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup , TQT_SLOT( deleteLater() ) ); } else { @@ -727,7 +727,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) chatWindowPopup->setItemEnabled( 1, false ); chatWindowPopup->insertSeparator(); } - else if ( d->activeElement.tagName().lower() == QString::fromLatin1( "a" ) ) + else if ( d->activeElement.tagName().lower() == TQString::fromLatin1( "a" ) ) { d->copyURLAction->plug( chatWindowPopup ); chatWindowPopup->insertSeparator(); @@ -741,7 +741,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) chatWindowPopup->insertSeparator(); d->closeAction->plug( chatWindowPopup ); - connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup, SLOT( deleteLater() ) ); + connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup, TQT_SLOT( deleteLater() ) ); chatWindowPopup->popup( point ); } @@ -751,26 +751,26 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) chatWindowPopup->popup( point ); } -QString ChatMessagePart::textUnderMouse() +TQString ChatMessagePart::textUnderMouse() { DOM::Node activeNode = nodeUnderMouse(); if( activeNode.nodeType() != DOM::Node::TEXT_NODE ) - return QString::null; + return TQString::null; DOM::Text textNode = activeNode; - QString data = textNode.data().string(); + TQString data = textNode.data().string(); //Ok, we have the whole node. Now, find the text under the mouse. - int mouseLeft = view()->mapFromGlobal( QCursor::pos() ).x(), + int mouseLeft = view()->mapFromGlobal( TQCursor::pos() ).x(), nodeLeft = activeNode.getRect().x(), cPos = 0, dataLen = data.length(); - QFontMetrics metrics( KopetePrefs::prefs()->fontFace() ); - QString buffer; + TQFontMetrics metrics( KopetePrefs::prefs()->fontFace() ); + TQString buffer; while( cPos < dataLen && nodeLeft < mouseLeft ) { - QChar c = data[cPos++]; + TQChar c = data[cPos++]; if( c.isSpace() ) buffer.truncate(0); else @@ -781,7 +781,7 @@ QString ChatMessagePart::textUnderMouse() if( cPos < dataLen ) { - QChar c = data[cPos++]; + TQChar c = data[cPos++]; while( cPos < dataLen && !c.isSpace() ) { buffer += c; @@ -797,8 +797,8 @@ void ChatMessagePart::slotCopyURL() DOM::HTMLAnchorElement a = d->activeElement; if ( !a.isNull() ) { - QApplication::clipboard()->setText( a.href().string(), QClipboard::Clipboard ); - QApplication::clipboard()->setText( a.href().string(), QClipboard::Selection ); + TQApplication::clipboard()->setText( a.href().string(), QClipboard::Clipboard ); + TQApplication::clipboard()->setText( a.href().string(), QClipboard::Selection ); } } @@ -818,8 +818,8 @@ void ChatMessagePart::copy(bool justselection /* default false */) * This also copies the text as type text/html * RangeImpl::toHTML was not implemented before KDE 3.4 */ - QString text; - QString htmltext; + TQString text; + TQString htmltext; #if KDE_IS_VERSION(3,3,90) htmltext = selectedTextAsHTML(); @@ -842,7 +842,7 @@ void ChatMessagePart::copy(bool justselection /* default false */) { if(n.nodeType() == DOM::Node::TEXT_NODE /*&& n.handle()->renderer()*/) { - QString str = n.nodeValue().string(); + TQString str = n.nodeValue().string(); hasNewLine = false; if(n == startNode && n == endNode) text = str.mid(startOffset, endOffset - startOffset); @@ -941,29 +941,29 @@ void ChatMessagePart::copy(bool justselection /* default false */) if(text.isEmpty()) return; - disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), this, SLOT( slotClearSelection())); + disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection())); #ifndef QT_NO_MIMECLIPBOARD if(!justselection) { - QTextDrag *textdrag = new QTextDrag(text, 0L); + TQTextDrag *textdrag = new TQTextDrag(text, 0L); KMultipleDrag *drag = new KMultipleDrag( ); drag->addDragObject( textdrag ); if(!htmltext.isEmpty()) { - htmltext.replace( QChar( 0xa0 ), ' ' ); - QTextDrag *htmltextdrag = new QTextDrag(htmltext, 0L); + htmltext.replace( TQChar( 0xa0 ), ' ' ); + TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, 0L); htmltextdrag->setSubtype("html"); drag->addDragObject( htmltextdrag ); } - QApplication::clipboard()->setData( drag, QClipboard::Clipboard ); + TQApplication::clipboard()->setData( drag, QClipboard::Clipboard ); } - QApplication::clipboard()->setText( text, QClipboard::Selection ); + TQApplication::clipboard()->setText( text, QClipboard::Selection ); #else if(!justselection) - QApplication::clipboard()->setText( text, QClipboard::Clipboard ); - QApplication::clipboard()->setText( text, QClipboard::Selection ); + TQApplication::clipboard()->setText( text, QClipboard::Clipboard ); + TQApplication::clipboard()->setText( text, QClipboard::Selection ); #endif - connect( kapp->clipboard(), SIGNAL( selectionChanged()), SLOT( slotClearSelection())); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); } @@ -982,17 +982,17 @@ void ChatMessagePart::slotCloseView( bool force ) d->manager->view()->closeView( force ); } -void ChatMessagePart::emitTooltipEvent( const QString &textUnderMouse, QString &toolTip ) +void ChatMessagePart::emitTooltipEvent( const TQString &textUnderMouse, TQString &toolTip ) { emit tooltipEvent( textUnderMouse, toolTip ); } // Style formatting for messages(incoming, outgoing, status) -QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const Kopete::Message &_message ) +TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const Kopete::Message &_message ) { Kopete::Message message=_message; //we will eventually need to modify it before showing it. - QString resultHTML = sourceHTML; - QString nick, contactId, service, protocolIcon, nickLink; + TQString resultHTML = sourceHTML; + TQString nick, contactId, service, protocolIcon, nickLink; if( message.from() ) { @@ -1014,8 +1014,8 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // // Use default if protocol() and protocol()->displayName() is NULL. // For preview and unit tests. - QString iconName = QString::fromUtf8("kopete"); - service = QString::fromUtf8("Kopete"); + TQString iconName = TQString::fromUtf8("kopete"); + service = TQString::fromUtf8("Kopete"); if(message.from()->protocol() && !message.from()->protocol()->displayName().isNull()) { service = message.from()->protocol()->displayName(); @@ -1024,10 +1024,10 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K protocolIcon = KGlobal::iconLoader()->iconPath( iconName, KIcon::Small ); - nickLink=QString::fromLatin1("") - .arg( QStyleSheet::escape(message.from()->contactId()).replace('"',"""), - QStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"""), - QStyleSheet::escape(message.from()->account()->accountId() ).replace('"',""")); + nickLink=TQString::fromLatin1("") + .arg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"""), + TQStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"""), + TQStyleSheet::escape(message.from()->account()->accountId() ).replace('"',""")); } else { @@ -1036,22 +1036,22 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // Replace sender (contact nick) - resultHTML = resultHTML.replace( QString::fromUtf8("%sender%"), nickLink+nick+"" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%sender%"), nickLink+nick+"" ); // Replace time, by default display only time and display seconds(that was true means). - resultHTML = resultHTML.replace( QString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) ); // Replace %screenName% (contact ID) - resultHTML = resultHTML.replace( QString::fromUtf8("%senderScreenName%"), nickLink+QStyleSheet::escape(contactId)+"" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"" ); // Replace service name (protocol name) - resultHTML = resultHTML.replace( QString::fromUtf8("%service%"), QStyleSheet::escape(service) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) ); // Replace protocolIcon (sender statusIcon) - resultHTML = resultHTML.replace( QString::fromUtf8("%senderStatusIcon%"), QStyleSheet::escape(protocolIcon).replace('"',""") ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).replace('"',""") ); // Look for %time{X}% - QRegExp timeRegExp("%time\\{([^}]*)\\}%"); + TQRegExp timeRegExp("%time\\{([^}]*)\\}%"); int pos=0; while( (pos=timeRegExp.search(resultHTML , pos) ) != -1 ) { - QString timeKeyword = formatTime( timeRegExp.cap(1), message.timestamp() ); + TQString timeKeyword = formatTime( timeRegExp.cap(1), message.timestamp() ); resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } @@ -1059,13 +1059,13 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // TODO: use the X value. // Replace with user-selected highlight color if to be highlighted or // with "inherit" otherwise to keep CSS clean - QString bgColor = QString::fromUtf8("inherit"); + TQString bgColor = TQString::fromUtf8("inherit"); if( message.importance() == Kopete::Message::Highlight && KopetePrefs::prefs()->highlightEnabled() ) { bgColor = KopetePrefs::prefs()->highlightBackground().name(); } - QRegExp textBackgroundRegExp("%textbackgroundcolor\\{([^}]*)\\}%"); + TQRegExp textBackgroundRegExp("%textbackgroundcolor\\{([^}]*)\\}%"); int textPos=0; while( (textPos=textBackgroundRegExp.search(resultHTML, textPos) ) != -1 ) { @@ -1075,30 +1075,30 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // Replace userIconPath if( message.from() ) { - QString photoPath; + TQString photoPath; #if 0 photoPath = message.from()->property(Kopete::Global::Properties::self()->photo().key()).value().toString(); // If the photo path is empty, set the default buddy icon for the theme if( photoPath.isEmpty() ) { if(message.direction() == Kopete::Message::Inbound) - photoPath = QString::fromUtf8("Incoming/buddy_icon.png"); + photoPath = TQString::fromUtf8("Incoming/buddy_icon.png"); else if(message.direction() == Kopete::Message::Outbound) - photoPath = QString::fromUtf8("Outgoing/buddy_icon.png"); + photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); } #endif if( !message.from()->metaContact()->picture().isNull() ) { - photoPath = QString( "data:image/png;base64," ) + message.from()->metaContact()->picture().base64(); + photoPath = TQString( "data:image/png;base64," ) + message.from()->metaContact()->picture().base64(); } else { if(message.direction() == Kopete::Message::Inbound) - photoPath = QString::fromUtf8("Incoming/buddy_icon.png"); + photoPath = TQString::fromUtf8("Incoming/buddy_icon.png"); else if(message.direction() == Kopete::Message::Outbound) - photoPath = QString::fromUtf8("Outgoing/buddy_icon.png"); + photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); } - resultHTML = resultHTML.replace(QString::fromUtf8("%userIconPath%"), photoPath); + resultHTML = resultHTML.replace(TQString::fromUtf8("%userIconPath%"), photoPath); } // Replace messages. @@ -1107,13 +1107,13 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K { kdDebug(14000) << k_funcinfo << "Map Action message to Status template. " << endl; - QString boldNick = QString::fromUtf8("%1%2 ").arg(nickLink,nick); - QString newBody = boldNick + message.parsedBody(); + TQString boldNick = TQString::fromUtf8("%1%2 ").arg(nickLink,nick); + TQString newBody = boldNick + message.parsedBody(); message.setBody(newBody, Kopete::Message::ParsedHTML ); } // Set message direction("rtl"(Right-To-Left) or "ltr"(Left-to-right)) - resultHTML = resultHTML.replace( QString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" ); // These colors are used for coloring nicknames. I tried to use // colors both visible on light and dark background. @@ -1131,10 +1131,10 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K int hash = 0; for( uint f = 0; f < contactId.length(); ++f ) hash += contactId[f].unicode() * f; - const QString colorName = nameColors[ hash % nameColorsLen ]; - QString lightColorName; // Do not initialize, QColor::name() is expensive! + const TQString colorName = nameColors[ hash % nameColorsLen ]; + TQString lightColorName; // Do not initialize, TQColor::name() is expensive! kdDebug(14000) << k_funcinfo << "Hash " << hash << " has color " << colorName << endl; - QRegExp senderColorRegExp("%senderColor(?:\\{([^}]*)\\})?%"); + TQRegExp senderColorRegExp("%senderColor(?:\\{([^}]*)\\})?%"); textPos=0; while( (textPos=senderColorRegExp.search(resultHTML, textPos) ) != -1 ) { @@ -1147,14 +1147,14 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // Lazily init light color if ( doLight && lightColorName.isNull() ) - lightColorName = QColor( colorName ).light( light ).name(); + lightColorName = TQColor( colorName ).light( light ).name(); resultHTML = resultHTML.replace( textPos , senderColorRegExp.cap(0).length(), doLight ? lightColorName : colorName ); } // Replace message at the end, maybe someone could put a Adium keyword in his message :P - resultHTML = resultHTML.replace( QString::fromUtf8("%message%"), formatMessageBody(message) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%message%"), formatMessageBody(message) ); // TODO: %status // resultHTML = addNickLinks( resultHTML ); @@ -1162,16 +1162,16 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K } // Style formatting for header and footer. -QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML ) +TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) { - QString resultHTML = sourceHTML; + TQString resultHTML = sourceHTML; Kopete::Contact *remoteContact = d->manager->members().getFirst(); // Verify that all contacts are not null before doing anything if( remoteContact && d->manager->myself() ) { - QString sourceName, destinationName; + TQString sourceName, destinationName; // Use contact nickname for ourselfs, Myself metacontact display name isn't a reliable source. sourceName = d->manager->myself()->nickName(); if( remoteContact->metaContact() ) @@ -1180,64 +1180,64 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML ) destinationName = remoteContact->nickName(); // Replace %chatName%, create a internal span to update it by DOM when asked. - resultHTML = resultHTML.replace( QString::fromUtf8("%chatName%"), QString("%1").arg( formatName(d->manager->displayName()) ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("%1").arg( formatName(d->manager->displayName()) ) ); // Replace %sourceName% - resultHTML = resultHTML.replace( QString::fromUtf8("%sourceName%"), formatName(sourceName) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) ); // Replace %destinationName% - resultHTML = resultHTML.replace( QString::fromUtf8("%destinationName%"), formatName(destinationName) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) ); // For %timeOpened%, display the date and time (also the seconds). - resultHTML = resultHTML.replace( QString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, true ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) ); // Look for %timeOpened{X}% - QRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%"); + TQRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%"); int pos=0; while( (pos=timeRegExp.search(resultHTML, pos) ) != -1 ) { - QString timeKeyword = formatTime( timeRegExp.cap(1), QDateTime::currentDateTime() ); + TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::currentDateTime() ); resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } // Get contact image paths #if 0 - QString photoIncomingPath, photoOutgoingPath; + TQString photoIncomingPath, photoOutgoingPath; photoIncomingPath = remoteContact->property( Kopete::Global::Properties::self()->photo().key()).value().toString(); photoOutgoingPath = d->manager->myself()->property(Kopete::Global::Properties::self()->photo().key()).value().toString(); if( photoIncomingPath.isEmpty() ) - photoIncomingPath = QString::fromUtf8("Incoming/buddy_icon.png"); + photoIncomingPath = TQString::fromUtf8("Incoming/buddy_icon.png"); if( photoOutgoingPath.isEmpty() ) - photoOutgoingPath = QString::fromUtf8("Outgoing/buddy_icon.png"); + photoOutgoingPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); - resultHTML = resultHTML.replace( QString::fromUtf8("%incomingIconPath%"), photoIncomingPath); - resultHTML = resultHTML.replace( QString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath); + resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath); + resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath); #endif - QString photoIncoming, photoOutgoing; + TQString photoIncoming, photoOutgoing; if( remoteContact->metaContact() && !remoteContact->metaContact()->picture().isNull() ) { - photoIncoming = QString("data:image/png;base64,%1").arg( remoteContact->metaContact()->picture().base64() ); + photoIncoming = TQString("data:image/png;base64,%1").arg( remoteContact->metaContact()->picture().base64() ); } else { - photoIncoming = QString::fromUtf8("Incoming/buddy_icon.png"); + photoIncoming = TQString::fromUtf8("Incoming/buddy_icon.png"); } if( d->manager->myself()->metaContact() && !d->manager->myself()->metaContact()->picture().isNull() ) { - photoOutgoing = QString("data:image/png;base64,%1").arg( d->manager->myself()->metaContact()->picture().base64() ); + photoOutgoing = TQString("data:image/png;base64,%1").arg( d->manager->myself()->metaContact()->picture().base64() ); } else { - photoOutgoing = QString::fromUtf8("Outgoing/buddy_icon.png"); + photoOutgoing = TQString::fromUtf8("Outgoing/buddy_icon.png"); } - resultHTML = resultHTML.replace( QString::fromUtf8("%incomingIconPath%"), photoIncoming); - resultHTML = resultHTML.replace( QString::fromUtf8("%outgoingIconPath%"), photoOutgoing ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming); + resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing ); } return resultHTML; } -QString ChatMessagePart::formatTime(const QString &timeFormat, const QDateTime &dateTime) +TQString ChatMessagePart::formatTime(const TQString &timeFormat, const TQDateTime &dateTime) { char buffer[256]; @@ -1249,12 +1249,12 @@ QString ChatMessagePart::formatTime(const QString &timeFormat, const QDateTime & loctime = localtime (&timeT); strftime (buffer, 256, timeFormat.ascii(), loctime); - return QString(buffer); + return TQString(buffer); } -QString ChatMessagePart::formatName(const QString &sourceName) +TQString ChatMessagePart::formatName(const TQString &sourceName) { - QString formattedName = sourceName; + TQString formattedName = sourceName; // Escape the name. formattedName = Kopete::Message::escape(formattedName); @@ -1267,14 +1267,14 @@ QString ChatMessagePart::formatName(const QString &sourceName) return formattedName; } -QString ChatMessagePart::formatMessageBody(const Kopete::Message &message) +TQString ChatMessagePart::formatMessageBody(const Kopete::Message &message) { - QString formattedBody("%1").arg(message.parsedBody()); + formattedBody += TQString::fromUtf8("class=\"KopeteMessageBody\">%1").arg(message.parsedBody()); return formattedBody; } @@ -1282,7 +1282,7 @@ QString ChatMessagePart::formatMessageBody(const Kopete::Message &message) void ChatMessagePart::slotUpdateHeaderDisplayName() { kdDebug(14000) << k_funcinfo << endl; - DOM::HTMLElement kopeteChatNameNode = document().getElementById( QString::fromUtf8("KopeteHeaderChatNameInternal") ); + DOM::HTMLElement kopeteChatNameNode = document().getElementById( TQString::fromUtf8("KopeteHeaderChatNameInternal") ); if( !kopeteChatNameNode.isNull() ) kopeteChatNameNode.setInnerText( formatName(d->manager->displayName()) ); } @@ -1291,13 +1291,13 @@ void ChatMessagePart::slotUpdateHeaderPhoto() { // Do the actual style switch // Wait for the event loop before switching the style - QTimer::singleShot( 0, this, SLOT(changeStyle()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) ); } void ChatMessagePart::changeStyle() { #ifdef STYLE_TIMETEST - QTime beforeChange = QTime::currentTime(); + TQTime beforeChange = TQTime::currentTime(); #endif // Make latestContact null to reset consecutives messages. d->latestContact = 0; @@ -1306,7 +1306,7 @@ void ChatMessagePart::changeStyle() writeTemplate(); // Readd all current messages. - QValueList::ConstIterator it, itEnd = d->allMessages.constEnd(); + TQValueList::ConstIterator it, itEnd = d->allMessages.constEnd(); for(it = d->allMessages.constBegin(); it != itEnd; ++it) { Kopete::Message tempMessage = *it; @@ -1314,7 +1314,7 @@ void ChatMessagePart::changeStyle() } kdDebug(14000) << k_funcinfo << "Finish changing style." << endl; #ifdef STYLE_TIMETEST - kdDebug(14000) << "Change time: " << beforeChange.msecsTo( QTime::currentTime()) << endl; + kdDebug(14000) << "Change time: " << beforeChange.msecsTo( TQTime::currentTime()) << endl; #endif } @@ -1323,7 +1323,7 @@ void ChatMessagePart::writeTemplate() kdDebug(14000) << k_funcinfo << endl; #ifdef STYLE_TIMETEST - QTime beforeHeader = QTime::currentTime(); + TQTime beforeHeader = TQTime::currentTime(); #endif // Clear all the page, and begin a new page. begin(); @@ -1338,8 +1338,8 @@ void ChatMessagePart::writeTemplate() // mainStyle: Currrent variant CSS url. // FIXME: Maybe this string should be load from a file, then parsed for args. - QString xhtmlBase; - xhtmlBase += QString("\n" + TQString xhtmlBase; + xhtmlBase += TQString("\n" "\n" "\n" @@ -1371,7 +1371,7 @@ void ChatMessagePart::writeTemplate() write(xhtmlBase); end(); #ifdef STYLE_TIMETEST - kdDebug(14000) << "Header time: " << beforeHeader.msecsTo( QTime::currentTime()) << endl; + kdDebug(14000) << "Header time: " << beforeHeader.msecsTo( TQTime::currentTime()) << endl; #endif } diff --git a/kopete/kopete/chatwindow/chatmessagepart.h b/kopete/kopete/chatwindow/chatmessagepart.h index ad14d3e3..5314d776 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.h +++ b/kopete/kopete/chatwindow/chatmessagepart.h @@ -22,7 +22,7 @@ #include #include -#include +#include namespace Kopete { @@ -43,7 +43,7 @@ public: /** * Create a new ChatMessage Part. */ - ChatMessagePart( Kopete::ChatSession *manager, QWidget *parent, const char *name = 0); + ChatMessagePart( Kopete::ChatSession *manager, TQWidget *parent, const char *name = 0); ~ChatMessagePart(); /** @@ -104,7 +104,7 @@ public slots: * * @param stylePath absolute path to the style. */ - void setStyle( const QString &stylePath ); + void setStyle( const TQString &stylePath ); /** * Change the current style @@ -121,18 +121,18 @@ public slots: * Change the current variant for the current style * @param variantPath relative path to the style variant. */ - void setStyleVariant( const QString &variantPath ); + void setStyleVariant( const TQString &variantPath ); signals: /** * Emits before the context menu is about to show */ - void contextMenuEvent( const QString &textUnderMouse, KPopupMenu *popupMenu ); + void contextMenuEvent( const TQString &textUnderMouse, KPopupMenu *popupMenu ); /** * Emits before the tooltip is about to show */ - void tooltipEvent( const QString &textUnderMouse, QString &toolTip ); + void tooltipEvent( const TQString &textUnderMouse, TQString &toolTip ); private slots: void slotOpenURLRequest( const KURL &url, const KParts::URLArgs &args ); @@ -143,7 +143,7 @@ private slots: void slotRefreshView(); - void slotRightClick( const QString &, const QPoint &point ); + void slotRightClick( const TQString &, const TQPoint &point ); void slotCopyURL(); @@ -170,49 +170,49 @@ protected: private: void readOverrides(); - const QString styleHTML() const; + const TQString styleHTML() const; Kopete::Contact *contactFromNode( const DOM::Node &n ) const; /** * Emits before the tooltip is about to show */ - void emitTooltipEvent( const QString &textUnderMouse, QString &toolTipString ); + void emitTooltipEvent( const TQString &textUnderMouse, TQString &toolTipString ); /** * Returns the text currently under the mouse */ - QString textUnderMouse(); + TQString textUnderMouse(); /** * Format(replace) style keywords for messages (incoming, outgoing, internal) - * Use formatStyleKeywords(const QString &sourceHTML) for header and footer. + * Use formatStyleKeywords(const TQString &sourceHTML) for header and footer. * * @param sourceHTML the source html which contains the keywords * @param message the current Message. * * @return the resulting HTML with replaced keywords. */ - QString formatStyleKeywords( const QString &sourceHTML, const Kopete::Message &message ); + TQString formatStyleKeywords( const TQString &sourceHTML, const Kopete::Message &message ); /** * Format(replace) style keywords for header and footers. - * For messages, use formatStyleKeywords(const QString &sourceHTML, Kopete::Message &message) instead. + * For messages, use formatStyleKeywords(const TQString &sourceHTML, Kopete::Message &message) instead. * * @param sourceHTML HTML source needed to be replaced. * * @return the resulting HTML with replaced keywords. */ - QString formatStyleKeywords( const QString &sourceHTML ); + TQString formatStyleKeywords( const TQString &sourceHTML ); /** * Helper function to parse time in correct format. * Use glibc strftime function. * * @param timeFormat the time format to parse. - * @param dateTime the QDateTime which contains the datetime to format. + * @param dateTime the TQDateTime which contains the datetime to format. * @return the formatted time string. */ - QString formatTime(const QString &timeFormat, const QDateTime &dateTime); + TQString formatTime(const TQString &timeFormat, const TQDateTime &dateTime); /** * Format a nickname/displayname according to preferences. @@ -220,7 +220,7 @@ private: * @param sourceName Source name to format. * @return the formatted name. */ - QString formatName( const QString &sourceName ); + TQString formatName( const TQString &sourceName ); /** * Format a message body according to the style included @@ -229,7 +229,7 @@ private: * @param message Kopete::Message to format. * @return a span tag with a style attribute. */ - QString formatMessageBody( const Kopete::Message &message ); + TQString formatMessageBody( const Kopete::Message &message ); /** * Write the template file to KHTMLPart diff --git a/kopete/kopete/chatwindow/chattexteditpart.cpp b/kopete/kopete/chatwindow/chattexteditpart.cpp index bac31bcf..e284903d 100644 --- a/kopete/kopete/chatwindow/chattexteditpart.cpp +++ b/kopete/kopete/chatwindow/chattexteditpart.cpp @@ -28,10 +28,10 @@ #include #include -#include -#include +#include +#include -ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, QWidget *parent, const char *name ) +ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, TQWidget *parent, const char *name ) : KopeteRichTextEditPart( parent, name, session->protocol()->capabilities() ), m_session(session) { historyPos = -1; @@ -43,30 +43,30 @@ ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, QWidget *paren mComplete->setOrder( KCompletion::Weighted ); // set params on the edit widget - edit()->setMinimumSize( QSize( 75, 20 ) ); - edit()->setWordWrap( QTextEdit::WidgetWidth ); - edit()->setWrapPolicy( QTextEdit::AtWhiteSpace ); - edit()->setAutoFormatting( QTextEdit::AutoNone ); + edit()->setMinimumSize( TQSize( 75, 20 ) ); + edit()->setWordWrap( TQTextEdit::WidgetWidth ); + edit()->setWrapPolicy( TQTextEdit::AtWhiteSpace ); + edit()->setAutoFormatting( TQTextEdit::AutoNone ); // some signals and slots connections - connect( edit(), SIGNAL( textChanged()), this, SLOT( slotTextChanged() ) ); + connect( edit(), TQT_SIGNAL( textChanged()), this, TQT_SLOT( slotTextChanged() ) ); // timers for typing notifications - m_typingRepeatTimer = new QTimer(this, "m_typingRepeatTimer"); - m_typingStopTimer = new QTimer(this, "m_typingStopTimer"); - - connect( m_typingRepeatTimer, SIGNAL( timeout() ), this, SLOT( slotRepeatTypingTimer() ) ); - connect( m_typingStopTimer, SIGNAL( timeout() ), this, SLOT( slotStoppedTypingTimer() ) ); - - connect( session, SIGNAL( contactAdded(const Kopete::Contact*, bool) ), - this, SLOT( slotContactAdded(const Kopete::Contact*) ) ); - connect( session, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ), - this, SLOT( slotContactRemoved(const Kopete::Contact*) ) ); - connect( session, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + m_typingRepeatTimer = new TQTimer(this, "m_typingRepeatTimer"); + m_typingStopTimer = new TQTimer(this, "m_typingStopTimer"); + + connect( m_typingRepeatTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRepeatTypingTimer() ) ); + connect( m_typingStopTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotStoppedTypingTimer() ) ); + + connect( session, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ), + this, TQT_SLOT( slotContactAdded(const Kopete::Contact*) ) ); + connect( session, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ), + this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*) ) ); + connect( session, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); slotContactAdded( session->myself() ); - for ( QPtrListIterator it( session->members() ); it.current(); ++it ) + for ( TQPtrListIterator it( session->members() ); it.current(); ++it ) slotContactAdded( *it ); } @@ -101,7 +101,7 @@ bool ChatTextEditPart::autoSpellCheckEnabled() const KDictSpellingHighlighter* ChatTextEditPart::spellHighlighter() { - QSyntaxHighlighter *qsh = edit()->syntaxHighlighter(); + TQSyntaxHighlighter *qsh = edit()->syntaxHighlighter(); KDictSpellingHighlighter* kdsh = dynamic_cast( qsh ); return kdsh; } @@ -112,9 +112,9 @@ class EvilTextEdit : public KTextEdit { public: // grab the paragraph as plain text - very very evil. - QString plainText( int para ) + TQString plainText( int para ) { - QString str = document()->paragAt( para )->string()->toString(); + TQString str = document()->paragAt( para )->string()->toString(); // str includes an extra space on the end (from the newline character?) - remove it return str.left( str.length() - 1 ); } @@ -126,24 +126,24 @@ void ChatTextEditPart::complete() edit()->getCursorPosition( ¶, &parIdx); // FIXME: strips out all formatting - QString txt = static_cast(edit())->plainText( para ); + TQString txt = static_cast(edit())->plainText( para ); if ( parIdx > 0 ) { - int firstSpace = txt.findRev( QRegExp( QString::fromLatin1("\\s\\S+") ), parIdx - 1 ) + 1; - int lastSpace = txt.find( QRegExp( QString::fromLatin1("[\\s\\:]") ), firstSpace ); + int firstSpace = txt.findRev( TQRegExp( TQString::fromLatin1("\\s\\S+") ), parIdx - 1 ) + 1; + int lastSpace = txt.find( TQRegExp( TQString::fromLatin1("[\\s\\:]") ), firstSpace ); if( lastSpace == -1 ) lastSpace = txt.length(); - QString word = txt.mid( firstSpace, lastSpace - firstSpace ); - QString match; + TQString word = txt.mid( firstSpace, lastSpace - firstSpace ); + TQString match; kdDebug(14000) << k_funcinfo << word << " from '" << txt << "'" << endl; if ( word != m_lastMatch ) { match = mComplete->makeCompletion( word ); - m_lastMatch = QString::null; + m_lastMatch = TQString::null; parIdx -= word.length(); } else @@ -154,11 +154,11 @@ void ChatTextEditPart::complete() if ( !match.isNull() && !match.isEmpty() ) { - QString rightText = txt.right( txt.length() - lastSpace ); + TQString rightText = txt.right( txt.length() - lastSpace ); - if ( para == 0 && firstSpace == 0 && rightText[0] != QChar(':') ) + if ( para == 0 && firstSpace == 0 && rightText[0] != TQChar(':') ) { - rightText = match + QString::fromLatin1(": ") + rightText; + rightText = match + TQString::fromLatin1(": ") + rightText; parIdx += 2; } else @@ -172,7 +172,7 @@ void ChatTextEditPart::complete() edit()->removeParagraph( para + 1 ); edit()->setCursorPosition( para, parIdx + match.length() ); edit()->setUpdatesEnabled( true ); - // must call this rather than update because QTextEdit is broken :( + // must call this rather than update because TQTextEdit is broken :( edit()->updateContents(); m_lastMatch = match; } @@ -183,8 +183,8 @@ void ChatTextEditPart::complete() } } -void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const QString &key, - const QVariant& oldValue, const QVariant &newValue ) +void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const TQString &key, + const TQVariant& oldValue, const TQVariant &newValue ) { if ( key == Kopete::Global::Properties::self()->nickName().key() ) { @@ -195,19 +195,19 @@ void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const QString &key void ChatTextEditPart::slotContactAdded( const Kopete::Contact *contact ) { - connect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; - QString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString(); mComplete->addItem( contactName ); } void ChatTextEditPart::slotContactRemoved( const Kopete::Contact *contact ) { - disconnect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + disconnect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; - QString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString(); mComplete->removeItem( contactName ); } @@ -227,7 +227,7 @@ bool ChatTextEditPart::canSend() bool reachableContactFound = false; //TODO: does this perform badly in large / busy IRC channels? - no, doesn't seem to - QPtrListIterator it ( members ); + TQPtrListIterator it ( members ); for( ; it.current(); ++it ) { if ( (*it)->isReachable() ) @@ -257,17 +257,17 @@ void ChatTextEditPart::slotContactStatusChanged( Kopete::Contact *, const Kopete void ChatTextEditPart::sendMessage() { - QString txt = text( Qt::PlainText ); + TQString txt = text( Qt::PlainText ); // avoid sending emtpy messages or enter keys (see bug 100334) if ( txt.isEmpty() || txt == "\n" ) return; - if ( m_lastMatch.isNull() && ( txt.find( QRegExp( QString::fromLatin1("^\\w+:\\s") ) ) > -1 ) ) + if ( m_lastMatch.isNull() && ( txt.find( TQRegExp( TQString::fromLatin1("^\\w+:\\s") ) ) > -1 ) ) { //no last match and it finds something of the form of "word:" at the start of a line - QString search = txt.left( txt.find(':') ); + TQString search = txt.left( txt.find(':') ); if( !search.isEmpty() ) { - QString match = mComplete->makeCompletion( search ); + TQString match = mComplete->makeCompletion( search ); if( !match.isNull() ) edit()->setText( txt.replace(0,search.length(),match) ); } @@ -277,7 +277,7 @@ void ChatTextEditPart::sendMessage() { //FIXME: what is the next line for? mComplete->addItem( m_lastMatch ); - m_lastMatch = QString::null; + m_lastMatch = TQString::null; } slotStoppedTypingTimer(); @@ -291,9 +291,9 @@ void ChatTextEditPart::sendMessage() bool ChatTextEditPart::isTyping() { - QString txt = text( Qt::PlainText ); + TQString txt = text( Qt::PlainText ); - //Make sure the message is empty. QString::isEmpty() + //Make sure the message is empty. TQString::isEmpty() //returns false if a message contains just whitespace //which is the reason why we strip the whitespace return !txt.stripWhiteSpace().isEmpty(); @@ -322,7 +322,7 @@ void ChatTextEditPart::historyUp() if ( historyList.empty() || historyPos == historyList.count() - 1 ) return; - QString text = edit()->text(); + TQString text = edit()->text(); bool empty = text.stripWhiteSpace().isEmpty(); // got text? save it @@ -341,12 +341,12 @@ void ChatTextEditPart::historyUp() historyPos++; - QString newText = historyList[historyPos]; + TQString newText = historyList[historyPos]; TextFormat format=edit()->textFormat(); edit()->setTextFormat(AutoText); //workaround bug 115690 edit()->setText( newText ); edit()->setTextFormat(format); - edit()->moveCursor( QTextEdit::MoveEnd, false ); + edit()->moveCursor( TQTextEdit::MoveEnd, false ); } void ChatTextEditPart::historyDown() @@ -354,7 +354,7 @@ void ChatTextEditPart::historyDown() if ( historyList.empty() || historyPos == -1 ) return; - QString text = edit()->text(); + TQString text = edit()->text(); bool empty = text.stripWhiteSpace().isEmpty(); // got text? save it @@ -365,7 +365,7 @@ void ChatTextEditPart::historyDown() historyPos--; - QString newText = ( historyPos >= 0 ? historyList[historyPos] : QString::null ); + TQString newText = ( historyPos >= 0 ? historyList[historyPos] : TQString::null ); TextFormat format=edit()->textFormat(); @@ -375,10 +375,10 @@ void ChatTextEditPart::historyDown() - edit()->moveCursor( QTextEdit::MoveEnd, false ); + edit()->moveCursor( TQTextEdit::MoveEnd, false ); } -void ChatTextEditPart::addText( const QString &text ) +void ChatTextEditPart::addText( const TQString &text ) { edit()->insert( text ); } diff --git a/kopete/kopete/chatwindow/chattexteditpart.h b/kopete/kopete/chatwindow/chattexteditpart.h index 3391b8a7..d16567ad 100644 --- a/kopete/kopete/chatwindow/chattexteditpart.h +++ b/kopete/kopete/chatwindow/chattexteditpart.h @@ -20,7 +20,7 @@ #include "krichtexteditpart.h" -#include +#include class QTimer; @@ -48,7 +48,7 @@ class ChatTextEditPart : public KopeteRichTextEditPart { Q_OBJECT public: - ChatTextEditPart( Kopete::ChatSession *session, QWidget *parent, const char *name = 0 ); + ChatTextEditPart( Kopete::ChatSession *session, TQWidget *parent, const char *name = 0 ); ~ChatTextEditPart(); /** @@ -67,7 +67,7 @@ public: * Adds text into the edit area. Used when an emoticon is selected. * @param text The text to be inserted */ - void addText( const QString &text ); + void addText( const TQString &text ); /** * Can we send messages now? @@ -177,7 +177,7 @@ private slots: /** * Update completion to follow changes in users' nicknames */ - void slotPropertyChanged( Kopete::Contact *, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); private: KDictSpellingHighlighter* spellHighlighter(); @@ -193,14 +193,14 @@ private: * index -1 is treated specially; when it is modified, changes are saved to * a new message placed at index 0. */ - QStringList historyList; + TQStringList historyList; int historyPos; KCompletion *mComplete; - QString m_lastMatch; + TQString m_lastMatch; - QTimer *m_typingRepeatTimer; - QTimer *m_typingStopTimer; + TQTimer *m_typingRepeatTimer; + TQTimer *m_typingStopTimer; bool m_autoSpellCheckEnabled; }; diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp index 62c1206d..514aaac8 100644 --- a/kopete/kopete/chatwindow/chatview.cpp +++ b/kopete/kopete/chatwindow/chatview.cpp @@ -45,13 +45,13 @@ #include #include #include -#include -#include +#include +#include typedef KGenericFactory ChatWindowPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_chatwindow, ChatWindowPluginFactory( "kopete_chatwindow" ) ) -ChatWindowPlugin::ChatWindowPlugin(QObject *parent, const char *name, const QStringList &) : +ChatWindowPlugin::ChatWindowPlugin(TQObject *parent, const char *name, const TQStringList &) : Kopete::ViewPlugin( ChatWindowPluginFactory::instance(), parent, name ) {} @@ -63,8 +63,8 @@ KopeteView* ChatWindowPlugin::createView( Kopete::ChatSession *manager ) class KopeteChatViewPrivate { public: - QString captionText; - QString statusText; + TQString captionText; + TQString statusText; bool isActive; bool sendInProgress; bool visibleMembers; @@ -89,8 +89,8 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch hide(); //Create the view dock widget (KHTML Part), and set it to no docking (lock it in place) - viewDock = createDockWidget(QString::fromLatin1( "viewDock" ), QPixmap(), - 0L,QString::fromLatin1("viewDock"), QString::fromLatin1(" ")); + viewDock = createDockWidget(TQString::fromLatin1( "viewDock" ), TQPixmap(), + 0L,TQString::fromLatin1("viewDock"), TQString::fromLatin1(" ")); m_messagePart = new ChatMessagePart( mgr, viewDock, "m_messagePart" ); viewDock->setWidget(messagePart()->widget()); @@ -98,19 +98,19 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch viewDock->setEnableDocking(KDockWidget::DockNone); //Create the bottom dock widget, with the edit area, statusbar and send button - editDock = createDockWidget( QString::fromLatin1( "editDock" ), QPixmap(), - 0L, QString::fromLatin1("editDock"), QString::fromLatin1(" ") ); + editDock = createDockWidget( TQString::fromLatin1( "editDock" ), TQPixmap(), + 0L, TQString::fromLatin1("editDock"), TQString::fromLatin1(" ") ); m_editPart = new ChatTextEditPart( mgr, editDock, "kopeterichtexteditpart" ); // FIXME: is this used these days? it seems totally unnecessary - connect( editPart(), SIGNAL( toggleToolbar(bool)), this, SLOT(slotToggleRtfToolbar(bool)) ); + connect( editPart(), TQT_SIGNAL( toggleToolbar(bool)), this, TQT_SLOT(slotToggleRtfToolbar(bool)) ); - connect( editPart(), SIGNAL( messageSent( Kopete::Message & ) ), - this, SIGNAL( messageSent( Kopete::Message & ) ) ); - connect( editPart(), SIGNAL( canSendChanged( bool ) ), - this, SIGNAL( canSendChanged(bool) ) ); - connect( editPart(), SIGNAL( typing(bool) ), - mgr, SLOT( typing(bool) ) ); + connect( editPart(), TQT_SIGNAL( messageSent( Kopete::Message & ) ), + this, TQT_SIGNAL( messageSent( Kopete::Message & ) ) ); + connect( editPart(), TQT_SIGNAL( canSendChanged( bool ) ), + this, TQT_SIGNAL( canSendChanged(bool) ) ); + connect( editPart(), TQT_SIGNAL( typing(bool) ), + mgr, TQT_SLOT( typing(bool) ) ); //Make the edit area dockable for now editDock->setWidget( editPart()->widget() ); @@ -129,40 +129,40 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch m_remoteTypingMap.setAutoDelete( true ); //Manager signals - connect( mgr, SIGNAL( displayNameChanged() ), - this, SLOT( slotChatDisplayNameChanged() ) ); - connect( mgr, SIGNAL( contactAdded(const Kopete::Contact*, bool) ), - this, SLOT( slotContactAdded(const Kopete::Contact*, bool) ) ); - connect( mgr, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ), - this, SLOT( slotContactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ) ); - connect( mgr, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - connect( mgr, SIGNAL( remoteTyping( const Kopete::Contact *, bool) ), - this, SLOT( remoteTyping(const Kopete::Contact *, bool) ) ); - connect( mgr, SIGNAL( eventNotification( const QString& ) ), - this, SLOT( setStatusText( const QString& ) ) ); + connect( mgr, TQT_SIGNAL( displayNameChanged() ), + this, TQT_SLOT( slotChatDisplayNameChanged() ) ); + connect( mgr, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ), + this, TQT_SLOT( slotContactAdded(const Kopete::Contact*, bool) ) ); + connect( mgr, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ), + this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ) ); + connect( mgr, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( mgr, TQT_SIGNAL( remoteTyping( const Kopete::Contact *, bool) ), + this, TQT_SLOT( remoteTyping(const Kopete::Contact *, bool) ) ); + connect( mgr, TQT_SIGNAL( eventNotification( const TQString& ) ), + this, TQT_SLOT( setStatusText( const TQString& ) ) ); //Connections to the manager and the ViewManager that every view should have - connect( this, SIGNAL( closing( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewDestroyed( KopeteView * ) ) ); - connect( this, SIGNAL( activated( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewActivated( KopeteView * ) ) ); - connect( this, SIGNAL( messageSent(Kopete::Message &) ), - mgr, SLOT( sendMessage(Kopete::Message &) ) ); - connect( mgr, SIGNAL( messageSuccess() ), - this, SLOT( messageSentSuccessfully() )); + connect( this, TQT_SIGNAL( closing( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewDestroyed( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( activated( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewActivated( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( messageSent(Kopete::Message &) ), + mgr, TQT_SLOT( sendMessage(Kopete::Message &) ) ); + connect( mgr, TQT_SIGNAL( messageSuccess() ), + this, TQT_SLOT( messageSentSuccessfully() )); // add contacts slotContactAdded( mgr->myself(), true ); - for ( QPtrListIterator it( mgr->members() ); it.current(); ++it ) + for ( TQPtrListIterator it( mgr->members() ); it.current(); ++it ) slotContactAdded( *it, true ); setFocusProxy( editPart()->widget() ); editPart()->widget()->setFocus(); // init actions - KStdAction::copy( this, SLOT(copy()), actionCollection() ); - KStdAction::close( this, SLOT(closeView()),actionCollection() ); + KStdAction::copy( this, TQT_SLOT(copy()), actionCollection() ); + KStdAction::close( this, TQT_SLOT(closeView()),actionCollection() ); setCaption( m_manager->displayName(), false ); @@ -187,7 +187,7 @@ KTextEdit *ChatView::editWidget() return editPart()->widget(); } -QWidget *ChatView::mainWidget() +TQWidget *ChatView::mainWidget() { return this; } @@ -230,7 +230,7 @@ void ChatView::nickComplete() return editPart()->complete(); } -void ChatView::addText( const QString &text ) +void ChatView::addText( const TQString &text ) { editPart()->addText( text ); } @@ -240,7 +240,7 @@ void ChatView::clear() messagePart()->clear(); } -void ChatView::setBgColor( const QColor &newColor ) +void ChatView::setBgColor( const TQColor &newColor ) { editPart()->setBgColor( newColor ); } @@ -250,17 +250,17 @@ void ChatView::setFont() editPart()->setFont(); } -QFont ChatView::font() +TQFont ChatView::font() { return editPart()->font(); } -void ChatView::setFont( const QFont &font ) +void ChatView::setFont( const TQFont &font ) { editPart()->setFont( font ); } -void ChatView::setFgColor( const QColor &newColor ) +void ChatView::setFgColor( const TQColor &newColor ) { editPart()->setFgColor( newColor ); } @@ -349,26 +349,26 @@ bool ChatView::closeView( bool force ) { if ( m_manager->members().count() > 1 ) { - QString shortCaption = d->captionText; + TQString shortCaption = d->captionText; shortCaption = KStringHandler::rsqueeze( shortCaption ); response = KMessageBox::warningContinueCancel( this, i18n("You are about to leave the group chat session %1.
" "You will not receive future messages from this conversation.
").arg( shortCaption ), i18n( "Closing Group Chat" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1( "AskCloseGroupChat" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseGroupChat" ) ); } if ( !unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel( this, i18n("You have received a message from %1 in the last " "second. Are you sure you want to close this chat?").arg( unreadMessageFrom ), i18n( "Unread Message" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1("AskCloseChatRecentMessage" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1("AskCloseChatRecentMessage" ) ); } if ( d->sendInProgress && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel( this, i18n( "You have a message send in progress, which will be " "aborted if this chat is closed. Are you sure you want to close this chat?" ), i18n( "Message in Transit" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1( "AskCloseChatMessageInProgress" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseChatMessageInProgress" ) ); } } @@ -418,8 +418,8 @@ void ChatView::createMembersList() if ( !membersDock ) { //Create the chat members list - membersDock = createDockWidget( QString::fromLatin1( "membersDock" ), QPixmap(), 0L, - QString::fromLatin1( "membersDock" ), QString::fromLatin1( " " ) ); + membersDock = createDockWidget( TQString::fromLatin1( "membersDock" ), TQPixmap(), 0L, + TQString::fromLatin1( "membersDock" ), TQString::fromLatin1( " " ) ); m_membersList = new ChatMembersListWidget( m_manager, this, "m_membersList" ); membersDock->setWidget( m_membersList ); @@ -431,7 +431,7 @@ void ChatView::createMembersList() membersStatus = static_cast ( members.first()->metaContact()->pluginData - ( m_manager->protocol(), QString::fromLatin1( "MembersListPolicy" ) ).toInt() + ( m_manager->protocol(), TQString::fromLatin1( "MembersListPolicy" ) ).toInt() ); } else @@ -459,7 +459,7 @@ void ChatView::toggleMembersVisibility() if ( members.first()->metaContact() ) { members.first()->metaContact()->setPluginData( m_manager->protocol(), - QString::fromLatin1( "MembersListPolicy" ), QString::number(membersStatus) ); + TQString::fromLatin1( "MembersListPolicy" ), TQString::number(membersStatus) ); } //refreshView(); } @@ -476,17 +476,17 @@ void ChatView::placeMembersList( KDockWidget::DockPosition dp ) // look up the dock width int dockWidth; - KGlobal::config()->setGroup( QString::fromLatin1( "ChatViewDock" ) ); + KGlobal::config()->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); if( membersDockPosition == KDockWidget::DockLeft ) { dockWidth = KGlobal::config()->readNumEntry( - QString::fromLatin1( "membersDock,viewDock:sepPos" ), 30); + TQString::fromLatin1( "membersDock,viewDock:sepPos" ), 30); } else { dockWidth = KGlobal::config()->readNumEntry( - QString::fromLatin1( "viewDock,membersDock:sepPos" ), 70); + TQString::fromLatin1( "viewDock,membersDock:sepPos" ), 70); } // Make sure it is shown then place it wherever @@ -519,19 +519,19 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) m_remoteTypingMap.remove( key ); if( isTyping ) { - m_remoteTypingMap.insert( key, new QTimer(this) ); - connect( m_remoteTypingMap[ key ], SIGNAL( timeout() ), SLOT( slotRemoteTypingTimeout() ) ); + m_remoteTypingMap.insert( key, new TQTimer(this) ); + connect( m_remoteTypingMap[ key ], TQT_SIGNAL( timeout() ), TQT_SLOT( slotRemoteTypingTimeout() ) ); m_remoteTypingMap[ key ]->start( 6000, true ); } // Loop through the map, constructing a string of people typing - QStringList typingList; - QPtrDictIterator it( m_remoteTypingMap ); + TQStringList typingList; + TQPtrDictIterator it( m_remoteTypingMap ); for( ; it.current(); ++it ) { Kopete::Contact *c = static_cast( it.currentKey() ); - QString nick; + TQString nick; if( c->metaContact() && c->metaContact() != Kopete::ContactList::self()->myself() ) { nick = c->metaContact()->displayName(); @@ -550,7 +550,7 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) setStatusText( i18n( "%1 is typing a message" ).arg( typingList.first() ) ); else { - QString statusTyping = typingList.join( QString::fromLatin1( ", " ) ); + TQString statusTyping = typingList.join( TQString::fromLatin1( ", " ) ); setStatusText( i18n( "%1 is a list of names", "%1 are typing a message" ).arg( statusTyping ) ); } updateChatState( Typing ); @@ -561,14 +561,14 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) } } -void ChatView::setStatusText( const QString &status ) +void ChatView::setStatusText( const TQString &status ) { d->statusText = status; if ( d->isActive ) m_mainWindow->setStatus( status ); } -const QString& ChatView::statusText() +const TQString& ChatView::statusText() { return d->statusText; } @@ -578,18 +578,18 @@ void ChatView::slotChatDisplayNameChanged() // This fires whenever a contact or MC changes displayName, so only // update the caption if it changed to avoid unneeded updates that // could cause flickering - QString chatName = m_manager->displayName(); + TQString chatName = m_manager->displayName(); if ( chatName != d->captionText ) setCaption( chatName, true ); } -void ChatView::slotPropertyChanged( Kopete::Contact*, const QString &key, - const QVariant& oldValue, const QVariant &newValue ) +void ChatView::slotPropertyChanged( Kopete::Contact*, const TQString &key, + const TQVariant& oldValue, const TQVariant &newValue ) { if ( key == Kopete::Global::Properties::self()->nickName().key() ) { - QString newName=newValue.toString(); - QString oldName=oldValue.toString(); + TQString newName=newValue.toString(); + TQString oldName=oldValue.toString(); if(KopetePrefs::prefs()->showEvents()) if ( oldName != newName && !oldName.isEmpty()) @@ -597,7 +597,7 @@ void ChatView::slotPropertyChanged( Kopete::Contact*, const QString &key, } } -void ChatView::slotDisplayNameChanged( const QString &oldValue, const QString &newValue ) +void ChatView::slotDisplayNameChanged( const TQString &oldValue, const TQString &newValue ) { if( KopetePrefs::prefs()->showEvents() ) { @@ -608,7 +608,7 @@ void ChatView::slotDisplayNameChanged( const QString &oldValue, const QString &n void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) { - QString contactName; + TQString contactName; // Myself metacontact is not a reliable source. if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { @@ -621,13 +621,13 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { - connect( contact->metaContact(), SIGNAL( displayNameChanged(const QString&, const QString&) ), - this, SLOT( slotDisplayNameChanged(const QString &, const QString &) ) ); + connect( contact->metaContact(), TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + this, TQT_SLOT( slotDisplayNameChanged(const TQString &, const TQString &) ) ); } else { - connect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; } if( !suppress && m_manager->members().count() > 1 ) @@ -647,14 +647,14 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) emit updateStatusIcon( this ); } -void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString &reason, Kopete::Message::MessageFormat format, bool suppressNotification ) +void ChatView::slotContactRemoved( const Kopete::Contact *contact, const TQString &reason, Kopete::Message::MessageFormat format, bool suppressNotification ) { // kdDebug(14000) << k_funcinfo << endl; if ( contact != m_manager->myself() ) { m_remoteTypingMap.remove( const_cast( contact ) ); - QString contactName; + TQString contactName; if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { contactName = contact->metaContact()->displayName(); @@ -669,13 +669,13 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString { if( contact->metaContact() ) { - disconnect( contact->metaContact(), SIGNAL( displayNameChanged(const QString&, const QString&) ), - this, SLOT( slotDisplayNameChanged(const QString&, const QString&) ) ); + disconnect( contact->metaContact(), TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + this, TQT_SLOT( slotDisplayNameChanged(const TQString&, const TQString&) ) ); } else { - disconnect(contact,SIGNAL(propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & )), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + disconnect(contact,TQT_SIGNAL(propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & )), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; } } @@ -692,15 +692,15 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString emit updateStatusIcon( this ); } -QString& ChatView::caption() const +TQString& ChatView::caption() const { return d->captionText; } -void ChatView::setCaption( const QString &text, bool modified ) +void ChatView::setCaption( const TQString &text, bool modified ) { // kdDebug(14000) << k_funcinfo << endl; - QString newCaption = text; + TQString newCaption = text; //Save this caption d->captionText = text; @@ -711,7 +711,7 @@ void ChatView::setCaption( const QString &text, bool modified ) //Call the original set caption KDockMainWindow::setCaption( newCaption, false ); - emit updateChatTooltip( this, QString::fromLatin1("%1").arg( d->captionText ) ); + emit updateChatTooltip( this, TQString::fromLatin1("%1").arg( d->captionText ) ); emit updateChatLabel( this, newCaption ); //Blink icon if modified and not active if( !d->isActive && modified ) @@ -757,15 +757,15 @@ void ChatView::appendMessage(Kopete::Message &message) { unreadMessageFrom = message.from()->nickName(); } - QTimer::singleShot( 1000, this, SLOT( slotMarkMessageRead() ) ); + TQTimer::singleShot( 1000, this, TQT_SLOT( slotMarkMessageRead() ) ); } else - unreadMessageFrom = QString::null; + unreadMessageFrom = TQString::null; } void ChatView::slotMarkMessageRead() { - unreadMessageFrom = QString::null; + unreadMessageFrom = TQString::null; } void ChatView::slotToggleRtfToolbar( bool enabled ) @@ -796,7 +796,7 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete: } else { - QString nick=contact->nickName(); + TQString nick=contact->nickName(); sendInternalMessage( i18n( "%2 is now %1." ) .arg( newStatus.description(), nick ) ); } @@ -808,7 +808,7 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete: emit updateStatusIcon( this ); } -void ChatView::sendInternalMessage(const QString &msg, Kopete::Message::MessageFormat format ) +void ChatView::sendInternalMessage(const TQString &msg, Kopete::Message::MessageFormat format ) { // When closing kopete, some internal message may be sent because some contact are deleted // these contacts can already be deleted @@ -835,9 +835,9 @@ void ChatView::saveOptions() { KConfig *config = KGlobal::config(); - writeDockConfig ( config, QString::fromLatin1( "ChatViewDock" ) ); - config->setGroup( QString::fromLatin1( "ChatViewDock" ) ); - config->writeEntry( QString::fromLatin1( "membersDockPosition" ), membersDockPosition ); + writeDockConfig ( config, TQString::fromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); + config->writeEntry( TQString::fromLatin1( "membersDockPosition" ), membersDockPosition ); saveChatSettings(); config->sync(); } @@ -859,7 +859,7 @@ void ChatView::saveChatSettings() KConfig* config = KGlobal::config(); - QString contactListGroup = QString::fromLatin1("chatwindow_") + + TQString contactListGroup = TQString::fromLatin1("chatwindow_") + mc->metaContactId(); config->setGroup( contactListGroup ); @@ -875,7 +875,7 @@ void ChatView::loadChatSettings() return; //can't load with more than one other person in the chat //read settings for metacontact - QString contactListGroup = QString::fromLatin1("chatwindow_") + + TQString contactListGroup = TQString::fromLatin1("chatwindow_") + contacts.first()->metaContact()->metaContactId(); KConfig* config = KGlobal::config(); config->setGroup( contactListGroup ); @@ -891,24 +891,24 @@ void ChatView::readOptions() KConfig *config = KGlobal::config(); /** THIS IS BROKEN !!! */ - //dockManager->readConfig ( config, QString::fromLatin1("ChatViewDock") ); + //dockManager->readConfig ( config, TQString::fromLatin1("ChatViewDock") ); //Work-around to restore dock widget positions - config->setGroup( QString::fromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); membersDockPosition = static_cast( - config->readNumEntry( QString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); + config->readNumEntry( TQString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); - QString dockKey = QString::fromLatin1( "viewDock" ); + TQString dockKey = TQString::fromLatin1( "viewDock" ); if ( d->visibleMembers ) { if( membersDockPosition == KDockWidget::DockLeft ) - dockKey.prepend( QString::fromLatin1( "membersDock," ) ); + dockKey.prepend( TQString::fromLatin1( "membersDock," ) ); else if( membersDockPosition == KDockWidget::DockRight ) - dockKey.append( QString::fromLatin1( ",membersDock" ) ); + dockKey.append( TQString::fromLatin1( ",membersDock" ) ); } - dockKey.append( QString::fromLatin1( ",editDock:sepPos" ) ); + dockKey.append( TQString::fromLatin1( ",editDock:sepPos" ) ); //kdDebug(14000) << k_funcinfo << "reading splitterpos from key: " << dockKey << endl; int splitterPos = config->readNumEntry( dockKey, 70 ); editDock->manualDock( viewDock, KDockWidget::DockBottom, splitterPos ); @@ -928,23 +928,23 @@ void ChatView::setActive( bool value ) void ChatView::slotRemoteTypingTimeout() { - // Remove the topmost timer from the list. Why does QPtrDict use void* keys and not typed keys? *sigh* + // Remove the topmost timer from the list. Why does TQPtrDict use void* keys and not typed keys? *sigh* if ( !m_remoteTypingMap.isEmpty() ) - remoteTyping( reinterpret_cast( QPtrDictIterator(m_remoteTypingMap).currentKey() ), false ); + remoteTyping( reinterpret_cast( TQPtrDictIterator(m_remoteTypingMap).currentKey() ), false ); } -void ChatView::dragEnterEvent ( QDragEnterEvent * event ) +void ChatView::dragEnterEvent ( TQDragEnterEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - QStringList lst=QStringList::split( QChar( 0xE000 ) , QString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); + TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1]) { - QString contact=lst[2]; + TQString contact=lst[2]; bool found =false; - QPtrList cts=m_manager->members(); - for ( QPtrListIterator it( cts ); it.current(); ++it ) + TQPtrList cts=m_manager->members(); + for ( TQPtrListIterator it( cts ); it.current(); ++it ) { if(it.current()->contactId() == contact) { @@ -959,13 +959,13 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - QString metacontactID=QString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); + TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID); if( m && m_manager->mayInvite()) { - QPtrList cts=m->contacts(); - for ( QPtrListIterator it( cts ); it.current(); ++it ) + TQPtrList cts=m->contacts(); + for ( TQPtrListIterator it( cts ); it.current(); ++it ) { Kopete::Contact *c=it.current(); if(c && c->account() == m_manager->account()) @@ -978,7 +978,7 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) } // make sure it doesn't come from the current chat view - then it's an emoticon else if ( event->provides( "text/uri-list" ) && m_manager->members().count() == 1 && - ( event->source() != (QWidget*)m_messagePart->view()->viewport() ) ) + ( event->source() != (TQWidget*)m_messagePart->view()->viewport() ) ) { Kopete::ContactPtrList members = m_manager->members(); Kopete::Contact *contact = members.first(); @@ -989,18 +989,18 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) KDockMainWindow::dragEnterEvent(event); } -void ChatView::dropEvent ( QDropEvent * event ) +void ChatView::dropEvent ( TQDropEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - QStringList lst=QStringList::split( QChar( 0xE000 ) , QString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); + TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1]) { - QString contact=lst[2]; + TQString contact=lst[2]; bool found =false; - QPtrList cts=m_manager->members(); - for ( QPtrListIterator it( cts ); it.current(); ++it ) + TQPtrList cts=m_manager->members(); + for ( TQPtrListIterator it( cts ); it.current(); ++it ) { if(it.current()->contactId() == contact) { @@ -1014,12 +1014,12 @@ void ChatView::dropEvent ( QDropEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - QString metacontactID=QString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); + TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID); if(m && m_manager->mayInvite()) { - QPtrList cts=m->contacts(); - for ( QPtrListIterator it( cts ); it.current(); ++it ) + TQPtrList cts=m->contacts(); + for ( TQPtrListIterator it( cts ); it.current(); ++it ) { Kopete::Contact *c=it.current(); if(c && c->account() == m_manager->account() && c->isOnline()) @@ -1035,7 +1035,7 @@ void ChatView::dropEvent ( QDropEvent * event ) Kopete::ContactPtrList members = m_manager->members(); Kopete::Contact *contact = members.first(); - if ( !contact || !contact->canAcceptFiles() || !QUriDrag::canDecode( event ) ) + if ( !contact || !contact->canAcceptFiles() || !TQUriDrag::canDecode( event ) ) { event->ignore(); return; @@ -1063,19 +1063,19 @@ void ChatView::dropEvent ( QDropEvent * event ) } -void ChatView::registerContextMenuHandler( QObject *target, const char* slot ) +void ChatView::registerContextMenuHandler( TQObject *target, const char* slot ) { connect( m_messagePart, - SIGNAL( contextMenuEvent( Kopete::Message &, const QString &, KPopupMenu * ) ), + TQT_SIGNAL( contextMenuEvent( Kopete::Message &, const TQString &, KPopupMenu * ) ), target, slot ); } -void ChatView::registerTooltipHandler( QObject *target, const char* slot ) +void ChatView::registerTooltipHandler( TQObject *target, const char* slot ) { connect( m_messagePart, - SIGNAL( tooltipEvent( Kopete::Message &, const QString &, QString & ) ), + TQT_SIGNAL( tooltipEvent( Kopete::Message &, const TQString &, TQString & ) ), target, slot ); diff --git a/kopete/kopete/chatwindow/chatview.h b/kopete/kopete/chatwindow/chatview.h index ef10320b..7e083d80 100644 --- a/kopete/kopete/chatwindow/chatview.h +++ b/kopete/kopete/chatwindow/chatview.h @@ -22,7 +22,7 @@ #include "kopeteviewplugin.h" #include #include // for covariant return type of editWidget -#include +#include class QTimer; @@ -69,7 +69,7 @@ public: * Adds text into the edit area. Used when you select an emoticon * @param text The text to be inserted */ - void addText( const QString &text ); + void addText( const TQString &text ); /** * Saves window settings such as splitter positions @@ -101,7 +101,7 @@ public: /** * Sets the text to be displayed on tab label and window caption */ - void setCaption( const QString &text, bool modified ); + void setCaption( const TQString &text, bool modified ); /** * Changes the pointer to the chat window. Used to re-parent the view @@ -155,9 +155,9 @@ public: */ bool visibleMembersList(); - const QString &statusText(); + const TQString &statusText(); - QString &caption() const; + TQString &caption() const; bool sendInProgress(); @@ -171,17 +171,17 @@ public: virtual bool isVisible(); /** Reimplemented from KopeteView **/ - virtual QWidget *mainWidget(); + virtual TQWidget *mainWidget(); KTextEdit *editWidget(); bool canSend(); /** Reimplemented from KopeteView **/ - virtual void registerContextMenuHandler( QObject *target, const char* slot ); + virtual void registerContextMenuHandler( TQObject *target, const char* slot ); /** Reimplemented from KopeteView **/ - virtual void registerTooltipHandler( QObject *target, const char* slot ); + virtual void registerTooltipHandler( TQObject *target, const char* slot ); public slots: /** @@ -205,16 +205,16 @@ public slots: /** * Sets the foreground color of the entry area, and outgoing messages - * @param newColor The new foreground color. If this is QColor(), then + * @param newColor The new foreground color. If this is TQColor(), then * a color chooser dialog is opened */ - void setFgColor( const QColor &newColor = QColor() ); + void setFgColor( const TQColor &newColor = TQColor() ); /** * Sets the font of the edit area and outgoing messages to the specified value. * @param newFont The new font to use. */ - void setFont( const QFont &newFont ); + void setFont( const TQFont &newFont ); /** * show a Font dialog and set the font selected by the user @@ -224,14 +224,14 @@ public slots: /** * Get the font used in the format toolbar for Rich Text formatting */ - QFont font(); + TQFont font(); /** * Sets the background color of the entry area, and outgoing messages - * @param newColor The new background color. If this is QColor(), then + * @param newColor The new background color. If this is TQColor(), then * a color chooser dialog is opened */ - void setBgColor( const QColor &newColor = QColor() ); + void setBgColor( const TQColor &newColor = TQColor() ); /** * Sends the text currently entered into the edit area @@ -256,7 +256,7 @@ public slots: * Sets the text to be displayed on the status label * @param text The text to be displayed */ - void setStatusText( const QString &text ); + void setStatusText( const TQString &text ); /** Reimplemented from KopeteView **/ virtual void messageSentSuccessfully(); @@ -286,13 +286,13 @@ signals: void updateStatusIcon( ChatView* ); /** Emitted when a possible tab tooltip needs updating */ - void updateChatTooltip( ChatView*, const QString& ); + void updateChatTooltip( ChatView*, const TQString& ); /** Emitted when the state of the chat changes */ void updateChatState( ChatView*, int ); /** Emitted when a possible tab label needs updating */ - void updateChatLabel( ChatView*, const QString& ); + void updateChatLabel( ChatView*, const TQString& ); /** * Our send-button-enabled flag has changed @@ -316,7 +316,7 @@ private slots: /** * Show that a contact changed his nickname when a metacontact is not avaiable. */ - void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); /** * Called when a contact is added to the chat session. @@ -334,7 +334,7 @@ private slots: * @param format The format of the reason message * @param suppressNotification mean that no notifications are showed */ - void slotContactRemoved( const Kopete::Contact *c, const QString& reason, Kopete::Message::MessageFormat format, bool suppressNotification=false ); + void slotContactRemoved( const Kopete::Contact *c, const TQString& reason, Kopete::Message::MessageFormat format, bool suppressNotification=false ); /** * Called when a contact changes status, updates the display name, status icon and tab bar state. @@ -357,11 +357,11 @@ private slots: /** * Show that a (meta)contact change his display name. */ - void slotDisplayNameChanged(const QString &oldValue, const QString &newValue); + void slotDisplayNameChanged(const TQString &oldValue, const TQString &newValue); protected: - virtual void dragEnterEvent ( QDragEnterEvent * ); - virtual void dropEvent ( QDropEvent * ); + virtual void dragEnterEvent ( TQDragEnterEvent * ); + virtual void dropEvent ( TQDropEvent * ); private: // widget stuff @@ -384,9 +384,9 @@ private: MembersListPolicy membersStatus; // miscellany - QPtrDict m_remoteTypingMap; - QString unreadMessageFrom; - QString m_status; + TQPtrDict m_remoteTypingMap; + TQString unreadMessageFrom; + TQString m_status; void updateChatState( KopeteTabState state = Undefined ); @@ -400,7 +400,7 @@ private: */ void readOptions(); - void sendInternalMessage( const QString &msg, Kopete::Message::MessageFormat format = Kopete::Message::PlainText ); + void sendInternalMessage( const TQString &msg, Kopete::Message::MessageFormat format = Kopete::Message::PlainText ); KopeteChatViewPrivate *d; }; @@ -411,7 +411,7 @@ private: class ChatWindowPlugin : public Kopete::ViewPlugin { public: - ChatWindowPlugin(QObject *parent, const char *name, const QStringList &args); + ChatWindowPlugin(TQObject *parent, const char *name, const TQStringList &args); KopeteView* createView( Kopete::ChatSession *manager ); }; diff --git a/kopete/kopete/chatwindow/emoticonselector.cpp b/kopete/kopete/chatwindow/emoticonselector.cpp index e6802b45..47dd1a59 100644 --- a/kopete/kopete/chatwindow/emoticonselector.cpp +++ b/kopete/kopete/chatwindow/emoticonselector.cpp @@ -24,25 +24,25 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -EmoticonLabel::EmoticonLabel(const QString &emoticonText, const QString &pixmapPath, QWidget *parent, const char *name) - : QLabel(parent,name) +EmoticonLabel::EmoticonLabel(const TQString &emoticonText, const TQString &pixmapPath, TQWidget *parent, const char *name) + : TQLabel(parent,name) { mText = emoticonText; - setMovie( QMovie(pixmapPath) ); + setMovie( TQMovie(pixmapPath) ); setAlignment(Qt::AlignCenter); - QToolTip::add(this,emoticonText); - // Somehow QLabel doesn't tell a reasonable size when you use setMovie + TQToolTip::add(this,emoticonText); + // Somehow TQLabel doesn't tell a reasonable size when you use setMovie // although it does it correctly for setPixmap. Therefore here is a little workaround // to tell our minimum size. - QPixmap p(pixmapPath); + TQPixmap p(pixmapPath); // // Some of the custom icons are rather large // so lets limit them to a maximum size for this display panel @@ -52,13 +52,13 @@ EmoticonLabel::EmoticonLabel(const QString &emoticonText, const QString &pixmapP setMinimumSize(p.size()); } -void EmoticonLabel::mouseReleaseEvent(QMouseEvent*) +void EmoticonLabel::mouseReleaseEvent(TQMouseEvent*) { emit clicked(mText); } -EmoticonSelector::EmoticonSelector(QWidget *parent, const char *name) - : QWidget(parent, name) +EmoticonSelector::EmoticonSelector(TQWidget *parent, const char *name) + : TQWidget(parent, name) { // kdDebug(14000) << k_funcinfo << "called." << endl; lay = 0L; @@ -69,13 +69,13 @@ void EmoticonSelector::prepareList(void) // kdDebug(14000) << k_funcinfo << "called." << endl; int row = 0; int col = 0; - QMap list = Kopete::Emoticons::self()->emoticonAndPicList(); + TQMap list = Kopete::Emoticons::self()->emoticonAndPicList(); int emoticonsPerRow = static_cast(sqrt(list.count())); //kdDebug(14000) << "emoticonsPerRow=" << emoticonsPerRow << endl; if ( lay ) { - QObjectList *objList = queryList( "EmoticonLabel" ); + TQObjectList *objList = queryList( "EmoticonLabel" ); //kdDebug(14000) << k_funcinfo << "There are " << objList->count() << " EmoticonLabels to delete." << endl; objList->setAutoDelete(true); objList->clear(); @@ -83,13 +83,13 @@ void EmoticonSelector::prepareList(void) delete lay; } - lay = new QGridLayout(this, 0, 0, 4, 4, "emoticonLayout"); + lay = new TQGridLayout(this, 0, 0, 4, 4, "emoticonLayout"); movieList.clear(); - for (QMap::const_iterator it = list.constBegin(); it != list.constEnd(); ++it ) + for (TQMap::const_iterator it = list.constBegin(); it != list.constEnd(); ++it ) { - QWidget *w = new EmoticonLabel(it.data().first(), it.key(), this); - movieList.push_back( ((QLabel*)w)->movie() ); - connect(w, SIGNAL(clicked(const QString&)), this, SLOT(emoticonClicked(const QString&))); + TQWidget *w = new EmoticonLabel(it.data().first(), it.key(), this); + movieList.push_back( ((TQLabel*)w)->movie() ); + connect(w, TQT_SIGNAL(clicked(const TQString&)), this, TQT_SLOT(emoticonClicked(const TQString&))); // kdDebug(14000) << "adding Emoticon to row=" << row << ", col=" << col << "." << endl; lay->addWidget(w, row, col); if ( col == emoticonsPerRow ) @@ -103,19 +103,19 @@ void EmoticonSelector::prepareList(void) resize(minimumSizeHint()); } -void EmoticonSelector::emoticonClicked(const QString &str) +void EmoticonSelector::emoticonClicked(const TQString &str) { // kdDebug(14000) << "selected emoticon '" << str << "'" << endl; // KDE4/Qt TODO: use qobject_cast instead. emit ItemSelected ( str ); if ( isVisible() && parentWidget() && - parentWidget()->inherits("QPopupMenu") ) + parentWidget()->inherits("TQPopupMenu") ) { parentWidget()->close(); } } -void EmoticonSelector::hideEvent( QHideEvent* ) +void EmoticonSelector::hideEvent( TQHideEvent* ) { kdDebug( 14000 ) << k_funcinfo << endl; MovieList::iterator it; @@ -125,7 +125,7 @@ void EmoticonSelector::hideEvent( QHideEvent* ) } } -void EmoticonSelector::showEvent( QShowEvent* ) +void EmoticonSelector::showEvent( TQShowEvent* ) { kdDebug( 14000 ) << k_funcinfo << endl; MovieList::iterator it; diff --git a/kopete/kopete/chatwindow/emoticonselector.h b/kopete/kopete/chatwindow/emoticonselector.h index 7d7b4842..df51a5b6 100644 --- a/kopete/kopete/chatwindow/emoticonselector.h +++ b/kopete/kopete/chatwindow/emoticonselector.h @@ -20,8 +20,8 @@ #ifndef __emoticonselector_h__ #define __emoticonselector_h__ -#include -#include +#include +#include class QGridLayout; class QHideEvent; class QShowEvent; @@ -31,15 +31,15 @@ class EmoticonLabel : public QLabel Q_OBJECT public: - EmoticonLabel(const QString &emoticonText, const QString &pixmapPath, QWidget *parent=0, const char *name=0); + EmoticonLabel(const TQString &emoticonText, const TQString &pixmapPath, TQWidget *parent=0, const char *name=0); // ~EmoticonLabel(); signals: - void clicked(const QString &text); + void clicked(const TQString &text); protected: - void mouseReleaseEvent(QMouseEvent*); - QString mText; + void mouseReleaseEvent(TQMouseEvent*); + TQString mText; }; class EmoticonSelector : public QWidget @@ -48,28 +48,28 @@ class EmoticonSelector : public QWidget public: - EmoticonSelector ( QWidget *parent = 0, const char *name = 0 ); + EmoticonSelector ( TQWidget *parent = 0, const char *name = 0 ); // ~EmoticonSelector(); - typedef QValueList MovieList; + typedef TQValueList MovieList; signals: /** * gets emitted when an emoticon has been selected from the list - * the QString holds the emoticon as a string or is 0L if nothing was selected + * the TQString holds the emoticon as a string or is 0L if nothing was selected **/ - void ItemSelected(const QString &); + void ItemSelected(const TQString &); public slots: void prepareList(); protected: - virtual void hideEvent( QHideEvent* ); - virtual void showEvent( QShowEvent* ); + virtual void hideEvent( TQHideEvent* ); + virtual void showEvent( TQShowEvent* ); MovieList movieList; - QGridLayout *lay; + TQGridLayout *lay; protected slots: - void emoticonClicked(const QString &); + void emoticonClicked(const TQString &); }; #endif diff --git a/kopete/kopete/chatwindow/kopetechatwindow.cpp b/kopete/kopete/chatwindow/kopetechatwindow.cpp index 2af1426d..ad002edc 100644 --- a/kopete/kopete/chatwindow/kopetechatwindow.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindow.cpp @@ -19,12 +19,12 @@ ************************************************************************* */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -63,13 +63,13 @@ #include "kopetestdaction.h" #include "kopeteviewmanager.h" -#include +#include #include -typedef QMap AccountMap; -typedef QMap GroupMap; -typedef QMap MetaContactMap; -typedef QPtrList WindowList; +typedef TQMap AccountMap; +typedef TQMap GroupMap; +typedef TQMap MetaContactMap; +typedef TQPtrList WindowList; namespace { @@ -164,7 +164,7 @@ KopeteChatWindow *KopeteChatWindow::window( Kopete::ChatSession *manager ) return myWindow; } -KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name ) +KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name ) : KParts::MainWindow( parent, name ) { m_activeView = 0L; @@ -175,28 +175,28 @@ KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name ) initActions(); - QVBox *vBox = new QVBox( this ); + TQVBox *vBox = new TQVBox( this ); vBox->setLineWidth( 0 ); vBox->setSpacing( 0 ); - vBox->setFrameStyle( QFrame::NoFrame ); + vBox->setFrameStyle( TQFrame::NoFrame ); // set default window size. This could be removed by fixing the size hints of the contents resize( 500, 500 ); setCentralWidget( vBox ); - mainArea = new QFrame( vBox ); + mainArea = new TQFrame( vBox ); mainArea->setLineWidth( 0 ); - mainArea->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); - mainLayout = new QVBoxLayout( mainArea ); + mainArea->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + mainLayout = new TQVBoxLayout( mainArea ); if ( KopetePrefs::prefs()->chatWShowSend() ) { //Send Button m_button_send = new KPushButton( i18n("Send"), statusBar() ); - m_button_send->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); + m_button_send->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); m_button_send->setEnabled( false ); m_button_send->setFont( statusBar()->font() ); m_button_send->setFixedHeight( statusBar()->sizeHint().height() ); - connect( m_button_send, SIGNAL( clicked() ), this, SLOT( slotSendMessage() ) ); + connect( m_button_send, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSendMessage() ) ); statusBar()->addWidget( m_button_send, 0, true ); } else @@ -214,9 +214,9 @@ KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name ) windows.append( this ); windowListChanged(); - KGlobal::config()->setGroup( QString::fromLatin1("ChatWindowSettings") ); - m_alwaysShowTabs = KGlobal::config()->readBoolEntry( QString::fromLatin1("AlwaysShowTabs"), false ); - m_showFormatToolbar = KGlobal::config()->readBoolEntry( QString::fromLatin1("Show Format Toolbar"), true ); + KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") ); + m_alwaysShowTabs = KGlobal::config()->readBoolEntry( TQString::fromLatin1("AlwaysShowTabs"), false ); + m_showFormatToolbar = KGlobal::config()->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true ); adjustingFormatToolbar = false; // kdDebug( 14010 ) << k_funcinfo << "Open Windows: " << windows.count() << endl; kapp->ref(); @@ -273,7 +273,7 @@ KopeteChatWindow::~KopeteChatWindow() void KopeteChatWindow::windowListChanged() { // update all windows' Move Tab to Window action - for ( QPtrListIterator it( windows ); *it; ++it ) + for ( TQPtrListIterator it( windows ); *it; ++it ) (*it)->checkDetachEnable(); } @@ -283,7 +283,7 @@ void KopeteChatWindow::slotNickComplete() m_activeView->nickComplete(); } -void KopeteChatWindow::slotTabContextMenu( QWidget *tab, const QPoint &pos ) +void KopeteChatWindow::slotTabContextMenu( TQWidget *tab, const TQPoint &pos ) { m_popupView = static_cast( tab ); @@ -313,101 +313,101 @@ void KopeteChatWindow::initActions(void) createStandardStatusBarAction(); - chatSend = new KAction( i18n( "&Send Message" ), QString::fromLatin1( "mail_send" ), QKeySequence(Key_Return) , - this, SLOT( slotSendMessage() ), coll, "chat_send" ); + chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), TQKeySequence(Key_Return) , + this, TQT_SLOT( slotSendMessage() ), coll, "chat_send" ); chatSend->setEnabled( false ); - KStdAction::save ( this, SLOT(slotChatSave()), coll ); - KStdAction::print ( this, SLOT(slotChatPrint()), coll ); - KAction* quitAction = KStdAction::quit ( this, SLOT(close()), coll ); + KStdAction::save ( this, TQT_SLOT(slotChatSave()), coll ); + KStdAction::print ( this, TQT_SLOT(slotChatPrint()), coll ); + KAction* quitAction = KStdAction::quit ( this, TQT_SLOT(close()), coll ); quitAction->setText( i18n("Close All Chats") ); - tabClose = KStdAction::close ( this, SLOT(slotChatClosed()), coll, "tabs_close" ); + tabClose = KStdAction::close ( this, TQT_SLOT(slotChatClosed()), coll, "tabs_close" ); tabRight=new KAction( i18n( "&Activate Next Tab" ), 0, KStdAccel::tabNext(), - this, SLOT( slotNextTab() ), coll, "tabs_right" ); + this, TQT_SLOT( slotNextTab() ), coll, "tabs_right" ); tabLeft=new KAction( i18n( "&Activate Previous Tab" ), 0, KStdAccel::tabPrev(), - this, SLOT( slotPreviousTab() ), coll, "tabs_left" ); + this, TQT_SLOT( slotPreviousTab() ), coll, "tabs_left" ); tabLeft->setEnabled( false ); tabRight->setEnabled( false ); - nickComplete = new KAction( i18n( "Nic&k Completion" ), QString::null, 0, this, SLOT( slotNickComplete() ), coll , "nick_compete"); - nickComplete->setShortcut( QKeySequence( Key_Tab ) ); + nickComplete = new KAction( i18n( "Nic&k Completion" ), TQString::null, 0, this, TQT_SLOT( slotNickComplete() ), coll , "nick_compete"); + nickComplete->setShortcut( TQKeySequence( Key_Tab ) ); - tabDetach = new KAction( i18n( "&Detach Chat" ), QString::fromLatin1( "tab_breakoff" ), 0, - this, SLOT( slotDetachChat() ), coll, "tabs_detach" ); + tabDetach = new KAction( i18n( "&Detach Chat" ), TQString::fromLatin1( "tab_breakoff" ), 0, + this, TQT_SLOT( slotDetachChat() ), coll, "tabs_detach" ); tabDetach->setEnabled( false ); - actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), QString::fromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" ); + actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), TQString::fromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" ); actionDetachMenu->setDelayed( false ); - connect ( actionDetachMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPrepareDetachMenu()) ); - connect ( actionDetachMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotDetachChat(int)) ); + connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareDetachMenu()) ); + connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDetachChat(int)) ); actionTabPlacementMenu = new KActionMenu( i18n( "&Tab Placement" ), coll, "tabs_placement" ); - connect ( actionTabPlacementMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPreparePlacementMenu()) ); - connect ( actionTabPlacementMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotPlaceTabs(int)) ); + connect ( actionTabPlacementMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPreparePlacementMenu()) ); + connect ( actionTabPlacementMenu->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPlaceTabs(int)) ); - tabDetach->setShortcut( QKeySequence(CTRL + SHIFT + Key_B) ); + tabDetach->setShortcut( TQKeySequence(CTRL + SHIFT + Key_B) ); - KStdAction::cut( this, SLOT(slotCut()), coll); - KStdAction::copy( this, SLOT(slotCopy()), coll); - KStdAction::paste( this, SLOT(slotPaste()), coll); + KStdAction::cut( this, TQT_SLOT(slotCut()), coll); + KStdAction::copy( this, TQT_SLOT(slotCopy()), coll); + KStdAction::paste( this, TQT_SLOT(slotPaste()), coll); - new KAction( i18n( "Set Default &Font..." ), QString::fromLatin1( "charset" ), 0, this, SLOT( slotSetFont() ), coll, "format_font" ); - new KAction( i18n( "Set Default Text &Color..." ), QString::fromLatin1( "pencil" ), 0, this, SLOT( slotSetFgColor() ), coll, "format_fgcolor" ); - new KAction( i18n( "Set &Background Color..." ), QString::fromLatin1( "fill" ), 0, this, SLOT( slotSetBgColor() ), coll, "format_bgcolor" ); + new KAction( i18n( "Set Default &Font..." ), TQString::fromLatin1( "charset" ), 0, this, TQT_SLOT( slotSetFont() ), coll, "format_font" ); + new KAction( i18n( "Set Default Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, this, TQT_SLOT( slotSetFgColor() ), coll, "format_fgcolor" ); + new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, this, TQT_SLOT( slotSetBgColor() ), coll, "format_bgcolor" ); - historyUp = new KAction( i18n( "Previous History" ), QString::null, 0, - this, SLOT( slotHistoryUp() ), coll, "history_up" ); - historyUp->setShortcut( QKeySequence(CTRL + Key_Up) ); + historyUp = new KAction( i18n( "Previous History" ), TQString::null, 0, + this, TQT_SLOT( slotHistoryUp() ), coll, "history_up" ); + historyUp->setShortcut( TQKeySequence(CTRL + Key_Up) ); - historyDown = new KAction( i18n( "Next History" ), QString::null, 0, - this, SLOT( slotHistoryDown() ), coll, "history_down" ); - historyDown->setShortcut( QKeySequence(CTRL + Key_Down) ); + historyDown = new KAction( i18n( "Next History" ), TQString::null, 0, + this, TQT_SLOT( slotHistoryDown() ), coll, "history_down" ); + historyDown->setShortcut( TQKeySequence(CTRL + Key_Down) ); - KStdAction::prior( this, SLOT( slotPageUp() ), coll, "scroll_up" ); - KStdAction::next( this, SLOT( slotPageDown() ), coll, "scroll_down" ); + KStdAction::prior( this, TQT_SLOT( slotPageUp() ), coll, "scroll_up" ); + KStdAction::next( this, TQT_SLOT( slotPageDown() ), coll, "scroll_down" ); - KStdAction::showMenubar( this, SLOT(slotViewMenuBar()), coll ); + KStdAction::showMenubar( this, TQT_SLOT(slotViewMenuBar()), coll ); - membersLeft = new KToggleAction( i18n( "Place to Left of Chat Area" ), QString::null, 0, - this, SLOT( slotViewMembersLeft() ), coll, "options_membersleft" ); - membersRight = new KToggleAction( i18n( "Place to Right of Chat Area" ), QString::null, 0, - this, SLOT( slotViewMembersRight() ), coll, "options_membersright" ); - toggleMembers = new KToggleAction( i18n( "Show" ), QString::null, 0, - this, SLOT( slotToggleViewMembers() ), coll, "options_togglemembers" ); + membersLeft = new KToggleAction( i18n( "Place to Left of Chat Area" ), TQString::null, 0, + this, TQT_SLOT( slotViewMembersLeft() ), coll, "options_membersleft" ); + membersRight = new KToggleAction( i18n( "Place to Right of Chat Area" ), TQString::null, 0, + this, TQT_SLOT( slotViewMembersRight() ), coll, "options_membersright" ); + toggleMembers = new KToggleAction( i18n( "Show" ), TQString::null, 0, + this, TQT_SLOT( slotToggleViewMembers() ), coll, "options_togglemembers" ); toggleMembers->setCheckedState(i18n("Hide")); - toggleAutoSpellCheck = new KToggleAction( i18n( "Automatic Spell Checking" ), QString::null, 0, - this, SLOT( toggleAutoSpellChecking() ), coll, "enable_auto_spell_check" ); + toggleAutoSpellCheck = new KToggleAction( i18n( "Automatic Spell Checking" ), TQString::null, 0, + this, TQT_SLOT( toggleAutoSpellChecking() ), coll, "enable_auto_spell_check" ); toggleAutoSpellCheck->setChecked( true ); actionSmileyMenu = new KopeteEmoticonAction( coll, "format_smiley" ); actionSmileyMenu->setDelayed( false ); - connect(actionSmileyMenu, SIGNAL(activated(const QString &)), this, SLOT(slotSmileyActivated(const QString &))); + connect(actionSmileyMenu, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSmileyActivated(const TQString &))); actionContactMenu = new KActionMenu(i18n("Co&ntacts"), coll, "contacts_menu" ); actionContactMenu->setDelayed( false ); - connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPrepareContactMenu()) ); + connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareContactMenu()) ); // add configure key bindings menu item - KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), coll ); + KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), coll ); - KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), coll); + KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), coll); KopeteStdAction::preferences( coll , "settings_prefs" ); //The Sending movie - normalIcon = QPixmap( BarIcon( QString::fromLatin1( "kopete" ) ) ); - animIcon = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Toolbar); + normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) ); + animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar); // Pause the animation because otherwise it's running even when we're not // showing it. This eats resources, and also triggers a pixmap leak in - // QMovie in at least Qt 3.1, Qt 3.2 and the current Qt 3.3 beta + // TQMovie in at least Qt 3.1, Qt 3.2 and the current Qt 3.3 beta if( !animIcon.isNull() ) //and another QT bug: it crash if we pause a null movie animIcon.pause(); // we can't set the tool bar as parent, if we do, it will be deleted when we configure toolbars - anim = new QLabel( QString::null, 0L ,"kde toolbar widget" ); + anim = new TQLabel( TQString::null, 0L ,"kde toolbar widget" ); anim->setMargin(5); anim->setPixmap( normalIcon ); @@ -418,20 +418,20 @@ void KopeteChatWindow::initActions(void) //toolBar()->alignItemRight( 99 ); setStandardToolBarMenuEnabled( true ); - setXMLFile( QString::fromLatin1( "kopetechatwindow.rc" ) ); + setXMLFile( TQString::fromLatin1( "kopetechatwindow.rc" ) ); createGUI( 0L ); // Special handling for remembering whether the format toolbar is visible or not - connect ( toolBar("formatToolBar"), SIGNAL(visibilityChanged(bool)), this, SLOT(slotToggleFormatToolbar(bool)) ); + connect ( toolBar("formatToolBar"), TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(slotToggleFormatToolbar(bool)) ); } -const QString KopeteChatWindow::fileContents( const QString &path ) const +const TQString KopeteChatWindow::fileContents( const TQString &path ) const { - QString contents; - QFile file( path ); + TQString contents; + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); contents = stream.read(); file.close(); } @@ -581,7 +581,7 @@ void KopeteChatWindow::slotSetBgColor() m_activeView->setBgColor(); } -void KopeteChatWindow::setStatus(const QString &text) +void KopeteChatWindow::setStatus(const TQString &text) { m_status_text->setText(text); } @@ -590,28 +590,28 @@ void KopeteChatWindow::createTabBar() { if( !m_tabBar ) { - KGlobal::config()->setGroup( QString::fromLatin1("ChatWindowSettings") ); + KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") ); m_tabBar = new KTabWidget( mainArea ); - m_tabBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); - m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( QString::fromLatin1("HoverClose"), false )); + m_tabBar->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( TQString::fromLatin1("HoverClose"), false )); m_tabBar->setTabReorderingEnabled(true); #if KDE_IS_VERSION(3,4,0) m_tabBar->setAutomaticResizeTabs(true); #endif - connect( m_tabBar, SIGNAL( closeRequest( QWidget* )), this, SLOT( slotCloseChat( QWidget* ) ) ); + connect( m_tabBar, TQT_SIGNAL( closeRequest( TQWidget* )), this, TQT_SLOT( slotCloseChat( TQWidget* ) ) ); - QToolButton* m_rightWidget = new QToolButton( m_tabBar ); - connect( m_rightWidget, SIGNAL( clicked() ), this, SLOT( slotChatClosed() ) ); + TQToolButton* m_rightWidget = new TQToolButton( m_tabBar ); + connect( m_rightWidget, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChatClosed() ) ); m_rightWidget->setIconSet( SmallIcon( "tab_remove" ) ); m_rightWidget->adjustSize(); - QToolTip::add( m_rightWidget, i18n("Close the current tab")); - m_tabBar->setCornerWidget( m_rightWidget, QWidget::TopRight ); + TQToolTip::add( m_rightWidget, i18n("Close the current tab")); + m_tabBar->setCornerWidget( m_rightWidget, TQWidget::TopRight ); mainLayout->addWidget( m_tabBar ); m_tabBar->show(); - connect ( m_tabBar, SIGNAL(currentChanged(QWidget *)), this, SLOT(setActiveView(QWidget *)) ); - connect ( m_tabBar, SIGNAL(contextMenu(QWidget *, const QPoint & )), this, SLOT(slotTabContextMenu( QWidget *, const QPoint & )) ); + connect ( m_tabBar, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(setActiveView(TQWidget *)) ); + connect ( m_tabBar, TQT_SIGNAL(contextMenu(TQWidget *, const TQPoint & )), this, TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & )) ); for( ChatView *view = chatViewList.first(); view; view = chatViewList.next() ) addTab( view ); @@ -621,35 +621,35 @@ void KopeteChatWindow::createTabBar() else setActiveView( chatViewList.first() ); - int tabPosition = KGlobal::config()->readNumEntry( QString::fromLatin1("Tab Placement") , 0 ); + int tabPosition = KGlobal::config()->readNumEntry( TQString::fromLatin1("Tab Placement") , 0 ); slotPlaceTabs( tabPosition ); } } -void KopeteChatWindow::slotCloseChat( QWidget *chatView ) +void KopeteChatWindow::slotCloseChat( TQWidget *chatView ) { static_cast( chatView )->closeView(); } void KopeteChatWindow::addTab( ChatView *view ) { - QPtrList chatMembers=view->msgManager()->members(); + TQPtrList chatMembers=view->msgManager()->members(); Kopete::Contact *c=0L; for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() ) { if(!c || c->onlineStatus() < contact->onlineStatus()) c=contact; } - QPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); + TQPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); - view->reparent( m_tabBar, 0, QPoint(), true ); + view->reparent( m_tabBar, 0, TQPoint(), true ); m_tabBar->addTab( view, pluginIcon, view->caption() ); if( view == m_activeView ) view->show(); else view->hide(); - connect( view, SIGNAL( captionChanged( bool ) ), this, SLOT( updateChatLabel() ) ); - connect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( slotUpdateCaptionIcons( ChatView* ) ) ); + connect( view, TQT_SIGNAL( captionChanged( bool ) ), this, TQT_SLOT( updateChatLabel() ) ); + connect( view, TQT_SIGNAL( updateStatusIcon( ChatView* ) ), this, TQT_SLOT( slotUpdateCaptionIcons( ChatView* ) ) ); view->setCaption( view->caption(), false ); } @@ -657,8 +657,8 @@ void KopeteChatWindow::setPrimaryChatView( ChatView *view ) { //TODO figure out what else we have to save here besides the font //reparent clears a lot of stuff out - QFont savedFont = view->font(); - view->reparent( mainArea, 0, QPoint(), true ); + TQFont savedFont = view->font(); + view->reparent( mainArea, 0, TQPoint(), true ); view->setFont( savedFont ); view->show(); @@ -670,8 +670,8 @@ void KopeteChatWindow::deleteTabBar() { if( m_tabBar ) { - disconnect ( m_tabBar, SIGNAL(currentChanged(QWidget *)), this, SLOT(setActiveView(QWidget *)) ); - disconnect ( m_tabBar, SIGNAL(contextMenu(QWidget *, const QPoint & )), this, SLOT(slotTabContextMenu( QWidget *, const QPoint & )) ); + disconnect ( m_tabBar, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(setActiveView(TQWidget *)) ); + disconnect ( m_tabBar, TQT_SIGNAL(contextMenu(TQWidget *, const TQPoint & )), this, TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & )) ); if( !chatViewList.isEmpty() ) setPrimaryChatView( chatViewList.first() ); @@ -700,17 +700,17 @@ void KopeteChatWindow::attachChatView( ChatView* newView ) newView->editWidget()->installEventFilter( this ); KCursor::setAutoHideCursor( newView->editWidget(), true, true ); - connect( newView, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) ); - connect( newView, SIGNAL(messageSuccess( ChatView* )), this, SLOT(slotStopAnimation( ChatView* )) ); - connect( newView, SIGNAL(rtfEnabled( ChatView*, bool ) ), this, SLOT( slotRTFEnabled( ChatView*, bool ) ) ); - connect( newView, SIGNAL(updateStatusIcon( ChatView* ) ), this, SLOT(slotUpdateCaptionIcons( ChatView* ) ) ); - connect( newView, SIGNAL(updateChatState( ChatView*, int ) ), this, SLOT( updateChatState( ChatView*, int ) ) ); + connect( newView, TQT_SIGNAL(captionChanged( bool)), this, TQT_SLOT(slotSetCaption(bool)) ); + connect( newView, TQT_SIGNAL(messageSuccess( ChatView* )), this, TQT_SLOT(slotStopAnimation( ChatView* )) ); + connect( newView, TQT_SIGNAL(rtfEnabled( ChatView*, bool ) ), this, TQT_SLOT( slotRTFEnabled( ChatView*, bool ) ) ); + connect( newView, TQT_SIGNAL(updateStatusIcon( ChatView* ) ), this, TQT_SLOT(slotUpdateCaptionIcons( ChatView* ) ) ); + connect( newView, TQT_SIGNAL(updateChatState( ChatView*, int ) ), this, TQT_SLOT( updateChatState( ChatView*, int ) ) ); updateSpellCheckAction(); checkDetachEnable(); newView->loadChatSettings(); - connect( newView, SIGNAL(autoSpellCheckEnabled( ChatView*, bool ) ), - this, SLOT( slotAutoSpellCheckEnabled( ChatView*, bool ) ) ); + connect( newView, TQT_SIGNAL(autoSpellCheckEnabled( ChatView*, bool ) ), + this, TQT_SLOT( slotAutoSpellCheckEnabled( ChatView*, bool ) ) ); } void KopeteChatWindow::checkDetachEnable() @@ -730,15 +730,15 @@ void KopeteChatWindow::detachChatView( ChatView *view ) if( !chatViewList.removeRef( view ) ) return; - disconnect( view, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) ); - disconnect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( slotUpdateCaptionIcons( ChatView* ) ) ); - disconnect( view, SIGNAL( updateChatState( ChatView*, int ) ), this, SLOT( updateChatState( ChatView*, int ) ) ); + disconnect( view, TQT_SIGNAL(captionChanged( bool)), this, TQT_SLOT(slotSetCaption(bool)) ); + disconnect( view, TQT_SIGNAL( updateStatusIcon( ChatView* ) ), this, TQT_SLOT( slotUpdateCaptionIcons( ChatView* ) ) ); + disconnect( view, TQT_SIGNAL( updateChatState( ChatView*, int ) ), this, TQT_SLOT( updateChatState( ChatView*, int ) ) ); view->editWidget()->removeEventFilter( this ); if( m_tabBar ) { int curPage = m_tabBar->currentPageIndex(); - QWidget *page = m_tabBar->page( curPage ); + TQWidget *page = m_tabBar->page( curPage ); // if the current view is to be detached, switch to a different one if( page == view ) @@ -818,7 +818,7 @@ void KopeteChatWindow::slotSetCaption( bool active ) } } -void KopeteChatWindow::updateBackground( const QPixmap &pm ) +void KopeteChatWindow::updateBackground( const TQPixmap &pm ) { if( updateBg ) { @@ -829,13 +829,13 @@ void KopeteChatWindow::updateBackground( const QPixmap &pm ) backgroundFile->unlink(); } - backgroundFile = new KTempFile( QString::null, QString::fromLatin1( ".bmp" ) ); + backgroundFile = new KTempFile( TQString::null, TQString::fromLatin1( ".bmp" ) ); pm.save( backgroundFile->name(), "BMP" ); - QTimer::singleShot( 100, this, SLOT( slotEnableUpdateBg() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotEnableUpdateBg() ) ); } } -void KopeteChatWindow::setActiveView( QWidget *widget ) +void KopeteChatWindow::setActiveView( TQWidget *widget ) { ChatView *view = static_cast(widget); @@ -844,7 +844,7 @@ void KopeteChatWindow::setActiveView( QWidget *widget ) if(m_activeView) { - disconnect( m_activeView, SIGNAL( canSendChanged(bool) ), this, SLOT( slotUpdateSendEnabled() ) ); + disconnect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) ); guiFactory()->removeClient(m_activeView->msgManager()); m_activeView->saveChatSettings(); } @@ -860,7 +860,7 @@ void KopeteChatWindow::setActiveView( QWidget *widget ) if( !chatViewList.contains( view ) ) attachChatView( view ); - connect( m_activeView, SIGNAL( canSendChanged(bool) ), this, SLOT( slotUpdateSendEnabled() ) ); + connect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) ); //Tell it it is active m_activeView->setActive( true ); @@ -905,7 +905,7 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view ) if ( !view ) return; //(pas de charité) - QPtrList chatMembers=view->msgManager()->members(); + TQPtrList chatMembers=view->msgManager()->members(); Kopete::Contact *c=0L; for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() ) { @@ -915,9 +915,9 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view ) if ( view == m_activeView ) { - QPixmap icon16 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 16) : + TQPixmap icon16 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 16) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); - QPixmap icon32 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 32) : + TQPixmap icon32 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 32) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); KWin::setIcons( winId(), icon32, icon16 ); } @@ -937,7 +937,7 @@ void KopeteChatWindow::slotChatClosed() void KopeteChatWindow::slotPrepareDetachMenu(void) { - QPopupMenu *detachMenu = actionDetachMenu->popupMenu(); + TQPopupMenu *detachMenu = actionDetachMenu->popupMenu(); detachMenu->clear(); for ( unsigned id=0; id < windows.count(); id++ ) @@ -963,7 +963,7 @@ void KopeteChatWindow::slotSendMessage() void KopeteChatWindow::slotPrepareContactMenu(void) { - QPopupMenu *contactsMenu = actionContactMenu->popupMenu(); + TQPopupMenu *contactsMenu = actionContactMenu->popupMenu(); contactsMenu->clear(); Kopete::Contact *contact; @@ -982,8 +982,8 @@ void KopeteChatWindow::slotPrepareContactMenu(void) for ( contact = m_them.first(); contact; contact = m_them.next() ) { KPopupMenu *p = contact->popupMenu(); - connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToHide()), - p, SLOT(deleteLater() ) ); + connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()), + p, TQT_SLOT(deleteLater() ) ); if( contact->metaContact() ) contactsMenu->insertItem( contact->onlineStatus().iconFor( contact ) , contact->metaContact()->displayName(), p ); @@ -994,9 +994,9 @@ void KopeteChatWindow::slotPrepareContactMenu(void) if( ++contactCount == 15 && contact != m_them.getLast() ) { KActionMenu *moreMenu = new KActionMenu( i18n("More..."), - QString::fromLatin1("folder_open"), contactsMenu ); - connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToHide()), - moreMenu, SLOT(deleteLater() ) ); + TQString::fromLatin1("folder_open"), contactsMenu ); + connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()), + moreMenu, TQT_SLOT(deleteLater() ) ); moreMenu->plug( contactsMenu ); contactsMenu = moreMenu->popupMenu(); contactCount = 0; @@ -1006,7 +1006,7 @@ void KopeteChatWindow::slotPrepareContactMenu(void) void KopeteChatWindow::slotPreparePlacementMenu() { - QPopupMenu *placementMenu = actionTabPlacementMenu->popupMenu(); + TQPopupMenu *placementMenu = actionTabPlacementMenu->popupMenu(); placementMenu->clear(); placementMenu->insertItem( i18n("Top"), 0 ); @@ -1019,9 +1019,9 @@ void KopeteChatWindow::slotPlaceTabs( int placement ) { if( placement == 0 ) - m_tabBar->setTabPosition( QTabWidget::Top ); + m_tabBar->setTabPosition( TQTabWidget::Top ); else - m_tabBar->setTabPosition( QTabWidget::Bottom ); + m_tabBar->setTabPosition( TQTabWidget::Bottom ); saveOptions(); } @@ -1032,9 +1032,9 @@ void KopeteChatWindow::readOptions() // load and apply config file settings affecting the appearance of the UI // kdDebug(14010) << k_funcinfo << endl; KConfig *config = KGlobal::config(); - applyMainWindowSettings( config, QString::fromLatin1( "KopeteChatWindow" ) ); - config->setGroup( QString::fromLatin1("ChatWindowSettings") ); - m_showFormatToolbar = config->readBoolEntry( QString::fromLatin1("Show Format Toolbar"), true ); + applyMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) ); + config->setGroup( TQString::fromLatin1("ChatWindowSettings") ); + m_showFormatToolbar = config->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true ); } void KopeteChatWindow::saveOptions() @@ -1044,12 +1044,12 @@ void KopeteChatWindow::saveOptions() KConfig *config = KGlobal::config(); // saves menubar,toolbar and statusbar setting - saveMainWindowSettings( config, QString::fromLatin1( "KopeteChatWindow" ) ); - config->setGroup( QString::fromLatin1("ChatWindowSettings") ); + saveMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) ); + config->setGroup( TQString::fromLatin1("ChatWindowSettings") ); if( m_tabBar ) - config->writeEntry ( QString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() ); + config->writeEntry ( TQString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() ); - config->writeEntry( QString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar ); + config->writeEntry( TQString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar ); config->sync(); } @@ -1094,7 +1094,7 @@ void KopeteChatWindow::slotViewMenuBar() menuBar()->show(); } -void KopeteChatWindow::slotSmileyActivated(const QString &sm) +void KopeteChatWindow::slotSmileyActivated(const TQString &sm) { if ( !sm.isNull() ) m_activeView->addText( " " + sm + " " ); @@ -1130,10 +1130,10 @@ bool KopeteChatWindow::queryClose() bool canClose = true; // kdDebug( 14010 ) << " Windows left open:" << endl; -// for( QPtrListIterator it( chatViewList ); it; ++it) +// for( TQPtrListIterator it( chatViewList ); it; ++it) // kdDebug( 14010 ) << " " << *it << " (" << (*it)->caption() << ")" << endl; - for( QPtrListIterator it( chatViewList ); it; ) + for( TQPtrListIterator it( chatViewList ); it; ) { ChatView *view = *it; // move out of the way before view is removed @@ -1169,7 +1169,7 @@ bool KopeteChatWindow::queryExit() return false; } -void KopeteChatWindow::closeEvent( QCloseEvent * e ) +void KopeteChatWindow::closeEvent( TQCloseEvent * e ) { // if there's a system tray applet and we are not shutting down then just do what needs to be done if a // window is closed. @@ -1197,7 +1197,7 @@ void KopeteChatWindow::slotConfKeys() if( m_activeView ) { dlg.insert(m_activeView->msgManager()->actionCollection() , i18n("Plugin Actions") ); - QPtrListIterator it( *m_activeView->msgManager()->childClients() ); + TQPtrListIterator it( *m_activeView->msgManager()->childClients() ); KXMLGUIClient *c = 0; while( (c = it.current()) != 0 ) { @@ -1214,7 +1214,7 @@ void KopeteChatWindow::slotConfKeys() void KopeteChatWindow::slotConfToolbar() { - saveMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteChatWindow" )); + saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" )); KEditToolbar *dlg = new KEditToolbar(factory(), this ); if (dlg->exec()) { @@ -1222,7 +1222,7 @@ void KopeteChatWindow::slotConfToolbar() createGUI( m_activeView->editPart() ); else createGUI( 0L ); - applyMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteChatWindow" )); + applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" )); } delete dlg; } @@ -1256,7 +1256,7 @@ void KopeteChatWindow::updateChatState( ChatView* cv, int newState ) void KopeteChatWindow::updateChatTooltip( ChatView* cv ) { if ( m_tabBar ) - m_tabBar->setTabToolTip( cv, QString::fromLatin1("%1").arg( cv->caption() ) ); + m_tabBar->setTabToolTip( cv, TQString::fromLatin1("%1").arg( cv->caption() ) ); } void KopeteChatWindow::updateChatLabel() @@ -1269,7 +1269,7 @@ void KopeteChatWindow::updateChatLabel() if ( m_tabBar ) { m_tabBar->setTabLabel( chat, chat->caption() ); - if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast(cv) ) + if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast(cv) ) setCaption( chat->caption() ); } } diff --git a/kopete/kopete/chatwindow/kopetechatwindow.h b/kopete/kopete/chatwindow/kopetechatwindow.h index 39277d86..6b896d81 100644 --- a/kopete/kopete/chatwindow/kopetechatwindow.h +++ b/kopete/kopete/chatwindow/kopetechatwindow.h @@ -20,7 +20,7 @@ #define KOPETECHATWINDOW_H #include -#include +#include #include "kopetecontact.h" #include "kdeversion.h" @@ -48,7 +48,7 @@ class Message; class ChatSession; class Contact; class Protocol; -typedef QPtrList ContactPtrList; +typedef TQPtrList ContactPtrList; } class KopeteChatWindow : public KParts::MainWindow @@ -92,7 +92,7 @@ public: ChatView *activeView(); void updateMembersActions(); - void setStatus( const QString & ); + void setStatus( const TQString & ); /** * Reimplemented from KMainWindow - asks each ChatView in the window if it is ok to close the window @@ -102,11 +102,11 @@ public: virtual bool queryExit(); KTempFile *backgroundFile; - QPtrList chatViewList; + TQPtrList chatViewList; private: // All KopeteChatWindows are created by the window function - KopeteChatWindow( QWidget *parent = 0, const char* name = "KopeteChatWindow" ); + KopeteChatWindow( TQWidget *parent = 0, const char* name = "KopeteChatWindow" ); /** * The window list has changed: @@ -122,7 +122,7 @@ private: void deleteTabBar(); void addTab( ChatView* ); void setPrimaryChatView( ChatView* ); - const QString fileContents( const QString &file ) const; + const TQString fileContents( const TQString &file ) const; ChatView *m_activeView; ChatView *m_popupView; @@ -133,11 +133,11 @@ private: KTabWidget *m_tabBar; KPushButton *m_button_send; KSqueezedTextLabel *m_status_text; - QVBoxLayout *mainLayout; - QFrame *mainArea; - QLabel *anim; - QMovie animIcon; - QPixmap normalIcon; + TQVBoxLayout *mainLayout; + TQFrame *mainArea; + TQLabel *anim; + TQMovie animIcon; + TQPixmap normalIcon; KAction *chatSend; KAction *historyUp; @@ -161,15 +161,15 @@ private: KActionMenu *actionContactMenu; KActionMenu *actionDetachMenu; KActionMenu *actionTabPlacementMenu; - QString statusMsg; + TQString statusMsg; signals: void closing( KopeteChatWindow* ); public slots: - void slotSmileyActivated( const QString & ); - void setActiveView( QWidget *active ); - void updateBackground( const QPixmap &pm ); + void slotSmileyActivated( const TQString & ); + void setActiveView( TQWidget *active ); + void updateBackground( const TQPixmap &pm ); private slots: // void slotPrepareSmileyMenu(); @@ -219,10 +219,10 @@ private slots: void slotSetCaption( bool ); void slotUpdateCaptionIcons( ChatView * ); void slotChatClosed(); - void slotTabContextMenu( QWidget*, const QPoint & ); + void slotTabContextMenu( TQWidget*, const TQPoint & ); void slotStopAnimation( ChatView* ); void slotNickComplete(); - void slotCloseChat( QWidget* ); + void slotCloseChat( TQWidget* ); //slots for tabs from the chatview widget void updateChatState( ChatView* cv, int state ); @@ -233,7 +233,7 @@ private: void updateSpellCheckAction(); protected: - virtual void closeEvent( QCloseEvent *e ); + virtual void closeEvent( TQCloseEvent *e ); virtual void windowActivationChange( bool ); }; diff --git a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp index 3e15281f..76e7fd54 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp @@ -18,10 +18,10 @@ #include "kopetechatwindowstyle.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // KDE includes #include @@ -30,39 +30,39 @@ class ChatWindowStyle::Private { public: - QString stylePath; + TQString stylePath; StyleVariants variantsList; - QString baseHref; - QString currentVariantPath; + TQString baseHref; + TQString currentVariantPath; - QString headerHtml; - QString footerHtml; - QString incomingHtml; - QString nextIncomingHtml; - QString outgoingHtml; - QString nextOutgoingHtml; - QString statusHtml; - QString actionIncomingHtml; - QString actionOutgoingHtml; + TQString headerHtml; + TQString footerHtml; + TQString incomingHtml; + TQString nextIncomingHtml; + TQString outgoingHtml; + TQString nextOutgoingHtml; + TQString statusHtml; + TQString actionIncomingHtml; + TQString actionOutgoingHtml; }; -ChatWindowStyle::ChatWindowStyle(const QString &stylePath, int styleBuildMode) +ChatWindowStyle::ChatWindowStyle(const TQString &stylePath, int styleBuildMode) : d(new Private) { init(stylePath, styleBuildMode); } -ChatWindowStyle::ChatWindowStyle(const QString &stylePath, const QString &variantPath, int styleBuildMode) +ChatWindowStyle::ChatWindowStyle(const TQString &stylePath, const TQString &variantPath, int styleBuildMode) : d(new Private) { d->currentVariantPath = variantPath; init(stylePath, styleBuildMode); } -void ChatWindowStyle::init(const QString &stylePath, int styleBuildMode) +void ChatWindowStyle::init(const TQString &stylePath, int styleBuildMode) { d->stylePath = stylePath; - d->baseHref = stylePath + QString::fromUtf8("/Contents/Resources/"); + d->baseHref = stylePath + TQString::fromUtf8("/Contents/Resources/"); readStyleFiles(); if(styleBuildMode & StyleBuildNormal) { @@ -86,57 +86,57 @@ ChatWindowStyle::StyleVariants ChatWindowStyle::getVariants() return d->variantsList; } -QString ChatWindowStyle::getStylePath() const +TQString ChatWindowStyle::getStylePath() const { return d->stylePath; } -QString ChatWindowStyle::getStyleBaseHref() const +TQString ChatWindowStyle::getStyleBaseHref() const { return d->baseHref; } -QString ChatWindowStyle::getHeaderHtml() const +TQString ChatWindowStyle::getHeaderHtml() const { return d->headerHtml; } -QString ChatWindowStyle::getFooterHtml() const +TQString ChatWindowStyle::getFooterHtml() const { return d->footerHtml; } -QString ChatWindowStyle::getIncomingHtml() const +TQString ChatWindowStyle::getIncomingHtml() const { return d->incomingHtml; } -QString ChatWindowStyle::getNextIncomingHtml() const +TQString ChatWindowStyle::getNextIncomingHtml() const { return d->nextIncomingHtml; } -QString ChatWindowStyle::getOutgoingHtml() const +TQString ChatWindowStyle::getOutgoingHtml() const { return d->outgoingHtml; } -QString ChatWindowStyle::getNextOutgoingHtml() const +TQString ChatWindowStyle::getNextOutgoingHtml() const { return d->nextOutgoingHtml; } -QString ChatWindowStyle::getStatusHtml() const +TQString ChatWindowStyle::getStatusHtml() const { return d->statusHtml; } -QString ChatWindowStyle::getActionIncomingHtml() const +TQString ChatWindowStyle::getActionIncomingHtml() const { return d->actionIncomingHtml; } -QString ChatWindowStyle::getActionOutgoingHtml() const +TQString ChatWindowStyle::getActionOutgoingHtml() const { return d->actionOutgoingHtml; } @@ -148,131 +148,131 @@ bool ChatWindowStyle::hasActionTemplate() const void ChatWindowStyle::listVariants() { - QString variantDirPath = d->baseHref + QString::fromUtf8("Variants/"); - QDir variantDir(variantDirPath); + TQString variantDirPath = d->baseHref + TQString::fromUtf8("Variants/"); + TQDir variantDir(variantDirPath); - QStringList variantList = variantDir.entryList("*.css"); - QStringList::ConstIterator it, itEnd = variantList.constEnd(); + TQStringList variantList = variantDir.entryList("*.css"); + TQStringList::ConstIterator it, itEnd = variantList.constEnd(); for(it = variantList.constBegin(); it != itEnd; ++it) { - QString variantName = *it, variantPath; + TQString variantName = *it, variantPath; // Retrieve only the file name. variantName = variantName.left(variantName.findRev(".")); // variantPath is relative to baseHref. - variantPath = QString("Variants/%1").arg(*it); + variantPath = TQString("Variants/%1").arg(*it); d->variantsList.insert(variantName, variantPath); } } void ChatWindowStyle::readStyleFiles() { - QString headerFile = d->baseHref + QString("Header.html"); - QString footerFile = d->baseHref + QString("Footer.html"); - QString incomingFile = d->baseHref + QString("Incoming/Content.html"); - QString nextIncomingFile = d->baseHref + QString("Incoming/NextContent.html"); - QString outgoingFile = d->baseHref + QString("Outgoing/Content.html"); - QString nextOutgoingFile = d->baseHref + QString("Outgoing/NextContent.html"); - QString statusFile = d->baseHref + QString("Status.html"); - QString actionIncomingFile = d->baseHref + QString("Incoming/Action.html"); - QString actionOutgoingFile = d->baseHref + QString("Outgoing/Action.html"); + TQString headerFile = d->baseHref + TQString("Header.html"); + TQString footerFile = d->baseHref + TQString("Footer.html"); + TQString incomingFile = d->baseHref + TQString("Incoming/Content.html"); + TQString nextIncomingFile = d->baseHref + TQString("Incoming/NextContent.html"); + TQString outgoingFile = d->baseHref + TQString("Outgoing/Content.html"); + TQString nextOutgoingFile = d->baseHref + TQString("Outgoing/NextContent.html"); + TQString statusFile = d->baseHref + TQString("Status.html"); + TQString actionIncomingFile = d->baseHref + TQString("Incoming/Action.html"); + TQString actionOutgoingFile = d->baseHref + TQString("Outgoing/Action.html"); - QFile fileAccess; + TQFile fileAccess; // First load header file. - if( QFile::exists(headerFile) ) + if( TQFile::exists(headerFile) ) { fileAccess.setName(headerFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->headerHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Header HTML: " << d->headerHtml << endl; fileAccess.close(); } // Load Footer file - if( QFile::exists(footerFile) ) + if( TQFile::exists(footerFile) ) { fileAccess.setName(footerFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->footerHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Footer HTML: " << d->footerHtml << endl; fileAccess.close(); } // Load incoming file - if( QFile::exists(incomingFile) ) + if( TQFile::exists(incomingFile) ) { fileAccess.setName(incomingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->incomingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Incoming HTML: " << d->incomingHtml << endl; fileAccess.close(); } // Load next Incoming file - if( QFile::exists(nextIncomingFile) ) + if( TQFile::exists(nextIncomingFile) ) { fileAccess.setName(nextIncomingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->nextIncomingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "NextIncoming HTML: " << d->nextIncomingHtml << endl; fileAccess.close(); } // Load outgoing file - if( QFile::exists(outgoingFile) ) + if( TQFile::exists(outgoingFile) ) { fileAccess.setName(outgoingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->outgoingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Outgoing HTML: " << d->outgoingHtml << endl; fileAccess.close(); } // Load next outgoing file - if( QFile::exists(nextOutgoingFile) ) + if( TQFile::exists(nextOutgoingFile) ) { fileAccess.setName(nextOutgoingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->nextOutgoingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "NextOutgoing HTML: " << d->nextOutgoingHtml << endl; fileAccess.close(); } // Load status file - if( QFile::exists(statusFile) ) + if( TQFile::exists(statusFile) ) { fileAccess.setName(statusFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->statusHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Status HTML: " << d->statusHtml << endl; fileAccess.close(); } // Load Action Incoming file - if( QFile::exists(actionIncomingFile) ) + if( TQFile::exists(actionIncomingFile) ) { fileAccess.setName(actionIncomingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->actionIncomingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "ActionIncoming HTML: " << d->actionIncomingHtml << endl; fileAccess.close(); } // Load Action Outgoing file - if( QFile::exists(actionOutgoingFile) ) + if( TQFile::exists(actionOutgoingFile) ) { fileAccess.setName(actionOutgoingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->actionOutgoingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "ActionOutgoing HTML: " << d->actionOutgoingHtml << endl; fileAccess.close(); diff --git a/kopete/kopete/chatwindow/kopetechatwindowstyle.h b/kopete/kopete/chatwindow/kopetechatwindowstyle.h index ca5a0863..43c54887 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstyle.h +++ b/kopete/kopete/chatwindow/kopetechatwindowstyle.h @@ -17,8 +17,8 @@ #ifndef KOPETECHATWINDOWSTYLE_H #define KOPETECHATWINDOWSTYLE_H -#include -#include +#include +#include /** @@ -35,7 +35,7 @@ public: * value = Path to variant CSS file. * Path is relative to Ressources directory. */ - typedef QMap StyleVariants; + typedef TQMap StyleVariants; /** * This enum specifies the mode of the constructor @@ -48,8 +48,8 @@ public: * @brief Build a single chat window style. * */ - ChatWindowStyle(const QString &stylePath, int styleBuildMode = StyleBuildNormal); - ChatWindowStyle(const QString &stylePath, const QString &variantPath, int styleBuildMode = StyleBuildFast); + ChatWindowStyle(const TQString &stylePath, int styleBuildMode = StyleBuildNormal); + ChatWindowStyle(const TQString &stylePath, const TQString &variantPath, int styleBuildMode = StyleBuildFast); ~ChatWindowStyle(); /** @@ -58,7 +58,7 @@ public: * before returning the list of the Variants. * If the variant are listed, it just return the cached * variant list. - * @return the StyleVariants QMap. + * @return the StyleVariants TQMap. */ StyleVariants getVariants(); @@ -69,7 +69,7 @@ public: * * @return the style path based. */ - QString getStylePath() const; + TQString getStylePath() const; /** * Get the style ressource directory. @@ -82,18 +82,18 @@ public: * * @return the path to the the ressource directory. */ - QString getStyleBaseHref() const; + TQString getStyleBaseHref() const; - QString getHeaderHtml() const; - QString getFooterHtml() const; - QString getIncomingHtml() const; - QString getNextIncomingHtml() const; - QString getOutgoingHtml() const; - QString getNextOutgoingHtml() const; - QString getStatusHtml() const; + TQString getHeaderHtml() const; + TQString getFooterHtml() const; + TQString getIncomingHtml() const; + TQString getNextIncomingHtml() const; + TQString getOutgoingHtml() const; + TQString getNextOutgoingHtml() const; + TQString getStatusHtml() const; - QString getActionIncomingHtml() const; - QString getActionOutgoingHtml() const; + TQString getActionIncomingHtml() const; + TQString getActionOutgoingHtml() const; /** * Check if the style has the support for Kopete Action template (Kopete extension) @@ -114,7 +114,7 @@ private: /** * Init this class */ - void init(const QString &stylePath, int styleBuildMode); + void init(const TQString &stylePath, int styleBuildMode); /** * List available variants for the current style. diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp index 71032ea3..cb3291e7 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp @@ -18,7 +18,7 @@ #include "kopetechatwindowstylemanager.h" // Qt includes -#include +#include // KDE includes #include @@ -51,7 +51,7 @@ public: styleDirLister->deleteLater(); } - QMap::Iterator styleIt, styleItEnd = stylePool.end(); + TQMap::Iterator styleIt, styleItEnd = stylePool.end(); for(styleIt = stylePool.begin(); styleIt != styleItEnd; ++styleIt) { delete styleIt.data(); @@ -62,9 +62,9 @@ public: StyleList availableStyles; // key = style path, value = ChatWindowStyle instance - QMap stylePool; + TQMap stylePool; - QValueStack styleDirs; + TQValueStack styleDirs; }; static KStaticDeleter ChatWindowStyleManagerstaticDeleter; @@ -81,8 +81,8 @@ ChatWindowStyleManager *ChatWindowStyleManager::self() return s_self; } -ChatWindowStyleManager::ChatWindowStyleManager(QObject *parent, const char *name) - : QObject(parent, name), d(new Private()) +ChatWindowStyleManager::ChatWindowStyleManager(TQObject *parent, const char *name) + : TQObject(parent, name), d(new Private()) { kdDebug(14000) << k_funcinfo << endl; loadStyles(); @@ -96,12 +96,12 @@ ChatWindowStyleManager::~ChatWindowStyleManager() void ChatWindowStyleManager::loadStyles() { - QStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", QString::fromUtf8( "styles" ) ); - QString localStyleDir( locateLocal( "appdata", QString::fromUtf8("styles/"),true) ); + TQStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", TQString::fromUtf8( "styles" ) ); + TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/"),true) ); if( !chatStyles.contains(localStyleDir)) chatStyles<styleDirLister = new KDirLister(this); d->styleDirLister->setDirOnlyMode(true); - connect(d->styleDirLister, SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewStyles(const KFileItemList &))); - connect(d->styleDirLister, SIGNAL(completed()), this, SLOT(slotDirectoryFinished())); + connect(d->styleDirLister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewStyles(const KFileItemList &))); + connect(d->styleDirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotDirectoryFinished())); if( !d->styleDirs.isEmpty() ) d->styleDirLister->openURL(d->styleDirs.pop(), true); @@ -123,9 +123,9 @@ ChatWindowStyleManager::StyleList ChatWindowStyleManager::getAvailableStyles() return d->availableStyles; } -int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) +int ChatWindowStyleManager::installStyle(const TQString &styleBundlePath) { - QString localStyleDir( locateLocal( "appdata", QString::fromUtf8("styles/") ) ); + TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/") ) ); KArchiveEntry *currentEntry = 0L; KArchiveDirectory* currentDir = 0L; @@ -137,7 +137,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) } // Find mimetype for current bundle. ZIP and KTar need separate constructor - QString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name(); + TQString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name(); if(currentBundleMimeType == "application/x-zip") { archive = new KZip(styleBundlePath); @@ -167,9 +167,9 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) // main.css, Footer.html, Header.html, Status.html files in Contents/Ressources. // So for a style bundle to be valid, it must have a result greather than 8, because we test for 8 required entry. int validResult = 0; - QStringList entries = rootDir->entries(); + TQStringList entries = rootDir->entries(); // Will be reused later. - QStringList::Iterator entriesIt, entriesItEnd = entries.end(); + TQStringList::Iterator entriesIt, entriesItEnd = entries.end(); for(entriesIt = entries.begin(); entriesIt != entries.end(); ++entriesIt) { currentEntry = const_cast(rootDir->entry(*entriesIt)); @@ -179,52 +179,52 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) currentDir = dynamic_cast( currentEntry ); if (currentDir) { - if( currentDir->entry(QString::fromUtf8("Contents")) ) + if( currentDir->entry(TQString::fromUtf8("Contents")) ) { // kdDebug() << k_funcinfo << "Contents found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources")) ) { // kdDebug() << k_funcinfo << "Contents/Resources found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Incoming")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Incoming found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Outgoing")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Outgoing found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/main.css")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/main.css")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/main.css found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Footer.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Footer.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Footer.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Status.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Status.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Status.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Header.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Header.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Header.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming/Content.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Incoming/Content.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Incoming/Content.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing/Content.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Outgoing/Content.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Outgoing/Content.html found" << endl; validResult += 1; @@ -232,7 +232,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) } } } -// kdDebug() << k_funcinfo << "Valid result: " << QString::number(validResult) << endl; +// kdDebug() << k_funcinfo << "Valid result: " << TQString::number(validResult) << endl; // The archive is a valid style bundle. if(validResult >= 8) { @@ -243,7 +243,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) if(currentEntry && currentEntry->isDirectory()) { // Ignore this MacOS X "garbage" directory in zip. - if(currentEntry->name() == QString::fromUtf8("__MACOSX")) + if(currentEntry->name() == TQString::fromUtf8("__MACOSX")) { continue; } @@ -284,13 +284,13 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) return StyleUnknow; } -bool ChatWindowStyleManager::removeStyle(const QString &stylePath) +bool ChatWindowStyleManager::removeStyle(const TQString &stylePath) { // Find for the current style in avaiableStyles map. KURL urlStyle(stylePath); - QString styleName=urlStyle.fileName(); + TQString styleName=urlStyle.fileName(); StyleList::Iterator foundStyle = d->availableStyles.find(styleName); - // QMap iterator return end() if it found no item. + // TQMap iterator return end() if it found no item. if(foundStyle != d->availableStyles.end()) { d->availableStyles.remove(foundStyle); @@ -312,7 +312,7 @@ bool ChatWindowStyleManager::removeStyle(const QString &stylePath) } } -ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &stylePath) +ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const TQString &stylePath) { if( d->stylePool.contains(stylePath) ) { @@ -344,11 +344,11 @@ ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &stylePa void ChatWindowStyleManager::slotNewStyles(const KFileItemList &dirList) { KFileItem *item; - QPtrListIterator it( dirList ); + TQPtrListIterator it( dirList ); while( (item = it.current()) != 0 ) { // Ignore data dir(from deprecated XSLT themes) - if( !item->url().fileName().contains(QString::fromUtf8("data")) ) + if( !item->url().fileName().contains(TQString::fromUtf8("data")) ) { kdDebug(14000) << k_funcinfo << "Listing: " << item->url().fileName() << endl; // If the style path is already in the pool, that's mean the style was updated on disk diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h index 4b21c79b..dcc56cf0 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h +++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h @@ -18,8 +18,8 @@ #ifndef KOPETECHATWINDOWSTYLEMANAGER_H #define KOPETECHATWINDOWSTYLEMANAGER_H -#include -#include +#include +#include #include #include @@ -46,11 +46,11 @@ class KOPETE_EXPORT ChatWindowStyleManager : public QObject Q_OBJECT public: /** - * StyleList typedef (a QMap) + * StyleList typedef (a TQMap) * key = Name of the style (currently the directory name) * value = Path to the style */ - typedef QMap StyleList; + typedef TQMap StyleList; /** * The StyleInstallStatus enum. It gives better return value for installStyle(). @@ -92,7 +92,7 @@ public slots: * @param styleBundlePath Path to the container file to install. * @return A status code from StyleInstallStatus enum. */ - int installStyle(const QString &styleBundlePath); + int installStyle(const TQString &styleBundlePath); /** * Remove a style from user style directory @@ -100,7 +100,7 @@ public slots: * @param stylePath the path of the style to remove. * @return true if the deletion went without problems. */ - bool removeStyle(const QString &stylePath); + bool removeStyle(const TQString &stylePath); /** * Get a instance of a ChatWindowStyle from the pool. @@ -110,7 +110,7 @@ public slots: * @param stylePath Path for the specified style. Name can be ambigous. * @return the instance of ChatWindow for the specified style. DO NOT DELETE IT. */ - ChatWindowStyle *getStyleFromPool(const QString &stylePath); + ChatWindowStyle *getStyleFromPool(const TQString &stylePath); signals: /** @@ -136,7 +136,7 @@ private: * Private constructor(it's a singleton class) * Call loadStyles() to list all avaiable styles. */ - ChatWindowStyleManager(QObject *parent = 0, const char *name = 0); + ChatWindowStyleManager(TQObject *parent = 0, const char *name = 0); static ChatWindowStyleManager *s_self; diff --git a/kopete/kopete/chatwindow/kopeteemailwindow.cpp b/kopete/kopete/chatwindow/kopeteemailwindow.cpp index 84b71b16..89f99eb9 100644 --- a/kopete/kopete/chatwindow/kopeteemailwindow.cpp +++ b/kopete/kopete/chatwindow/kopeteemailwindow.cpp @@ -54,15 +54,15 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include typedef KGenericFactory EmailWindowPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_emailwindow, EmailWindowPluginFactory( "kopete_emailwindow" ) ) -EmailWindowPlugin::EmailWindowPlugin(QObject *parent, const char *name, const QStringList &) : +EmailWindowPlugin::EmailWindowPlugin(TQObject *parent, const char *name, const TQStringList &) : Kopete::ViewPlugin( EmailWindowPluginFactory::instance(), parent, name ) {} @@ -75,7 +75,7 @@ KopeteView* EmailWindowPlugin::createView( Kopete::ChatSession *manager ) class KopeteEmailWindow::Private { public: - QValueList messageQueue; + TQValueList messageQueue; bool showingMessage; bool sendInProgress; bool visible; @@ -83,14 +83,14 @@ public: KPushButton *btnReplySend; KPushButton *btnReadNext; KPushButton *btnReadPrev; - QSplitter *split; + TQSplitter *split; ChatMessagePart *messagePart; KopeteEmailWindow::WindowMode mode; KAction *chatSend; - QLabel *anim; - QMovie animIcon; - QPixmap normalIcon; - QString unreadMessageFrom; + TQLabel *anim; + TQMovie animIcon; + TQPixmap normalIcon; + TQString unreadMessageFrom; ChatTextEditPart *editPart; KActionMenu *actionActionMenu; @@ -100,27 +100,27 @@ public: KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowPlugin *parent, bool foreignMessage ) : KParts::MainWindow( ), KopeteView( manager, parent ), d( new Private ) { - QVBox *v = new QVBox( this ); + TQVBox *v = new TQVBox( this ); setCentralWidget( v ); - setMinimumSize( QSize( 75, 20 ) ); + setMinimumSize( TQSize( 75, 20 ) ); - d->split = new QSplitter( v ); - d->split->setOrientation( QSplitter::Vertical ); + d->split = new TQSplitter( v ); + d->split->setOrientation( TQSplitter::Vertical ); d->messagePart = new ChatMessagePart( manager, d->split, "messagePart" ); // FIXME: should this be in ChatView too? maybe move to ChatMessagePart? d->messagePart->view()->setMarginWidth( 4 ); d->messagePart->view()->setMarginHeight( 4 ); - d->messagePart->view()->setMinimumSize( QSize( 75, 20 ) ); + d->messagePart->view()->setMinimumSize( TQSize( 75, 20 ) ); d->editPart = new ChatTextEditPart( manager, d->split, "editPart" ); /* FIXME: dude, wtf? - QDomDocument doc = d->editPart->domDocument(); - QDomNode menu = doc.documentElement().firstChild(); + TQDomDocument doc = d->editPart->domDocument(); + TQDomNode menu = doc.documentElement().firstChild(); menu.removeChild( menu.firstChild() ); // Remove File menu.removeChild( menu.firstChild() ); // Remove Edit menu.removeChild( menu.firstChild() ); // Remove View @@ -129,40 +129,40 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP doc.documentElement().removeChild( doc.documentElement().childNodes().item(1) ); //Remove MainToolbar doc.documentElement().removeChild( doc.documentElement().lastChild() ); // Remove Edit popup */ - connect( d->editPart, SIGNAL( messageSent( Kopete::Message & ) ), - this, SIGNAL( messageSent( Kopete::Message & ) ) ); - connect( d->editPart, SIGNAL( canSendChanged( bool ) ), - this, SLOT( slotUpdateReplySend() ) ); - connect( d->editPart, SIGNAL( typing(bool) ), - manager, SIGNAL( typing(bool) ) ); + connect( d->editPart, TQT_SIGNAL( messageSent( Kopete::Message & ) ), + this, TQT_SIGNAL( messageSent( Kopete::Message & ) ) ); + connect( d->editPart, TQT_SIGNAL( canSendChanged( bool ) ), + this, TQT_SLOT( slotUpdateReplySend() ) ); + connect( d->editPart, TQT_SIGNAL( typing(bool) ), + manager, TQT_SIGNAL( typing(bool) ) ); //Connections to the manager and the ViewManager that every view should have - connect( this, SIGNAL( closing( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewDestroyed( KopeteView * ) ) ); - connect( this, SIGNAL( activated( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewActivated( KopeteView * ) ) ); - connect( this, SIGNAL( messageSent(Kopete::Message &) ), - manager, SLOT( sendMessage(Kopete::Message &) ) ); - connect( manager, SIGNAL( messageSuccess() ), - this, SLOT( messageSentSuccessfully() )); - - QWidget *containerWidget = new QWidget( v ); - containerWidget->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum) ); - - QHBoxLayout *h = new QHBoxLayout( containerWidget, 4, 4 ); + connect( this, TQT_SIGNAL( closing( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewDestroyed( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( activated( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewActivated( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( messageSent(Kopete::Message &) ), + manager, TQT_SLOT( sendMessage(Kopete::Message &) ) ); + connect( manager, TQT_SIGNAL( messageSuccess() ), + this, TQT_SLOT( messageSentSuccessfully() )); + + TQWidget *containerWidget = new TQWidget( v ); + containerWidget->setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); + + TQHBoxLayout *h = new TQHBoxLayout( containerWidget, 4, 4 ); h->addStretch(); d->btnReadPrev = new KPushButton( i18n( "<< Prev" ), containerWidget ); - connect( d->btnReadPrev, SIGNAL( pressed() ), this, SLOT( slotReadPrev() ) ); + connect( d->btnReadPrev, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReadPrev() ) ); h->addWidget( d->btnReadPrev, 0, Qt::AlignRight | Qt::AlignVCenter ); d->btnReadPrev->setEnabled( false ); d->btnReadNext = new KPushButton( i18n( "(0) Next >>" ), containerWidget ); - connect( d->btnReadNext, SIGNAL( pressed() ), this, SLOT( slotReadNext() ) ); + connect( d->btnReadNext, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReadNext() ) ); h->addWidget( d->btnReadNext, 0, Qt::AlignRight | Qt::AlignVCenter ); d->btnReplySend = new KPushButton( containerWidget ); - connect( d->btnReplySend, SIGNAL( pressed() ), this, SLOT( slotReplySend() ) ); + connect( d->btnReplySend, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReplySend() ) ); h->addWidget( d->btnReplySend, 0, Qt::AlignRight | Qt::AlignVCenter ); initActions(); @@ -176,7 +176,7 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP toggleMode( Send ); KConfig *config = KGlobal::config(); - applyMainWindowSettings( config, QString::fromLatin1( "KopeteEmailWindow" ) ); + applyMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) ); d->sendInProgress = false; @@ -196,7 +196,7 @@ KopeteEmailWindow::~KopeteEmailWindow() // saves menubar, toolbar and statusbar setting KConfig *config = KGlobal::config(); - saveMainWindowSettings( config, QString::fromLatin1( "KopeteEmailWindow" ) ); + saveMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) ); config->sync(); delete d; @@ -206,54 +206,54 @@ void KopeteEmailWindow::initActions(void) { KActionCollection *coll = actionCollection(); - d->chatSend = new KAction( i18n( "&Send Message" ), QString::fromLatin1( "mail_send" ), 0, - this, SLOT( slotReplySend() ), coll, "chat_send" ); + d->chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), 0, + this, TQT_SLOT( slotReplySend() ), coll, "chat_send" ); //Default to 'Return' for sending messages - d->chatSend->setShortcut( QKeySequence( Key_Return ) ); + d->chatSend->setShortcut( TQKeySequence( Key_Return ) ); - KStdAction::quit ( this, SLOT( slotCloseView() ), coll ); + KStdAction::quit ( this, TQT_SLOT( slotCloseView() ), coll ); - KStdAction::cut( d->editPart->widget(), SLOT( cut() ), coll ); - KStdAction::copy( this, SLOT(slotCopy()), coll); - KStdAction::paste( d->editPart->widget(), SLOT( paste() ), coll ); + KStdAction::cut( d->editPart->widget(), TQT_SLOT( cut() ), coll ); + KStdAction::copy( this, TQT_SLOT(slotCopy()), coll); + KStdAction::paste( d->editPart->widget(), TQT_SLOT( paste() ), coll ); - new KAction( i18n( "&Set Font..." ), QString::fromLatin1( "charset" ), 0, - d->editPart, SLOT( setFont() ), coll, "format_font" ); - new KAction( i18n( "Set Text &Color..." ), QString::fromLatin1( "pencil" ), 0, - d->editPart, SLOT( setFgColor() ), coll, "format_color" ); - new KAction( i18n( "Set &Background Color..." ), QString::fromLatin1( "fill" ), 0, - d->editPart, SLOT( setBgColor() ), coll, "format_bgcolor" ); + new KAction( i18n( "&Set Font..." ), TQString::fromLatin1( "charset" ), 0, + d->editPart, TQT_SLOT( setFont() ), coll, "format_font" ); + new KAction( i18n( "Set Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, + d->editPart, TQT_SLOT( setFgColor() ), coll, "format_color" ); + new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, + d->editPart, TQT_SLOT( setBgColor() ), coll, "format_bgcolor" ); - KStdAction::showMenubar( this, SLOT( slotViewMenuBar() ), coll ); + KStdAction::showMenubar( this, TQT_SLOT( slotViewMenuBar() ), coll ); setStandardToolBarMenuEnabled( true ); d->actionSmileyMenu = new KopeteEmoticonAction( coll, "format_smiley" ); d->actionSmileyMenu->setDelayed( false ); - connect(d->actionSmileyMenu, SIGNAL(activated(const QString &)), this, SLOT(slotSmileyActivated(const QString &))); + connect(d->actionSmileyMenu, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSmileyActivated(const TQString &))); // add configure key bindings menu item - KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), coll ); - KStdAction::configureToolbars(this, SLOT( slotConfToolbar() ), coll); + KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), coll ); + KStdAction::configureToolbars(this, TQT_SLOT( slotConfToolbar() ), coll); //FIXME: no longer works? KopeteStdAction::preferences( coll , "settings_prefs" ); // The animated toolbarbutton - d->normalIcon = QPixmap( BarIcon( QString::fromLatin1( "kopete" ) ) ); - d->animIcon = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Toolbar); + d->normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) ); + d->animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar); d->animIcon.pause(); - d->anim = new QLabel( this, "kde toolbar widget" ); + d->anim = new TQLabel( this, "kde toolbar widget" ); d->anim->setMargin( 5 ); d->anim->setPixmap( d->normalIcon ); new KWidgetAction( d->anim, i18n("Toolbar Animation"), 0, 0, 0, coll, "toolbar_animation" ); - setXMLFile( QString::fromLatin1( "kopeteemailwindow.rc" ) ); + setXMLFile( TQString::fromLatin1( "kopeteemailwindow.rc" ) ); createGUI( d->editPart ); - //createGUI( QString::fromLatin1( "kopeteemailwindow.rc" ) ); + //createGUI( TQString::fromLatin1( "kopeteemailwindow.rc" ) ); guiFactory()->addClient(m_manager); } -void KopeteEmailWindow::closeEvent( QCloseEvent *e ) +void KopeteEmailWindow::closeEvent( TQCloseEvent *e ) { // DO NOT call base class's closeEvent - see comment in KopeteApplication constructor for reason @@ -272,7 +272,7 @@ void KopeteEmailWindow::slotViewMenuBar() menuBar()->show(); } -void KopeteEmailWindow::slotSmileyActivated(const QString &sm ) +void KopeteEmailWindow::slotSmileyActivated(const TQString &sm ) { if ( !sm.isNull() ) d->editPart->addText( sm ); @@ -280,12 +280,12 @@ void KopeteEmailWindow::slotSmileyActivated(const QString &sm ) void KopeteEmailWindow::slotConfToolbar() { - saveMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteEmailWindow" )); - KEditToolbar *dlg = new KEditToolbar(actionCollection(), QString::fromLatin1("kopeteemailwindow.rc") ); + saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" )); + KEditToolbar *dlg = new KEditToolbar(actionCollection(), TQString::fromLatin1("kopeteemailwindow.rc") ); if (dlg->exec()) { createGUI( d->editPart ); - applyMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteEmailWindow" )); + applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" )); } delete dlg; } @@ -313,19 +313,19 @@ void KopeteEmailWindow::appendMessage(Kopete::Message &message) slotReadNext(); else { - d->btnReadNext->setPaletteForegroundColor( QColor("red") ); + d->btnReadNext->setPaletteForegroundColor( TQColor("red") ); updateNextButton(); } d->unreadMessageFrom = message.from()->metaContact() ? message.from()->metaContact()->displayName() : message.from()->contactId(); - QTimer::singleShot( 1000, this, SLOT(slotMarkMessageRead()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(slotMarkMessageRead()) ); } } void KopeteEmailWindow::slotMarkMessageRead() { - d->unreadMessageFrom = QString::null; + d->unreadMessageFrom = TQString::null; } void KopeteEmailWindow::updateNextButton() @@ -418,27 +418,27 @@ bool KopeteEmailWindow::closeView( bool force ) { if( m_manager->members().count() > 1 ) { - QString shortCaption = caption(); + TQString shortCaption = caption(); if( shortCaption.length() > 40 ) - shortCaption = shortCaption.left( 40 ) + QString::fromLatin1("..."); + shortCaption = shortCaption.left( 40 ) + TQString::fromLatin1("..."); response = KMessageBox::warningContinueCancel(this, i18n("You are about to leave the group chat session %1.
" "You will not receive future messages from this conversation.
").arg(shortCaption), i18n("Closing Group Chat"), - i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseGroupChat")); + i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseGroupChat")); } if( !d->unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel(this, i18n("You have received a message from %1 in the last " "second. Are you sure you want to close this chat?").arg(d->unreadMessageFrom), i18n("Unread Message"), - i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseChatRecentMessage")); + i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseChatRecentMessage")); } if( d->sendInProgress && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel(this, i18n("You have a message send in progress, which will be " "aborted if this chat is closed. Are you sure you want to close this chat?"), i18n("Message in Transit"), - i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseChatMessageInProgress") ); + i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseChatMessageInProgress") ); } } @@ -477,7 +477,7 @@ void KopeteEmailWindow::toggleMode( WindowMode newMode ) d->btnReadPrev->show(); break; case Reply: - QValueList splitPercent; + TQValueList splitPercent; // FIXME: should be saved and restored splitPercent.append(50); splitPercent.append(50); diff --git a/kopete/kopete/chatwindow/kopeteemailwindow.h b/kopete/kopete/chatwindow/kopeteemailwindow.h index 43908645..165ee53a 100644 --- a/kopete/kopete/chatwindow/kopeteemailwindow.h +++ b/kopete/kopete/chatwindow/kopeteemailwindow.h @@ -44,7 +44,7 @@ public: virtual void makeVisible(); virtual bool closeView( bool force = false ); virtual bool isVisible(); - virtual QWidget *mainWidget() { return this; } + virtual TQWidget *mainWidget() { return this; } public slots: virtual void sendMessage(); @@ -58,7 +58,7 @@ signals: virtual void activated( KopeteView *view ); protected: - virtual void closeEvent( QCloseEvent *e ); + virtual void closeEvent( TQCloseEvent *e ); virtual void windowActivationChange( bool activated ); private slots: @@ -68,7 +68,7 @@ private slots: void slotReadPrev(); void slotCloseView(); - void slotSmileyActivated( const QString & ); + void slotSmileyActivated( const TQString & ); void slotCopy(); void slotViewMenuBar(); @@ -94,7 +94,7 @@ private: class EmailWindowPlugin : public Kopete::ViewPlugin { public: - EmailWindowPlugin(QObject *parent, const char *name, const QStringList &args); + EmailWindowPlugin(TQObject *parent, const char *name, const TQStringList &args); KopeteView* createView( Kopete::ChatSession *manager ); }; diff --git a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp index 3e14e66d..bb440ef2 100644 --- a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp +++ b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp @@ -22,7 +22,7 @@ #include -#include +#include #include #include @@ -46,7 +46,7 @@ public: emoticonSelector = new EmoticonSelector( m_popup, "KopeteEmoticonActionPrivate::emoticonSelector"); m_popup->insertItem( emoticonSelector ); // TODO: Maybe connect to kopeteprefs and redo list only on config changes - connect( m_popup, SIGNAL( aboutToShow() ), emoticonSelector, SLOT( prepareList() ) ); + connect( m_popup, TQT_SIGNAL( aboutToShow() ), emoticonSelector, TQT_SLOT( prepareList() ) ); } ~KopeteEmoticonActionPrivate() @@ -61,16 +61,16 @@ public: bool m_stickyMenu; }; -KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent, const char* name ) +KopeteEmoticonAction::KopeteEmoticonAction( TQObject* parent, const char* name ) : KAction( i18n( "Add Smiley" ), 0, parent, name ) { d = new KopeteEmoticonActionPrivate; // Try to load the icon for our current emoticon theme, when it fails // fall back to our own default - QString icon; - QMap emoticonsMap = Kopete::Emoticons::self()->emoticonAndPicList(); - for( QMap::const_iterator it = emoticonsMap.constBegin(); + TQString icon; + TQMap emoticonsMap = Kopete::Emoticons::self()->emoticonAndPicList(); + for( TQMap::const_iterator it = emoticonsMap.constBegin(); it != emoticonsMap.constEnd(); ++it ) { if( ( *it ).contains( ":)" ) || ( *it ).contains( ":-)" ) ) @@ -83,11 +83,11 @@ KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent, const char* name ) if ( icon.isNull() ) setIcon( "emoticon" ); else - setIconSet( QIconSet( icon ) ); + setIconSet( TQIconSet( icon ) ); setShortcutConfigurable( false ); - connect( d->emoticonSelector, SIGNAL( ItemSelected( const QString & ) ), - this, SIGNAL( activated( const QString & ) ) ); + connect( d->emoticonSelector, TQT_SIGNAL( ItemSelected( const TQString & ) ), + this, TQT_SIGNAL( activated( const TQString & ) ) ); } KopeteEmoticonAction::~KopeteEmoticonAction() @@ -98,7 +98,7 @@ KopeteEmoticonAction::~KopeteEmoticonAction() d = 0; } -void KopeteEmoticonAction::popup( const QPoint& global ) +void KopeteEmoticonAction::popup( const TQPoint& global ) { popupMenu()->popup( global ); } @@ -128,7 +128,7 @@ void KopeteEmoticonAction::setStickyMenu(bool sticky) d->m_stickyMenu = sticky; } -int KopeteEmoticonAction::plug( QWidget* widget, int index ) +int KopeteEmoticonAction::plug( TQWidget* widget, int index ) { if (kapp && !kapp->authorizeKAction(name())) return -1; @@ -136,9 +136,9 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) // kdDebug(14010) << "KopeteEmoticonAction::plug( " << widget << ", " << index << " )" << endl; // KDE4/Qt TODO: Use qobject_cast instead. - if ( widget->inherits("QPopupMenu") ) + if ( widget->inherits("TQPopupMenu") ) { - QPopupMenu* menu = static_cast( widget ); + TQPopupMenu* menu = static_cast( widget ); int id; if ( hasIcon() ) id = menu->insertItem( iconSet(KIcon::Small), text(), d->m_popup, -1, index ); @@ -149,7 +149,7 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) menu->setItemEnabled( id, false ); addContainer( menu, id ); - connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); if ( m_parentCollection ) m_parentCollection->connectHighlight( menu, this ); @@ -166,8 +166,8 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) if ( icon().isEmpty() && !iconSet(KIcon::Small).isNull() ) { bar->insertButton( - iconSet(KIcon::Small).pixmap(), id_, SIGNAL(clicked()), this, - SLOT(slotActivated()), isEnabled(), plainText(), + iconSet(KIcon::Small).pixmap(), id_, TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotActivated()), isEnabled(), plainText(), index ); } else @@ -179,17 +179,17 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) else instance = KGlobal::instance(); - bar->insertButton( icon(), id_, SIGNAL( clicked() ), this, - SLOT( slotActivated() ), isEnabled(), plainText(), + bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, + TQT_SLOT( slotActivated() ), isEnabled(), plainText(), index, instance ); } addContainer( bar, id_ ); if (!whatsThis().isEmpty()) - QWhatsThis::add( bar->getButton(id_), whatsThis() ); + TQWhatsThis::add( bar->getButton(id_), whatsThis() ); - connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); if (delayed()) bar->setDelayedPopup(id_, popupMenu(), stickyMenu()); @@ -202,9 +202,9 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) return containerCount() - 1; } // KDE4/Qt TODO: Use qobject_cast instead. - else if ( widget->inherits( "QMenuBar" ) ) + else if ( widget->inherits( "TQMenuBar" ) ) { - QMenuBar *bar = static_cast( widget ); + TQMenuBar *bar = static_cast( widget ); int id; @@ -214,7 +214,7 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) bar->setItemEnabled( id, false ); addContainer( bar, id ); - connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); return containerCount() - 1; } diff --git a/kopete/kopete/chatwindow/kopeteemoticonaction.h b/kopete/kopete/chatwindow/kopeteemoticonaction.h index d420518a..15b1fd14 100644 --- a/kopete/kopete/chatwindow/kopeteemoticonaction.h +++ b/kopete/kopete/chatwindow/kopeteemoticonaction.h @@ -31,11 +31,11 @@ class KopeteEmoticonAction : public KAction Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) public: - KopeteEmoticonAction( QObject *parent = 0, const char *name = 0 ); + KopeteEmoticonAction( TQObject *parent = 0, const char *name = 0 ); virtual ~KopeteEmoticonAction(); KPopupMenu * popupMenu() const; - void popup( const QPoint &global ); + void popup( const TQPoint &global ); /** * Returns true if this action creates a delayed popup menu @@ -74,10 +74,10 @@ public: */ void setStickyMenu( bool sticky ); - virtual int plug( QWidget* widget, int index = -1 ); + virtual int plug( TQWidget* widget, int index = -1 ); signals: - void activated( const QString &item ); + void activated( const TQString &item ); private: class KopeteEmoticonActionPrivate; diff --git a/kopete/kopete/chatwindow/krichtexteditpart.cpp b/kopete/kopete/chatwindow/krichtexteditpart.cpp index 001096b9..a08fa7e3 100644 --- a/kopete/kopete/chatwindow/krichtexteditpart.cpp +++ b/kopete/kopete/chatwindow/krichtexteditpart.cpp @@ -6,9 +6,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -23,25 +23,25 @@ K_EXPORT_COMPONENT_FACTORY( libkopeterichtexteditpart, KopeteRichTextEditPartFac class KopeteTextEdit : public KTextEdit { public: - KopeteTextEdit( QWidget *parent ) : KTextEdit( parent ) {} + KopeteTextEdit( TQWidget *parent ) : KTextEdit( parent ) {} const QTextCursor * cursor() { return textCursor(); } - bool event(QEvent *event) + bool event(TQEvent *event) { - // don't allow QTextEdit to override accels - if ( event->type() == QEvent::AccelOverride ) - return QWidget::event(event); + // don't allow TQTextEdit to override accels + if ( event->type() == TQEvent::AccelOverride ) + return TQWidget::event(event); else return KTextEdit::event(event); } }; -KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *wparent, const char *wname, QObject*, const char*, const QStringList& ) +KopeteRichTextEditPart::KopeteRichTextEditPart( TQWidget *wparent, const char *wname, TQObject*, const char*, const TQStringList& ) : KParts::ReadOnlyPart( wparent, wname ? wname : "rich_text_part" ) { KopeteRichTextEditPart::KopeteRichTextEditPart( wparent, wname, false ); } -KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *parent, const char *name, int capabilities ) +KopeteRichTextEditPart::KopeteRichTextEditPart( TQWidget *parent, const char *name, int capabilities ) : KParts::ReadOnlyPart( parent, name ? name : "rich_text_part" ), m_capabilities( capabilities ), m_richTextEnabled( true ) @@ -127,86 +127,86 @@ void KopeteRichTextEditPart::createActions( KActionCollection *ac ) enableRichText = new KToggleAction(i18n("Enable &Rich Text"), "pencil", 0, ac, "enableRichText" ); enableRichText->setCheckedState(i18n("Disable &Rich Text")); - connect( enableRichText, SIGNAL( toggled(bool) ), - this, SLOT( slotSetRichTextEnabled(bool) ) ); + connect( enableRichText, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( slotSetRichTextEnabled(bool) ) ); checkSpelling = new KAction( i18n("Check &Spelling"), "spellcheck", 0, - editor, SLOT( checkSpelling() ), ac, "check_spelling" ); + editor, TQT_SLOT( checkSpelling() ), ac, "check_spelling" ); //Fg Color actionFgColor = new KAction( i18n("Text &Color..."), "color_line", 0, - this, SLOT( setFgColor() ), + this, TQT_SLOT( setFgColor() ), ac, "format_color" ); //BG Color actionBgColor = new KAction( i18n("Background Co&lor..."), "color_fill", 0, - this, SLOT( setBgColor() ), + this, TQT_SLOT( setBgColor() ), ac, "format_bgcolor" ); //Font Family action_font = new KFontAction( i18n("&Font"), 0, ac, "format_font" ); - connect( action_font, SIGNAL( activated( const QString & ) ), - this, SLOT( setFont( const QString & ) ) ); + connect( action_font, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( setFont( const TQString & ) ) ); //Font Size action_font_size = new KFontSizeAction( i18n("Font &Size"), 0, ac, "format_font_size" ); - connect( action_font_size, SIGNAL( fontSizeChanged(int) ), - this, SLOT( setFontSize(int) ) ); + connect( action_font_size, TQT_SIGNAL( fontSizeChanged(int) ), + this, TQT_SLOT( setFontSize(int) ) ); //Formatting action_bold = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B, ac, "format_bold" ); - connect( action_bold, SIGNAL( toggled(bool) ), - this, SLOT( setBold(bool) ) ); + connect( action_bold, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setBold(bool) ) ); action_italic = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I, ac, "format_italic" ); - connect( action_italic, SIGNAL( toggled(bool) ), - this, SLOT( setItalic(bool) ) ); + connect( action_italic, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setItalic(bool) ) ); action_underline = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U, ac, "format_underline" ); - connect( action_underline, SIGNAL( toggled(bool) ), - this, SLOT( setUnderline(bool) ) ); + connect( action_underline, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setUnderline(bool) ) ); - connect( editor, SIGNAL( currentFontChanged( const QFont & ) ), - this, SLOT( updateCharFmt() ) ); + connect( editor, TQT_SIGNAL( currentFontChanged( const TQFont & ) ), + this, TQT_SLOT( updateCharFmt() ) ); updateCharFmt(); - connect( editor, SIGNAL( currentFontChanged( const QFont & ) ), - this, SLOT( updateFont() ) ); + connect( editor, TQT_SIGNAL( currentFontChanged( const TQFont & ) ), + this, TQT_SLOT( updateFont() ) ); updateFont(); //Alignment action_align_left = new KToggleAction( i18n("Align &Left"), "text_left", 0, ac, "format_align_left" ); - connect( action_align_left, SIGNAL( toggled(bool) ), - this, SLOT( setAlignLeft(bool) ) ); + connect( action_align_left, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setAlignLeft(bool) ) ); action_align_center = new KToggleAction( i18n("Align &Center"), "text_center", 0, ac, "format_align_center" ); - connect( action_align_center, SIGNAL( toggled(bool) ), - this, SLOT( setAlignCenter(bool) ) ); + connect( action_align_center, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setAlignCenter(bool) ) ); action_align_right = new KToggleAction( i18n("Align &Right"), "text_right", 0, ac, "format_align_right" ); - connect( action_align_right, SIGNAL( toggled(bool) ), - this, SLOT( setAlignRight(bool) ) ); + connect( action_align_right, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setAlignRight(bool) ) ); action_align_justify = new KToggleAction( i18n("&Justify"), "text_block", 0, ac, "format_align_justify" ); - connect( action_align_justify, SIGNAL( toggled(bool) ), - this, SLOT( setAlignJustify(bool) ) ); + connect( action_align_justify, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setAlignJustify(bool) ) ); action_align_left->setExclusiveGroup( "alignment" ); action_align_center->setExclusiveGroup( "alignment" ); action_align_right->setExclusiveGroup( "alignment" ); action_align_justify->setExclusiveGroup( "alignment" ); - connect( editor, SIGNAL( cursorPositionChanged( int,int ) ), - this, SLOT( updateAligment() ) ); + connect( editor, TQT_SIGNAL( cursorPositionChanged( int,int ) ), + this, TQT_SLOT( updateAligment() ) ); updateAligment(); } @@ -248,7 +248,7 @@ void KopeteRichTextEditPart::updateCharFmt() void KopeteRichTextEditPart::clear() { - editor->setText( QString::null ); + editor->setText( TQString::null ); setFont( mFont ); setFgColor( mFgColor ); @@ -303,13 +303,13 @@ void KopeteRichTextEditPart::readConfig() KConfig *config = KGlobal::config(); config->setGroup("RichTextEditor"); - QColor tmpColor = KGlobalSettings::textColor(); + TQColor tmpColor = KGlobalSettings::textColor(); setFgColor( config->readColorEntry("FgColor", &tmpColor ) ); tmpColor = KGlobalSettings::baseColor(); setBgColor( config->readColorEntry("BgColor", &tmpColor ) ); - QFont tmpFont = KopetePrefs::prefs()->fontFace(); + TQFont tmpFont = KopetePrefs::prefs()->fontFace(); setFont( config->readFontEntry("Font", &tmpFont ) ); int tmp = KGlobalSettings::generalFont().pixelSize(); @@ -357,12 +357,12 @@ void KopeteRichTextEditPart::writeConfig() void KopeteRichTextEditPart::setFgColor() { - QColor col=editor->color(); + TQColor col=editor->color(); int s = KColorDialog::getColor( col, KGlobalSettings::textColor() , editor ); if(!col.isValid()) col= KGlobalSettings::textColor() ; - if ( s != QDialog::Accepted ) + if ( s != TQDialog::Accepted ) return; setFgColor( col ); @@ -370,17 +370,17 @@ void KopeteRichTextEditPart::setFgColor() writeConfig(); } -void KopeteRichTextEditPart::setFgColor( const QColor &newColor ) +void KopeteRichTextEditPart::setFgColor( const TQColor &newColor ) { mFgColor = newColor; if( !(m_capabilities & Kopete::Protocol::RichColor) ) { - QPalette pal = editor->palette(); - pal.setColor(QPalette::Active, QColorGroup::Text, mFgColor ); - pal.setColor(QPalette::Inactive, QColorGroup::Text, mFgColor ); + TQPalette pal = editor->palette(); + pal.setColor(TQPalette::Active, TQColorGroup::Text, mFgColor ); + pal.setColor(TQPalette::Inactive, TQColorGroup::Text, mFgColor ); - if ( pal == QApplication::palette( editor ) ) + if ( pal == TQApplication::palette( editor ) ) editor->unsetPalette(); else editor->setPalette(pal); @@ -389,16 +389,16 @@ void KopeteRichTextEditPart::setFgColor( const QColor &newColor ) editor->setColor( mFgColor ); } -QColor KopeteRichTextEditPart::fgColor() +TQColor KopeteRichTextEditPart::fgColor() { if( mFgColor == KGlobalSettings::textColor()) - return QColor(); + return TQColor(); return mFgColor; } void KopeteRichTextEditPart::setBgColor() { - QColor col=mBgColor; + TQColor col=mBgColor; int s = KColorDialog::getColor( col, KGlobalSettings::baseColor(), editor ); if(!col.isValid()) @@ -406,7 +406,7 @@ void KopeteRichTextEditPart::setBgColor() col=KGlobalSettings::baseColor(); } - if ( s != QDialog::Accepted ) + if ( s != TQDialog::Accepted ) return; setBgColor( col ); @@ -414,25 +414,25 @@ void KopeteRichTextEditPart::setBgColor() writeConfig(); } -void KopeteRichTextEditPart::setBgColor( const QColor &newColor ) +void KopeteRichTextEditPart::setBgColor( const TQColor &newColor ) { mBgColor = newColor; - QPalette pal = editor->palette(); - pal.setColor(QPalette::Active, QColorGroup::Base, mBgColor ); - pal.setColor(QPalette::Inactive, QColorGroup::Base, mBgColor ); - pal.setColor(QPalette::Disabled, QColorGroup::Base, mBgColor ); + TQPalette pal = editor->palette(); + pal.setColor(TQPalette::Active, TQColorGroup::Base, mBgColor ); + pal.setColor(TQPalette::Inactive, TQColorGroup::Base, mBgColor ); + pal.setColor(TQPalette::Disabled, TQColorGroup::Base, mBgColor ); - if ( pal == QApplication::palette( editor ) ) + if ( pal == TQApplication::palette( editor ) ) editor->unsetPalette(); else editor->setPalette(pal); } -QColor KopeteRichTextEditPart::bgColor() +TQColor KopeteRichTextEditPart::bgColor() { if( mBgColor == KGlobalSettings::baseColor()) - return QColor(); + return TQColor(); return mBgColor; } @@ -453,14 +453,14 @@ void KopeteRichTextEditPart::setFont() writeConfig(); } -void KopeteRichTextEditPart::setFont( const QFont &newFont ) +void KopeteRichTextEditPart::setFont( const TQFont &newFont ) { mFont = newFont; editor->setFont(mFont); updateFont(); } -void KopeteRichTextEditPart::setFont( const QString &newFont ) +void KopeteRichTextEditPart::setFont( const TQString &newFont ) { mFont.setFamily( newFont ); if( m_capabilities & Kopete::Protocol::RichFont) @@ -540,7 +540,7 @@ void KopeteRichTextEditPart::setAlignJustify( bool yes ) writeConfig(); } -QString KopeteRichTextEditPart::text( Qt::TextFormat fmt ) const +TQString KopeteRichTextEditPart::text( Qt::TextFormat fmt ) const { if( fmt == editor->textFormat() || fmt != Qt::PlainText ) return editor->text(); diff --git a/kopete/kopete/chatwindow/krichtexteditpart.h b/kopete/kopete/chatwindow/krichtexteditpart.h index cd32993c..06c4b80d 100644 --- a/kopete/kopete/chatwindow/krichtexteditpart.h +++ b/kopete/kopete/chatwindow/krichtexteditpart.h @@ -5,8 +5,8 @@ #include -#include -#include +#include +#include class KAboutData; class KTextEdit; @@ -16,7 +16,7 @@ class KToggleAction; class KopeteTextEdit; /** - * KParts wrapper for QTextEdit. + * KParts wrapper for TQTextEdit. * * Originally by Richard Moore, rich@kde.org * forked by Jason Keirstead @@ -26,21 +26,21 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart Q_OBJECT public: - KopeteRichTextEditPart( QWidget *wparent, const char *wname, QObject*, const char*, const QStringList& ); - KopeteRichTextEditPart( QWidget *wparent, const char *wname, int capabilities ); + KopeteRichTextEditPart( TQWidget *wparent, const char *wname, TQObject*, const char*, const TQStringList& ); + KopeteRichTextEditPart( TQWidget *wparent, const char *wname, int capabilities ); /** * Returns the current editor widget. */ KTextEdit *widget() const { return (KTextEdit*)editor; } - QString text( Qt::TextFormat = Qt::AutoText ) const; + TQString text( Qt::TextFormat = Qt::AutoText ) const; - QFont font() { return mFont; } + TQFont font() { return mFont; } - QColor fgColor(); + TQColor fgColor(); - QColor bgColor(); + TQColor bgColor(); void clear(); @@ -57,14 +57,14 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart public slots: void setFgColor(); - void setFgColor( const QColor & ); + void setFgColor( const TQColor & ); void setBgColor(); - void setBgColor( const QColor & ); + void setBgColor( const TQColor & ); void setFont(); - void setFont( const QFont & ); - void setFont( const QString & ); + void setFont( const TQFont & ); + void setFont( const TQString & ); void setFontSize( int ); @@ -131,9 +131,9 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart bool m_configWriteLock; - QFont mFont; - QColor mBgColor; - QColor mFgColor; + TQFont mFont; + TQColor mBgColor; + TQColor mFgColor; }; #endif // KRICHTEXTEDITPART_H diff --git a/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp index 26dba26b..31535603 100644 --- a/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp +++ b/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp @@ -20,8 +20,8 @@ #include -#include -#include +#include +#include #include @@ -30,10 +30,10 @@ KUNITTEST_MODULE_REGISTER_TESTER( ChatWindowStyle_Test ); void ChatWindowStyle_Test::allTests() { - testStyle = new ChatWindowStyle(QString(SRCDIR)+QString("/TestStyle")); + testStyle = new ChatWindowStyle(TQString(SRCDIR)+TQString("/TestStyle")); // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); testPaths(); testHtml(); @@ -43,8 +43,8 @@ void ChatWindowStyle_Test::allTests() void ChatWindowStyle_Test::testPaths() { - QString expectedStylePath = SRCDIR + QString::fromUtf8("/TestStyle"); - QString expectedBaseHref = expectedStylePath + QString::fromUtf8("/Contents/Resources/"); + TQString expectedStylePath = SRCDIR + TQString::fromUtf8("/TestStyle"); + TQString expectedBaseHref = expectedStylePath + TQString::fromUtf8("/Contents/Resources/"); CHECK(testStyle->getStylePath(), expectedStylePath); CHECK(testStyle->getStyleBaseHref(), expectedBaseHref); @@ -52,7 +52,7 @@ void ChatWindowStyle_Test::testPaths() void ChatWindowStyle_Test::testHtml() { - QString exceptedHeader = QString::fromUtf8( + TQString exceptedHeader = TQString::fromUtf8( "
%chatName%
\n" "
%sourceName%
\n" "
%destinationName%
\n" @@ -61,8 +61,8 @@ void ChatWindowStyle_Test::testHtml() "
%timeOpened%
\n" "
%timeOpened{%H:%M}%
"); // Footer is empty on purpose, this is to test if the file doesn't exist. - QString exceptedFooter; - QString exceptedIncoming = QString::fromUtf8( + TQString exceptedFooter; + TQString exceptedIncoming = TQString::fromUtf8( "Incoming:\n" "
%userIconPath%
\n" "
%senderScreenName%
\n" @@ -72,12 +72,12 @@ void ChatWindowStyle_Test::testHtml() "
%time%
\n" "
%time{%H:%M}%
\n" "
"); - QString exceptedNextIncoming = QString::fromUtf8( + TQString exceptedNextIncoming = TQString::fromUtf8( "Incoming:\n" "
%message%
\n" "
" ); - QString exceptedOutgoing = QString::fromUtf8( + TQString exceptedOutgoing = TQString::fromUtf8( "Outgoing:\n" "
%userIconPath%
\n" "
%senderScreenName%
\n" @@ -87,12 +87,12 @@ void ChatWindowStyle_Test::testHtml() "
%time%
\n" "
%time{%H:%M}%
\n" "
"); - QString exceptedNextOutgoing = QString::fromUtf8( + TQString exceptedNextOutgoing = TQString::fromUtf8( "Outgoing:\n" "
%message%
\n" "
" ); - QString exceptedStatus = QString::fromUtf8( + TQString exceptedStatus = TQString::fromUtf8( "
%message%
\n" "
%time%
\n" "
%time{%H:%M}%
"); @@ -113,10 +113,10 @@ void ChatWindowStyle_Test::testAction() void ChatWindowStyle_Test::testVariants() { - QString expectedNameResult("Variant1;Variant2"); - QString expectedPathResult("Variants/Variant1.css;Variants/Variant2.css"); - QStringList variantNameList; - QStringList variantPathList; + TQString expectedNameResult("Variant1;Variant2"); + TQString expectedPathResult("Variants/Variant1.css;Variants/Variant2.css"); + TQStringList variantNameList; + TQStringList variantPathList; ChatWindowStyle::StyleVariants variantList; ChatWindowStyle::StyleVariants::ConstIterator it; variantList = testStyle->getVariants(); diff --git a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp index af0f6b81..9fe66c06 100644 --- a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp +++ b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp @@ -21,10 +21,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // KDE includes #include @@ -53,7 +53,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( ChatWindowStyleRendering_Test ); class FakeContact : public Kopete::Contact { public: - FakeContact (Kopete::Account *account, const QString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} + FakeContact (Kopete::Account *account, const TQString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) { return 0L; } virtual void slotUserInfo() {}; }; @@ -61,22 +61,22 @@ public: class FakeProtocol : public Kopete::Protocol { public: -FakeProtocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) +FakeProtocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) { } -Account* createNewAccount( const QString &/*accountId*/ ) +Account* createNewAccount( const TQString &/*accountId*/ ) { return 0L; } -AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/) +AddContactPage* createAddContactWidget( TQWidget */*parent*/, Kopete::Account */*account*/) { return 0L; } -KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */) +KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, TQWidget */*parent */) { return 0L; } @@ -86,7 +86,7 @@ KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, class FakeAccount : public Kopete::Account { public: -FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name) +FakeAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { } @@ -96,7 +96,7 @@ FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name } -bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ) +bool createContact( const TQString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ) { return true; } @@ -111,7 +111,7 @@ void disconnect() // do nothing } -void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const QString &/*reason*/) +void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const TQString &/*reason*/) { // do nothing } @@ -122,8 +122,8 @@ class ChatWindowStyleRendering_Test::Private public: Private() { - protocol = new FakeProtocol( new KInstance(QCString("test-kopete-message")), 0L, "test-kopete-message"); - account = new FakeAccount(protocol, QString("testaccount"), 0); + protocol = new FakeProtocol( new KInstance(TQCString("test-kopete-message")), 0L, "test-kopete-message"); + account = new FakeAccount(protocol, TQString("testaccount"), 0); // Create fake meta/contacts myselfMetaContact = new Kopete::MetaContact(); @@ -144,7 +144,7 @@ public: fakeChatSession->setDisplayName("Test Session"); // Create testStyle - testStyle = new ChatWindowStyle(QString(SRCDIR)+QString("/TestStyle")); + testStyle = new ChatWindowStyle(TQString(SRCDIR)+TQString("/TestStyle")); } ~Private() { @@ -163,7 +163,7 @@ public: Kopete::ChatSession *fakeChatSession; ChatWindowStyle *testStyle; - QString resultHTML; + TQString resultHTML; }; @@ -181,7 +181,7 @@ ChatWindowStyleRendering_Test::~ChatWindowStyleRendering_Test() void ChatWindowStyleRendering_Test::allTests() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); KApplication::disableAutoDcopRegistration(); //KCmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0); @@ -197,7 +197,7 @@ void ChatWindowStyleRendering_Test::allTests() void ChatWindowStyleRendering_Test::testHeaderRendering() { - QString expectedHtml = QString( + TQString expectedHtml = TQString( "
Test Session
\n" "
Bob
\n" "
Audrey
\n" @@ -205,11 +205,11 @@ void ChatWindowStyleRendering_Test::testHeaderRendering() "
Outgoing/buddy_icon.png
\n" "
%1
\n" "
%2
" - ).arg(KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, true ) ) - .arg(QDateTime::currentDateTime().toString("hh:mm")); + ).arg(KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) ) + .arg(TQDateTime::currentDateTime().toString("hh:mm")); - QString headerHtml = d->testStyle->getHeaderHtml(); - QString resultHtml; + TQString headerHtml = d->testStyle->getHeaderHtml(); + TQString resultHtml; resultHtml = chatPart->formatStyleKeywords(headerHtml); @@ -220,7 +220,7 @@ void ChatWindowStyleRendering_Test::testHeaderRendering() void ChatWindowStyleRendering_Test::testMessageRendering() { - QString expectedIncomingHtml = QString( + TQString expectedIncomingHtml = TQString( "Incoming:\n" "
Incoming/buddy_icon.png
\n" "\n" @@ -230,9 +230,9 @@ void ChatWindowStyleRendering_Test::testMessageRendering() "
%1
\n" "
%2
\n" "
" - ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); - QString expectedOutgoingHtml = QString( + TQString expectedOutgoingHtml = TQString( "Outgoing:\n" "
Outgoing/buddy_icon.png
\n" "\n" @@ -242,14 +242,14 @@ void ChatWindowStyleRendering_Test::testMessageRendering() "
%1
\n" "
%2
\n" "
" - ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); - QString tempHtml; - QString resultHtml; + TQString tempHtml; + TQString resultHtml; - Kopete::Message msgIn(d->other, d->myself, QString::fromUtf8("Test"), Kopete::Message::Inbound ); - Kopete::Message msgOut(d->myself, d->other, QString::fromUtf8("Hello there"), Kopete::Message::Outbound); + Kopete::Message msgIn(d->other, d->myself, TQString::fromUtf8("Test"), Kopete::Message::Inbound ); + Kopete::Message msgOut(d->myself, d->other, TQString::fromUtf8("Hello there"), Kopete::Message::Outbound); tempHtml = d->testStyle->getIncomingHtml(); resultHtml = chatPart->formatStyleKeywords(tempHtml, msgIn); @@ -268,16 +268,16 @@ void ChatWindowStyleRendering_Test::testMessageRendering() void ChatWindowStyleRendering_Test::testStatusRendering() { - QString expectedStatusHtml = QString( + TQString expectedStatusHtml = TQString( "
A contact went offline.
\n" "
%1
\n" "
%2
" - ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); - QString statusHtml = d->testStyle->getStatusHtml(); - QString resultHtml; + TQString statusHtml = d->testStyle->getStatusHtml(); + TQString resultHtml; - Kopete::Message msgStatus(0,0, QString::fromUtf8("A contact went offline."), Kopete::Message::Internal); + Kopete::Message msgStatus(0,0, TQString::fromUtf8("A contact went offline."), Kopete::Message::Internal); resultHtml = chatPart->formatStyleKeywords(statusHtml, msgStatus); CHECK(resultHtml, expectedStatusHtml); @@ -285,17 +285,17 @@ void ChatWindowStyleRendering_Test::testStatusRendering() void ChatWindowStyleRendering_Test::testFullRendering() { - QString expectedFullHtml; - QString resultHtml; - - Kopete::Message msgIn1(d->myself, d->other, QString("Hello there !"), Kopete::Message::Inbound); - Kopete::Message msgIn2(d->myself, d->other, QString("How are you doing ?"), Kopete::Message::Inbound); - Kopete::Message msgOut1(d->other, d->myself, QString("Fine and you ?"), Kopete::Message::Outbound); - Kopete::Message msgStatus1(d->myself,d->other, QString("You are now marked as away."), Kopete::Message::Internal); - Kopete::Message msgStatus2(d->myself,d->other, QString("You are now marked as online."), Kopete::Message::Internal); - Kopete::Message msgIn3(d->myself, d->other, QString("Well, doing some tests."), Kopete::Message::Internal); - Kopete::Message msgOut2(d->other, d->myself, QString("All your bases are belong to us."), Kopete::Message::Outbound); - Kopete::Message msgOut3(d->other, d->myself, QString("You are on the way to destruction"), Kopete::Message::Outbound); + TQString expectedFullHtml; + TQString resultHtml; + + Kopete::Message msgIn1(d->myself, d->other, TQString("Hello there !"), Kopete::Message::Inbound); + Kopete::Message msgIn2(d->myself, d->other, TQString("How are you doing ?"), Kopete::Message::Inbound); + Kopete::Message msgOut1(d->other, d->myself, TQString("Fine and you ?"), Kopete::Message::Outbound); + Kopete::Message msgStatus1(d->myself,d->other, TQString("You are now marked as away."), Kopete::Message::Internal); + Kopete::Message msgStatus2(d->myself,d->other, TQString("You are now marked as online."), Kopete::Message::Internal); + Kopete::Message msgIn3(d->myself, d->other, TQString("Well, doing some tests."), Kopete::Message::Internal); + Kopete::Message msgOut2(d->other, d->myself, TQString("All your bases are belong to us."), Kopete::Message::Outbound); + Kopete::Message msgOut3(d->other, d->myself, TQString("You are on the way to destruction"), Kopete::Message::Outbound); // Change style on the fly in ChatMessagePart so this test would run chatPart->setStyle(d->testStyle); @@ -313,11 +313,11 @@ void ChatWindowStyleRendering_Test::testFullRendering() resultHtml = chatPart->htmlDocument().toHTML(); // Read the expected(sample) HTML from file. - QFile sampleHtml(QString(SRCDIR)+"sample.html"); + TQFile sampleHtml(TQString(SRCDIR)+"sample.html"); if(sampleHtml.open(IO_ReadOnly)) { - QTextStream stream(&sampleHtml); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&sampleHtml); + stream.setEncoding(TQTextStream::UnicodeUTF8); expectedFullHtml = stream.read(); sampleHtml.close(); } diff --git a/kopete/kopete/config/accounts/kopeteaccountconfig.cpp b/kopete/kopete/config/accounts/kopeteaccountconfig.cpp index 3d86fb8d..feaa88fd 100644 --- a/kopete/kopete/config/accounts/kopeteaccountconfig.cpp +++ b/kopete/kopete/config/accounts/kopeteaccountconfig.cpp @@ -18,9 +18,9 @@ #include "kopeteaccountconfig.h" -#include -#include -#include +#include +#include +#include #include #include @@ -47,31 +47,31 @@ class KopeteAccountLVI : public KListViewItem private: //need to be guarded because some accounts may be linked (that's the case of jabber transports) - QGuardedPtr m_account; + TQGuardedPtr m_account; }; -typedef KGenericFactory KopeteAccountConfigFactory; +typedef KGenericFactory KopeteAccountConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_accountconfig, KopeteAccountConfigFactory( "kcm_kopete_accountconfig" ) ) -KopeteAccountConfig::KopeteAccountConfig( QWidget *parent, const char * /* name */, const QStringList &args ) +KopeteAccountConfig::KopeteAccountConfig( TQWidget *parent, const char * /* name */, const TQStringList &args ) : KCModule( KopeteAccountConfigFactory::instance(), parent, args ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); m_view = new KopeteAccountConfigBase( this, "KopeteAccountConfig::m_view" ); m_view->mButtonUp->setIconSet( SmallIconSet( "up" ) ); m_view->mButtonDown->setIconSet( SmallIconSet( "down" ) ); - connect( m_view->mButtonNew, SIGNAL( clicked() ), this, SLOT( slotAddAccount() ) ); - connect( m_view->mButtonEdit, SIGNAL( clicked() ), this, SLOT( slotEditAccount() ) ); - connect( m_view->mButtonRemove, SIGNAL( clicked() ), this, SLOT( slotRemoveAccount() ) ); - connect( m_view->mButtonUp, SIGNAL( clicked() ), this, SLOT( slotAccountUp() ) ); - connect( m_view->mButtonDown, SIGNAL( clicked() ), this, SLOT( slotAccountDown() ) ); - connect( m_view->mAccountList, SIGNAL( selectionChanged() ), this, SLOT( slotItemSelected() ) ); - connect( m_view->mAccountList, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( slotEditAccount() ) ); - connect( m_view->mUseColor, SIGNAL( toggled( bool ) ), this, SLOT( slotColorChanged() ) ); - connect( m_view->mColorButton, SIGNAL( changed( const QColor & ) ), this, SLOT( slotColorChanged() ) ); + connect( m_view->mButtonNew, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddAccount() ) ); + connect( m_view->mButtonEdit, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEditAccount() ) ); + connect( m_view->mButtonRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveAccount() ) ); + connect( m_view->mButtonUp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAccountUp() ) ); + connect( m_view->mButtonDown, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAccountDown() ) ); + connect( m_view->mAccountList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotItemSelected() ) ); + connect( m_view->mAccountList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), this, TQT_SLOT( slotEditAccount() ) ); + connect( m_view->mUseColor, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotColorChanged() ) ); + connect( m_view->mColorButton, TQT_SIGNAL( changed( const TQColor & ) ), this, TQT_SLOT( slotColorChanged() ) ); m_view->mAccountList->setSorting(-1); @@ -92,7 +92,7 @@ void KopeteAccountConfig::save() i = static_cast( i->nextSibling() ); } - QMap::Iterator it; + TQMap::Iterator it; for(it=m_newColors.begin() ; it != m_newColors.end() ; ++it) it.key()->setColor(it.data()); m_newColors.clear(); @@ -108,7 +108,7 @@ void KopeteAccountConfig::load() m_view->mAccountList->clear(); - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for ( Kopete::Account *i = accounts.first() ; i; i = accounts.next() ) { // Insert the item after the previous one @@ -136,7 +136,7 @@ void KopeteAccountConfig::slotItemSelected() m_view->mButtonDown->setEnabled( itemSelected->itemBelow() ); Kopete::Account *account = itemSelected->account(); - QColor color= m_newColors.contains(account) ? m_newColors[account] : account->color(); + TQColor color= m_newColors.contains(account) ? m_newColors[account] : account->color(); m_view->mUseColor->setEnabled( true ); m_view->mUseColor->setChecked( color.isValid() ); m_view->mColorButton->setColor( color ); @@ -181,7 +181,7 @@ void KopeteAccountConfig::slotAccountDown() void KopeteAccountConfig::slotAddAccount() { AddAccountWizard *m_addwizard = new AddAccountWizard( this, "addAccountWizard", true ); - connect( m_addwizard, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotAddWizardDone() ) ); + connect( m_addwizard, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotAddWizardDone() ) ); m_addwizard->show(); } @@ -204,15 +204,15 @@ void KopeteAccountConfig::slotEditAccount() // FIXME: Why the #### is EditAccountWidget not a QWidget?!? This sideways casting // is braindead and error-prone. Looking at MSN the only reason I can see is // because it allows direct subclassing of designer widgets. But what is - // wrong with embedding the designer widget in an empty QWidget instead? + // wrong with embedding the designer widget in an empty TQWidget instead? // Also, if this REALLY has to be a pure class and not a widget, then the // class should at least be renamed to EditAccountIface instead - Martijn - QWidget *w = dynamic_cast( m_accountWidget ); + TQWidget *w = dynamic_cast( m_accountWidget ); if ( !w ) return; editDialog->setMainWidget( w ); - if ( editDialog->exec() == QDialog::Accepted ) + if ( editDialog->exec() == TQDialog::Accepted ) { if( m_accountWidget->validateData() ) m_accountWidget->apply(); @@ -263,7 +263,7 @@ void KopeteAccountConfig::slotColorChanged() } else if(!m_view->mUseColor->isChecked()) { //the user disabled account coloring, but it was activated before - m_newColors[account]=QColor(); + m_newColors[account]=TQColor(); emit changed(true); return; } diff --git a/kopete/kopete/config/accounts/kopeteaccountconfig.h b/kopete/kopete/config/accounts/kopeteaccountconfig.h index 9aec2a60..cfaf1064 100644 --- a/kopete/kopete/config/accounts/kopeteaccountconfig.h +++ b/kopete/kopete/config/accounts/kopeteaccountconfig.h @@ -17,8 +17,8 @@ #define __ACCOUNTCONFIG_H #include -#include -#include +#include +#include namespace Kopete { @@ -35,7 +35,7 @@ class KopeteAccountConfig : public KCModule Q_OBJECT public: - KopeteAccountConfig(QWidget *parent, const char *name, const QStringList &args ); + KopeteAccountConfig(TQWidget *parent, const char *name, const TQStringList &args ); public slots: virtual void save(); @@ -43,7 +43,7 @@ public slots: private: KopeteAccountConfigBase *m_view; - QMap m_newColors; + TQMap m_newColors; bool m_protected; private slots: diff --git a/kopete/kopete/config/appearance/appearanceconfig.cpp b/kopete/kopete/config/appearance/appearanceconfig.cpp index d83b0801..2f7a5eaf 100644 --- a/kopete/kopete/config/appearance/appearanceconfig.cpp +++ b/kopete/kopete/config/appearance/appearanceconfig.cpp @@ -29,13 +29,13 @@ #include "tooltipeditdialog.h" #include "emoticonseditdialog.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -84,9 +84,9 @@ #include "kopeteemoticons.h" #include "kopeteglobal.h" -#include +#include -typedef KGenericFactory KopeteAppearanceConfigFactory; +typedef KGenericFactory KopeteAppearanceConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_appearanceconfig, KopeteAppearanceConfigFactory( "kcm_kopete_appearanceconfig" ) ) class FakeProtocol; @@ -102,7 +102,7 @@ public: styleChanged(false) {} - QTabWidget *mAppearanceTabCtl; + TQTabWidget *mAppearanceTabCtl; ChatMessagePart *preview; AppearanceConfig_Emoticons *mPrfsEmoticons; @@ -111,7 +111,7 @@ public: AppearanceConfig_ContactList *mPrfsContactList; // value is the style path - QMap styleItemMap; + TQMap styleItemMap; ChatWindowStyle::StyleVariants currentVariantMap; ChatWindowStyle *currentStyle; bool loading; @@ -130,16 +130,16 @@ public: class KopeteStyleNewStuff : public KNewStuff { public: - KopeteStyleNewStuff(const QString &type, QWidget *parentWidget = 0) + KopeteStyleNewStuff(const TQString &type, TQWidget *parentWidget = 0) : KNewStuff( type, parentWidget) {} - bool createUploadFile(const QString &) + bool createUploadFile(const TQString &) { return false; } - bool install(const QString &styleFilename) + bool install(const TQString &styleFilename) { int styleInstallReturn = 0; styleInstallReturn = ChatWindowStyleManager::self()->installStyle( styleFilename ); @@ -179,59 +179,59 @@ public: }; // TODO: Someday, this configuration dialog must(not should) use KConfigXT -AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const QStringList &args ) +AppearanceConfig::AppearanceConfig(TQWidget *parent, const char* /*name*/, const TQStringList &args ) : KCModule( KopeteAppearanceConfigFactory::instance(), parent, args ) { d = new Private; - (new QVBoxLayout(this))->setAutoAdd(true); - d->mAppearanceTabCtl = new QTabWidget(this, "mAppearanceTabCtl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + d->mAppearanceTabCtl = new TQTabWidget(this, "mAppearanceTabCtl"); KConfig *config = KGlobal::config(); config->setGroup( "ChatWindowSettings" ); // "Emoticons" TAB ========================================================== d->mPrfsEmoticons = new AppearanceConfig_Emoticons(d->mAppearanceTabCtl); - connect(d->mPrfsEmoticons->chkUseEmoticons, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsEmoticons->chkRequireSpaces, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsEmoticons->icon_theme_list, SIGNAL(selectionChanged()), - this, SLOT(slotSelectedEmoticonsThemeChanged())); - connect(d->mPrfsEmoticons->btnInstallTheme, SIGNAL(clicked()), - this, SLOT(installEmoticonTheme())); - - connect(d->mPrfsEmoticons->btnGetThemes, SIGNAL(clicked()), - this, SLOT(slotGetEmoticonThemes())); - connect(d->mPrfsEmoticons->btnRemoveTheme, SIGNAL(clicked()), - this, SLOT(removeSelectedEmoticonTheme())); - connect(d->mPrfsEmoticons->btnEditThemes, SIGNAL(clicked()), - this, SLOT(editSelectedEmoticonTheme())); + connect(d->mPrfsEmoticons->chkUseEmoticons, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsEmoticons->chkRequireSpaces, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsEmoticons->icon_theme_list, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSelectedEmoticonsThemeChanged())); + connect(d->mPrfsEmoticons->btnInstallTheme, TQT_SIGNAL(clicked()), + this, TQT_SLOT(installEmoticonTheme())); + + connect(d->mPrfsEmoticons->btnGetThemes, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotGetEmoticonThemes())); + connect(d->mPrfsEmoticons->btnRemoveTheme, TQT_SIGNAL(clicked()), + this, TQT_SLOT(removeSelectedEmoticonTheme())); + connect(d->mPrfsEmoticons->btnEditThemes, TQT_SIGNAL(clicked()), + this, TQT_SLOT(editSelectedEmoticonTheme())); d->mAppearanceTabCtl->addTab(d->mPrfsEmoticons, i18n("&Emoticons")); // "Chat Window" TAB ======================================================== d->mPrfsChatWindow = new AppearanceConfig_ChatWindow(d->mAppearanceTabCtl); - connect(d->mPrfsChatWindow->styleList, SIGNAL(selectionChanged(QListBoxItem *)), - this, SLOT(slotChatStyleSelected())); - connect(d->mPrfsChatWindow->variantList, SIGNAL(activated(const QString&)), - this, SLOT(slotChatStyleVariantSelected(const QString &))); - connect(d->mPrfsChatWindow->deleteButton, SIGNAL(clicked()), - this, SLOT(slotDeleteChatStyle())); - connect(d->mPrfsChatWindow->installButton, SIGNAL(clicked()), - this, SLOT(slotInstallChatStyle())); - connect(d->mPrfsChatWindow->btnGetStyles, SIGNAL(clicked()), - this, SLOT(slotGetChatStyles())); - connect(d->mPrfsChatWindow->groupConsecutiveMessages, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); + connect(d->mPrfsChatWindow->styleList, TQT_SIGNAL(selectionChanged(TQListBoxItem *)), + this, TQT_SLOT(slotChatStyleSelected())); + connect(d->mPrfsChatWindow->variantList, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChatStyleVariantSelected(const TQString &))); + connect(d->mPrfsChatWindow->deleteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteChatStyle())); + connect(d->mPrfsChatWindow->installButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotInstallChatStyle())); + connect(d->mPrfsChatWindow->btnGetStyles, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotGetChatStyles())); + connect(d->mPrfsChatWindow->groupConsecutiveMessages, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); // Show the available styles when the Manager has finish to load the styles. - connect(ChatWindowStyleManager::self(), SIGNAL(loadStylesFinished()), this, SLOT(slotLoadChatStyles())); + connect(ChatWindowStyleManager::self(), TQT_SIGNAL(loadStylesFinished()), this, TQT_SLOT(slotLoadChatStyles())); - d->mPrfsChatWindow->htmlFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + d->mPrfsChatWindow->htmlFrame->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); // Create the fake Chat Session createPreviewChatSession(); - QVBoxLayout *l = new QVBoxLayout(d->mPrfsChatWindow->htmlFrame); + TQVBoxLayout *l = new TQVBoxLayout(d->mPrfsChatWindow->htmlFrame); d->preview = new ChatMessagePart(d->previewChatSession, d->mPrfsChatWindow->htmlFrame, "preview"); d->preview->setJScriptEnabled(false); d->preview->setJavaEnabled(false); @@ -242,7 +242,7 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const htmlWidget->setMarginHeight(4); htmlWidget->setFocusPolicy(NoFocus); htmlWidget->setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); l->addWidget(htmlWidget); // Add the preview message to the ChatMessagePart createPreviewMessages(); @@ -251,28 +251,28 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const // "Contact List" TAB ======================================================= d->mPrfsContactList = new AppearanceConfig_ContactList(d->mAppearanceTabCtl); - connect(d->mPrfsContactList->mTreeContactList, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mSortByGroup, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mEditTooltips, SIGNAL(clicked()), - this, SLOT(slotEditTooltips())); - connect(d->mPrfsContactList->mIndentContacts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mDisplayMode, SIGNAL(clicked(int)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mIconMode, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAnimateChanges, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mFadeVisibility, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mFoldVisibility, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAutoHide, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAutoHideTimeout, SIGNAL(valueChanged(int)), - this, SLOT(emitChanged())); + connect(d->mPrfsContactList->mTreeContactList, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mSortByGroup, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mEditTooltips, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditTooltips())); + connect(d->mPrfsContactList->mIndentContacts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mDisplayMode, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mIconMode, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAnimateChanges, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mFadeVisibility, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mFoldVisibility, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAutoHide, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAutoHideTimeout, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(emitChanged())); // don't enable the checkbox if XRender is not available #ifdef HAVE_XRENDER @@ -285,37 +285,37 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const // "Colors and Fonts" TAB =================================================== d->mPrfsColors = new AppearanceConfig_Colors(d->mAppearanceTabCtl); - connect(d->mPrfsColors->foregroundColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotHighlightChanged())); - connect(d->mPrfsColors->backgroundColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotHighlightChanged())); - connect(d->mPrfsColors->fontFace, SIGNAL(fontSelected(const QFont &)), - this, SLOT(slotChangeFont())); - connect(d->mPrfsColors->textColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->bgColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->linkColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->mGreyIdleMetaContacts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->idleContactColor, SIGNAL(changed(const QColor &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mUseCustomFonts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mSmallFont, SIGNAL(fontSelected(const QFont &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mNormalFont, SIGNAL(fontSelected(const QFont &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mGroupNameColor, SIGNAL(changed(const QColor &)), - this, SLOT(emitChanged())); - - connect(d->mPrfsColors->mBgOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mFgOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mRtfOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); + connect(d->mPrfsColors->foregroundColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotHighlightChanged())); + connect(d->mPrfsColors->backgroundColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotHighlightChanged())); + connect(d->mPrfsColors->fontFace, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(slotChangeFont())); + connect(d->mPrfsColors->textColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->bgColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->linkColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->mGreyIdleMetaContacts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->idleContactColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mUseCustomFonts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mSmallFont, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mNormalFont, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mGroupNameColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(emitChanged())); + + connect(d->mPrfsColors->mBgOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mFgOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mRtfOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); d->mAppearanceTabCtl->addTab(d->mPrfsColors, i18n("Colors && Fonts")); @@ -331,8 +331,8 @@ AppearanceConfig::~AppearanceConfig() void AppearanceConfig::updateEmoticonsButton(bool _b) { - QString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); - QFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); + TQString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); + TQFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); d->mPrfsEmoticons->btnRemoveTheme->setEnabled( _b && fileInf.isWritable()); d->mPrfsEmoticons->btnGetThemes->setEnabled( false ); } @@ -499,28 +499,28 @@ void AppearanceConfig::updateEmoticonlist() d->mPrfsEmoticons->icon_theme_list->clear(); // Wipe out old list // Get a list of directories in our icon theme dir - QStringList themeDirs = KGlobal::dirs()->findDirs("emoticons", ""); + TQStringList themeDirs = KGlobal::dirs()->findDirs("emoticons", ""); // loop adding themes from all dirs into theme-list for(unsigned int x = 0;x < themeDirs.count();x++) { - QDir themeQDir(themeDirs[x]); - themeQDir.setFilter( QDir::Dirs ); // only scan for subdirs - themeQDir.setSorting( QDir::Name ); // I guess name is as good as any + TQDir themeQDir(themeDirs[x]); + themeQDir.setFilter( TQDir::Dirs ); // only scan for subdirs + themeQDir.setSorting( TQDir::Name ); // I guess name is as good as any for(unsigned int y = 0; y < themeQDir.count(); y++) { - QStringList themes = themeQDir.entryList(QDir::Dirs, QDir::Name); + TQStringList themes = themeQDir.entryList(TQDir::Dirs, TQDir::Name); // We don't care for '.' and '..' if ( themeQDir[y] != "." && themeQDir[y] != ".." ) { // Add ourselves to the list, using our directory name FIXME: use the first emoticon of the theme. - QPixmap previewPixmap = QPixmap(locate("emoticons", themeQDir[y]+"/smile.png")); + TQPixmap previewPixmap = TQPixmap(locate("emoticons", themeQDir[y]+"/smile.png")); d->mPrfsEmoticons->icon_theme_list->insertItem(previewPixmap,themeQDir[y]); } } } // Where is that theme in our big-list-o-themes? - QListBoxItem *item = d->mPrfsEmoticons->icon_theme_list->findItem( p->iconTheme() ); + TQListBoxItem *item = d->mPrfsEmoticons->icon_theme_list->findItem( p->iconTheme() ); if (item) // found it... make it the currently selected theme d->mPrfsEmoticons->icon_theme_list->setCurrentItem( item ); @@ -530,18 +530,18 @@ void AppearanceConfig::updateEmoticonlist() void AppearanceConfig::slotSelectedEmoticonsThemeChanged() { - QString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); - QFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); + TQString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); + TQFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); d->mPrfsEmoticons->btnRemoveTheme->setEnabled( fileInf.isWritable() ); Kopete::Emoticons emoticons( themeName ); - QStringList smileys = emoticons.emoticonAndPicList().keys(); - QString newContentText = ""; + TQStringList smileys = emoticons.emoticonAndPicList().keys(); + TQString newContentText = ""; - for(QStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it ) - newContentText += QString::fromLatin1(" ").arg(*it); + for(TQStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it ) + newContentText += TQString::fromLatin1(" ").arg(*it); - newContentText += QString::fromLatin1(""); + newContentText += TQString::fromLatin1(""); d->mPrfsEmoticons->icon_theme_preview->setText(newContentText); emitChanged(); } @@ -563,7 +563,7 @@ void AppearanceConfig::slotChangeFont() void AppearanceConfig::slotChatStyleSelected() { // Retrieve variant list. - QString stylePath = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; + TQString stylePath = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; d->currentStyle = ChatWindowStyleManager::self()->getStyleFromPool( stylePath ); if(d->currentStyle) @@ -603,7 +603,7 @@ void AppearanceConfig::slotChatStyleSelected() } } -void AppearanceConfig::slotChatStyleVariantSelected(const QString &variantName) +void AppearanceConfig::slotChatStyleVariantSelected(const TQString &variantName) { // kdDebug(14000) << k_funcinfo << variantName << endl; // kdDebug(14000) << k_funcinfo << d->currentVariantMap[variantName] << endl; @@ -615,11 +615,11 @@ void AppearanceConfig::slotChatStyleVariantSelected(const QString &variantName) void AppearanceConfig::slotInstallChatStyle() { - KURL styleToInstall = KFileDialog::getOpenURL( QString::null, QString::fromUtf8("application/x-zip application/x-tgz application/x-tbz"), this, i18n("Choose Chat Window style to install.") ); + KURL styleToInstall = KFileDialog::getOpenURL( TQString::null, TQString::fromUtf8("application/x-zip application/x-tgz application/x-tbz"), this, i18n("Choose Chat Window style to install.") ); if( !styleToInstall.isEmpty() ) { - QString stylePath; + TQString stylePath; if( KIO::NetAccess::download( styleToInstall, stylePath, this ) ) { int styleInstallReturn = 0; @@ -660,14 +660,14 @@ void AppearanceConfig::slotInstallChatStyle() void AppearanceConfig::slotDeleteChatStyle() { - QString styleName = d->mPrfsChatWindow->styleList->selectedItem()->text(); - QString stylePathToDelete = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; + TQString styleName = d->mPrfsChatWindow->styleList->selectedItem()->text(); + TQString stylePathToDelete = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; if( ChatWindowStyleManager::self()->removeStyle(stylePathToDelete) ) { KMessageBox::queuedMessageBox(this, KMessageBox::Information, i18n("It's the deleted style name", "The style %1 was successfully deleted.").arg(styleName)); // Get the first item in the stye List. - QString stylePath = (*d->styleItemMap.begin()); + TQString stylePath = (*d->styleItemMap.begin()); d->currentStyle = ChatWindowStyleManager::self()->getStyleFromPool(stylePath); emitChanged(); } @@ -686,7 +686,7 @@ void AppearanceConfig::slotGetChatStyles() downloadDialog->setType( "kopete/chatstyle" ); // you have to do this by hand when providing your own Engine KNS::ProviderLoader *provider = new KNS::ProviderLoader( this ); - QObject::connect( provider, SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, SLOT( slotProviders (Provider::List *) ) ); + TQObject::connect( provider, TQT_SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, TQT_SLOT( slotProviders (Provider::List *) ) ); provider->load( "kopete/chatstyle", "http://download.kde.org/khotnewstuff/kopetestyles12-providers.xml" ); downloadDialog->exec(); } @@ -696,7 +696,7 @@ void AppearanceConfig::slotGetChatStyles() class FakeContact : public Kopete::Contact { public: - FakeContact (Kopete::Account *account, const QString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} + FakeContact (Kopete::Account *account, const TQString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) { return 0L; } virtual void slotUserInfo() {}; }; @@ -705,29 +705,29 @@ public: class FakeProtocol : public Kopete::Protocol { public: -FakeProtocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name){} -Kopete::Account* createNewAccount( const QString &/*accountId*/ ){return 0L;} -AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/){return 0L;} -KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */){return 0L;} +FakeProtocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name){} +Kopete::Account* createNewAccount( const TQString &/*accountId*/ ){return 0L;} +AddContactPage* createAddContactWidget( TQWidget */*parent*/, Kopete::Account */*account*/){return 0L;} +KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, TQWidget */*parent */){return 0L;} }; // This is for style preview. class FakeAccount : public Kopete::Account { public: -FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name){} +FakeAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name){} ~FakeAccount() {} -bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;} +bool createContact( const TQString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;} void connect( const Kopete::OnlineStatus& /*initialStatus*/){} void disconnect(){} -void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const QString &/*reason*/){} +void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const TQString &/*reason*/){} }; void AppearanceConfig::createPreviewChatSession() { - d->previewProtocol = new FakeProtocol( new KInstance(QCString("kopete-preview-chatwindowstyle")), 0L, "kopete-preview-chatwindowstyle"); - d->previewAccount = new FakeAccount(d->previewProtocol, QString("previewaccount"), 0); + d->previewProtocol = new FakeProtocol( new KInstance(TQCString("kopete-preview-chatwindowstyle")), 0L, "kopete-preview-chatwindowstyle"); + d->previewAccount = new FakeAccount(d->previewProtocol, TQString("previewaccount"), 0); // Create fake meta/contacts d->myselfMetaContact = new Kopete::MetaContact(); @@ -757,11 +757,11 @@ void AppearanceConfig::createPreviewMessages() Kopete::Message msgOut2( d->myself, d->jack, i18n( "Ok, a outgoing consecutive message." ), Kopete::Message::Outbound ); Kopete::Message msgCol( d->jack, d->myself, i18n( "Here is an incoming colored message" ), Kopete::Message::Inbound ); - msgCol.setFg( QColor( "DodgerBlue" ) ); - msgCol.setBg( QColor( "LightSteelBlue" ) ); + msgCol.setFg( TQColor( "DodgerBlue" ) ); + msgCol.setBg( TQColor( "LightSteelBlue" ) ); Kopete::Message msgInt( d->jack, d->myself, i18n( "This is an internal message" ), Kopete::Message::Internal ); Kopete::Message msgAct( d->jack, d->myself, i18n( "performed an action" ), Kopete::Message::Inbound, - Kopete::Message::PlainText, QString::null, Kopete::Message::TypeAction ); + Kopete::Message::PlainText, TQString::null, Kopete::Message::TypeAction ); Kopete::Message msgHigh( d->jack, d->myself, i18n( "This is a highlighted message" ), Kopete::Message::Inbound ); msgHigh.setImportance( Kopete::Message::Highlight ); // This is a UTF-8 string btw. @@ -801,7 +801,7 @@ void AppearanceConfig::emitChanged() void AppearanceConfig::installEmoticonTheme() { - KURL themeURL = KURLRequesterDlg::getURL(QString::null, this, + KURL themeURL = KURLRequesterDlg::getURL(TQString::null, this, i18n("Drag or Type Emoticon Theme URL")); if ( themeURL.isEmpty() ) return; @@ -820,13 +820,13 @@ void AppearanceConfig::installEmoticonTheme() void AppearanceConfig::removeSelectedEmoticonTheme() { - QListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); + TQListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); if(selected==0) return; - QString themeName = selected->text(); + TQString themeName = selected->text(); - QString question=i18n("Are you sure you want to remove the " + TQString question=i18n("Are you sure you want to remove the " "%1 emoticon theme?
" "
" "This will delete the files installed by this theme.
"). @@ -864,18 +864,18 @@ void AppearanceConfig::slotGetEmoticonThemes() void AppearanceConfig::slotEditTooltips() { TooltipEditDialog *dlg = new TooltipEditDialog(this); - connect(dlg, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect(dlg, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); dlg->exec(); delete dlg; } void AppearanceConfig::editSelectedEmoticonTheme() { - QListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); + TQListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); if(selected==0) return; - QString themeName = selected->text(); + TQString themeName = selected->text(); EmoticonsEditDialog *dlg = new EmoticonsEditDialog(this, themeName); dlg->exec(); diff --git a/kopete/kopete/config/appearance/appearanceconfig.h b/kopete/kopete/config/appearance/appearanceconfig.h index 747117c6..e380542d 100644 --- a/kopete/kopete/config/appearance/appearanceconfig.h +++ b/kopete/kopete/config/appearance/appearanceconfig.h @@ -20,8 +20,8 @@ #define __APPEARANCE_H #include "kcmodule.h" -#include -#include +#include +#include /** * @author Duncan Mac-Vicar P. @@ -34,7 +34,7 @@ class AppearanceConfig : public KCModule friend class KopeteStyleNewStuff; public: - AppearanceConfig( QWidget *parent, const char *name, const QStringList &args ); + AppearanceConfig( TQWidget *parent, const char *name, const TQStringList &args ); ~AppearanceConfig(); virtual void save(); @@ -48,7 +48,7 @@ private slots: void slotInstallChatStyle(); void slotDeleteChatStyle(); void slotChatStyleSelected(); - void slotChatStyleVariantSelected(const QString &variantName); + void slotChatStyleVariantSelected(const TQString &variantName); void slotEditTooltips(); void emitChanged(); void installEmoticonTheme(); diff --git a/kopete/kopete/config/appearance/emoticonseditdialog.cpp b/kopete/kopete/config/appearance/emoticonseditdialog.cpp index 21e12231..af62e4ff 100644 --- a/kopete/kopete/config/appearance/emoticonseditdialog.cpp +++ b/kopete/kopete/config/appearance/emoticonseditdialog.cpp @@ -25,19 +25,19 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include -EditDialog::EditDialog(QWidget *parent, const char* name) +EditDialog::EditDialog(TQWidget *parent, const char* name) : KDialogBase(parent, name, true, i18n(name), Ok|Cancel, Ok, true) { setupDlg(); } -EditDialog::EditDialog(QWidget *parent, const char* name, QPixmap emot, QString text, QString file) +EditDialog::EditDialog(TQWidget *parent, const char* name, TQPixmap emot, TQString text, TQString file) : KDialogBase(parent, name, true, i18n(name), Ok|Cancel, Ok, true) { setupDlg(); @@ -48,19 +48,19 @@ EditDialog::EditDialog(QWidget *parent, const char* name, QPixmap emot, QString void EditDialog::setupDlg() { - wdg = new QWidget(this); - QVBoxLayout *vl = new QVBoxLayout(wdg, 11, 6); - QHBoxLayout *hb = new QHBoxLayout(wdg, 0, 6); + wdg = new TQWidget(this); + TQVBoxLayout *vl = new TQVBoxLayout(wdg, 11, 6); + TQHBoxLayout *hb = new TQHBoxLayout(wdg, 0, 6); leText = new KLineEdit(wdg); btnIcon = new KPushButton(wdg); - btnIcon->setFixedSize(QSize(64, 64)); + btnIcon->setFixedSize(TQSize(64, 64)); - vl->addWidget(new QLabel(i18n("Insert the string for the emoticon\nseparated by space if you want multiple strings"), wdg)); + vl->addWidget(new TQLabel(i18n("Insert the string for the emoticon\nseparated by space if you want multiple strings"), wdg)); hb->addWidget(btnIcon); hb->addWidget(leText); vl->addLayout(hb); setMainWidget(wdg); - connect(btnIcon, SIGNAL(clicked()), this, SLOT(btnIconClicked())); + connect(btnIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(btnIconClicked())); } void EditDialog::btnIconClicked() @@ -75,17 +75,17 @@ void EditDialog::btnIconClicked() if(emoticon.isEmpty()) return; - btnIcon->setPixmap(QPixmap(emoticon)); + btnIcon->setPixmap(TQPixmap(emoticon)); } -EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const char* name) +EmoticonsEditDialog::EmoticonsEditDialog(TQWidget *parent, TQString theme, const char* name) : KDialogBase(parent, name, true, i18n("Emoticons Editor"), Ok|Cancel, Ok, true) { themeName = theme; mMainWidget = new EmoticonsEditWidget(this, "EmoticonsEditDialog::mMainWidget"); setMainWidget(mMainWidget); - resize(QSize(450, 350)); + resize(TQSize(450, 350)); mMainWidget->btnAdd->setGuiItem(KStdGuiItem::add()); mMainWidget->btnEdit->setText(i18n("Edit...")); mMainWidget->btnRemove->setGuiItem(KStdGuiItem::remove()); @@ -96,22 +96,22 @@ EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const c mMainWidget->klvEmoticons->addColumn("File", 0); mMainWidget->klvEmoticons->header()->hide(); Kopete::Emoticons emoticons( theme ); - QMap smileys = emoticons.emoticonAndPicList(); + TQMap smileys = emoticons.emoticonAndPicList(); - for(QMap::Iterator it = smileys.begin(); it != smileys.end(); ++it ) + for(TQMap::Iterator it = smileys.begin(); it != smileys.end(); ++it ) { KListViewItem *itm = new KListViewItem(mMainWidget->klvEmoticons); - itm->setPixmap(0, QPixmap(it.key())); - itm->setText(2, QFileInfo(it.key()).baseName()); - QString text = *it.data().at(0); + itm->setPixmap(0, TQPixmap(it.key())); + itm->setText(2, TQFileInfo(it.key()).baseName()); + TQString text = *it.data().at(0); for(uint i = 1; i < it.data().size(); i++) { text += " " + *it.data().at(i); } itm->setText(1, text); } - QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); + TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); if( !fp->exists() ) { kdWarning() << "EmoticonsEditDialog::EmoticonsEditDialog() " << fp->name() << " doesn't exist!" << endl; @@ -131,18 +131,18 @@ EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const c fp->close(); - mMainWidget->klvEmoticons->setColumnWidth(0, QListView::Maximum); - mMainWidget->klvEmoticons->setColumnWidth(1, QListView::Maximum); + mMainWidget->klvEmoticons->setColumnWidth(0, TQListView::Maximum); + mMainWidget->klvEmoticons->setColumnWidth(1, TQListView::Maximum); - connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked())); - connect(mMainWidget->btnAdd, SIGNAL(clicked()), this, SLOT(slotAddClicked())); - connect(mMainWidget->btnEdit, SIGNAL(clicked()), this, SLOT(slotEditClicked())); - connect(mMainWidget->btnRemove, SIGNAL(clicked()), this, SLOT(slotRemoveClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOkClicked())); + connect(mMainWidget->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddClicked())); + connect(mMainWidget->btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditClicked())); + connect(mMainWidget->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveClicked())); } void EmoticonsEditDialog::slotOkClicked() { - QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); + TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); if( !fp->exists() ) { kdWarning() << "EmoticonsEditDialog::slotOkClicked() " << fp->name() << " doesn't exist!" << endl; @@ -154,7 +154,7 @@ void EmoticonsEditDialog::slotOkClicked() return; } - QTextStream emoStream(fp); + TQTextStream emoStream(fp); emoStream << themeXml.toString(4); fp->close(); } @@ -163,7 +163,7 @@ void EmoticonsEditDialog::slotAddClicked() { EditDialog *dlg = new EditDialog(this, "Add emoticon"); - if(dlg->exec() == QDialog::Rejected) + if(dlg->exec() == TQDialog::Rejected) return; if(dlg->getText().isEmpty() || !dlg->getEmoticon()) @@ -182,29 +182,29 @@ void EmoticonsEditDialog::slotEditClicked() dlg = new EditDialog(this, "Edit emoticon", *mMainWidget->klvEmoticons->selectedItem()->pixmap(0), mMainWidget->klvEmoticons->selectedItem()->text(1), mMainWidget->klvEmoticons->selectedItem()->text(2)); - if(dlg->exec() == QDialog::Rejected) + if(dlg->exec() == TQDialog::Rejected) return; if(dlg->getText().isEmpty() || !dlg->getEmoticon()) return; bool copy; - QString emo = dlg->getEmoticon(); + TQString emo = dlg->getEmoticon(); if(mMainWidget->klvEmoticons->selectedItem()->text(2) != dlg->getEmoticon()) { copy = true; } else { copy = false; - QString f = mMainWidget->klvEmoticons->selectedItem()->text(2); + TQString f = mMainWidget->klvEmoticons->selectedItem()->text(2); KStandardDirs *dir = KGlobal::dirs(); - emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f ); + emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f ); if( emo.isNull() ) - emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".mng" ) ); + emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".mng" ) ); if ( emo.isNull() ) - emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".png" ) ); + emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".png" ) ); if ( emo.isNull() ) - emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".gif" ) ); + emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".gif" ) ); if ( emo.isNull() ) return; } @@ -223,44 +223,44 @@ void EmoticonsEditDialog::slotRemoveClicked() removeEmoticon(mMainWidget->klvEmoticons->selectedItem()->text(2)); } -void EmoticonsEditDialog::addEmoticon(QString emo, QString text, bool copy) +void EmoticonsEditDialog::addEmoticon(TQString emo, TQString text, bool copy) { if(copy) KIO::copy(emo, KGlobal::dirs()->saveLocation( "emoticons", themeName, false )); KListViewItem *itm = new KListViewItem(mMainWidget->klvEmoticons); - itm->setPixmap(0, QPixmap(emo)); + itm->setPixmap(0, TQPixmap(emo)); itm->setText(1, text); - itm->setText(2, QFileInfo(emo).baseName()); + itm->setText(2, TQFileInfo(emo).baseName()); - QDomNode lc = themeXml.lastChild(); + TQDomNode lc = themeXml.lastChild(); if(lc.isNull()) return; - QDomElement emoticon = themeXml.createElement("emoticon"); - emoticon.setAttribute("file", QFileInfo(emo).baseName()); + TQDomElement emoticon = themeXml.createElement("emoticon"); + emoticon.setAttribute("file", TQFileInfo(emo).baseName()); lc.appendChild(emoticon); - QStringList splitted = QStringList::split(" ", text); - QStringList::const_iterator constIterator; + TQStringList splitted = TQStringList::split(" ", text); + TQStringList::const_iterator constIterator; for(constIterator = splitted.begin(); constIterator != splitted.end(); constIterator++) { - QDomElement emotext = themeXml.createElement("string"); - QDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace()); + TQDomElement emotext = themeXml.createElement("string"); + TQDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace()); emotext.appendChild(txt); emoticon.appendChild(emotext); } } -void EmoticonsEditDialog::removeEmoticon(QString emo) +void EmoticonsEditDialog::removeEmoticon(TQString emo) { - QDomNode lc = themeXml.lastChild(); + TQDomNode lc = themeXml.lastChild(); if(lc.isNull()) return; - QDomNodeList nl = lc.childNodes(); + TQDomNodeList nl = lc.childNodes(); for(uint i = 0; i < nl.length(); i++) { - QDomElement de = nl.item(i).toElement(); + TQDomElement de = nl.item(i).toElement(); if(!de.isNull() && de.tagName() == "emoticon" && de.attribute("file") == emo) { lc.removeChild(de); delete mMainWidget->klvEmoticons->selectedItem(); diff --git a/kopete/kopete/config/appearance/emoticonseditdialog.h b/kopete/kopete/config/appearance/emoticonseditdialog.h index 4bbaccda..fe5b8426 100644 --- a/kopete/kopete/config/appearance/emoticonseditdialog.h +++ b/kopete/kopete/config/appearance/emoticonseditdialog.h @@ -17,12 +17,12 @@ #define EMOTICONSEDITDIALOG_H #include -#include +#include #include #include #include -#include -#include +#include +#include class EmoticonsEditWidget; @@ -31,18 +31,18 @@ class EditDialog : public KDialogBase Q_OBJECT public: - EditDialog(QWidget *parent, const char* name); - EditDialog(QWidget *parent, const char* name, QPixmap emot, QString text, QString file); - const QString getText() { return leText->text(); }; - const QString getEmoticon() { return emoticon; }; + EditDialog(TQWidget *parent, const char* name); + EditDialog(TQWidget *parent, const char* name, TQPixmap emot, TQString text, TQString file); + const TQString getText() { return leText->text(); }; + const TQString getEmoticon() { return emoticon; }; private slots: void btnIconClicked(); private: void setupDlg(); - QWidget *wdg; + TQWidget *wdg; KLineEdit *leText; KPushButton *btnIcon; - QString emoticon; + TQString emoticon; }; class EmoticonsEditDialog : public KDialogBase @@ -50,8 +50,8 @@ class EmoticonsEditDialog : public KDialogBase Q_OBJECT public: - EmoticonsEditDialog(QWidget *parent=0, QString theme = QString::null, const char* name="EmoticonsEditDialog"); - void addEmoticon(QString emo, QString text, bool copy); + EmoticonsEditDialog(TQWidget *parent=0, TQString theme = TQString::null, const char* name="EmoticonsEditDialog"); + void addEmoticon(TQString emo, TQString text, bool copy); private slots: void slotOkClicked(); @@ -60,11 +60,11 @@ class EmoticonsEditDialog : public KDialogBase void slotRemoveClicked(); private: - void removeEmoticon(QString emo); + void removeEmoticon(TQString emo); EmoticonsEditWidget *mMainWidget; - QString themeName; + TQString themeName; EditDialog *dlg; - QDomDocument themeXml; + TQDomDocument themeXml; }; #endif diff --git a/kopete/kopete/config/appearance/tooltipeditdialog.cpp b/kopete/kopete/config/appearance/tooltipeditdialog.cpp index c8ed8a5d..eef1ccb0 100644 --- a/kopete/kopete/config/appearance/tooltipeditdialog.cpp +++ b/kopete/kopete/config/appearance/tooltipeditdialog.cpp @@ -21,10 +21,10 @@ #include "kopeteglobal.h" #include "kopeteprefs.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -33,26 +33,26 @@ class TooltipItem : public KListViewItem { public: - TooltipItem(KListView *parent, const QString& label, const QString& propertyName) + TooltipItem(KListView *parent, const TQString& label, const TQString& propertyName) : KListViewItem(parent, label), mPropName(propertyName) { } - TooltipItem(KListView *parent, QListViewItem *item, const QString& label, const QString& propertyName) + TooltipItem(KListView *parent, TQListViewItem *item, const TQString& label, const TQString& propertyName) : KListViewItem(parent, item, label), mPropName(propertyName) { } - QString propertyName() const { return mPropName; } + TQString propertyName() const { return mPropName; } private: - QString mPropName; + TQString mPropName; }; -TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name) +TooltipEditDialog::TooltipEditDialog(TQWidget *parent, const char* name) : KDialogBase(parent, name, true, i18n("Tooltip Editor"), Ok|Cancel, Ok, true) { mMainWidget = new TooltipEditWidget(this, "TooltipEditDialog::mMainWidget"); @@ -64,13 +64,13 @@ TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name) const Kopete::ContactPropertyTmpl::Map propmap( Kopete::Global::Properties::self()->templateMap()); - QStringList usedKeys = KopetePrefs::prefs()->toolTipContents(); + TQStringList usedKeys = KopetePrefs::prefs()->toolTipContents(); - connect(mMainWidget->lstUnusedItems, SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )), this, SLOT(slotAddButton())); - connect(mMainWidget->lstUsedItems, SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )), this, SLOT(slotRemoveButton())); + connect(mMainWidget->lstUnusedItems, TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotAddButton())); + connect(mMainWidget->lstUsedItems, TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotRemoveButton())); // first fill the "used" list - QStringList::Iterator usedIt=usedKeys.end(); + TQStringList::Iterator usedIt=usedKeys.end(); do { usedIt--; @@ -91,45 +91,45 @@ TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name) new TooltipItem(mMainWidget->lstUnusedItems, it.data().label(), it.key()); } - connect(mMainWidget->lstUnusedItems, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotUnusedSelected(QListViewItem *))); - connect(mMainWidget->lstUsedItems, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotUsedSelected(QListViewItem *))); + connect(mMainWidget->lstUnusedItems, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotUnusedSelected(TQListViewItem *))); + connect(mMainWidget->lstUsedItems, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotUsedSelected(TQListViewItem *))); - QIconSet iconSet; + TQIconSet iconSet; iconSet = SmallIconSet("up"); mMainWidget->tbUp->setIconSet(iconSet); mMainWidget->tbUp->setEnabled(false); mMainWidget->tbUp->setAutoRepeat(true); - connect(mMainWidget->tbUp, SIGNAL(clicked()), SLOT(slotUpButton())); + connect(mMainWidget->tbUp, TQT_SIGNAL(clicked()), TQT_SLOT(slotUpButton())); iconSet = SmallIconSet("down"); mMainWidget->tbDown->setIconSet(iconSet); mMainWidget->tbDown->setEnabled(false); mMainWidget->tbDown->setAutoRepeat(true); - connect(mMainWidget->tbDown, SIGNAL(clicked()), SLOT(slotDownButton())); + connect(mMainWidget->tbDown, TQT_SIGNAL(clicked()), TQT_SLOT(slotDownButton())); - iconSet = QApplication::reverseLayout() ? SmallIconSet("back") : SmallIconSet("forward"); + iconSet = TQApplication::reverseLayout() ? SmallIconSet("back") : SmallIconSet("forward"); mMainWidget->tbAdd->setIconSet(iconSet); mMainWidget->tbAdd->setEnabled(false); - connect(mMainWidget->tbAdd, SIGNAL(clicked()), SLOT(slotAddButton())); + connect(mMainWidget->tbAdd, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddButton())); - iconSet = QApplication::reverseLayout() ? SmallIconSet("forward") : SmallIconSet("back"); + iconSet = TQApplication::reverseLayout() ? SmallIconSet("forward") : SmallIconSet("back"); mMainWidget->tbRemove->setIconSet(iconSet); mMainWidget->tbRemove->setEnabled(false); - connect(mMainWidget->tbRemove, SIGNAL(clicked()), SLOT(slotRemoveButton())); + connect(mMainWidget->tbRemove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveButton())); - connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOkClicked())); - resize(QSize(450, 450)); + resize(TQSize(450, 450)); } void TooltipEditDialog::slotOkClicked() { - QStringList oldList = KopetePrefs::prefs()->toolTipContents(); - QStringList newList; - QListViewItemIterator it(mMainWidget->lstUsedItems); - QString keyname; + TQStringList oldList = KopetePrefs::prefs()->toolTipContents(); + TQStringList newList; + TQListViewItemIterator it(mMainWidget->lstUsedItems); + TQString keyname; while(it.current()) { @@ -149,13 +149,13 @@ void TooltipEditDialog::slotOkClicked() } -void TooltipEditDialog::slotUnusedSelected(QListViewItem *item) +void TooltipEditDialog::slotUnusedSelected(TQListViewItem *item) { //mMainWidget->tbRemove->setEnabled(false); mMainWidget->tbAdd->setEnabled(item!=0); } -void TooltipEditDialog::slotUsedSelected(QListViewItem *item) +void TooltipEditDialog::slotUsedSelected(TQListViewItem *item) { mMainWidget->tbRemove->setEnabled(item!=0); //mMainWidget->tbAdd->setEnabled(false); @@ -173,8 +173,8 @@ void TooltipEditDialog::slotUsedSelected(QListViewItem *item) void TooltipEditDialog::slotUpButton() { - QListViewItem *item = mMainWidget->lstUsedItems->currentItem(); - QListViewItem *prev = item->itemAbove(); + TQListViewItem *item = mMainWidget->lstUsedItems->currentItem(); + TQListViewItem *prev = item->itemAbove(); if(prev == 0) // we are first item already return; @@ -184,8 +184,8 @@ void TooltipEditDialog::slotUpButton() void TooltipEditDialog::slotDownButton() { - QListViewItem *item = mMainWidget->lstUsedItems->currentItem(); - QListViewItem *next = item->itemBelow(); + TQListViewItem *item = mMainWidget->lstUsedItems->currentItem(); + TQListViewItem *next = item->itemBelow(); if(next == 0) // we are last item already return; diff --git a/kopete/kopete/config/appearance/tooltipeditdialog.h b/kopete/kopete/config/appearance/tooltipeditdialog.h index 92d75aa9..54807df4 100644 --- a/kopete/kopete/config/appearance/tooltipeditdialog.h +++ b/kopete/kopete/config/appearance/tooltipeditdialog.h @@ -18,7 +18,7 @@ #define TOOLTIPEDITDIALOG_H #include -#include +#include #include class TooltipEditWidget; @@ -27,11 +27,11 @@ class TooltipEditDialog : public KDialogBase Q_OBJECT public: - TooltipEditDialog(QWidget *parent=0, const char* name="ToolTipEditDialog"); + TooltipEditDialog(TQWidget *parent=0, const char* name="ToolTipEditDialog"); private slots: - void slotUnusedSelected(QListViewItem *); - void slotUsedSelected(QListViewItem *); + void slotUnusedSelected(TQListViewItem *); + void slotUsedSelected(TQListViewItem *); void slotUpButton(); void slotDownButton(); void slotAddButton(); diff --git a/kopete/kopete/config/avdevice/avdeviceconfig.cpp b/kopete/kopete/config/avdevice/avdeviceconfig.cpp index a2c474e0..dec03277 100644 --- a/kopete/kopete/config/avdevice/avdeviceconfig.cpp +++ b/kopete/kopete/config/avdevice/avdeviceconfig.cpp @@ -19,13 +19,13 @@ #include "avdeviceconfig_videoconfig.h" #include "videodevice.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,35 +34,35 @@ #include #include #include -#include -#include +#include +#include -#include +#include //#include "videodevice.h" -typedef KGenericFactory KopeteAVDeviceConfigFactory; +typedef KGenericFactory KopeteAVDeviceConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_avdeviceconfig, KopeteAVDeviceConfigFactory( "kcm_kopete_avdeviceconfig" ) ) -AVDeviceConfig::AVDeviceConfig(QWidget *parent, const char * name , const QStringList &args) +AVDeviceConfig::AVDeviceConfig(TQWidget *parent, const char * name , const TQStringList &args) : KCModule( KopeteAVDeviceConfigFactory::instance(), parent, args ) { kdDebug() << "kopete:config (avdevice): KopeteAVDeviceConfigFactory::instance() called. " << endl; - (new QVBoxLayout(this))->setAutoAdd(true); - mAVDeviceTabCtl = new QTabWidget(this, "mAVDeviceTabCtl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + mAVDeviceTabCtl = new TQTabWidget(this, "mAVDeviceTabCtl"); // "Video" TAB ============================================================ mPrfsVideoDevice = new AVDeviceConfig_VideoDevice(mAVDeviceTabCtl); - connect(mPrfsVideoDevice->mDeviceKComboBox, SIGNAL(activated(int)), this, SLOT(slotDeviceKComboBoxChanged(int))); - connect(mPrfsVideoDevice->mInputKComboBox, SIGNAL(activated(int)), this, SLOT(slotInputKComboBoxChanged(int))); - connect(mPrfsVideoDevice->mStandardKComboBox, SIGNAL(activated(int)), this, SLOT(slotStandardKComboBoxChanged(int))); - connect(mPrfsVideoDevice->mBrightnessSlider, SIGNAL(valueChanged(int)), this, SLOT(slotBrightnessSliderChanged(int))); - connect(mPrfsVideoDevice->mContrastSlider, SIGNAL(valueChanged(int)), this, SLOT(slotContrastSliderChanged(int))); - connect(mPrfsVideoDevice->mSaturationSlider, SIGNAL(valueChanged(int)), this, SLOT(slotSaturationSliderChanged(int))); - connect(mPrfsVideoDevice->mWhitenessSlider, SIGNAL(valueChanged(int)), this, SLOT(slotWhitenessSliderChanged(int))); - connect(mPrfsVideoDevice->mHueSlider, SIGNAL(valueChanged(int)), this, SLOT(slotHueSliderChanged(int))); - connect(mPrfsVideoDevice->mImageAutoBrightnessContrast, SIGNAL(toggled(bool)), this, SLOT(slotImageAutoBrightnessContrastChanged(bool))); - connect(mPrfsVideoDevice->mImageAutoColorCorrection, SIGNAL(toggled(bool)), this, SLOT(slotImageAutoColorCorrectionChanged(bool))); - connect(mPrfsVideoDevice->mImageAsMirror, SIGNAL(toggled(bool)), this, SLOT(slotImageAsMirrorChanged(bool))); + connect(mPrfsVideoDevice->mDeviceKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDeviceKComboBoxChanged(int))); + connect(mPrfsVideoDevice->mInputKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInputKComboBoxChanged(int))); + connect(mPrfsVideoDevice->mStandardKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStandardKComboBoxChanged(int))); + connect(mPrfsVideoDevice->mBrightnessSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBrightnessSliderChanged(int))); + connect(mPrfsVideoDevice->mContrastSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotContrastSliderChanged(int))); + connect(mPrfsVideoDevice->mSaturationSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSaturationSliderChanged(int))); + connect(mPrfsVideoDevice->mWhitenessSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWhitenessSliderChanged(int))); + connect(mPrfsVideoDevice->mHueSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotHueSliderChanged(int))); + connect(mPrfsVideoDevice->mImageAutoBrightnessContrast, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAutoBrightnessContrastChanged(bool))); + connect(mPrfsVideoDevice->mImageAutoColorCorrection, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAutoColorCorrectionChanged(bool))); + connect(mPrfsVideoDevice->mImageAsMirror, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAsMirrorChanged(bool))); // why is this here? // mPrfsVideoDevice->mVideoImageLabel->setPixmap(qpixmap); @@ -81,7 +81,7 @@ AVDeviceConfig::AVDeviceConfig(QWidget *parent, const char * name , const QStri mVideoDevicePool->getImage(&qimage); if (qpixmap.convertFromImage(qimage,0) == true) mPrfsVideoDevice->mVideoImageLabel->setPixmap(qpixmap); - connect(&qtimer, SIGNAL(timeout()), this, SLOT(slotUpdateImage()) ); + connect(&qtimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateImage()) ); qtimer.start(0,FALSE); } diff --git a/kopete/kopete/config/avdevice/avdeviceconfig.h b/kopete/kopete/config/avdevice/avdeviceconfig.h index d732b1a7..3648a913 100644 --- a/kopete/kopete/config/avdevice/avdeviceconfig.h +++ b/kopete/kopete/config/avdevice/avdeviceconfig.h @@ -20,12 +20,12 @@ #include "kcmodule.h" #include "videodevicepool.h" -#include -#include -#include +#include +#include +#include #ifdef HAVE_GL -# include +# include #endif class QFrame; @@ -41,7 +41,7 @@ class AVDeviceConfig : public KCModule { Q_OBJECT public: - AVDeviceConfig(QWidget *parent, const char * name , const QStringList &args); + AVDeviceConfig(TQWidget *parent, const char * name , const TQStringList &args); ~AVDeviceConfig(); virtual void save(); @@ -63,16 +63,16 @@ private slots: void slotImageAsMirrorChanged(bool); void slotUpdateImage(); private: - QTabWidget* mAVDeviceTabCtl; + TQTabWidget* mAVDeviceTabCtl; AVDeviceConfig_VideoDevice *mPrfsVideoDevice; AVDeviceConfig_AudioDevice *mPrfsAudioDevice; Kopete::AV::VideoDevicePool *mVideoDevicePool ; - QImage qimage; - QPixmap qpixmap; - QTimer qtimer; + TQImage qimage; + TQPixmap qpixmap; + TQTimer qtimer; void setVideoInputParameters(); #ifdef HAVE_GL - QGLWidget m_video_gl; + TQGLWidget m_video_gl; #endif }; diff --git a/kopete/kopete/config/behavior/behaviorconfig.cpp b/kopete/kopete/config/behavior/behaviorconfig.cpp index 379e762a..b133a64b 100644 --- a/kopete/kopete/config/behavior/behaviorconfig.cpp +++ b/kopete/kopete/config/behavior/behaviorconfig.cpp @@ -18,14 +18,14 @@ #include "behaviorconfig_events.h" #include "behaviorconfig_chat.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,17 +42,17 @@ #include "kopetepluginmanager.h" #include "kopeteaway.h" -#include +#include -typedef KGenericFactory KopeteBehaviorConfigFactory; +typedef KGenericFactory KopeteBehaviorConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_behaviorconfig, KopeteBehaviorConfigFactory( "kcm_kopete_behaviorconfig" ) ) -BehaviorConfig::BehaviorConfig(QWidget *parent, const char * /* name */, const QStringList &args) : +BehaviorConfig::BehaviorConfig(TQWidget *parent, const char * /* name */, const TQStringList &args) : KCModule( KopeteBehaviorConfigFactory::instance(), parent, args ) { - (new QVBoxLayout(this))->setAutoAdd(true); - mBehaviorTabCtl = new QTabWidget(this, "mBehaviorTabCtl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + mBehaviorTabCtl = new TQTabWidget(this, "mBehaviorTabCtl"); // "General" TAB ============================================================ mPrfsGeneral = new BehaviorConfig_General(mBehaviorTabCtl); @@ -77,81 +77,81 @@ BehaviorConfig::BehaviorConfig(QWidget *parent, const char * /* name */, const Q // "General" TAB ============================================================ - connect(mPrfsGeneral->mShowTrayChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mStartDockedChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mUseQueueChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mUseStackChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mQueueUnreadMessagesChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mAutoConnect, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mShowTrayChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mStartDockedChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mUseQueueChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mUseStackChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mQueueUnreadMessagesChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mAutoConnect, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); // "Events" TAB ============================================================ - connect(mPrfsEvents->mQueueOnlyHighlightedMessagesInGroupChatsChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mQueueOnlyMessagesOnAnotherDesktopChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mBalloonNotifyChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mBalloonNotifyIgnoreClosesChatViewChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mCloseBalloonChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mBalloonCloseDelay, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect(mPrfsEvents->mTrayflashNotifyChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mTrayflashNotifyLeftClickOpensMessageChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mTrayflashNotifySetCurrentDesktopToChatViewChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mSoundIfAwayChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mEventIfActive, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mRaiseMsgWindowChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mQueueOnlyHighlightedMessagesInGroupChatsChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mQueueOnlyMessagesOnAnotherDesktopChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mBalloonNotifyChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mBalloonNotifyIgnoreClosesChatViewChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mCloseBalloonChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mBalloonCloseDelay, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect(mPrfsEvents->mTrayflashNotifyChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mTrayflashNotifyLeftClickOpensMessageChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mTrayflashNotifySetCurrentDesktopToChatViewChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mSoundIfAwayChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mEventIfActive, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mRaiseMsgWindowChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); // "Chat" TAB =============================================================== - connect( mPrfsChat->cb_ShowEventsChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mPrfsChat->highlightEnabled, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mPrfsChat->cb_SpellCheckChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mPrfsChat->cmbChatGroupingPolicy, SIGNAL(activated(int)), - this, SLOT(slotValueChanged(int))); - connect( mPrfsChat->mChatViewBufferSize, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect( mPrfsChat->truncateContactNameEnabled, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mPrfsChat->mMaxContactNameLength, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect( mPrfsChat->viewPlugin, SIGNAL(activated(int)), - this, SLOT(slotValueChanged(int))); - connect( mPrfsChat->viewPlugin, SIGNAL(activated(int)), - this, SLOT(slotUpdatePluginLabel(int))); + connect( mPrfsChat->cb_ShowEventsChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mPrfsChat->highlightEnabled, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mPrfsChat->cb_SpellCheckChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mPrfsChat->cmbChatGroupingPolicy, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mPrfsChat->mChatViewBufferSize, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mPrfsChat->truncateContactNameEnabled, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mPrfsChat->mMaxContactNameLength, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mPrfsChat->viewPlugin, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mPrfsChat->viewPlugin, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotUpdatePluginLabel(int))); // "Away" TAB =============================================================== - connect( mAwayConfigUI->rememberedMessages, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect( mAwayConfigUI->mAutoAwayTimeout, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect( mAwayConfigUI->mGoAvailable, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mAwayConfigUI->mUseAutoAway, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mAwayConfigUI->mDisplayLastAwayMessage, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mAwayConfigUI->mDisplayCustomAwayMessage, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mAwayConfigUI->mAutoAwayMessageEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotTextChanged(const QString&))); + connect( mAwayConfigUI->rememberedMessages, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mAwayConfigUI->mAutoAwayTimeout, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mAwayConfigUI->mGoAvailable, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mAwayConfigUI->mUseAutoAway, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mAwayConfigUI->mDisplayLastAwayMessage, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mAwayConfigUI->mDisplayCustomAwayMessage, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mAwayConfigUI->mAutoAwayMessageEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotTextChanged(const TQString&))); } void BehaviorConfig::save() @@ -270,7 +270,7 @@ void BehaviorConfig::load() mPrfsChat->viewPlugin->clear(); int selectedIdx = 0, i = 0; - for( QValueList::iterator it = viewPlugins.begin(); it != viewPlugins.end(); ++it ) + for( TQValueList::iterator it = viewPlugins.begin(); it != viewPlugins.end(); ++it ) { if( (*it)->pluginName() == p->interfacePreference() ) selectedIdx = i; @@ -296,7 +296,7 @@ void BehaviorConfig::slotValueChanged(int) emit changed( true ); } -void BehaviorConfig::slotTextChanged(const QString&) +void BehaviorConfig::slotTextChanged(const TQString&) { emit changed( true ); } diff --git a/kopete/kopete/config/behavior/behaviorconfig.h b/kopete/kopete/config/behavior/behaviorconfig.h index 5a981784..8fead0ed 100644 --- a/kopete/kopete/config/behavior/behaviorconfig.h +++ b/kopete/kopete/config/behavior/behaviorconfig.h @@ -37,7 +37,7 @@ class BehaviorConfig : public KCModule Q_OBJECT public: - BehaviorConfig(QWidget *parent, const char * name , const QStringList &args) ; + BehaviorConfig(TQWidget *parent, const char * name , const TQStringList &args) ; virtual void save(); virtual void load(); @@ -46,15 +46,15 @@ class BehaviorConfig : public KCModule void slotSettingsChanged(bool); void slotValueChanged(int); void slotUpdatePluginLabel(int); - void slotTextChanged(const QString&); + void slotTextChanged(const TQString&); private: - QTabWidget* mBehaviorTabCtl; + TQTabWidget* mBehaviorTabCtl; BehaviorConfig_General *mPrfsGeneral; BehaviorConfig_Events *mPrfsEvents; BehaviorConfig_Chat *mPrfsChat; KopeteAwayConfigBaseUI *mAwayConfigUI; - QValueList viewPlugins; + TQValueList viewPlugins; Kopete::Away* awayInstance; }; #endif diff --git a/kopete/kopete/config/identity/globalidentitiesmanager.cpp b/kopete/kopete/config/identity/globalidentitiesmanager.cpp index 192849e4..52da32a7 100644 --- a/kopete/kopete/config/identity/globalidentitiesmanager.cpp +++ b/kopete/kopete/config/identity/globalidentitiesmanager.cpp @@ -17,9 +17,9 @@ #include "globalidentitiesmanager.h" // Qt includes -#include -#include -#include +#include +#include +#include // KDE includes #include @@ -37,7 +37,7 @@ class GlobalIdentitiesManager::Private { public: - QMap identitiesList; + TQMap identitiesList; }; GlobalIdentitiesManager *GlobalIdentitiesManager::s_self = 0L; @@ -49,8 +49,8 @@ GlobalIdentitiesManager *GlobalIdentitiesManager::self() return s_self; } -GlobalIdentitiesManager::GlobalIdentitiesManager(QObject *parent, const char *name) - : QObject(parent, name) +GlobalIdentitiesManager::GlobalIdentitiesManager(TQObject *parent, const char *name) + : TQObject(parent, name) { d = new Private; } @@ -62,7 +62,7 @@ GlobalIdentitiesManager::~GlobalIdentitiesManager() delete d; } -void GlobalIdentitiesManager::createNewIdentity(const QString &identityName) +void GlobalIdentitiesManager::createNewIdentity(const TQString &identityName) { // Create new identity metacontact based on myself to get the sub-contacts. Kopete::MetaContact *newIdentity = createNewMetaContact(); @@ -71,21 +71,21 @@ void GlobalIdentitiesManager::createNewIdentity(const QString &identityName) d->identitiesList.insert(identityName, newIdentity); } -void GlobalIdentitiesManager::copyIdentity(const QString ©IdentityName, const QString &sourceIdentity) +void GlobalIdentitiesManager::copyIdentity(const TQString ©IdentityName, const TQString &sourceIdentity) { Kopete::MetaContact *copyIdentity = createCopyMetaContact(d->identitiesList[sourceIdentity]); d->identitiesList.insert(copyIdentityName, copyIdentity); } -void GlobalIdentitiesManager::renameIdentity(const QString &oldName, const QString &newName) +void GlobalIdentitiesManager::renameIdentity(const TQString &oldName, const TQString &newName) { Kopete::MetaContact *renamedIdentity = d->identitiesList[oldName]; d->identitiesList.remove(oldName); d->identitiesList.insert(newName, renamedIdentity); } -void GlobalIdentitiesManager::removeIdentity(const QString &removedIdentity) +void GlobalIdentitiesManager::removeIdentity(const TQString &removedIdentity) { // Clear from memory the identity metacontact. delete d->identitiesList[removedIdentity]; @@ -93,15 +93,15 @@ void GlobalIdentitiesManager::removeIdentity(const QString &removedIdentity) d->identitiesList.remove(removedIdentity); } -void GlobalIdentitiesManager::updateIdentity(const QString &updatedIdentity, Kopete::MetaContact *sourceMetaContact) +void GlobalIdentitiesManager::updateIdentity(const TQString &updatedIdentity, Kopete::MetaContact *sourceMetaContact) { copyMetaContact(d->identitiesList[updatedIdentity], sourceMetaContact); } -bool GlobalIdentitiesManager::isIdentityPresent(const QString &identityName) +bool GlobalIdentitiesManager::isIdentityPresent(const TQString &identityName) { - QMapIterator it; - QMapIterator end = d->identitiesList.end(); + TQMapIterator it; + TQMapIterator end = d->identitiesList.end(); for(it = d->identitiesList.begin(); it != end; ++it) { @@ -114,7 +114,7 @@ bool GlobalIdentitiesManager::isIdentityPresent(const QString &identityName) return false; } -Kopete::MetaContact *GlobalIdentitiesManager::getIdentity(const QString &identityName) +Kopete::MetaContact *GlobalIdentitiesManager::getIdentity(const TQString &identityName) { // Check if the identity is present. return isIdentityPresent(identityName) ? d->identitiesList[identityName] : 0; @@ -124,26 +124,26 @@ void GlobalIdentitiesManager::loadXML() { kdDebug() << k_funcinfo << "Loading global identities list from XML." << endl; - QString filename = locateLocal( "appdata", QString::fromUtf8("global-identities.xml") ); + TQString filename = locateLocal( "appdata", TQString::fromUtf8("global-identities.xml") ); if( filename.isEmpty() ) { return; } - QDomDocument globalIdentitiesList( QString::fromUtf8( "kopete-global-identities-list" ) ); + TQDomDocument globalIdentitiesList( TQString::fromUtf8( "kopete-global-identities-list" ) ); - QFile globalIdentitiesListFile( filename ); + TQFile globalIdentitiesListFile( filename ); globalIdentitiesListFile.open( IO_ReadOnly ); globalIdentitiesList.setContent( &globalIdentitiesListFile ); - QDomElement list = globalIdentitiesList.documentElement(); - QDomElement element = list.firstChild().toElement(); + TQDomElement list = globalIdentitiesList.documentElement(); + TQDomElement element = list.firstChild().toElement(); while( !element.isNull() ) { - if( element.tagName() == QString::fromUtf8("identity") ) + if( element.tagName() == TQString::fromUtf8("identity") ) { Kopete::MetaContact *metaContact = createNewMetaContact(); - QString identityName = element.attribute(QString::fromUtf8("name")); + TQString identityName = element.attribute(TQString::fromUtf8("name")); if(!metaContact->fromXML(element)) { @@ -169,12 +169,12 @@ void GlobalIdentitiesManager::saveXML() { kdDebug() << k_funcinfo << "Saving global identities list to XML." << endl; - QString globalIdentitiesListFileName = locateLocal( "appdata", QString::fromUtf8("global-identities.xml") ); + TQString globalIdentitiesListFileName = locateLocal( "appdata", TQString::fromUtf8("global-identities.xml") ); KSaveFile globalIdentitiesListFile(globalIdentitiesListFileName); if( globalIdentitiesListFile.status() == 0 ) { - QTextStream *stream = globalIdentitiesListFile.textStream(); - stream->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *stream = globalIdentitiesListFile.textStream(); + stream->setEncoding( TQTextStream::UnicodeUTF8 ); toXML().save( *stream, 4 ); if ( globalIdentitiesListFile.close() ) @@ -193,20 +193,20 @@ void GlobalIdentitiesManager::saveXML() } } -const QDomDocument GlobalIdentitiesManager::toXML() +const TQDomDocument GlobalIdentitiesManager::toXML() { - QDomDocument doc; + TQDomDocument doc; - doc.appendChild(doc.createElement(QString::fromUtf8("kopete-global-identities-list"))); + doc.appendChild(doc.createElement(TQString::fromUtf8("kopete-global-identities-list"))); - QMapIterator it; - QMapIterator end = d->identitiesList.end(); + TQMapIterator it; + TQMapIterator end = d->identitiesList.end(); for(it = d->identitiesList.begin(); it != end; ++it) { kdDebug(14000) << k_funcinfo << "Saving " << it.key() << endl; - QDomElement identityMetaContactElement = it.data()->toXML(true); // Save minimal information. - identityMetaContactElement.setTagName(QString::fromUtf8("identity")); - identityMetaContactElement.setAttribute(QString::fromUtf8("name"), it.key()); + TQDomElement identityMetaContactElement = it.data()->toXML(true); // Save minimal information. + identityMetaContactElement.setTagName(TQString::fromUtf8("identity")); + identityMetaContactElement.setAttribute(TQString::fromUtf8("name"), it.key()); doc.documentElement().appendChild(doc.importNode(identityMetaContactElement, true)); } @@ -216,11 +216,11 @@ const QDomDocument GlobalIdentitiesManager::toXML() Kopete::MetaContact *GlobalIdentitiesManager::createNewMetaContact() { Kopete::MetaContact *newMetaContact = new Kopete::MetaContact(); - QPtrList contactList = Kopete::ContactList::self()->myself()->contacts(); + TQPtrList contactList = Kopete::ContactList::self()->myself()->contacts(); // Copy the contacts list to the new metacontact, so Kopete::Contact for SourceContact // will not be null. - QPtrListIterator it( contactList); + TQPtrListIterator it( contactList); for ( ; it.current(); ++it ) { newMetaContact->addContact(it.current()); @@ -252,7 +252,7 @@ void GlobalIdentitiesManager::copyMetaContact(Kopete::MetaContact *destination, destination->setPhotoSourceContact(source->photoSourceContact()); } -QMap GlobalIdentitiesManager::getGlobalIdentitiesList() +TQMap GlobalIdentitiesManager::getGlobalIdentitiesList() { return d->identitiesList; } diff --git a/kopete/kopete/config/identity/globalidentitiesmanager.h b/kopete/kopete/config/identity/globalidentitiesmanager.h index c188d497..71e890b0 100644 --- a/kopete/kopete/config/identity/globalidentitiesmanager.h +++ b/kopete/kopete/config/identity/globalidentitiesmanager.h @@ -18,8 +18,8 @@ #ifndef GLOBALIDENTITIESMANAGER_H #define GLOBALIDENTITIESMANAGER_H -#include -#include +#include +#include namespace Kopete { @@ -54,7 +54,7 @@ public: /** * @brief Create a new identity and add it to the internal list. */ - void createNewIdentity(const QString &identityName); + void createNewIdentity(const TQString &identityName); /** * @brief Copy a identity @@ -62,7 +62,7 @@ public: * @param copyIdentityName Name for the copy identity. * @param sourceIdentity Name of the source identity. */ - void copyIdentity(const QString ©IdentityName, const QString &sourceIdentity); + void copyIdentity(const TQString ©IdentityName, const TQString &sourceIdentity); /** * @brief Rename a identity @@ -70,14 +70,14 @@ public: * @param oldName Identity to rename. * @param newName New identity name. */ - void renameIdentity(const QString &oldName, const QString &newName); + void renameIdentity(const TQString &oldName, const TQString &newName); /** * @brief Delete identity * * @param removedIdentity Identity name to remove. */ - void removeIdentity(const QString &removedIdentity); + void removeIdentity(const TQString &removedIdentity); /** * @brief Update the specified identity using the source MetaContact @@ -85,7 +85,7 @@ public: * @param updatedIdentity Identity to update. * @param sourceMetaContact Source of data. */ - void updateIdentity(const QString &updatedIdentity, Kopete::MetaContact *sourceMetaContact); + void updateIdentity(const TQString &updatedIdentity, Kopete::MetaContact *sourceMetaContact); /** * @brief Check if the specified identityName exists. @@ -93,7 +93,7 @@ public: * This is a helper method to avoid duplicated entries. * @return if the identityName is in the internal list. */ - bool isIdentityPresent(const QString &identityName); + bool isIdentityPresent(const TQString &identityName); /** * @brief Return the specified identity. @@ -101,7 +101,7 @@ public: * @param identityName Identity to retrive. * @return Identity data as Kopete::MetaContact. */ - Kopete::MetaContact *getIdentity(const QString &identityName); + Kopete::MetaContact *getIdentity(const TQString &identityName); /** * @brief Load the XML file where global identities metacontacts are stored. @@ -117,17 +117,17 @@ public: * @brief Return the list of global identities metacontact. * @return The pointer list of metacontact as QValueList */ - QMap getGlobalIdentitiesList(); + TQMap getGlobalIdentitiesList(); private: - GlobalIdentitiesManager(QObject *parent = 0, const char *name = 0); + GlobalIdentitiesManager(TQObject *parent = 0, const char *name = 0); /** * @brief Return a XML representation of the global identities list. * - * @return the XML represention as QDomDocument. + * @return the XML represention as TQDomDocument. */ - const QDomDocument toXML(); + const TQDomDocument toXML(); Kopete::MetaContact *createNewMetaContact(); Kopete::MetaContact *createCopyMetaContact(Kopete::MetaContact *source); diff --git a/kopete/kopete/config/identity/kopeteidentityconfig.cpp b/kopete/kopete/config/identity/kopeteidentityconfig.cpp index 26613b87..0f718e70 100644 --- a/kopete/kopete/config/identity/kopeteidentityconfig.cpp +++ b/kopete/kopete/config/identity/kopeteidentityconfig.cpp @@ -18,15 +18,15 @@ #include "kopeteidentityconfig.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE includes #include @@ -78,17 +78,17 @@ public: Kopete::MetaContact *myself; Kopete::MetaContact *currentIdentity; - QMap contactPhotoSourceList; - QString selectedIdentity; + TQMap contactPhotoSourceList; + TQString selectedIdentity; }; -typedef KGenericFactory KopeteIdentityConfigFactory; +typedef KGenericFactory KopeteIdentityConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_identityconfig, KopeteIdentityConfigFactory( "kcm_kopete_identityconfig" ) ) -KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/, const QStringList &args) : KCModule( KopeteIdentityConfigFactory::instance(), parent, args) +KopeteIdentityConfig::KopeteIdentityConfig(TQWidget *parent, const char */*name*/, const TQStringList &args) : KCModule( KopeteIdentityConfigFactory::instance(), parent, args) { d = new Private; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); d->m_view = new KopeteIdentityConfigBase( this, "KopeteIdentityConfig::m_view" ); // Setup KConfigXT link with GUI. @@ -109,7 +109,7 @@ KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/ // If the latest selected Identity is not present anymore, use a fallback identity. if( !GlobalIdentitiesManager::self()->isIdentityPresent(d->selectedIdentity) ) { - QMapIterator it = GlobalIdentitiesManager::self()->getGlobalIdentitiesList().begin(); + TQMapIterator it = GlobalIdentitiesManager::self()->getGlobalIdentitiesList().begin(); d->selectedIdentity = it.key(); } else @@ -124,33 +124,33 @@ KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/ d->m_view->buttonCopyIdentity->setIconSet(SmallIconSet("editcopy")); d->m_view->buttonRenameIdentity->setIconSet(SmallIconSet("edit")); d->m_view->buttonRemoveIdentity->setIconSet(SmallIconSet("delete_user")); - d->m_view->buttonClearPhoto->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); + d->m_view->buttonClearPhoto->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); load(); // Load Configuration // Action signal/slots - connect(d->m_view->buttonChangeAddressee, SIGNAL(clicked()), this, SLOT(slotChangeAddressee())); - connect(d->m_view->comboSelectIdentity, SIGNAL(activated(const QString &)), this, SLOT(slotUpdateCurrentIdentity(const QString& ))); - connect(d->m_view->buttonNewIdentity, SIGNAL(clicked()), this, SLOT(slotNewIdentity())); - connect(d->m_view->buttonCopyIdentity, SIGNAL(clicked()), this, SLOT(slotCopyIdentity())); - connect(d->m_view->buttonRenameIdentity, SIGNAL(clicked()), this, SLOT(slotRenameIdentity())); - connect(d->m_view->buttonRemoveIdentity, SIGNAL(clicked()), this, SLOT(slotRemoveIdentity())); - connect(d->m_view->comboPhotoURL, SIGNAL(urlSelected(const QString& )), this, SLOT(slotChangePhoto(const QString& ))); - connect(d->m_view->buttonClearPhoto, SIGNAL(clicked()), this, SLOT(slotClearPhoto())); + connect(d->m_view->buttonChangeAddressee, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChangeAddressee())); + connect(d->m_view->comboSelectIdentity, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotUpdateCurrentIdentity(const TQString& ))); + connect(d->m_view->buttonNewIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewIdentity())); + connect(d->m_view->buttonCopyIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopyIdentity())); + connect(d->m_view->buttonRenameIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRenameIdentity())); + connect(d->m_view->buttonRemoveIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveIdentity())); + connect(d->m_view->comboPhotoURL, TQT_SIGNAL(urlSelected(const TQString& )), this, TQT_SLOT(slotChangePhoto(const TQString& ))); + connect(d->m_view->buttonClearPhoto, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearPhoto())); // Settings signal/slots - connect(d->m_view->radioNicknameContact, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - connect(d->m_view->radioNicknameCustom, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - connect(d->m_view->radioNicknameKABC, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - - connect(d->m_view->radioPhotoContact, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - connect(d->m_view->radioPhotoCustom, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - connect(d->m_view->radioPhotoKABC, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - - connect(d->m_view->checkSyncPhotoKABC, SIGNAL(toggled(bool )), this, SLOT(slotSettingsChanged())); - connect(d->m_view->lineNickname, SIGNAL(textChanged(const QString& )), this, SLOT(slotSettingsChanged())); - connect(d->m_view->comboNameContact, SIGNAL(activated(int )), this, SLOT(slotSettingsChanged())); - connect(d->m_view->comboPhotoContact, SIGNAL(activated(int )), this, SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioNicknameContact, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioNicknameCustom, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioNicknameKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + + connect(d->m_view->radioPhotoContact, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioPhotoCustom, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioPhotoKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + + connect(d->m_view->checkSyncPhotoKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotSettingsChanged())); + connect(d->m_view->lineNickname, TQT_SIGNAL(textChanged(const TQString& )), this, TQT_SLOT(slotSettingsChanged())); + connect(d->m_view->comboNameContact, TQT_SIGNAL(activated(int )), this, TQT_SLOT(slotSettingsChanged())); + connect(d->m_view->comboPhotoContact, TQT_SIGNAL(activated(int )), this, TQT_SLOT(slotEnableAndDisableWidgets())); } KopeteIdentityConfig::~KopeteIdentityConfig() @@ -220,9 +220,9 @@ void KopeteIdentityConfig::loadIdentities() { d->m_view->comboSelectIdentity->clear(); - QMap identitiesList = GlobalIdentitiesManager::self()->getGlobalIdentitiesList(); - QMapIterator it; - QMapIterator end = identitiesList.end(); + TQMap identitiesList = GlobalIdentitiesManager::self()->getGlobalIdentitiesList(); + TQMapIterator it; + TQMapIterator end = identitiesList.end(); int count=0, selectedIndex=0; for(it = identitiesList.begin(); it != end; ++it) @@ -266,15 +266,15 @@ void KopeteIdentityConfig::slotLoadNameSources() { Kopete::Contact *nameSourceContact = d->currentIdentity->displayNameSourceContact(); - QPtrList contactList = d->myself->contacts(); // Use myself contact PtrList. Safer. - QPtrListIterator it(contactList); + TQPtrList contactList = d->myself->contacts(); // Use myself contact PtrList. Safer. + TQPtrListIterator it(contactList); d->m_view->comboNameContact->clear(); for(; it.current(); ++it) { - QString account = it.current()->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + it.current()->contactId() + ">"; - QPixmap accountIcon = it.current()->account()->accountIcon(); + TQString account = it.current()->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + it.current()->contactId() + ">"; + TQPixmap accountIcon = it.current()->account()->accountIcon(); d->m_view->comboNameContact->insertItem(accountIcon, account); // Select this item if it's the one we're tracking. @@ -297,8 +297,8 @@ void KopeteIdentityConfig::slotLoadPhotoSources() { Kopete::Contact *photoSourceContact = d->currentIdentity->photoSourceContact(); - QPtrList contactList = d->myself->contacts(); // Use myself contact PtrList. Safer. - QPtrListIterator it(contactList); + TQPtrList contactList = d->myself->contacts(); // Use myself contact PtrList. Safer. + TQPtrListIterator it(contactList); d->m_view->comboPhotoContact->clear(); d->m_view->comboPhotoURL->clear(); @@ -309,8 +309,8 @@ void KopeteIdentityConfig::slotLoadPhotoSources() Kopete::Contact *currentContact = it.current(); if(currentContact->hasProperty(Kopete::Global::Properties::self()->photo().key())) { - QString account = currentContact->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + currentContact->contactId() + ">"; - QPixmap accountIcon = currentContact->account()->accountIcon(); + TQString account = currentContact->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + currentContact->contactId() + ">"; + TQPixmap accountIcon = currentContact->account()->accountIcon(); d->m_view->comboPhotoContact->insertItem(accountIcon, account); d->contactPhotoSourceList.insert(d->m_view->comboPhotoContact->count() - 1, currentContact); @@ -368,7 +368,7 @@ void KopeteIdentityConfig::slotEnableAndDisableWidgets() d->m_view->comboPhotoContact->setEnabled(false); } - QImage photo; + TQImage photo; switch ( selectedPhotoSource() ) { case Kopete::MetaContact::SourceKABC: @@ -378,19 +378,19 @@ void KopeteIdentityConfig::slotEnableAndDisableWidgets() photo = Kopete::photoFromContact(selectedNameSourceContact()); break; case Kopete::MetaContact::SourceCustom: - photo = QImage(d->m_view->comboPhotoURL->url()); + photo = TQImage(d->m_view->comboPhotoURL->url()); break; } if(!photo.isNull()) - d->m_view->labelPhoto->setPixmap(QPixmap(photo.smoothScale(64, 92, QImage::ScaleMin))); + d->m_view->labelPhoto->setPixmap(TQPixmap(photo.smoothScale(64, 92, TQImage::ScaleMin))); else - d->m_view->labelPhoto->setPixmap(QPixmap()); + d->m_view->labelPhoto->setPixmap(TQPixmap()); emit changed(true); } -void KopeteIdentityConfig::slotUpdateCurrentIdentity(const QString &selectedIdentity) +void KopeteIdentityConfig::slotUpdateCurrentIdentity(const TQString &selectedIdentity) { kdDebug() << k_funcinfo << "Updating current identity." << endl; @@ -413,7 +413,7 @@ void KopeteIdentityConfig::slotUpdateCurrentIdentity(const QString &selectedIden void KopeteIdentityConfig::slotNewIdentity() { bool ok; - QString newIdentityName = KInputDialog::getText(i18n("New Identity"), i18n("Identity name:") , QString::null , &ok); + TQString newIdentityName = KInputDialog::getText(i18n("New Identity"), i18n("Identity name:") , TQString::null , &ok); if(newIdentityName.isEmpty() || !ok) return; @@ -428,7 +428,7 @@ void KopeteIdentityConfig::slotNewIdentity() void KopeteIdentityConfig::slotCopyIdentity() { bool ok; - QString copyName = KInputDialog::getText(i18n("Copy Identity"), i18n("Identity name:") , QString::null, &ok); + TQString copyName = KInputDialog::getText(i18n("Copy Identity"), i18n("Identity name:") , TQString::null, &ok); if(copyName.isEmpty() || !ok) return; @@ -453,7 +453,7 @@ void KopeteIdentityConfig::slotRenameIdentity() return; bool ok; - QString renamedName = KInputDialog::getText(i18n("Rename Identity"), i18n("Identity name:") , d->selectedIdentity, &ok); + TQString renamedName = KInputDialog::getText(i18n("Rename Identity"), i18n("Identity name:") , d->selectedIdentity, &ok); if(renamedName.isEmpty() || !ok) return; @@ -515,20 +515,20 @@ void KopeteIdentityConfig::slotChangeAddressee() emit changed(true); } -void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl) +void KopeteIdentityConfig::slotChangePhoto(const TQString &photoUrl) { - QString saveLocation; + TQString saveLocation; - QImage photo(photoUrl); + TQImage photo(photoUrl); // use KABC photo size 100x140 - photo = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(photo), 96, 96, this ); + photo = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(photo), 96, 96, this ); if(!photo.isNull()) { if(photo.width() > 96 || photo.height() > 96) { // Scale and crop the picture. - photo = photo.smoothScale( 96, 96, QImage::ScaleMin ); + photo = photo.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(photo.width() < photo.height()) photo = photo.copy((photo.width()-photo.height())/2, 0, 96, 96); @@ -539,7 +539,7 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl) else if (photo.width() < 32 || photo.height() < 32) { // Scale and crop the picture. - photo = photo.smoothScale( 32, 32, QImage::ScaleMin ); + photo = photo.smoothScale( 32, 32, TQImage::ScaleMin ); // crop image if not square if(photo.width() < photo.height()) photo = photo.copy((photo.width()-photo.height())/2, 0, 32, 32); @@ -557,14 +557,14 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl) // Use MD5 hash to save the filename, so no problems will occur with the filename because of non-ASCII characters. // Bug 124175: My personnal picture doesn't appear cause of l10n - QByteArray tempArray; - QBuffer tempBuffer(tempArray); + TQByteArray tempArray; + TQBuffer tempBuffer(tempArray); tempBuffer.open( IO_WriteOnly ); photo.save(&tempBuffer, "PNG"); KMD5 context(tempArray); // Save the image to a file. saveLocation = context.hexDigest() + ".png"; - saveLocation = locateLocal( "appdata", QString::fromUtf8("globalidentitiespictures/%1").arg( saveLocation ) ); + saveLocation = locateLocal( "appdata", TQString::fromUtf8("globalidentitiespictures/%1").arg( saveLocation ) ); if(!photo.save(saveLocation, "PNG")) { @@ -585,7 +585,7 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl) void KopeteIdentityConfig::slotClearPhoto() { - d->m_view->comboPhotoURL->setURL( QString::null ); + d->m_view->comboPhotoURL->setURL( TQString::null ); slotEnableAndDisableWidgets(); } diff --git a/kopete/kopete/config/identity/kopeteidentityconfig.h b/kopete/kopete/config/identity/kopeteidentityconfig.h index f18c5a8c..88644be8 100644 --- a/kopete/kopete/config/identity/kopeteidentityconfig.h +++ b/kopete/kopete/config/identity/kopeteidentityconfig.h @@ -37,7 +37,7 @@ class KopeteIdentityConfig : public KCModule { Q_OBJECT public: - KopeteIdentityConfig(QWidget *parent, const char *name, const QStringList &args ); + KopeteIdentityConfig(TQWidget *parent, const char *name, const TQStringList &args ); ~KopeteIdentityConfig(); public slots: @@ -58,14 +58,14 @@ private slots: void slotLoadPhotoSources(); void slotEnableAndDisableWidgets(); - void slotUpdateCurrentIdentity(const QString &selectedIdentity); + void slotUpdateCurrentIdentity(const TQString &selectedIdentity); void slotNewIdentity(); void slotCopyIdentity(); void slotRenameIdentity(); void slotRemoveIdentity(); void slotChangeAddressee(); - void slotChangePhoto(const QString &photoUrl); + void slotChangePhoto(const TQString &photoUrl); void slotClearPhoto(); void slotSettingsChanged(); diff --git a/kopete/kopete/config/plugins/kopetepluginconfig.cpp b/kopete/kopete/config/plugins/kopetepluginconfig.cpp index 9949f70e..7f790a0b 100644 --- a/kopete/kopete/config/plugins/kopetepluginconfig.cpp +++ b/kopete/kopete/config/plugins/kopetepluginconfig.cpp @@ -17,8 +17,8 @@ #include "kopetepluginconfig.h" -#include -#include +#include +#include #include #include @@ -39,7 +39,7 @@ KopetePluginConfig::~KopetePluginConfig() delete d; } -KopetePluginConfig::KopetePluginConfig( QWidget *parent, const char *name ) +KopetePluginConfig::KopetePluginConfig( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Configure Plugins" ), /*Help |*/ Cancel | Apply | Ok | User1, Ok, parent, name, false, true, KGuiItem( i18n( "&Reset" ), "undo" ) ) { @@ -50,14 +50,14 @@ KopetePluginConfig::KopetePluginConfig( QWidget *parent, const char *name ) // FIXME: Implement this - Martijn enableButton( KDialogBase::Help, false ); - setInitialSize( QSize( 640, 480 ) ); + setInitialSize( TQSize( 640, 480 ) ); - ( new QVBoxLayout( plainPage(), 0, 0 ) )->setAutoAdd( true ); + ( new TQVBoxLayout( plainPage(), 0, 0 ) )->setAutoAdd( true ); d->pluginSelector = new KPluginSelector( plainPage() ); setMainWidget( d->pluginSelector ); - connect( d->pluginSelector, SIGNAL( changed( bool ) ), this, SLOT( setChanged( bool ) ) ); - connect( d->pluginSelector, SIGNAL( configCommitted( const QCString & ) ), - KSettings::Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) ); + connect( d->pluginSelector, TQT_SIGNAL( changed( bool ) ), this, TQT_SLOT( setChanged( bool ) ) ); + connect( d->pluginSelector, TQT_SIGNAL( configCommitted( const TQCString & ) ), + KSettings::Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) ); d->pluginSelector->addPlugins( Kopete::PluginManager::self()->availablePlugins( "Plugins" ), i18n( "General Plugins" ), "Plugins" ); } diff --git a/kopete/kopete/config/plugins/kopetepluginconfig.h b/kopete/kopete/config/plugins/kopetepluginconfig.h index e8853a1c..04d1cfa1 100644 --- a/kopete/kopete/config/plugins/kopetepluginconfig.h +++ b/kopete/kopete/config/plugins/kopetepluginconfig.h @@ -32,7 +32,7 @@ class KopetePluginConfig : public KDialogBase Q_OBJECT public: - KopetePluginConfig( QWidget *parent, const char *name = 0L ); + KopetePluginConfig( TQWidget *parent, const char *name = 0L ); ~KopetePluginConfig(); void apply(); diff --git a/kopete/kopete/contactlist/customnotificationprops.cpp b/kopete/kopete/contactlist/customnotificationprops.cpp index 87833fa7..2f341426 100644 --- a/kopete/kopete/contactlist/customnotificationprops.cpp +++ b/kopete/kopete/contactlist/customnotificationprops.cpp @@ -18,9 +18,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -33,32 +33,32 @@ #include "customnotificationprops.h" -CustomNotificationProps::CustomNotificationProps( QWidget *parent, Kopete::NotifyDataObject* item, const char * name ) -: QObject( parent, name ) +CustomNotificationProps::CustomNotificationProps( TQWidget *parent, Kopete::NotifyDataObject* item, const char * name ) +: TQObject( parent, name ) { m_notifyWidget = new CustomNotificationWidget( parent, "notificationWidget" ); m_item = item; - QString path = "kopete/eventsrc"; + TQString path = "kopete/eventsrc"; KConfig eventsfile( path, true, false, "data" ); m_eventList = eventsfile.groupList(); - QStringList contactSpecificEvents; // we are only interested in events that relate to contacts - QStringList::Iterator it = m_eventList.begin(); - QStringList::Iterator end = m_eventList.end(); + TQStringList contactSpecificEvents; // we are only interested in events that relate to contacts + TQStringList::Iterator it = m_eventList.begin(); + TQStringList::Iterator end = m_eventList.end(); for ( ; it != end; ++it ) { - if ( !(*it).startsWith( QString::fromLatin1( "kopete_contact_" ) ) ) + if ( !(*it).startsWith( TQString::fromLatin1( "kopete_contact_" ) ) ) continue; contactSpecificEvents.append( *it ); - QMap entries = eventsfile.entryMap( *it ); + TQMap entries = eventsfile.entryMap( *it ); eventsfile.setGroup( *it ); - QString comment = eventsfile.readEntry( "Comment", QString::fromLatin1( "Found nothing!" ) ); + TQString comment = eventsfile.readEntry( "Comment", TQString::fromLatin1( "Found nothing!" ) ); m_notifyWidget->cmbEvents->insertItem( comment ); } m_eventList = contactSpecificEvents; slotEventsComboChanged( m_notifyWidget->cmbEvents->currentItem() ); // we have to do this after adding items - connect( m_notifyWidget->cmbEvents, SIGNAL( activated( int ) ), this, SLOT( slotEventsComboChanged( int ) ) ); + connect( m_notifyWidget->cmbEvents, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotEventsComboChanged( int ) ) ); } void CustomNotificationProps::slotEventsComboChanged( int itemNo ) @@ -152,7 +152,7 @@ void CustomNotificationProps::storeCurrentCustoms() evt->setPresentation( Kopete::EventPresentation::Message, eventNotify ); // set chat attributes eventNotify = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, - QString::null, + TQString::null, m_notifyWidget->chkChatSS->isChecked(), m_notifyWidget->chkCustomChat->isChecked() ); evt->setPresentation( Kopete::EventPresentation::Chat, eventNotify ); diff --git a/kopete/kopete/contactlist/customnotificationprops.h b/kopete/kopete/contactlist/customnotificationprops.h index 5d6c1dea..f28ada4c 100644 --- a/kopete/kopete/contactlist/customnotificationprops.h +++ b/kopete/kopete/contactlist/customnotificationprops.h @@ -31,7 +31,7 @@ class CustomNotificationProps : public QObject { Q_OBJECT public: - CustomNotificationProps( QWidget *parent, Kopete::NotifyDataObject* item, const char * name = 0 ); + CustomNotificationProps( TQWidget *parent, Kopete::NotifyDataObject* item, const char * name = 0 ); ~CustomNotificationProps() {} void dumpData(); void resetEventWidgets(); @@ -44,8 +44,8 @@ protected slots: private: CustomNotificationWidget* m_notifyWidget; Kopete::NotifyDataObject * m_item; - QStringList m_eventList; - QString m_event; + TQStringList m_eventList; + TQString m_event; }; #endif diff --git a/kopete/kopete/contactlist/kabcexport.cpp b/kopete/kopete/contactlist/kabcexport.cpp index 73f67344..0051f585 100644 --- a/kopete/kopete/contactlist/kabcexport.cpp +++ b/kopete/kopete/contactlist/kabcexport.cpp @@ -19,11 +19,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -48,27 +48,27 @@ class ContactLVI : public QCheckListItem { public: - ContactLVI ( Kopete::MetaContact * mc, QListView * parent, const QString & text, Type tt = RadioButtonController ) : QCheckListItem( parent, text, tt ), mc( mc ) + ContactLVI ( Kopete::MetaContact * mc, TQListView * parent, const TQString & text, Type tt = RadioButtonController ) : TQCheckListItem( parent, text, tt ), mc( mc ) { } Kopete::MetaContact * mc; - QString uid; + TQString uid; }; // ctor populates the resource list and contact list, and enables the next button on the first page -KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name ) +KabcExportWizard::KabcExportWizard( TQWidget *parent, const char *name ) : KabcExportWizard_Base( parent, name ) { - connect( m_addrBooks, SIGNAL( selectionChanged( QListBoxItem * ) ), SLOT( slotResourceSelectionChanged( QListBoxItem * ) ) ); + connect( m_addrBooks, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ), TQT_SLOT( slotResourceSelectionChanged( TQListBoxItem * ) ) ); - connect( m_btnSelectAll, SIGNAL( clicked() ), SLOT( slotSelectAll() ) ); - connect( m_btnDeselectAll, SIGNAL( clicked() ), SLOT( slotDeselectAll() ) ); + connect( m_btnSelectAll, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAll() ) ); + connect( m_btnDeselectAll, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDeselectAll() ) ); // fill resource selector m_addressBook = Kopete::KABCPersistence::self()->addressBook(); - QPtrList kabcResources = m_addressBook->resources(); + TQPtrList kabcResources = m_addressBook->resources(); - QPtrListIterator resIt( kabcResources ); + TQPtrListIterator resIt( kabcResources ); KABC::Resource *resource; uint counter = 0; @@ -82,8 +82,8 @@ KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name ) counter++; } } - setNextEnabled( QWizard::page( 0 ), false ); - setFinishEnabled( QWizard::page( 1 ), true ); + setNextEnabled( TQWizard::page( 0 ), false ); + setFinishEnabled( TQWizard::page( 1 ), true ); // if there were no writable address books, tell the user if ( counter == 0 ) { @@ -96,15 +96,15 @@ KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name ) m_addrBooks->setSelected( 0, true ); // fill contact list - QPtrList contacts = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( contacts ); + TQPtrList contacts = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( contacts ); counter = 0; - QString alreadyIn = i18n( " (already in address book)" ); + TQString alreadyIn = i18n( " (already in address book)" ); for (; it.current(); ++it) { m_contactMap.insert( counter, it.current() ); - QCheckListItem * lvi = new ContactLVI( it.current(), m_contactList, - it.current()->displayName(), QCheckListItem::CheckBox ); + TQCheckListItem * lvi = new ContactLVI( it.current(), m_contactList, + it.current()->displayName(), TQCheckListItem::CheckBox ); lvi->setOn( false ); if ( it.current()->metaContactId().contains(':') ) { @@ -123,7 +123,7 @@ KabcExportWizard::~KabcExportWizard() void KabcExportWizard::slotDeselectAll() { - QListViewItemIterator it( m_contactList ); + TQListViewItemIterator it( m_contactList ); while ( it.current() ) { ContactLVI *item = static_cast( it.current() ); @@ -134,7 +134,7 @@ void KabcExportWizard::slotDeselectAll() void KabcExportWizard::slotSelectAll() { - QListViewItemIterator it( m_contactList ); + TQListViewItemIterator it( m_contactList ); while ( it.current() ) { ContactLVI *item = static_cast( it.current() ); @@ -145,9 +145,9 @@ void KabcExportWizard::slotSelectAll() } } -void KabcExportWizard::slotResourceSelectionChanged( QListBoxItem * lbi ) +void KabcExportWizard::slotResourceSelectionChanged( TQListBoxItem * lbi ) { - setNextEnabled( QWizard::page( 0 ), lbi->isSelected() ); + setNextEnabled( TQWizard::page( 0 ), lbi->isSelected() ); } // accept runs the export algorithm @@ -159,7 +159,7 @@ void KabcExportWizard::accept() m_resourceMap[ ( m_addrBooks->index( m_addrBooks->selectedItem() ) ) ]; // for each item checked { - QListViewItemIterator it( m_contactList ); + TQListViewItemIterator it( m_contactList ); while ( it.current() ) { ContactLVI *item = static_cast( it.current() ); @@ -175,7 +175,7 @@ void KabcExportWizard::accept() addr.setResource( selectedResource ); // set name - QPtrList contacts = item->mc->contacts(); + TQPtrList contacts = item->mc->contacts(); if ( contacts.count() == 1 ) { Kopete::ContactProperty prop; @@ -207,14 +207,14 @@ void KabcExportWizard::accept() } // request a write in case we only changed details on existing linked addressee Kopete::KABCPersistence::self()->writeAddressBook( selectedResource ); - QDialog::accept(); + TQDialog::accept(); } void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, KABC::Addressee & addr ) { // for each contact - QPtrList contacts = mc->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = mc->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { Kopete::ContactProperty prop; @@ -241,7 +241,7 @@ void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, KABC::Addressee } // metacontact photo - QImage photo = mc->photo(); + TQImage photo = mc->photo(); if ( !photo.isNull() ) addr.setPhoto( KABC::Picture( photo ) ); } diff --git a/kopete/kopete/contactlist/kabcexport.h b/kopete/kopete/contactlist/kabcexport.h index bad1d8e6..0ebfb75b 100644 --- a/kopete/kopete/contactlist/kabcexport.h +++ b/kopete/kopete/contactlist/kabcexport.h @@ -37,20 +37,20 @@ class KabcExportWizard : public KabcExportWizard_Base { Q_OBJECT public: - KabcExportWizard( QWidget *parent = 0, const char *name = 0 ); + KabcExportWizard( TQWidget *parent = 0, const char *name = 0 ); ~KabcExportWizard(); public slots: void accept(); protected slots: void slotDeselectAll(); void slotSelectAll(); - void slotResourceSelectionChanged( QListBoxItem * lbi ); + void slotResourceSelectionChanged( TQListBoxItem * lbi ); protected: void exportDetails( Kopete::MetaContact * mc, KABC::Addressee & addr ); private: KABC::AddressBook* m_addressBook; - QMap m_resourceMap; - QMap m_contactMap; + TQMap m_resourceMap; + TQMap m_contactMap; }; #endif diff --git a/kopete/kopete/contactlist/kopeteaddrbookexport.cpp b/kopete/kopete/contactlist/kopeteaddrbookexport.cpp index d752f71e..bcb9c434 100644 --- a/kopete/kopete/contactlist/kopeteaddrbookexport.cpp +++ b/kopete/kopete/contactlist/kopeteaddrbookexport.cpp @@ -19,8 +19,8 @@ */ #include -#include -#include +#include +#include #include #include @@ -35,7 +35,7 @@ #include "kopeteaddrbookexport.h" #include "kopeteaddrbookexportui.h" -KopeteAddressBookExport::KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc ) : QObject( parent ) +KopeteAddressBookExport::KopeteAddressBookExport( TQWidget *parent, Kopete::MetaContact *mc ) : TQObject( parent ) { // instantiate dialog and populate widgets mParent = parent; @@ -69,30 +69,30 @@ void KopeteAddressBookExport::fetchKABCData() mAddrBookIcon = SmallIcon( "kaddressbook" ); // given name - QString given = mAddressee.givenName(); + TQString given = mAddressee.givenName(); if ( !given.isEmpty() ) mUI->mFirstName->insertItem( mAddrBookIcon, given ); else mUI->mFirstName->insertItem( mAddrBookIcon, i18n("") ); // family name - QString family = mAddressee.familyName(); + TQString family = mAddressee.familyName(); if ( !family.isEmpty() ) mUI->mLastName->insertItem( mAddrBookIcon, family ); else mUI->mLastName->insertItem( mAddrBookIcon, i18n("") ); // url - QString url = mAddressee.url().url(); + TQString url = mAddressee.url().url(); if ( !url.isEmpty() ) mUI->mUrl->insertItem( mAddrBookIcon, url ); else mUI->mUrl->insertItem( mAddrBookIcon, i18n("") ); // emails - QStringList emails = mAddressee.emails(); + TQStringList emails = mAddressee.emails(); numEmails = emails.count(); - for ( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) + for ( TQStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) mUI->mEmails->insertItem( mAddrBookIcon, *it ); if ( numEmails == 0 ) { @@ -123,13 +123,13 @@ void KopeteAddressBookExport::fetchPhoneNumbers( KListBox * listBox, int type, u void KopeteAddressBookExport::fetchIMData() { - QPtrList contacts = mMetaContact->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = mMetaContact->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { // for each contact, get the property content Kopete::Contact* c = cit.current(); - QPixmap contactIcon = c->account()->accountIcon( 16 ); + TQPixmap contactIcon = c->account()->accountIcon( 16 ); // given name populateIM( c, contactIcon, mUI->mFirstName, Kopete::Global::Properties::self()->firstName() ); // family name @@ -147,7 +147,7 @@ void KopeteAddressBookExport::fetchIMData() } } -void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const QPixmap &icon, QComboBox *combo, const Kopete::ContactPropertyTmpl &property ) +void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const TQPixmap &icon, TQComboBox *combo, const Kopete::ContactPropertyTmpl &property ) { Kopete::ContactProperty prop = contact->property( property ); if ( !prop.isNull() ) @@ -156,7 +156,7 @@ void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const } } -void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const QPixmap &icon, KListBox *listBox, const Kopete::ContactPropertyTmpl &property ) +void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const TQPixmap &icon, KListBox *listBox, const Kopete::ContactPropertyTmpl &property ) { Kopete::ContactProperty prop = contact->property( property ); if ( !prop.isNull() ) @@ -178,7 +178,7 @@ int KopeteAddressBookExport::showDialog() mUI = new AddressBookExportUI( mDialog ); mDialog->setMainWidget( mUI ); mDialog->setButtonOK( KGuiItem( i18n( "Export" ), - QString::null, i18n( "Set address book fields using the selected data from Kopete" ) ) ); + TQString::null, i18n( "Set address book fields using the selected data from Kopete" ) ) ); initLabels(); // fetch existing data from kabc @@ -189,7 +189,7 @@ int KopeteAddressBookExport::showDialog() return mDialog->exec(); } else - return QDialog::Rejected; + return TQDialog::Rejected; } void KopeteAddressBookExport::exportData() @@ -216,31 +216,31 @@ void KopeteAddressBookExport::exportData() mAddressee.setUrl( KURL( mUI->mUrl->currentText() ) ); } - QStringList newVals; + TQStringList newVals; // email newVals = newValues( mUI->mEmails, numEmails ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertEmail( *it ); } // home phone newVals = newValues( mUI->mHomePhones, numHomePhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Home ) ); } // work phone newVals = newValues( mUI->mWorkPhones, numWorkPhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Work ) ); } // mobile newVals = newValues( mUI->mMobilePhones, numMobilePhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Cell ) ); @@ -266,7 +266,7 @@ void KopeteAddressBookExport::exportData() } } -bool KopeteAddressBookExport::newValue( QComboBox *combo ) +bool KopeteAddressBookExport::newValue( TQComboBox *combo ) { // all data in position 0 is from KABC, so if position 0 is selected, // or if the selection is the same as the data at 0, return false @@ -274,9 +274,9 @@ bool KopeteAddressBookExport::newValue( QComboBox *combo ) ( combo->text( combo->currentItem() ) == combo->text( 0 ) ) ); } -QStringList KopeteAddressBookExport::newValues( KListBox *listBox, uint counter ) +TQStringList KopeteAddressBookExport::newValues( KListBox *listBox, uint counter ) { - QStringList newValues; + TQStringList newValues; // need to iterate all items except those from KABC and check if selected and not same as the first // counter is the number of KABC items, and hence the index of the first non KABC item for ( uint i = counter; i < listBox->count(); ++i ) diff --git a/kopete/kopete/contactlist/kopeteaddrbookexport.h b/kopete/kopete/contactlist/kopeteaddrbookexport.h index b4437c4e..131dad96 100644 --- a/kopete/kopete/contactlist/kopeteaddrbookexport.h +++ b/kopete/kopete/contactlist/kopeteaddrbookexport.h @@ -40,12 +40,12 @@ class MetaContact; class KopeteAddressBookExport : public QObject { public: - KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc ); + KopeteAddressBookExport( TQWidget *parent, Kopete::MetaContact *mc ); ~KopeteAddressBookExport(); /** * Display the dialog - * @return a QDialog return code + * @return a TQDialog return code */ int showDialog(); /** @@ -73,22 +73,22 @@ protected: /** * Populate a combobox with a contact's IM data */ - void populateIM( const Kopete::Contact *contact, const QPixmap &icon, - QComboBox *combo, const Kopete::ContactPropertyTmpl &property ); + void populateIM( const Kopete::Contact *contact, const TQPixmap &icon, + TQComboBox *combo, const Kopete::ContactPropertyTmpl &property ); /** * Populate a listbox with a contact's IM data */ - void populateIM( const Kopete::Contact *contact, const QPixmap &icon, + void populateIM( const Kopete::Contact *contact, const TQPixmap &icon, KListBox *combo, const Kopete::ContactPropertyTmpl &property ); /** Check the selected item is not the first (existing KABC) item, or the same as it */ - bool newValue( QComboBox *combo ); - QStringList newValues( KListBox *listBox, uint counter ); + bool newValue( TQComboBox *combo ); + TQStringList newValues( KListBox *listBox, uint counter ); // the GUI - QWidget *mParent; + TQWidget *mParent; KDialogBase * mDialog; - QPixmap mAddrBookIcon; + TQPixmap mAddrBookIcon; AddressBookExportUI *mUI; Kopete::MetaContact *mMetaContact; KABC::AddressBook *mAddressBook; diff --git a/kopete/kopete/contactlist/kopetecontactlistview.cpp b/kopete/kopete/contactlist/kopetecontactlistview.cpp index b6b01a2f..4e45f602 100644 --- a/kopete/kopete/contactlist/kopetecontactlistview.cpp +++ b/kopete/kopete/contactlist/kopetecontactlistview.cpp @@ -25,13 +25,13 @@ #include "kopetecontactlistview.h" #include "kopeteuiglobal.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -97,13 +97,13 @@ public: void addCurrentItems() { // Add the already existing groups now - QPtrList grps = Kopete::ContactList::self()->groups(); - for ( QPtrListIterator groupIt( grps ); groupIt.current(); ++groupIt ) + TQPtrList grps = Kopete::ContactList::self()->groups(); + for ( TQPtrListIterator groupIt( grps ); groupIt.current(); ++groupIt ) addGroup( groupIt.current() ); // Add the already existing meta contacts now - QPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); - for ( QPtrListIterator it( metaContacts ); it.current(); ++it ) + TQPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); + for ( TQPtrListIterator it( metaContacts ); it.current(); ++it ) addMetaContact( it.current() ); } @@ -119,13 +119,13 @@ public: virtual void metaContactStatusChanged( Kopete::MetaContact *mc ) = 0; protected: - // work around QListView design stupidity. + // work around TQListView design stupidity. // GroupViewItem will be QListView-derived, or QListViewItem-derived. template void addMetaContactToGroupInner( Kopete::MetaContact *mc, GroupViewItem *gpi ) { // check if the contact isn't already in the group - for( QListViewItem *item = gpi->firstChild(); item; item = item->nextSibling() ) + for( TQListViewItem *item = gpi->firstChild(); item; item = item->nextSibling() ) if ( KopeteMetaContactLVI *mci = dynamic_cast(item) ) if ( mci->metaContact() == mc ) return; @@ -136,7 +136,7 @@ protected: void removeMetaContactFromGroupInner( Kopete::MetaContact *mc, GroupViewItem *gpi ) { KopeteMetaContactLVI* mci; - QListViewItem* item = gpi->firstChild(); + TQListViewItem* item = gpi->firstChild(); while(item) { mci = dynamic_cast(item); item = item->nextSibling(); @@ -220,7 +220,7 @@ private: KopeteGroupViewItem *findGroupItem( Kopete::Group *gp ) { if ( gp->type() == Kopete::Group::TopLevel ) return 0; - for( QListViewItem *item = listView()->firstChild(); item; item = item->nextSibling() ) + for( TQListViewItem *item = listView()->firstChild(); item; item = item->nextSibling() ) if ( KopeteGroupViewItem *gvi = dynamic_cast(item) ) if ( gvi->group() == gp ) return gvi; @@ -327,15 +327,15 @@ private: } // check if the contact is already in the correct "group" - QListViewItem *currentGroup = mc->isOnline() ? m_onlineItem : m_offlineItem; - for( QListViewItem *lvi = currentGroup->firstChild(); lvi; lvi = lvi->nextSibling() ) + TQListViewItem *currentGroup = mc->isOnline() ? m_onlineItem : m_offlineItem; + for( TQListViewItem *lvi = currentGroup->firstChild(); lvi; lvi = lvi->nextSibling() ) if ( KopeteMetaContactLVI *kc = dynamic_cast( lvi ) ) if ( kc->metaContact() == mc ) return; // item not found in the right group; look for it in the other group - QListViewItem *oppositeGroup = mc->isOnline() ? m_offlineItem : m_onlineItem; - for( QListViewItem *lvi = oppositeGroup->firstChild(); lvi; lvi = lvi->nextSibling() ) + TQListViewItem *oppositeGroup = mc->isOnline() ? m_offlineItem : m_onlineItem; + for( TQListViewItem *lvi = oppositeGroup->firstChild(); lvi; lvi = lvi->nextSibling() ) { if ( KopeteMetaContactLVI *kc = dynamic_cast( lvi ) ) { @@ -354,7 +354,7 @@ private: } KopeteStatusGroupViewItem *m_onlineItem, *m_offlineItem; - QGuardedPtr m_temporaryItem; + TQGuardedPtr m_temporaryItem; }; void KopeteContactListViewPrivate::updateViewStrategy( KListView *view ) @@ -376,9 +376,9 @@ void KopeteContactListViewPrivate::updateViewStrategy( KListView *view ) // returns the next item in a depth-first descent of the list view. // much like QLVI::itemBelow but does not depend on visibility of items, etc. -static QListViewItem *nextItem( QListViewItem *item ) +static TQListViewItem *nextItem( TQListViewItem *item ) { - if ( QListViewItem *it = item->firstChild() ) + if ( TQListViewItem *it = item->firstChild() ) return it; while ( item && !item->nextSibling() ) item = item->parent(); @@ -389,7 +389,7 @@ static QListViewItem *nextItem( QListViewItem *item ) -KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name ) +KopeteContactListView::KopeteContactListView( TQWidget *parent, const char *name ) : Kopete::UI::ListView::ListView( parent, name ) { d = new KopeteContactListViewPrivate; @@ -411,38 +411,38 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name setFullWidth( true ); - connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), - SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); - connect( this, SIGNAL( expanded( QListViewItem * ) ), - SLOT( slotExpanded( QListViewItem * ) ) ); - connect( this, SIGNAL( collapsed( QListViewItem * ) ), - SLOT( slotCollapsed( QListViewItem * ) ) ); - connect( this, SIGNAL( executed( QListViewItem *, const QPoint &, int ) ), - SLOT( slotExecuted( QListViewItem *, const QPoint &, int ) ) ); - connect( this, SIGNAL( selectionChanged() ), SLOT( slotViewSelectionChanged() ) ); - connect( this, SIGNAL( itemRenamed( QListViewItem * ) ), - SLOT( slotItemRenamed( QListViewItem * ) ) ); - - connect( KopetePrefs::prefs(), SIGNAL( saved() ), SLOT( slotSettingsChanged() ) ); - - connect( Kopete::ContactList::self(), SIGNAL( selectionChanged() ), - SLOT( slotListSelectionChanged() ) ); + connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), + TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQT_SIGNAL( expanded( TQListViewItem * ) ), + TQT_SLOT( slotExpanded( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( collapsed( TQListViewItem * ) ), + TQT_SLOT( slotCollapsed( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( executed( TQListViewItem *, const TQPoint &, int ) ), + TQT_SLOT( slotExecuted( TQListViewItem *, const TQPoint &, int ) ) ); + connect( this, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotViewSelectionChanged() ) ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem * ) ), + TQT_SLOT( slotItemRenamed( TQListViewItem * ) ) ); + + connect( KopetePrefs::prefs(), TQT_SIGNAL( saved() ), TQT_SLOT( slotSettingsChanged() ) ); + + connect( Kopete::ContactList::self(), TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( slotListSelectionChanged() ) ); connect( Kopete::ContactList::self(), - SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), - SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); + TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), + TQT_SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); connect( Kopete::ContactList::self(), - SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), - SLOT( slotMetaContactDeleted( Kopete::MetaContact * ) ) ); - connect( Kopete::ContactList::self(), SIGNAL( groupAdded( Kopete::Group * ) ), - SLOT( slotGroupAdded( Kopete::Group * ) ) ); + TQT_SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), + TQT_SLOT( slotMetaContactDeleted( Kopete::MetaContact * ) ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( groupAdded( Kopete::Group * ) ), + TQT_SLOT( slotGroupAdded( Kopete::Group * ) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( newEvent( Kopete::MessageEvent * ) ), - this, SLOT( slotNewMessageEvent( Kopete::MessageEvent * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( newEvent( Kopete::MessageEvent * ) ), + this, TQT_SLOT( slotNewMessageEvent( Kopete::MessageEvent * ) ) ); - connect( this, SIGNAL( dropped( QDropEvent *, QListViewItem *, QListViewItem * ) ), - this, SLOT( slotDropped( QDropEvent *, QListViewItem *, QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( dropped( TQDropEvent *, TQListViewItem *, TQListViewItem * ) ), + this, TQT_SLOT( slotDropped( TQDropEvent *, TQListViewItem *, TQListViewItem * ) ) ); - connect( &undoTimer, SIGNAL(timeout()) , this, SLOT (slotTimeout() ) ); + connect( &undoTimer, TQT_SIGNAL(timeout()) , this, TQT_SLOT (slotTimeout() ) ); addColumn( i18n( "Contacts" ), 0 ); //add an unique colums to add every contact header()->hide(); // and hide the ugly header which show the single word "Contacts" @@ -453,7 +453,7 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name setItemsMovable( false ); setDropVisualizer( false ); setDropHighlighter( true ); - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); // Load in the user's initial settings slotSettingsChanged(); @@ -461,49 +461,49 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name void KopeteContactListView::initActions( KActionCollection *ac ) { - actionUndo = KStdAction::undo( this , SLOT( slotUndo() ) , ac ); - actionRedo = KStdAction::redo( this , SLOT( slotRedo() ) , ac ); + actionUndo = KStdAction::undo( this , TQT_SLOT( slotUndo() ) , ac ); + actionRedo = KStdAction::redo( this , TQT_SLOT( slotRedo() ) , ac ); actionUndo->setEnabled(false); actionRedo->setEnabled(false); - new KAction( i18n( "Create New Group..." ), 0, 0, this, SLOT( addGroup() ), + new KAction( i18n( "Create New Group..." ), 0, 0, this, TQT_SLOT( addGroup() ), ac, "AddGroup" ); actionSendMessage = KopeteStdAction::sendMessage( - this, SLOT( slotSendMessage() ), ac, "contactSendMessage" ); - actionStartChat = KopeteStdAction::chat( this, SLOT( slotStartChat() ), + this, TQT_SLOT( slotSendMessage() ), ac, "contactSendMessage" ); + actionStartChat = KopeteStdAction::chat( this, TQT_SLOT( slotStartChat() ), ac, "contactStartChat" ); - actionMove = new KopeteGroupListAction( i18n( "&Move To" ), QString::fromLatin1( "editcut" ), - 0, this, SLOT( slotMoveToGroup() ), ac, "contactMove" ); - actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), QString::fromLatin1( "editcopy" ), 0, - this, SLOT( slotCopyToGroup() ), ac, "contactCopy" ); + actionMove = new KopeteGroupListAction( i18n( "&Move To" ), TQString::fromLatin1( "editcut" ), + 0, this, TQT_SLOT( slotMoveToGroup() ), ac, "contactMove" ); + actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), TQString::fromLatin1( "editcopy" ), 0, + this, TQT_SLOT( slotCopyToGroup() ), ac, "contactCopy" ); - actionRemove = KopeteStdAction::deleteContact( this, SLOT( slotRemove() ), + actionRemove = KopeteStdAction::deleteContact( this, TQT_SLOT( slotRemove() ), ac, "contactRemove" ); - actionSendEmail = new KAction( i18n( "Send Email..." ), QString::fromLatin1( "mail_generic" ), - 0, this, SLOT( slotSendEmail() ), ac, "contactSendEmail" ); + actionSendEmail = new KAction( i18n( "Send Email..." ), TQString::fromLatin1( "mail_generic" ), + 0, this, TQT_SLOT( slotSendEmail() ), ac, "contactSendEmail" ); /* this actionRename is buggy, and useless with properties, removed in kopeteui.rc*/ actionRename = new KAction( i18n( "Rename" ), "filesaveas", 0, - this, SLOT( slotRename() ), ac, "contactRename" ); - actionSendFile = KopeteStdAction::sendFile( this, SLOT( slotSendFile() ), + this, TQT_SLOT( slotRename() ), ac, "contactRename" ); + actionSendFile = KopeteStdAction::sendFile( this, TQT_SLOT( slotSendFile() ), ac, "contactSendFile" ); actionAddContact = new KActionMenu( i18n( "&Add Contact" ), - QString::fromLatin1( "add_user" ), ac , "contactAddContact" ); + TQString::fromLatin1( "add_user" ), ac , "contactAddContact" ); actionAddContact->popupMenu()->insertTitle( i18n("Select Account") ); actionAddTemporaryContact = new KAction( i18n( "Add to Your Contact List" ), "add_user", 0, - this, SLOT( slotAddTemporaryContact() ), ac, "contactAddTemporaryContact" ); + this, TQT_SLOT( slotAddTemporaryContact() ), ac, "contactAddTemporaryContact" ); - connect( Kopete::ContactList::self(), SIGNAL( metaContactSelected( bool ) ), this, SLOT( slotMetaContactSelected( bool ) ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactSelected( bool ) ), this, TQT_SLOT( slotMetaContactSelected( bool ) ) ); - connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered( Kopete::Account* )), SLOT(slotAddSubContactActionNewAccount(Kopete::Account*))); - connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered( const Kopete::Account* )), SLOT(slotAddSubContactActionAccountDeleted(const Kopete::Account *))); + connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered( Kopete::Account* )), TQT_SLOT(slotAddSubContactActionNewAccount(Kopete::Account*))); + connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered( const Kopete::Account* )), TQT_SLOT(slotAddSubContactActionAccountDeleted(const Kopete::Account *))); actionProperties = new KAction( i18n( "&Properties" ), "edit_user", Qt::Key_Alt + Qt::Key_Return, - this, SLOT( slotProperties() ), ac, "contactProperties" ); + this, TQT_SLOT( slotProperties() ), ac, "contactProperties" ); // Update enabled/disabled actions slotViewSelectionChanged(); @@ -516,7 +516,7 @@ KopeteContactListView::~KopeteContactListView() void KopeteContactListView::slotAddSubContactActionNewAccount(Kopete::Account* account) { - KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , this, SLOT(slotAddContact()), account); + KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , this, TQT_SLOT(slotAddContact()), account); m_accountAddContactMap.insert( account, action); actionAddContact->insert( action ); } @@ -536,14 +536,14 @@ void KopeteContactListView::slotMetaContactAdded( Kopete::MetaContact *mc ) { d->viewStrategy->addMetaContact( mc ); - connect( mc, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), - SLOT( slotAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), - SLOT( slotRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), - SLOT( slotMovedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); + connect( mc, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), + TQT_SLOT( slotAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), + TQT_SLOT( slotRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), + TQT_SLOT( slotMovedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); } void KopeteContactListView::slotMetaContactDeleted( Kopete::MetaContact *mc ) @@ -595,7 +595,7 @@ void KopeteContactListView::removeContact( Kopete::MetaContact *c ) void KopeteContactListView::addGroup() { - QString groupName = + TQString groupName = KInputDialog::getText( i18n( "New Group" ), i18n( "Please enter the name for the new group:" ) ); @@ -603,7 +603,7 @@ void KopeteContactListView::addGroup() addGroup( groupName ); } -void KopeteContactListView::addGroup( const QString &groupName ) +void KopeteContactListView::addGroup( const TQString &groupName ) { d->viewStrategy->addGroup( Kopete::ContactList::self()->findGroup(groupName) ); } @@ -613,7 +613,7 @@ void KopeteContactListView::slotGroupAdded( Kopete::Group *group ) d->viewStrategy->addGroup( group ); } -void KopeteContactListView::slotExpanded( QListViewItem *item ) +void KopeteContactListView::slotExpanded( TQListViewItem *item ) { KopeteGroupViewItem *groupLVI = dynamic_cast( item ); if ( groupLVI ) @@ -626,7 +626,7 @@ void KopeteContactListView::slotExpanded( QListViewItem *item ) delayedSort(); } -void KopeteContactListView::slotCollapsed( QListViewItem *item ) +void KopeteContactListView::slotCollapsed( TQListViewItem *item ) { KopeteGroupViewItem *groupLVI = dynamic_cast( item ); if ( groupLVI ) @@ -637,7 +637,7 @@ void KopeteContactListView::slotCollapsed( QListViewItem *item ) } void KopeteContactListView::slotContextMenu( KListView * /*listview*/, - QListViewItem *item, const QPoint &point ) + TQListViewItem *item, const TQPoint &point ) { // FIXME: this code should be moved to the various list view item classes. KopeteMetaContactLVI *metaLVI = dynamic_cast( item ); @@ -653,7 +653,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, { clearSelection(); //Clear selection doesn't update lists of selected contact if the item is onlt heilighted (see bug 106090) - Kopete::ContactList::self()->setSelectedItems( QPtrList() , QPtrList() ); + Kopete::ContactList::self()->setSelectedItems( TQPtrList() , TQPtrList() ); } int nb = Kopete::ContactList::self()->selectedMetaContacts().count() + @@ -674,11 +674,11 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, int py = mapFromGlobal( point ).y() - itemRect( item ).y() - (header()->isVisible() ? header()->height() : 0) ; //kdDebug( 14000 ) << k_funcinfo << "x: " << px << ", y: " << py << endl; - Kopete::Contact *c = metaLVI->contactForPoint( QPoint( px, py ) ) ; + Kopete::Contact *c = metaLVI->contactForPoint( TQPoint( px, py ) ) ; if ( c ) { KPopupMenu *p = c->popupMenu(); - connect( p, SIGNAL( aboutToHide() ), p, SLOT( deleteLater() ) ); + connect( p, TQT_SIGNAL( aboutToHide() ), p, TQT_SLOT( deleteLater() ) ); p->popup( point ); } else @@ -687,11 +687,11 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, window->factory()->container( "contact_popup", window ) ); if ( popup ) { - QString title = i18n( "Translators: format: ' ()'", "%1 (%2)" ). + TQString title = i18n( "Translators: format: ' ()'", "%1 (%2)" ). arg( metaLVI->metaContact()->displayName(), metaLVI->metaContact()->statusString() ); if ( title.length() > 43 ) - title = title.left( 40 ) + QString::fromLatin1( "..." ); + title = title.left( 40 ) + TQString::fromLatin1( "..." ); if ( popup->title( 0 ).isNull() ) popup->insertTitle ( title, 0, 0 ); @@ -700,7 +700,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, // Submenus for separate contact actions bool sep = false; //FIXME: find if there is already a separator in the end - Olivier - QPtrList it = metaLVI->metaContact()->contacts(); + TQPtrList it = metaLVI->metaContact()->contacts(); for( Kopete::Contact *c = it.first(); c; c = it.next() ) { if( sep ) @@ -710,13 +710,13 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, } KPopupMenu *contactMenu = it.current()->popupMenu(); - connect( popup, SIGNAL( aboutToHide() ), contactMenu, SLOT( deleteLater() ) ); - QString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); - QString text= nick.isEmpty() ? c->contactId() : i18n( "Translators: format: ' ()'", "%2 <%1>" ). arg( c->contactId(), nick ); + connect( popup, TQT_SIGNAL( aboutToHide() ), contactMenu, TQT_SLOT( deleteLater() ) ); + TQString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString text= nick.isEmpty() ? c->contactId() : i18n( "Translators: format: ' ()'", "%2 <%1>" ). arg( c->contactId(), nick ); text=text.replace("&","&&"); // cf BUG 115449 if ( text.length() > 41 ) - text = text.left( 38 ) + QString::fromLatin1( "..." ); + text = text.left( 38 ) + TQString::fromLatin1( "..." ); popup->insertItem( c->onlineStatus().iconFor( c, 16 ), text , contactMenu ); } @@ -731,9 +731,9 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, window->factory()->container( "group_popup", window ) ); if ( popup ) { - QString title = groupvi->group()->displayName(); + TQString title = groupvi->group()->displayName(); if ( title.length() > 32 ) - title = title.left( 30 ) + QString::fromLatin1( "..." ); + title = title.left( 30 ) + TQString::fromLatin1( "..." ); if( popup->title( 0 ).isNull() ) popup->insertTitle( title, 0, 0 ); @@ -798,24 +798,24 @@ void KopeteContactListView::slotUpdateAllGroupIcons() { // FIXME: groups can (should?) do this for themselves // HACK: assume all groups are top-level. works for now, until the fixme above is dealt with - for ( QListViewItem *it = firstChild(); it; it = it->nextSibling() ) + for ( TQListViewItem *it = firstChild(); it; it = it->nextSibling() ) if ( KopeteGroupViewItem *gpi = dynamic_cast( it ) ) gpi->updateIcon(); } -void KopeteContactListView::slotExecuted( QListViewItem *item, const QPoint &p, int /* col */ ) +void KopeteContactListView::slotExecuted( TQListViewItem *item, const TQPoint &p, int /* col */ ) { item->setSelected( false ); KopeteMetaContactLVI *metaContactLVI = dynamic_cast( item ); - QPoint pos = viewport()->mapFromGlobal( p ); + TQPoint pos = viewport()->mapFromGlobal( p ); Kopete::Contact *c = 0L; if ( metaContactLVI ) { // Try if we are clicking a protocol icon. If so, open a direct // connection for that protocol - QRect r = itemRect( item ); - QPoint relativePos( pos.x() - r.left() - ( treeStepSize() * + TQRect r = itemRect( item ); + TQPoint relativePos( pos.x() - r.left() - ( treeStepSize() * ( item->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ), pos.y() - r.top() ); c = metaContactLVI->contactForPoint( relativePos ); @@ -831,7 +831,7 @@ void KopeteContactListView::slotContactStatusChanged( Kopete::MetaContact *mc ) d->viewStrategy->metaContactStatusChanged( mc ); } -void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListViewItem *after) +void KopeteContactListView::slotDropped(TQDropEvent *e, TQListViewItem *, TQListViewItem *after) { if(!acceptDrag(e)) return; @@ -839,9 +839,9 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie KopeteMetaContactLVI *dest_metaLVI=dynamic_cast(after); KopeteGroupViewItem *dest_groupLVI=dynamic_cast(after); - if( const_cast( e->source() ) == this ) + if( const_cast( e->source() ) == this ) { - QPtrListIterator it( m_selectedContacts ); + TQPtrListIterator it( m_selectedContacts ); while ( it.current() ) { @@ -905,17 +905,17 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie } else if( e->provides("kopete/x-contact") ) { - QString contactInfo = QString::fromUtf8( e->encodedData("kopete/x-contact") ); - QString protocolId = contactInfo.section( QChar( 0xE000 ), 0, 0 ); - QString accountId = contactInfo.section( QChar( 0xE000 ), 1, 1 ); - QString contactId = contactInfo.section( QChar( 0xE000 ), 2 ); + TQString contactInfo = TQString::fromUtf8( e->encodedData("kopete/x-contact") ); + TQString protocolId = contactInfo.section( TQChar( 0xE000 ), 0, 0 ); + TQString accountId = contactInfo.section( TQChar( 0xE000 ), 1, 1 ); + TQString contactId = contactInfo.section( TQChar( 0xE000 ), 2 ); addDraggedContactByInfo( protocolId, accountId, contactId, after ); } else if( e->provides("text/uri-list") ) { - if ( !QUriDrag::canDecode( e ) ) + if ( !TQUriDrag::canDecode( e ) ) { e->ignore(); return; @@ -927,7 +927,7 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie for ( KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it ) { KURL url = (*it); - if( url.protocol() == QString::fromLatin1("kopetemessage") ) + if( url.protocol() == TQString::fromLatin1("kopetemessage") ) { //Add a contact addDraggedContactByInfo( url.queryItem("protocolId"), @@ -935,12 +935,12 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie } else if( dest_metaLVI ) { - QPoint p = contentsToViewport(e->pos()); + TQPoint p = contentsToViewport(e->pos()); int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) + treeStepSize() * ( dest_metaLVI->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); int py = p.y() - itemRect( dest_metaLVI ).y(); - Kopete::Contact *c = dest_metaLVI->contactForPoint( QPoint( px, py ) ); + Kopete::Contact *c = dest_metaLVI->contactForPoint( TQPoint( px, py ) ); if( url.isLocalFile() ) { @@ -1018,8 +1018,8 @@ void KopeteContactListView::addDraggedContactToMetaContact( Kopete::Contact *con } } -void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId, const QString &accountId, - const QString &contactId, QListViewItem *after ) +void KopeteContactListView::addDraggedContactByInfo( const TQString &protocolId, const TQString &accountId, + const TQString &contactId, TQListViewItem *after ) { kdDebug(14000) << k_funcinfo << "protocolId=" << protocolId << ", accountId=" << accountId << ", contactId=" << contactId << endl; @@ -1027,7 +1027,7 @@ void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId, Kopete::Account *account = Kopete::AccountManager::self()->findAccount( protocolId,accountId ); if( account ) { - QDict contacts = account->contacts(); + TQDict contacts = account->contacts(); Kopete::Contact *source_contact = contacts[ contactId ]; if( source_contact ) @@ -1061,11 +1061,11 @@ void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId, } } -bool KopeteContactListView::acceptDrag(QDropEvent *e) const +bool KopeteContactListView::acceptDrag(TQDropEvent *e) const { - QListViewItem *source=currentItem(); - QListViewItem *parent; - QListViewItem *afterme; + TQListViewItem *source=currentItem(); + TQListViewItem *parent; + TQListViewItem *afterme; // Due to a little design problem in KListView::findDrop() we can't // call it directly from a const method until KDE 4.0, but as the // method is in fact const we can of course get away with a @@ -1074,7 +1074,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const KopeteMetaContactLVI *dest_metaLVI=dynamic_cast(afterme); - if( const_cast( e->source() ) == this ) + if( const_cast( e->source() ) == this ) { KopeteMetaContactLVI *source_metaLVI=dynamic_cast(source); KopeteGroupViewItem *dest_groupLVI=dynamic_cast(afterme); @@ -1143,11 +1143,11 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const //we are sending a file (or dragging from the chat view) if( dest_metaLVI ) { - QPoint p=contentsToViewport(e->pos()); + TQPoint p=contentsToViewport(e->pos()); int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) + treeStepSize() * ( dest_metaLVI->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); int py = p.y() - itemRect( dest_metaLVI ).y(); - Kopete::Contact *c = dest_metaLVI->contactForPoint( QPoint( px, py ) ) ; + Kopete::Contact *c = dest_metaLVI->contactForPoint( TQPoint( px, py ) ) ; if( c ? !c->isReachable() : !dest_metaLVI->metaContact()->isReachable() ) return false; //If the pointed contact is not reachable, abort @@ -1160,7 +1160,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const } } - if ( !QUriDrag::canDecode(e) ) + if ( !TQUriDrag::canDecode(e) ) return false; KURL::List urlList; @@ -1168,7 +1168,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const for ( KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it ) { - if( (*it).protocol() != QString::fromLatin1("kopetemessage") && (*it).isLocalFile() ) + if( (*it).protocol() != TQString::fromLatin1("kopetemessage") && (*it).isLocalFile() ) return false; //we can't send links if a locale file is in link } @@ -1181,8 +1181,8 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const } else { - QString text; - QTextDrag::decode(e, text); + TQString text; + TQTextDrag::decode(e, text); kdDebug(14000) << k_funcinfo << "drop with mimetype:" << e->format() << " data as text:" << text << endl; } @@ -1191,24 +1191,24 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const return false; } -void KopeteContactListView::findDrop(const QPoint &pos, QListViewItem *&parent, - QListViewItem *&after) +void KopeteContactListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, + TQListViewItem *&after) { //Since KDE 3.1.1 , the original find Drop return 0L for afterme if the group is open. //This woraround allow us to keep the highlight of the item, and give always a correct position parent=0L; - QPoint p (contentsToViewport(pos)); + TQPoint p (contentsToViewport(pos)); after=itemAt(p); } -void KopeteContactListView::contentsMousePressEvent( QMouseEvent *e ) +void KopeteContactListView::contentsMousePressEvent( TQMouseEvent *e ) { KListView::contentsMousePressEvent( e ); if (e->button() == LeftButton ) { - QPoint p=contentsToViewport(e->pos()); - QListViewItem *i=itemAt( p ); + TQPoint p=contentsToViewport(e->pos()); + TQListViewItem *i=itemAt( p ); if( i ) { //Maybe we are starting a drag? @@ -1218,7 +1218,7 @@ void KopeteContactListView::contentsMousePressEvent( QMouseEvent *e ) treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); int py = p.y() - itemRect( i ).y(); - m_startDragPos = QPoint( px , py ); + m_startDragPos = TQPoint( px , py ); } } } @@ -1233,14 +1233,14 @@ void KopeteContactListView::slotNewMessageEvent(Kopete::MessageEvent *event) if(!m) return; - for ( QListViewItem *item = firstChild(); item; item = nextItem(item) ) + for ( TQListViewItem *item = firstChild(); item; item = nextItem(item) ) if ( KopeteMetaContactLVI *li = dynamic_cast(item) ) if ( li->metaContact() == m ) li->catchEvent(event); } } -QDragObject *KopeteContactListView::dragObject() +TQDragObject *KopeteContactListView::dragObject() { // Discover what the drag started on. // If it's a MetaContactLVI, it was either on the MCLVI itself @@ -1249,7 +1249,7 @@ QDragObject *KopeteContactListView::dragObject() // we set the pixmap for the drag to the MC's pixmap // or the child contact's small icon - QListViewItem *currentLVI = currentItem(); + TQListViewItem *currentLVI = currentItem(); if( !currentLVI ) return 0L; @@ -1257,19 +1257,19 @@ QDragObject *KopeteContactListView::dragObject() if( !metaLVI ) return 0L; - QPixmap pm; + TQPixmap pm; Kopete::Contact *c = metaLVI->contactForPoint( m_startDragPos ); KMultipleDrag *drag = new KMultipleDrag( this ); - drag->addDragObject( new QStoredDrag("application/x-qlistviewitem", 0L ) ); + drag->addDragObject( new TQStoredDrag("application/x-qlistviewitem", 0L ) ); - QStoredDrag *d = new QStoredDrag("kopete/x-metacontact", 0L ); + TQStoredDrag *d = new TQStoredDrag("kopete/x-metacontact", 0L ); d->setEncodedData( metaLVI->metaContact()->metaContactId().utf8() ); drag->addDragObject( d ); if ( c ) // dragging a contact { - QStoredDrag *d = new QStoredDrag("kopete/x-contact", 0L ); - d->setEncodedData( QString( c->protocol()->pluginId() +QChar( 0xE000 )+ c->account()->accountId() +QChar( 0xE000 )+ c->contactId() ).utf8() ); + TQStoredDrag *d = new TQStoredDrag("kopete/x-contact", 0L ); + d->setEncodedData( TQString( c->protocol()->pluginId() +TQChar( 0xE000 )+ c->account()->accountId() +TQChar( 0xE000 )+ c->contactId() ).utf8() ); drag->addDragObject( d ); pm = c->onlineStatus().iconFor( c, 12 ); // FIXME: fixed icon scaling @@ -1278,7 +1278,7 @@ QDragObject *KopeteContactListView::dragObject() { // FIXME: first start at rendering the whole MC incl small icons // into a pixmap to drag - anyone know how to complete this? - //QPainter p( pm ); + //TQPainter p( pm ); //source_metaLVI->paintCell( p, cg?, width(), 0, 0 ); pm = SmallIcon( metaLVI->metaContact()->statusIcon() ); } @@ -1289,35 +1289,35 @@ QDragObject *KopeteContactListView::dragObject() if( !address.isEmpty() ) { - drag->addDragObject( new QTextDrag( address.fullEmail(), 0L ) ); + drag->addDragObject( new TQTextDrag( address.fullEmail(), 0L ) ); KABC::VCardConverter converter; - QString vcard = converter.createVCard( address ); + TQString vcard = converter.createVCard( address ); if( !vcard.isNull() ) { - QStoredDrag *vcardDrag = new QStoredDrag("text/x-vcard", 0L ); + TQStoredDrag *vcardDrag = new TQStoredDrag("text/x-vcard", 0L ); vcardDrag->setEncodedData( vcard.utf8() ); drag->addDragObject( vcardDrag ); } } - //QSize s = pm.size(); - drag->setPixmap( pm /*, QPoint( s.width() , s.height() )*/ ); + //TQSize s = pm.size(); + drag->setPixmap( pm /*, TQPoint( s.width() , s.height() )*/ ); return drag; } void KopeteContactListView::slotViewSelectionChanged() { - QPtrList contacts; - QPtrList groups; + TQPtrList contacts; + TQPtrList groups; m_selectedContacts.clear(); m_selectedGroups.clear(); - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); while ( it.current() ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); ++it; if ( item->isSelected() ) @@ -1346,8 +1346,8 @@ void KopeteContactListView::slotViewSelectionChanged() void KopeteContactListView::slotListSelectionChanged() { - QPtrList contacts = Kopete::ContactList::self()->selectedMetaContacts(); - QPtrList groups = Kopete::ContactList::self()->selectedGroups(); + TQPtrList contacts = Kopete::ContactList::self()->selectedMetaContacts(); + TQPtrList groups = Kopete::ContactList::self()->selectedGroups(); //TODO: update the list to select the items that should be selected. // make sure slotViewSelectionChanged is *not* called. @@ -1355,13 +1355,13 @@ void KopeteContactListView::slotListSelectionChanged() } void KopeteContactListView::updateActionsForSelection( - QPtrList contacts, QPtrList groups ) + TQPtrList contacts, TQPtrList groups ) { bool singleContactSelected = groups.isEmpty() && contacts.count() == 1; bool inkabc=false; if(singleContactSelected) { - QString kabcid=contacts.first()->metaContactId(); + TQString kabcid=contacts.first()->metaContactId(); inkabc= !kabcid.isEmpty() && !kabcid.contains(":"); } @@ -1439,11 +1439,11 @@ void KopeteContactListView::slotSendFile() KABC::Addressee addressee = KABC::StdAddressBook::self()->findByUid( m->metaContactId() ); if ( !addressee.isEmpty() ) { - QString emailAddr = addressee.fullEmail(); + TQString emailAddr = addressee.fullEmail(); kdDebug( 14000 ) << "Email: " << emailAddr << "!" << endl; if ( !emailAddr.isEmpty() ) - kapp->invokeMailer( emailAddr, QString::null ); + kapp->invokeMailer( emailAddr, TQString::null ); else KMessageBox::queuedMessageBox( this, KMessageBox::Sorry, i18n( "There is no email address set for this contact in the KDE address book." ), i18n( "No Email Address in Address Book" ) ); } @@ -1529,13 +1529,13 @@ void KopeteContactListView::slotCopyToGroup() void KopeteContactListView::slotRemove() { - QPtrList contacts = Kopete::ContactList::self()->selectedMetaContacts(); - QPtrList groups = Kopete::ContactList::self()->selectedGroups(); + TQPtrList contacts = Kopete::ContactList::self()->selectedMetaContacts(); + TQPtrList groups = Kopete::ContactList::self()->selectedGroups(); if(groups.count() + contacts.count() == 0) return; - QStringList items; + TQStringList items; for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { if(!it->displayName().isEmpty()) @@ -1550,7 +1550,7 @@ void KopeteContactListView::slotRemove() if( items.count() <= 1 ) { // we are deleting an empty contact - QString msg; + TQString msg; if( !contacts.isEmpty() ) { msg = i18n( "Are you sure you want to remove the contact %1" \ @@ -1575,7 +1575,7 @@ void KopeteContactListView::slotRemove() } else { - QString msg = groups.isEmpty() ? + TQString msg = groups.isEmpty() ? i18n( "Are you sure you want to remove these contacts " \ "from your contact list?" ) : i18n( "Are you sure you want to remove these groups and " \ @@ -1598,10 +1598,10 @@ void KopeteContactListView::slotRemove() else { //try to guess from what group we are removing that contact. - QListViewItemIterator lvi_it( this ); + TQListViewItemIterator lvi_it( this ); while ( lvi_it.current() ) { - QListViewItem *item = lvi_it.current(); + TQListViewItem *item = lvi_it.current(); ++lvi_it; if ( item->isSelected() ) @@ -1630,7 +1630,7 @@ void KopeteContactListView::slotRemove() for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QPtrList list = it->members(); + TQPtrList list = it->members(); for( list.first(); list.current(); list.next() ) { Kopete::MetaContact *mc = list.current(); @@ -1700,7 +1700,7 @@ void KopeteContactListView::slotAddContact() else { addDialog->setMainWidget( addContactPage ); - if( addDialog->exec() == QDialog::Accepted ) + if( addDialog->exec() == TQDialog::Accepted ) { if( addContactPage->validateData() ) { @@ -1786,7 +1786,7 @@ void KopeteContactListView::slotProperties() } } -void KopeteContactListView::slotItemRenamed( QListViewItem */*item*/ ) +void KopeteContactListView::slotItemRenamed( TQListViewItem */*item*/ ) { //everithing is now done in KopeteMetaContactLVI::rename @@ -1867,7 +1867,7 @@ void KopeteContactListView::slotUndo() if( m ) { // make a copy - QStringList undoArgs = m_undo->args; + TQStringList undoArgs = m_undo->args; Kopete::MetaContact::PropertySource undoSource = m_undo->nameSource; // set undo undo // set the source first @@ -1915,7 +1915,7 @@ void KopeteContactListView::slotUndo() { if( m_undo->group ) { - const QString old=m_undo->group->displayName(); + const TQString old=m_undo->group->displayName(); m_undo->group->setDisplayName( m_undo->args[0] ); m_undo->args[0]=old; success=true; @@ -2027,10 +2027,10 @@ void KopeteContactListView::slotRedo() Kopete::MetaContact *m=m_redo->metacontact; if( m ) { - const QString old=m->displayName(); + const TQString old=m->displayName(); if( m_redo->args[1].isEmpty() ) { - const QString name = m_redo->args[0]; + const TQString name = m_redo->args[0]; m_redo->args[0] = m->displayNameSource()->contactId(); m_redo->args[1] = m->displayNameSource()->protocol()->pluginId(); m_redo->args[2] = m->displayNameSource()->account()->accountId(); @@ -2038,9 +2038,9 @@ void KopeteContactListView::slotRedo() } else { - const QString oldName = m->displayName(); - QPtrList< Kopete::Contact > cList = m->contacts(); - QPtrListIterator< Kopete::Contact > it (cList); + const TQString oldName = m->displayName(); + TQPtrList< Kopete::Contact > cList = m->contacts(); + TQPtrListIterator< Kopete::Contact > it (cList); Kopete::Contact *c = Kopete::ContactList::self()->findContact( args[0], args[2], args[1]); if ( !c) return; @@ -2060,7 +2060,7 @@ void KopeteContactListView::slotRedo() { if( m_redo->group ) { - const QString old=m_redo->group->displayName(); + const TQString old=m_redo->group->displayName(); m_redo->group->setDisplayName( m_redo->args[0] ); m_redo->args[0]=old; success=true; diff --git a/kopete/kopete/contactlist/kopetecontactlistview.h b/kopete/kopete/contactlist/kopetecontactlistview.h index 43c60ebe..4c5a8d37 100644 --- a/kopete/kopete/contactlist/kopetecontactlistview.h +++ b/kopete/kopete/contactlist/kopetecontactlistview.h @@ -27,12 +27,12 @@ #include "kopetelistview.h" #include "kopetemetacontact.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class KopeteMetaContactLVI; class KopeteGroupViewItem; @@ -61,7 +61,7 @@ class KopeteContactListView : public Kopete::UI::ListView::ListView Q_OBJECT public: - KopeteContactListView( QWidget *parent = 0, const char *name = 0 ); + KopeteContactListView( TQWidget *parent = 0, const char *name = 0 ); ~KopeteContactListView(); /** @@ -72,7 +72,7 @@ public: /** * Add a given group name and return it */ - void addGroup( const QString &groupName ); + void addGroup( const TQString &groupName ); /** * Are we displaying as a tree view (true), or in a flat list (false)? @@ -92,26 +92,26 @@ public slots: void addGroup(); protected: - virtual void contentsMousePressEvent( QMouseEvent *e ); + virtual void contentsMousePressEvent( TQMouseEvent *e ); - virtual bool acceptDrag(QDropEvent *e) const; + virtual bool acceptDrag(TQDropEvent *e) const; /** * Start a drag operation - * @return a KMultipleDrag containing: 1) A QStoredDrag of type "application/x-qlistviewitem", 2) If the MC is associated with a KABC entry, i) a QTextDrag containing their email address, and ii) their vCard representation. + * @return a KMultipleDrag containing: 1) A TQStoredDrag of type "application/x-qlistviewitem", 2) If the MC is associated with a KABC entry, i) a TQTextDrag containing their email address, and ii) their vCard representation. */ - virtual QDragObject *dragObject(); + virtual TQDragObject *dragObject(); /** * Since KDE 3.1.1 , the original find Drop return 0L for afterme if the group is open. * This woraround allow us to keep the highlight of the item, and give always a correct position */ - virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after); + virtual void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after); /** * The selected items have changed; update our actions to show what's possible. */ - void updateActionsForSelection( QPtrList contacts, QPtrList groups ); + void updateActionsForSelection( TQPtrList contacts, TQPtrList groups ); private slots: /** @@ -126,13 +126,13 @@ private slots: void slotViewSelectionChanged(); void slotListSelectionChanged(); - void slotContextMenu(KListView*,QListViewItem *item, const QPoint &point ); - void slotExpanded( QListViewItem *item ); - void slotCollapsed( QListViewItem *item ); + void slotContextMenu(KListView*,TQListViewItem *item, const TQPoint &point ); + void slotExpanded( TQListViewItem *item ); + void slotCollapsed( TQListViewItem *item ); void slotSettingsChanged( void ); void slotUpdateAllGroupIcons(); - void slotExecuted( QListViewItem *item, const QPoint &pos, int c ); + void slotExecuted( TQListViewItem *item, const TQPoint &pos, int c ); void slotAddedToGroup( Kopete::MetaContact *mc, Kopete::Group *to ); void slotRemovedFromGroup( Kopete::MetaContact *mc, Kopete::Group *from ); @@ -149,7 +149,7 @@ private slots: void slotContactStatusChanged( Kopete::MetaContact *mc ); - void slotDropped(QDropEvent *e, QListViewItem *parent, QListViewItem*); + void slotDropped(TQDropEvent *e, TQListViewItem *parent, TQListViewItem*); void slotShowAddContactDialog(); void slotNewMessageEvent(Kopete::MessageEvent *); @@ -157,7 +157,7 @@ private slots: /** * Handle renamed items by renaming the meta contact */ - void slotItemRenamed( QListViewItem *item ); + void slotItemRenamed( TQListViewItem *item ); /** Actions related slots **/ void slotSendMessage(); @@ -180,15 +180,15 @@ private: bool mShowAsTree; // TODO: do we really need to store these? - QPtrList m_selectedContacts; - QPtrList m_selectedGroups; + TQPtrList m_selectedContacts; + TQPtrList m_selectedGroups; bool mSortByGroup; KRootPixmap *root; - QRect m_onItem; + TQRect m_onItem; - QPoint m_startDragPos; + TQPoint m_startDragPos; /* ACTIONS */ KAction *actionSendMessage; @@ -209,29 +209,29 @@ private: void moveDraggedContactToGroup( Kopete::MetaContact *contact, Kopete::Group *from, Kopete::Group *to ); void addDraggedContactToGroup( Kopete::MetaContact *contact, Kopete::Group *group ); void addDraggedContactToMetaContact( Kopete::Contact *contact, Kopete::MetaContact *parent ); - void addDraggedContactByInfo( const QString &protocolId, const QString &accountId, - const QString &contactId, QListViewItem *after ); + void addDraggedContactByInfo( const TQString &protocolId, const TQString &accountId, + const TQString &contactId, TQListViewItem *after ); public: struct UndoItem; UndoItem *m_undo; UndoItem *m_redo; void insertUndoItem(UndoItem *u); - QTimer undoTimer; + TQTimer undoTimer; public: // This is public so the chatwinodw can handle sub actions // FIXME: do we not believe in accessor functions any more? KActionMenu *actionAddContact; - QMap m_accountAddContactMap; + TQMap m_accountAddContactMap; }; struct KopeteContactListView::UndoItem { enum Type { MetaContactAdd, MetaContactRemove , MetaContactCopy , MetaContactRename, MetaContactChange, ContactAdd, GroupRename } type; - QStringList args; - QGuardedPtr metacontact; - QGuardedPtr group; + TQStringList args; + TQGuardedPtr metacontact; + TQGuardedPtr group; UndoItem *next; bool isStep; Kopete::MetaContact::PropertySource nameSource; diff --git a/kopete/kopete/contactlist/kopetegrouplistaction.cpp b/kopete/kopete/contactlist/kopetegrouplistaction.cpp index 1556f9b6..802df117 100644 --- a/kopete/kopete/contactlist/kopetegrouplistaction.cpp +++ b/kopete/kopete/contactlist/kopetegrouplistaction.cpp @@ -29,15 +29,15 @@ #include "kopetecontactlist.h" #include "kopetegroup.h" -KopeteGroupListAction::KopeteGroupListAction( const QString &text, const QString &pix, const KShortcut &cut, const QObject *receiver, - const char *slot, QObject *parent, const char *name ) +KopeteGroupListAction::KopeteGroupListAction( const TQString &text, const TQString &pix, const KShortcut &cut, const TQObject *receiver, + const char *slot, TQObject *parent, const char *name ) : KListAction( text, pix, cut, parent, name ) { - connect( this, SIGNAL( activated() ), receiver, slot ); + connect( this, TQT_SIGNAL( activated() ), receiver, slot ); - connect( Kopete::ContactList::self(), SIGNAL( groupAdded( Kopete::Group * ) ), this, SLOT( slotUpdateList() ) ); - connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ), this, SLOT( slotUpdateList() ) ); - connect( Kopete::ContactList::self(), SIGNAL( groupRenamed(Kopete::Group*, const QString& ) ), this, SLOT( slotUpdateList() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( groupAdded( Kopete::Group * ) ), this, TQT_SLOT( slotUpdateList() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), this, TQT_SLOT( slotUpdateList() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed(Kopete::Group*, const TQString& ) ), this, TQT_SLOT( slotUpdateList() ) ); slotUpdateList(); } @@ -47,10 +47,10 @@ KopeteGroupListAction::~KopeteGroupListAction() void KopeteGroupListAction::slotUpdateList() { - QStringList groupList; + TQStringList groupList; // Add groups to our list - QPtrList groups = Kopete::ContactList::self()->groups(); + TQPtrList groups = Kopete::ContactList::self()->groups(); for ( Kopete::Group *it = groups.first(); it; it = groups.next() ) { if(it->type() == Kopete::Group::Normal) @@ -58,7 +58,7 @@ void KopeteGroupListAction::slotUpdateList() } groupList.sort(); - groupList.prepend(QString::null); //add a separator; + groupList.prepend(TQString::null); //add a separator; groupList.prepend( i18n("Top Level") ); //the top-level group, with the id 0 setItems( groupList ); } diff --git a/kopete/kopete/contactlist/kopetegrouplistaction.h b/kopete/kopete/contactlist/kopetegrouplistaction.h index 3576f3ed..2b852632 100644 --- a/kopete/kopete/contactlist/kopetegrouplistaction.h +++ b/kopete/kopete/contactlist/kopetegrouplistaction.h @@ -31,14 +31,14 @@ class KopeteGroupListAction : public KListAction Q_OBJECT public: - KopeteGroupListAction( const QString &, const QString &, const KShortcut &, - const QObject *, const char *, QObject *, const char * ); + KopeteGroupListAction( const TQString &, const TQString &, const KShortcut &, + const TQObject *, const char *, TQObject *, const char * ); ~KopeteGroupListAction(); protected slots: void slotUpdateList(); private: - QStringList m_groupList; + TQStringList m_groupList; }; #endif diff --git a/kopete/kopete/contactlist/kopetegroupviewitem.cpp b/kopete/kopete/contactlist/kopetegroupviewitem.cpp index 21b1cf79..6b65b0ef 100644 --- a/kopete/kopete/contactlist/kopetegroupviewitem.cpp +++ b/kopete/kopete/contactlist/kopetegroupviewitem.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -55,7 +55,7 @@ public: : group( gp ) { } - QString operator()( ComponentBase *, const QPoint &, QRect & ) + TQString operator()( ComponentBase *, const TQPoint &, TQRect & ) { return group->toolTip(); } @@ -67,14 +67,14 @@ private: } // END namespace UI } // END namespace Kopete -KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, QListView *parent, const char *name ) +KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, TQListView *parent, const char *name ) : Kopete::UI::ListView::Item( parent, group_, name ) { m_group = group_; initLVI(); } -KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, QListViewItem *parent, const char *name ) +KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, TQListViewItem *parent, const char *name ) : Kopete::UI::ListView::Item( parent, group_, name ) { m_group = group_; @@ -102,14 +102,14 @@ void KopeteGroupViewItem::initLVI() d->name->setToolTipSource( d->toolTipSource.get() ); d->count->setToolTipSource( d->toolTipSource.get() ); - connect( m_group, SIGNAL( displayNameChanged( Kopete::Group*, const QString& ) ), - this, SLOT( refreshDisplayName() ) ); + connect( m_group, TQT_SIGNAL( displayNameChanged( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( refreshDisplayName() ) ); - connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ), - SLOT( slotConfigChanged() ) ); - connect( kapp, SIGNAL( appearanceChanged() ), SLOT( slotConfigChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ), + TQT_SLOT( slotConfigChanged() ) ); + connect( kapp, TQT_SIGNAL( appearanceChanged() ), TQT_SLOT( slotConfigChanged() ) ); - connect( m_group, SIGNAL( iconAppearanceChanged() ), SLOT( updateIcon() ) ); + connect( m_group, TQT_SIGNAL( iconAppearanceChanged() ), TQT_SLOT( updateIcon() ) ); refreshDisplayName(); slotConfigChanged(); @@ -120,7 +120,7 @@ Kopete::Group* KopeteGroupViewItem::group() const return m_group; } -QString KopeteGroupViewItem::toolTip() const +TQString KopeteGroupViewItem::toolTip() const { // TODO: add icon, and some more information than that which // is already displayed in the list view item @@ -136,7 +136,7 @@ void KopeteGroupViewItem::slotConfigChanged() d->name->setColor( KopetePrefs::prefs()->contactListGroupNameColor() ); - QFont font = listView()->font(); + TQFont font = listView()->font(); if ( KopetePrefs::prefs()->contactListUseCustomFonts() ) font = KopetePrefs::prefs()->contactListCustomNormalFont(); d->name->setFont( font ); @@ -149,7 +149,7 @@ void KopeteGroupViewItem::refreshDisplayName() totalMemberCount = 0; onlineMemberCount = 0; - for ( QListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() ) + for ( TQListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() ) { if ( KopeteMetaContactLVI *kc = dynamic_cast( lvi ) ) { @@ -161,7 +161,7 @@ void KopeteGroupViewItem::refreshDisplayName() d->name->setText( m_group->displayName() ); d->count->setText( i18n( "(NUMBER OF ONLINE CONTACTS/NUMBER OF CONTACTS IN GROUP)", "(%1/%2)" ) - .arg( QString::number( onlineMemberCount ), QString::number( totalMemberCount ) ) ); + .arg( TQString::number( onlineMemberCount ), TQString::number( totalMemberCount ) ) ); updateVisibility(); @@ -175,7 +175,7 @@ void KopeteGroupViewItem::refreshDisplayName() listView()->sort(); } -QString KopeteGroupViewItem::key( int, bool ) const +TQString KopeteGroupViewItem::key( int, bool ) const { //Groups are placed after topLevel contact. //Exepted Temporary group which is the first group @@ -223,7 +223,7 @@ void KopeteGroupViewItem::updateVisibility() // When calling setVisible(true) EVERY child item will be shown, // even if they should be hidden. // We just re-update the visibility of all child items - for ( QListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() ) + for ( TQListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() ) { if ( KopeteMetaContactLVI *kmc = dynamic_cast( lvi ) ) kmc->updateVisibility(); @@ -255,7 +255,7 @@ void KopeteGroupViewItem::updateIcon() } } -QString KopeteGroupViewItem::text( int column ) const +TQString KopeteGroupViewItem::text( int column ) const { if ( column == 0 ) return d->name->text(); @@ -263,7 +263,7 @@ QString KopeteGroupViewItem::text( int column ) const return KListViewItem::text( column ); } -void KopeteGroupViewItem::setText( int column, const QString &text ) +void KopeteGroupViewItem::setText( int column, const TQString &text ) { if ( column == 0 ) { diff --git a/kopete/kopete/contactlist/kopetegroupviewitem.h b/kopete/kopete/contactlist/kopetegroupviewitem.h index 777ea2e8..8891f992 100644 --- a/kopete/kopete/contactlist/kopetegroupviewitem.h +++ b/kopete/kopete/contactlist/kopetegroupviewitem.h @@ -19,7 +19,7 @@ #define KOPETEGROUPVIEWITEM_H #include "kopetelistviewitem.h" -#include +#include #define KOPETE_GROUP_DEFAULT_OPEN_ICON "folder_open" #define KOPETE_GROUP_DEFAULT_CLOSED_ICON "folder" @@ -36,8 +36,8 @@ class KopeteGroupViewItem : public Kopete::UI::ListView::Item { Q_OBJECT public: - KopeteGroupViewItem( Kopete::Group *group , QListView *parent, const char *name = 0 ); - KopeteGroupViewItem( Kopete::Group *group , QListViewItem *parent, const char *name = 0 ); + KopeteGroupViewItem( Kopete::Group *group , TQListView *parent, const char *name = 0 ); + KopeteGroupViewItem( Kopete::Group *group , TQListViewItem *parent, const char *name = 0 ); ~KopeteGroupViewItem(); Kopete::Group * group() const; @@ -47,10 +47,10 @@ public: /** * reimplemented from KListViewItem to take into account our alternate text storage */ - virtual QString text( int column ) const; - virtual void setText( int column, const QString &text ); + virtual TQString text( int column ) const; + virtual void setText( int column, const TQString &text ); - QString toolTip() const; + TQString toolTip() const; public slots: void refreshDisplayName(); @@ -65,9 +65,9 @@ private: void initLVI(); Kopete::Group *m_group; - QPixmap open, closed; + TQPixmap open, closed; - QString key( int column, bool ascending ) const; + TQString key( int column, bool ascending ) const; unsigned int onlineMemberCount; unsigned int totalMemberCount; diff --git a/kopete/kopete/contactlist/kopetelviprops.cpp b/kopete/kopete/contactlist/kopetelviprops.cpp index bf5431bf..1867dea5 100644 --- a/kopete/kopete/contactlist/kopetelviprops.cpp +++ b/kopete/kopete/contactlist/kopetelviprops.cpp @@ -23,14 +23,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -65,7 +65,7 @@ const char MC_AW[] = "metacontact_away"; const char MC_UNK[] = "metacontact_unknown"; -KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const char *name) +KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Properties of Group %1").arg(gvi->group()->displayName()), Ok|Cancel, Ok, false) { mainWidget = new KopeteGVIPropsWidget(this, "mainWidget"); @@ -83,22 +83,22 @@ KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const mainWidget->chkUseCustomIcons->setChecked( item->group()->useCustomIcon() ); - QString openName = item->group()->icon( Kopete::ContactListElement::Open ); + TQString openName = item->group()->icon( Kopete::ContactListElement::Open ); if(openName.isEmpty()) openName = KOPETE_GROUP_DEFAULT_OPEN_ICON; - QString closeName = item->group()->icon( Kopete::ContactListElement::Closed ); + TQString closeName = item->group()->icon( Kopete::ContactListElement::Closed ); if(closeName.isEmpty()) closeName = KOPETE_GROUP_DEFAULT_CLOSED_ICON; mainWidget->icnbOpen->setIcon( openName ); mainWidget->icnbClosed->setIcon( closeName ); - connect( this, SIGNAL(okClicked()), this, SLOT( slotOkClicked() ) ); - connect( mainWidget->chkUseCustomIcons, SIGNAL( toggled( bool ) ), - this, SLOT( slotUseCustomIconsToggled( bool ) ) ); - connect( mainWidget->icnbOpen, SIGNAL( iconChanged( QString ) ), - SLOT( slotIconChanged() ) ); - connect( mainWidget->icnbClosed, SIGNAL( iconChanged( QString ) ), - SLOT( slotIconChanged() ) ); + connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT( slotOkClicked() ) ); + connect( mainWidget->chkUseCustomIcons, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotUseCustomIconsToggled( bool ) ) ); + connect( mainWidget->icnbOpen, TQT_SIGNAL( iconChanged( TQString ) ), + TQT_SLOT( slotIconChanged() ) ); + connect( mainWidget->icnbClosed, TQT_SIGNAL( iconChanged( TQString ) ), + TQT_SLOT( slotIconChanged() ) ); slotUseCustomIconsToggled( mainWidget->chkUseCustomIcons->isChecked() ); } @@ -145,7 +145,7 @@ void KopeteGVIProps::slotIconChanged() // ============================================================================= -KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *parent, const char *name) +KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Properties of Meta Contact %1").arg(lvi->metaContact()->displayName()), Ok|Cancel, Ok, false) { m_countPhotoCapable = 0; @@ -158,10 +158,10 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren mNotificationProps = new CustomNotificationProps( this, lvi->metaContact() ); // add a button to the notification props to get the sound from KABC // the widget's vert box layout, horiz box layout containing button, spacer, followed by a spacer - QBoxLayout * vb = static_cast( mNotificationProps->widget()->layout() ); + TQBoxLayout * vb = static_cast( mNotificationProps->widget()->layout() ); - QHBoxLayout* hb = new QHBoxLayout( vb, -1, "soundFromKABClayout" ); - mFromKABC = new QPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget(), "getSoundFromKABC" ); + TQHBoxLayout* hb = new TQHBoxLayout( vb, -1, "soundFromKABClayout" ); + mFromKABC = new TQPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget(), "getSoundFromKABC" ); hb->addWidget( mFromKABC ); // [ [Button] <-xxxxx-> ] hb->addStretch(); vb->addStretch(); // vert spacer keeps the rest snug @@ -170,36 +170,36 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren setMainWidget( mainWidget ); item = lvi; - connect( mainWidget->radioNameKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioNameContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioNameCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioPhotoKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioPhotoContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioPhotoCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->cmbPhotoUrl, SIGNAL(urlSelected(const QString &)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->cmbAccountPhoto, SIGNAL(activated ( int )), SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioNameKABC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioNameContact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioNameCustom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioPhotoKABC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioPhotoContact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioPhotoCustom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->cmbPhotoUrl, TQT_SIGNAL(urlSelected(const TQString &)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->cmbAccountPhoto, TQT_SIGNAL(activated ( int )), TQT_SLOT(slotEnableAndDisableWidgets())); - mainWidget->btnClearPhoto->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); - connect( mainWidget->btnClearPhoto, SIGNAL( clicked() ), this, SLOT( slotClearPhotoClicked() ) ); - connect( mainWidget->widAddresseeLink, SIGNAL( addresseeChanged( const KABC::Addressee & ) ), SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) ); + mainWidget->btnClearPhoto->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); + connect( mainWidget->btnClearPhoto, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearPhotoClicked() ) ); + connect( mainWidget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee & ) ), TQT_SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) ); mainWidget->chkUseCustomIcons->setChecked( item->metaContact()->useCustomIcon() ); - QString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline ); + TQString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline ); if(offlineName.isEmpty()) - offlineName = QString::fromLatin1(MC_OFF); // Default + offlineName = TQString::fromLatin1(MC_OFF); // Default - QString onlineName = item->metaContact()->icon( Kopete::ContactListElement::Online ); + TQString onlineName = item->metaContact()->icon( Kopete::ContactListElement::Online ); if(onlineName.isEmpty()) - onlineName = QString::fromLatin1(MC_ON); // Default + onlineName = TQString::fromLatin1(MC_ON); // Default - QString awayName = item->metaContact()->icon( Kopete::ContactListElement::Away ); + TQString awayName = item->metaContact()->icon( Kopete::ContactListElement::Away ); if(awayName.isEmpty()) - awayName = QString::fromLatin1(MC_AW); // Default + awayName = TQString::fromLatin1(MC_AW); // Default - QString unknownName = item->metaContact()->icon( Kopete::ContactListElement::Unknown ); + TQString unknownName = item->metaContact()->icon( Kopete::ContactListElement::Unknown ); if(unknownName.isEmpty()) - unknownName = QString::fromLatin1(MC_UNK); // Default + unknownName = TQString::fromLatin1(MC_UNK); // Default mainWidget->icnbOffline->setIcon( offlineName ); mainWidget->icnbOnline->setIcon( onlineName ); @@ -232,17 +232,17 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren slotLoadNameSources(); slotLoadPhotoSources(); - connect( this, SIGNAL(okClicked()), this, SLOT( slotOkClicked() ) ); - connect( mainWidget->chkUseCustomIcons, SIGNAL( toggled( bool ) ), - this, SLOT( slotUseCustomIconsToggled( bool ) ) ); - connect( mainWidget->btnImportKABC, SIGNAL( clicked() ), - this, SLOT( slotImportClicked() ) ); - connect( mainWidget->btnExportKABC, SIGNAL( clicked() ), - this, SLOT( slotExportClicked() ) ); - connect( mFromKABC, SIGNAL( clicked() ), - this, SLOT( slotFromKABCClicked() ) ); - connect( mNotificationProps->widget()->customSound, SIGNAL( openFileDialog( KURLRequester * )), - SLOT( slotOpenSoundDialog( KURLRequester * ))); + connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT( slotOkClicked() ) ); + connect( mainWidget->chkUseCustomIcons, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotUseCustomIconsToggled( bool ) ) ); + connect( mainWidget->btnImportKABC, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImportClicked() ) ); + connect( mainWidget->btnExportKABC, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotExportClicked() ) ); + connect( mFromKABC, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotFromKABCClicked() ) ); + connect( mNotificationProps->widget()->customSound, TQT_SIGNAL( openFileDialog( KURLRequester * )), + TQT_SLOT( slotOpenSoundDialog( KURLRequester * ))); slotUseCustomIconsToggled( mainWidget->chkUseCustomIcons->isChecked() ); slotEnableAndDisableWidgets(); @@ -256,13 +256,13 @@ KopeteMetaLVIProps::~KopeteMetaLVIProps() void KopeteMetaLVIProps::slotLoadNameSources() { Kopete::Contact* trackingName = item->metaContact()->displayNameSourceContact(); - QPtrList< Kopete::Contact > cList = item->metaContact()->contacts(); - QPtrListIterator it( cList ); + TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts(); + TQPtrListIterator it( cList ); mainWidget->cmbAccountName->clear(); for( ; it.current(); ++it ) { - QString acct = it.current()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + it.current()->contactId() + ">"; - QPixmap acctIcon = it.current()->account()->accountIcon(); + TQString acct = it.current()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + it.current()->contactId() + ">"; + TQPixmap acctIcon = it.current()->account()->accountIcon(); mainWidget->cmbAccountName->insertItem( acctIcon, acct ); // Select this item if it's the one we're tracking. @@ -285,18 +285,18 @@ void KopeteMetaLVIProps::slotLoadNameSources() void KopeteMetaLVIProps::slotLoadPhotoSources() { // fill photo contact sources - QPtrList< Kopete::Contact > cList = item->metaContact()->contacts(); + TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts(); m_withPhotoContacts.clear(); Kopete::Contact* trackingPhoto = item->metaContact()->photoSourceContact(); mainWidget->cmbAccountPhoto->clear(); - QPtrListIterator itp( cList ); + TQPtrListIterator itp( cList ); for( ; itp.current(); ++itp ) { Kopete::Contact *citem = itp.current(); if ( citem->hasProperty( Kopete::Global::Properties::self()->photo().key() ) ) { - QString acct = citem->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + citem->contactId() + ">"; - QPixmap acctIcon = citem->account()->accountIcon(); + TQString acct = citem->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + citem->contactId() + ">"; + TQPixmap acctIcon = citem->account()->accountIcon(); mainWidget->cmbAccountPhoto->insertItem( acctIcon, acct ); // Select this item if it's the one we're tracking. @@ -358,7 +358,7 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets() mainWidget->cmbAccountPhoto->setEnabled(false); } - QImage photo; + TQImage photo; switch ( selectedPhotoSource() ) { case Kopete::MetaContact::SourceKABC: @@ -368,13 +368,13 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets() photo = Kopete::photoFromContact(selectedPhotoSourceContact()); break; case Kopete::MetaContact::SourceCustom: - photo = QImage(KURL::decode_string(mainWidget->cmbPhotoUrl->url())); + photo = TQImage(KURL::decode_string(mainWidget->cmbPhotoUrl->url())); break; } if( !photo.isNull() ) - mainWidget->photoLabel->setPixmap(QPixmap(photo.smoothScale( 64, 92, QImage::ScaleMin ))); + mainWidget->photoLabel->setPixmap(TQPixmap(photo.smoothScale( 64, 92, TQImage::ScaleMin ))); else - mainWidget->photoLabel->setPixmap( QPixmap() ); + mainWidget->photoLabel->setPixmap( TQPixmap() ); } Kopete::MetaContact::PropertySource KopeteMetaLVIProps::selectedNameSource() const @@ -489,7 +489,7 @@ void KopeteMetaLVIProps::slotAddresseeChanged( const KABC::Addressee & a ) { mainWidget->btnExportKABC->setEnabled( false ); mainWidget->btnImportKABC->setEnabled( false ); - mAddressBookUid = QString::null; + mAddressBookUid = TQString::null; mainWidget->radioNameContact->setChecked( true ); mainWidget->radioPhotoContact->setChecked( true ); } @@ -501,7 +501,7 @@ void KopeteMetaLVIProps::slotExportClicked() item->metaContact()->setMetaContactId( mAddressBookUid ); delete mExport; mExport = new KopeteAddressBookExport( this, item->metaContact() ); - if ( mExport->showDialog() == QDialog::Accepted ) + if ( mExport->showDialog() == TQDialog::Accepted ) mExport->exportData(); } @@ -523,26 +523,26 @@ void KopeteMetaLVIProps::slotOpenSoundDialog( KURLRequester *requester ) { // taken from kdelibs/kio/kfile/knotifydialog.cpp // only need to init this once - requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )), - this, SLOT( slotOpenSoundDialog( KURLRequester * ))); + requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )), + this, TQT_SLOT( slotOpenSoundDialog( KURLRequester * ))); KFileDialog *fileDialog = requester->fileDialog(); //fileDialog->setCaption( i18n("Select Sound File") ); - QStringList filters; + TQStringList filters; filters << "audio/x-wav" << "audio/x-mp3" << "application/ogg" << "audio/x-adpcm"; fileDialog->setMimeFilter( filters ); // find the first "sound"-resource that contains files - QStringList soundDirs = + TQStringList soundDirs = KGlobal::dirs()->findDirs("data", "kopete/sounds"); soundDirs += KGlobal::dirs()->resourceDirs( "sound" ); if ( !soundDirs.isEmpty() ) { KURL soundURL; - QDir dir; - dir.setFilter( QDir::Files | QDir::Readable ); - QStringList::ConstIterator it = soundDirs.begin(); + TQDir dir; + dir.setFilter( TQDir::Files | TQDir::Readable ); + TQStringList::ConstIterator it = soundDirs.begin(); while ( it != soundDirs.end() ) { dir = *it; if ( dir.isReadable() && dir.count() > 2 ) { @@ -560,7 +560,7 @@ void KopeteMetaLVIProps::slotClearPhotoClicked() #if KDE_IS_VERSION(3,4,0) mainWidget->cmbPhotoUrl->setKURL( KURL() ); #else - mainWidget->cmbPhotoUrl->setURL( QString::null ); + mainWidget->cmbPhotoUrl->setURL( TQString::null ); #endif item->metaContact()->setPhoto( KURL() ); diff --git a/kopete/kopete/contactlist/kopetelviprops.h b/kopete/kopete/contactlist/kopetelviprops.h index 9a2ebf34..de28e4b5 100644 --- a/kopete/kopete/contactlist/kopetelviprops.h +++ b/kopete/kopete/contactlist/kopetelviprops.h @@ -45,7 +45,7 @@ class KopeteGVIProps: public KDialogBase Q_OBJECT public: - KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const char *name=0L); + KopeteGVIProps(KopeteGroupViewItem *gvi, TQWidget *parent, const char *name=0L); ~KopeteGVIProps(); private: @@ -66,20 +66,20 @@ class KopeteMetaLVIProps: public KDialogBase Q_OBJECT public: - KopeteMetaLVIProps(KopeteMetaContactLVI *gvi, QWidget *parent, const char *name=0L); + KopeteMetaLVIProps(KopeteMetaContactLVI *gvi, TQWidget *parent, const char *name=0L); ~KopeteMetaLVIProps(); private: CustomNotificationProps * mNotificationProps; - QPushButton *mFromKABC; + TQPushButton *mFromKABC; KopeteMetaLVIPropsWidget *mainWidget; AddressBookLinkWidget *linkWidget; KopeteMetaContactLVI *item; KopeteAddressBookExport *mExport; KABC::Sound mSound; int m_countPhotoCapable; - QMap m_withPhotoContacts; - QString mAddressBookUid; // the currently selected addressbook UID + TQMap m_withPhotoContacts; + TQString mAddressBookUid; // the currently selected addressbook UID Kopete::MetaContact::PropertySource selectedNameSource() const; Kopete::MetaContact::PropertySource selectedPhotoSource() const; diff --git a/kopete/kopete/contactlist/kopetemetacontactlvi.cpp b/kopete/kopete/contactlist/kopetemetacontactlvi.cpp index 86dc4b40..b336a6cd 100644 --- a/kopete/kopete/contactlist/kopetemetacontactlvi.cpp +++ b/kopete/kopete/contactlist/kopetemetacontactlvi.cpp @@ -18,11 +18,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "knotification.h" #include @@ -78,27 +78,27 @@ public: : metaContact( mc ) { } - QString operator()( ComponentBase *, const QPoint &, QRect & ) + TQString operator()( ComponentBase *, const TQPoint &, TQRect & ) { // We begin with the meta contact display name at the top of the tooltip - QString toolTip = QString::fromLatin1(""); + TQString toolTip = TQString::fromLatin1("
"); - toolTip += QString::fromLatin1("
"); + toolTip += TQString::fromLatin1("
"); if ( ! metaContact->photo().isNull() ) { - QString photoName = QString::fromLatin1("kopete-metacontact-photo:%1").arg( KURL::encode_string( metaContact->metaContactId() )); - //QMimeSourceFactory::defaultFactory()->setImage( "contactimg", metaContact->photo() ); - toolTip += QString::fromLatin1("").arg( photoName ); + TQString photoName = TQString::fromLatin1("kopete-metacontact-photo:%1").arg( KURL::encode_string( metaContact->metaContactId() )); + //TQMimeSourceFactory::defaultFactory()->setImage( "contactimg", metaContact->photo() ); + toolTip += TQString::fromLatin1("").arg( photoName ); } - toolTip += QString::fromLatin1(""); + toolTip += TQString::fromLatin1(""); - QString displayName; + TQString displayName; Kopete::Emoticons *e = Kopete::Emoticons::self(); - QValueList t = e->tokenize( metaContact->displayName()); - QValueList::iterator it; + TQValueList t = e->tokenize( metaContact->displayName()); + TQValueList::iterator it; for( it = t.begin(); it != t.end(); ++it ) { if( (*it).type == Kopete::Emoticons::Image ) @@ -106,25 +106,25 @@ public: displayName += (*it).picHTMLCode; } else if( (*it).type == Kopete::Emoticons::Text ) { - displayName += QStyleSheet::escape( (*it).text ); + displayName += TQStyleSheet::escape( (*it).text ); } } - toolTip += QString::fromLatin1("%1

").arg( displayName ); + toolTip += TQString::fromLatin1("%1

").arg( displayName ); - QPtrList contacts = metaContact->contacts(); + TQPtrList contacts = metaContact->contacts(); if ( contacts.count() == 1 ) { - return toolTip + contacts.first()->toolTip() + QString::fromLatin1("
"); + return toolTip + contacts.first()->toolTip() + TQString::fromLatin1("
"); } - toolTip += QString::fromLatin1(""); + toolTip += TQString::fromLatin1("
"); // We are over a metacontact with > 1 child contacts, and not over a specific contact // Iterate through children and display a summary tooltip for(Contact *c = contacts.first(); c; c = contacts.next()) { - QString iconName = QString::fromLatin1("kopete-contact-icon:%1:%2:%3") + TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") .arg( KURL::encode_string( c->protocol()->pluginId() ), KURL::encode_string( c->account()->accountId() ), KURL::encode_string( c->contactId() ) @@ -135,7 +135,7 @@ public: .arg( iconName, Kopete::Emoticons::parseEmoticons(c->property(Kopete::Global::Properties::self()->nickName()).value().toString()) , c->contactId(), c->onlineStatus().description() ); } - return toolTip + QString::fromLatin1("
"); + return toolTip + TQString::fromLatin1(""); } private: MetaContact *metaContact; @@ -163,12 +163,12 @@ public: int currentMode; int currentIconMode; - QPtrList events; + TQPtrList events; }; KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, KopeteGroupViewItem *parent ) : ListView::Item( parent, contact, "MetaContactLVI" ) -//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent ) +//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent ) { m_metaContact = contact; m_isTopLevel = false; @@ -179,9 +179,9 @@ KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, Kopete parent->refreshDisplayName(); } -KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListViewItem *parent ) +KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListViewItem *parent ) : ListView::Item( parent, contact, "MetaContactLVI" ) -//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent ) +//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent ) { m_metaContact = contact; @@ -192,9 +192,9 @@ KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListV initLVI(); } -KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListView *parent ) +KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListView *parent ) : ListView::Item( parent, contact, "MetaContactLVI" ) -//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent ) +//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent ) { m_metaContact = contact; @@ -213,47 +213,47 @@ void KopeteMetaContactLVI::initLVI() m_oldStatus = m_metaContact->status(); - connect( m_metaContact, SIGNAL( displayNameChanged( const QString &, const QString & ) ), - SLOT( slotDisplayNameChanged() ) ); + connect( m_metaContact, TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), + TQT_SLOT( slotDisplayNameChanged() ) ); - connect( m_metaContact, SIGNAL( photoChanged() ), - SLOT( slotPhotoChanged() ) ); + connect( m_metaContact, TQT_SIGNAL( photoChanged() ), + TQT_SLOT( slotPhotoChanged() ) ); - connect( m_metaContact, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - SLOT( slotPhotoChanged() ) ); + connect( m_metaContact, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + TQT_SLOT( slotPhotoChanged() ) ); - connect( m_metaContact, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - this, SLOT(slotIdleStateChanged( ) ) ); + connect( m_metaContact, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + this, TQT_SLOT(slotIdleStateChanged( ) ) ); - connect( m_metaContact, SIGNAL( contactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ), - SLOT( slotContactStatusChanged( Kopete::Contact * ) ) ); + connect( m_metaContact, TQT_SIGNAL( contactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::Contact * ) ) ); - connect( m_metaContact, SIGNAL( contactAdded( Kopete::Contact * ) ), - SLOT( slotContactAdded( Kopete::Contact * ) ) ); + connect( m_metaContact, TQT_SIGNAL( contactAdded( Kopete::Contact * ) ), + TQT_SLOT( slotContactAdded( Kopete::Contact * ) ) ); - connect( m_metaContact, SIGNAL( contactRemoved( Kopete::Contact * ) ), - SLOT( slotContactRemoved( Kopete::Contact * ) ) ); + connect( m_metaContact, TQT_SIGNAL( contactRemoved( Kopete::Contact * ) ), + TQT_SLOT( slotContactRemoved( Kopete::Contact * ) ) ); - connect( m_metaContact, SIGNAL( iconAppearanceChanged() ), - SLOT( slotUpdateMetaContact() ) ); + connect( m_metaContact, TQT_SIGNAL( iconAppearanceChanged() ), + TQT_SLOT( slotUpdateMetaContact() ) ); - connect( m_metaContact, SIGNAL( useCustomIconChanged( bool ) ), - SLOT( slotUpdateMetaContact() ) ); + connect( m_metaContact, TQT_SIGNAL( useCustomIconChanged( bool ) ), + TQT_SLOT( slotUpdateMetaContact() ) ); - connect( m_metaContact, SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ), - SLOT( slotIdleStateChanged( Kopete::Contact * ) ) ); + connect( m_metaContact, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ), + TQT_SLOT( slotIdleStateChanged( Kopete::Contact * ) ) ); - connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ), - SLOT( slotConfigChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ), + TQT_SLOT( slotConfigChanged() ) ); - connect( kapp, SIGNAL( appearanceChanged() ), SLOT( slotConfigChanged() ) ); + connect( kapp, TQT_SIGNAL( appearanceChanged() ), TQT_SLOT( slotConfigChanged() ) ); - mBlinkTimer = new QTimer( this, "mBlinkTimer" ); - connect( mBlinkTimer, SIGNAL( timeout() ), SLOT( slotBlink() ) ); + mBlinkTimer = new TQTimer( this, "mBlinkTimer" ); + connect( mBlinkTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotBlink() ) ); mIsBlinkIcon = false; //if ( !mBlinkIcon ) - // mBlinkIcon = new QPixmap( KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "newmsg" ), KIcon::Small ) ); + // mBlinkIcon = new TQPixmap( KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "newmsg" ), KIcon::Small ) ); slotConfigChanged(); // this calls slotIdleStateChanged(), which sets up the constituent components, spacing, fonts and indirectly, the contact icon slotDisplayNameChanged(); @@ -301,9 +301,9 @@ void KopeteMetaContactLVI::movedToDifferentGroup() } } -void KopeteMetaContactLVI::rename( const QString& newName ) +void KopeteMetaContactLVI::rename( const TQString& newName ) { - QString oldName = m_metaContact->displayName(); + TQString oldName = m_metaContact->displayName(); KopeteContactListView *lv = dynamic_cast( listView() ); if ( lv ) { @@ -380,9 +380,9 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c ) { //int winId = KopeteSystemTray::systemTray() ? KopeteSystemTray::systemTray()->winId() : 0; - QString text = i18n( "%1 is now %2." ) - .arg( Kopete::Emoticons::parseEmoticons( QStyleSheet::escape(m_metaContact->displayName()) ) , - QStyleSheet::escape(c->onlineStatus().description())); + TQString text = i18n( "%1 is now %2." ) + .arg( Kopete::Emoticons::parseEmoticons( TQStyleSheet::escape(m_metaContact->displayName()) ) , + TQStyleSheet::escape(c->onlineStatus().description())); // figure out what's happened enum ChangeType { noChange, noEvent, signedIn, changedStatus, signedOut }; @@ -438,11 +438,11 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c ) break; case signedIn: connect(KNotification::event(m_metaContact, "kopete_contact_online", text, m_metaContact->photo(), KopeteSystemTray::systemTray(), i18n( "Chat" )) , - SIGNAL(activated(unsigned int )) , this, SLOT( execute() ) ); + TQT_SIGNAL(activated(unsigned int )) , this, TQT_SLOT( execute() ) ); break; case changedStatus: connect(KNotification::event(m_metaContact, "kopete_contact_status_change", text, m_metaContact->photo(), KopeteSystemTray::systemTray(), i18n( "Chat" )) , - SIGNAL(activated(unsigned int )) , this, SLOT( execute() )); + TQT_SIGNAL(activated(unsigned int )) , this, TQT_SLOT( execute() )); break; case signedOut: KNotification::event(m_metaContact, "kopete_contact_offline", text, m_metaContact->photo(), KopeteSystemTray::systemTray()); @@ -463,7 +463,7 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c ) //So the olfStatusIcon will not be set to the real after the blink. //we set it now. if( !mBlinkTimer->isActive() ) - m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap(); + m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap(); } // make a note of the current status for the next time we get a status change @@ -491,7 +491,7 @@ void KopeteMetaContactLVI::execute() const m_metaContact->execute(); //The selection is removed, but the contact still hihjlihted, remove the selection in the contactlist (see bug 106090) - Kopete::ContactList::self()->setSelectedItems( QPtrList() , QPtrList() ); + Kopete::ContactList::self()->setSelectedItems( TQPtrList() , TQPtrList() ); } void KopeteMetaContactLVI::slotDisplayNameChanged() @@ -513,14 +513,14 @@ void KopeteMetaContactLVI::slotPhotoChanged() if ( d->metaContactIcon && d->currentIconMode == KopetePrefs::PhotoPic ) { m_oldStatusIcon= d->metaContactIcon->pixmap(); - QPixmap photoPixmap; - //QPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) ); - QImage photoImg = m_metaContact->photo(); + TQPixmap photoPixmap; + //TQPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) ); + TQImage photoImg = m_metaContact->photo(); if ( !photoImg.isNull() && (photoImg.width() > 0) && (photoImg.height() > 0) ) { int photoSize = d->iconSize; - photoImg = photoImg.smoothScale( photoSize, photoSize, QImage::ScaleMin ); + photoImg = photoImg.smoothScale( photoSize, photoSize, TQImage::ScaleMin ); KImageEffect *effect = 0L; switch ( m_metaContact->status() ) @@ -640,7 +640,7 @@ void KopeteMetaContactLVI::slotAddToNewGroup() if ( m_metaContact->isTemporary() ) return; - QString groupName = KInputDialog::getText( + TQString groupName = KInputDialog::getText( i18n( "New Group" ), i18n( "Please enter the name for the new group:" ) ); if ( !groupName.isEmpty() ) @@ -668,7 +668,7 @@ void KopeteMetaContactLVI::slotConfigChanged() } else { - QFont font=listView()->font(); + TQFont font=listView()->font(); d->nameText->setFont( font ); if(d->extraText) { @@ -730,8 +730,8 @@ void KopeteMetaContactLVI::setDisplayMode( int mode, int iconmode ) new VSpacerComponent( imageBox ); if(!metaContact()->photoSource() && !Kopete::KABCPersistence::self()->addressBook()->findByUid( metaContact()->metaContactId() ).isEmpty() ) { //if the photo is the one of the kaddressbook, track every change in the adressbook, it might be the photo of our contact. - connect( Kopete::KABCPersistence::self()->addressBook() , SIGNAL(addressBookChanged (AddressBook *) ) , - this , SLOT(slotPhotoChanged())); + connect( Kopete::KABCPersistence::self()->addressBook() , TQT_SIGNAL(addressBookChanged (AddressBook *) ) , + this , TQT_SLOT(slotPhotoChanged())); } } else { d->metaContactIcon = new ImageComponent( hbox ); @@ -770,13 +770,13 @@ void KopeteMetaContactLVI::setDisplayMode( int mode, int iconmode ) slotIdleStateChanged( 0 ); // finally, re-add all contacts so their icons appear. remove them first for consistency. - QPtrList contacts = m_metaContact->contacts(); - for ( QPtrListIterator it( contacts ); it.current(); ++it ) + TQPtrList contacts = m_metaContact->contacts(); + for ( TQPtrListIterator it( contacts ); it.current(); ++it ) { slotContactRemoved( *it ); slotContactAdded( *it ); } - m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap(); + m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap(); if( mBlinkTimer->isActive() ) m_originalBlinkIcon=m_oldStatusIcon; } @@ -792,11 +792,11 @@ void KopeteMetaContactLVI::updateVisibility() } void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, - const QString &key, const QVariant &old, const QVariant &newVal ) + const TQString &key, const TQVariant &old, const TQVariant &newVal ) { -// if ( key == QString::fromLatin1("awayMessage") ) +// if ( key == TQString::fromLatin1("awayMessage") ) // kdDebug( 14000 ) << k_funcinfo << "contact=" << contact->contactId() << ", isonline=" << contact->isOnline() << ", alloffline=" << !m_metaContact->isOnline() << ", oldvalue=" << old.toString() << ", newvalue=" << newVal.toString() << endl; - if ( key == QString::fromLatin1("awayMessage") && d->extraText && old != newVal ) + if ( key == TQString::fromLatin1("awayMessage") && d->extraText && old != newVal ) { bool allOffline = !m_metaContact->isOnline(); if ( newVal.toString().isEmpty() || ( !contact->isOnline() && !allOffline ) ) @@ -805,11 +805,11 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, // -new away message is empty or // -contact who set it is offline and there are contacts online in the metacontact bool allAwayMessagesEmpty = true; - QPtrList contacts = m_metaContact->contacts(); + TQPtrList contacts = m_metaContact->contacts(); for ( Kopete::Contact *c = contacts.first(); c; c = contacts.next() ) { // kdDebug( 14000 ) << k_funcinfo << "ccontact=" << c->contactId() << ", isonline=" << c->isOnline() << ", awaymsg=" << c->property( key ).value().toString() << endl; - QString awayMessage( c->property( key ).value().toString() ); + TQString awayMessage( c->property( key ).value().toString() ); if ( ( allOffline || c->isOnline() ) && !awayMessage.isEmpty() ) { // display this contact's away message when: @@ -821,7 +821,7 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, } } if ( allAwayMessagesEmpty ) - d->extraText->setText( QString::null ); + d->extraText->setText( TQString::null ); } else { @@ -831,7 +831,7 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, d->extraText->setText( newVal.toString() ); } } // wtf? KopeteMetaContact also connects this signals and emits photoChanged! why no connect photoChanged to slotPhotoChanged? - /*else if ( key == QString::fromLatin1("photo") && (m_metaContact->photoSourceContact() == contact) && (m_metaContact->photoSource() == Kopete::MetaContact::SourceContact)) + /*else if ( key == TQString::fromLatin1("photo") && (m_metaContact->photoSourceContact() == contact) && (m_metaContact->photoSource() == Kopete::MetaContact::SourceContact)) { slotPhotoChanged(); }*/ @@ -839,46 +839,46 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, void KopeteMetaContactLVI::slotContactAdded( Kopete::Contact *c ) { - connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, - const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &, - const QVariant &, const QVariant & ) ) ); - connect( c->account() , SIGNAL( colorChanged(const QColor& ) ) , this, SLOT( updateContactIcons() ) ); + connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, + const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &, + const TQVariant &, const TQVariant & ) ) ); + connect( c->account() , TQT_SIGNAL( colorChanged(const TQColor& ) ) , this, TQT_SLOT( updateContactIcons() ) ); updateContactIcon( c ); - slotContactPropertyChanged( c, QString::fromLatin1("awayMessage"), - QVariant(), c->property( QString::fromLatin1("awayMessage") ).value() ); + slotContactPropertyChanged( c, TQString::fromLatin1("awayMessage"), + TQVariant(), c->property( TQString::fromLatin1("awayMessage") ).value() ); } void KopeteMetaContactLVI::slotContactRemoved( Kopete::Contact *c ) { - disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, - const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, - const QString &, const QVariant &, const QVariant & ) ) ); - disconnect( c->account() , SIGNAL( colorChanged(const QColor& ) ) , this, SLOT( updateContactIcons() ) ); + disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, + const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, + const TQString &, const TQVariant &, const TQVariant & ) ) ); + disconnect( c->account() , TQT_SIGNAL( colorChanged(const TQColor& ) ) , this, TQT_SLOT( updateContactIcons() ) ); if ( ListView::Component *comp = contactComponent( c ) ) delete comp; - slotContactPropertyChanged( c, QString::fromLatin1("awayMessage"), - c->property( QString::fromLatin1("awayMessage") ).value(), QVariant() ); + slotContactPropertyChanged( c, TQString::fromLatin1("awayMessage"), + c->property( TQString::fromLatin1("awayMessage") ).value(), TQVariant() ); } void KopeteMetaContactLVI::updateContactIcons() { // show offline contacts setting may have changed - QPtrList contacts = m_metaContact->contacts(); - for ( QPtrListIterator it( contacts ); it.current(); ++it ) + TQPtrList contacts = m_metaContact->contacts(); + for ( TQPtrListIterator it( contacts ); it.current(); ++it ) updateContactIcon( *it ); } void KopeteMetaContactLVI::updateContactIcon( Kopete::Contact *c ) { - KGlobal::config()->setGroup( QString::fromLatin1("ContactList") ); + KGlobal::config()->setGroup( TQString::fromLatin1("ContactList") ); bool bHideOffline = KGlobal::config()->readBoolEntry( - QString::fromLatin1("HideOfflineContacts"), false ); + TQString::fromLatin1("HideOfflineContacts"), false ); if ( KopetePrefs::prefs()->showOffline() ) bHideOffline = false; @@ -892,7 +892,7 @@ void KopeteMetaContactLVI::updateContactIcon( Kopete::Contact *c ) comp->updatePixmap(); } -Kopete::Contact *KopeteMetaContactLVI::contactForPoint( const QPoint &p ) const +Kopete::Contact *KopeteMetaContactLVI::contactForPoint( const TQPoint &p ) const { if ( ListView::ContactComponent *comp = dynamic_cast( d->contactIconBox->componentAt( p ) ) ) return comp->contact(); @@ -912,11 +912,11 @@ ListView::ContactComponent *KopeteMetaContactLVI::contactComponent( const Kopete return 0; } -QRect KopeteMetaContactLVI::contactRect( const Kopete::Contact *c ) const +TQRect KopeteMetaContactLVI::contactRect( const Kopete::Contact *c ) const { if ( ListView::Component *comp = contactComponent( c ) ) return comp->rect(); - return QRect(); + return TQRect(); } Kopete::Group *KopeteMetaContactLVI::group() @@ -927,7 +927,7 @@ Kopete::Group *KopeteMetaContactLVI::group() return Kopete::Group::topLevel(); } -QString KopeteMetaContactLVI::key( int, bool ) const +TQString KopeteMetaContactLVI::key( int, bool ) const { char importanceChar; switch ( m_metaContact->status() ) @@ -988,10 +988,10 @@ void KopeteMetaContactLVI::slotIdleStateChanged( Kopete::Contact *c ) { m_oldStatusIcon=d->metaContactIcon->pixmap(); - QPixmap icon = SmallIcon( m_metaContact->statusIcon(), d->iconSize ); + TQPixmap icon = SmallIcon( m_metaContact->statusIcon(), d->iconSize ); if ( doWeHaveToGrayThatContact ) { - // TODO: QPixmapCache this result + // TODO: TQPixmapCache this result KIconEffect::semiTransparent( icon ); } @@ -1011,13 +1011,13 @@ void KopeteMetaContactLVI::catchEvent( Kopete::MessageEvent *event ) { d->events.append( event ); - connect( event, SIGNAL( done( Kopete::MessageEvent* ) ), - this, SLOT( slotEventDone( Kopete::MessageEvent * ) ) ); + connect( event, TQT_SIGNAL( done( Kopete::MessageEvent* ) ), + this, TQT_SLOT( slotEventDone( Kopete::MessageEvent * ) ) ); if ( mBlinkTimer->isActive() ) mBlinkTimer->stop(); - m_oldStatusIcon= d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap(); + m_oldStatusIcon= d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap(); mBlinkTimer->start( 400, false ); @@ -1035,9 +1035,9 @@ void KopeteMetaContactLVI::slotBlink() if ( !haveEvent && m_blinkLeft <= 0 ) { mBlinkTimer->stop(); - m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap(); + m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap(); updateVisibility(); - m_originalBlinkIcon=QPixmap(); //i hope this help to reduce memory consuption + m_originalBlinkIcon=TQPixmap(); //i hope this help to reduce memory consuption } } else @@ -1076,12 +1076,12 @@ void KopeteMetaContactLVI::slotEventDone( Kopete::MessageEvent *event ) if(d->metaContactIcon) d->metaContactIcon->setPixmap( m_originalBlinkIcon ); - m_originalBlinkIcon=QPixmap(); //i hope this help to reduce memory consuption + m_originalBlinkIcon=TQPixmap(); //i hope this help to reduce memory consuption mIsBlinkIcon = false; } } -QString KopeteMetaContactLVI::text( int column ) const +TQString KopeteMetaContactLVI::text( int column ) const { if ( column == 0 ) return d->nameText->text(); @@ -1089,7 +1089,7 @@ QString KopeteMetaContactLVI::text( int column ) const return KListViewItem::text( column ); } -void KopeteMetaContactLVI::setText( int column, const QString &text ) +void KopeteMetaContactLVI::setText( int column, const TQString &text ) { if ( column == 0 ) rename( text ); diff --git a/kopete/kopete/contactlist/kopetemetacontactlvi.h b/kopete/kopete/contactlist/kopetemetacontactlvi.h index 767330ba..d795475f 100644 --- a/kopete/kopete/contactlist/kopetemetacontactlvi.h +++ b/kopete/kopete/contactlist/kopetemetacontactlvi.h @@ -23,9 +23,9 @@ #include "kopetelistviewitem.h" -#include -#include -#include +#include +#include +#include #include @@ -56,8 +56,8 @@ class KopeteMetaContactLVI : public Kopete::UI::ListView::Item public: KopeteMetaContactLVI( Kopete::MetaContact *contact, KopeteGroupViewItem *parent ); - KopeteMetaContactLVI( Kopete::MetaContact *contact, QListViewItem *parent ); - KopeteMetaContactLVI( Kopete::MetaContact *contact, QListView *parent ); + KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListViewItem *parent ); + KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListView *parent ); ~KopeteMetaContactLVI(); /** @@ -74,7 +74,7 @@ public: /** * parent when top-level */ - QListView *parentView() const { return m_parentView; }; + TQListView *parentView() const { return m_parentView; }; /** * parent when not top-level @@ -85,7 +85,7 @@ public: * call this when the item has been moved to a different group */ void movedToDifferentGroup(); - void rename( const QString& name ); + void rename( const TQString& name ); void startRename( int ); Kopete::Group *group(); @@ -97,28 +97,28 @@ public: * (This is used for e.g. the context-menu of a contact when * right-clicking an icon, or the tooltips) */ - Kopete::Contact *contactForPoint( const QPoint &p ) const; + Kopete::Contact *contactForPoint( const TQPoint &p ) const; /** - * Returns the QRect small little icon used for the Kopete::Contact. + * Returns the TQRect small little icon used for the Kopete::Contact. * The behavior is undefined if @param c doesn't point to a valid * Kopete::Contact for this list view item. - * The returned QRect is using the list view item's coordinate + * The returned TQRect is using the list view item's coordinate * system and should probably be transformed into the list view's * coordinates before being of any practical use. * Note that the returned Rect is always vertically stretched to fill * the full list view item's height, only the width is relative to * the actual icon width. */ - QRect contactRect( const Kopete::Contact *c ) const; + TQRect contactRect( const Kopete::Contact *c ) const; bool isGrouped() const; /** * reimplemented from KListViewItem to take into account our alternate text storage */ - virtual QString text( int column ) const; - virtual void setText( int column, const QString &text ); + virtual TQString text( int column ) const; + virtual void setText( int column, const TQString &text ); public slots: /** @@ -134,7 +134,7 @@ public slots: private slots: void slotUpdateMetaContact(); void slotContactStatusChanged( Kopete::Contact * ); - void slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ); + void slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ); void slotContactAdded( Kopete::Contact * ); void slotContactRemoved( Kopete::Contact * ); @@ -159,24 +159,24 @@ private: void initLVI(); void setDisplayMode( int mode, int iconMode ); void setMetaContactToolTipSourceForComponent( Kopete::UI::ListView::Component *comp ); - QString key( int column, bool ascending ) const; + TQString key( int column, bool ascending ) const; void updateContactIcon( Kopete::Contact * ); Kopete::UI::ListView::ContactComponent *contactComponent( const Kopete::Contact *c ) const; Kopete::MetaContact *m_metaContact; KopeteGroupViewItem *m_parentGroup; - QListView *m_parentView; + TQListView *m_parentView; bool m_isTopLevel; int m_pixelWide; Kopete::OnlineStatus m_oldStatus; - QPixmap m_oldStatusIcon; - QPixmap m_originalBlinkIcon; + TQPixmap m_oldStatusIcon; + TQPixmap m_originalBlinkIcon; - QTimer *mBlinkTimer; + TQTimer *mBlinkTimer; - QPtrDict m_addContactActions; + TQPtrDict m_addContactActions; bool mIsBlinkIcon; int m_blinkLeft; diff --git a/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp b/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp index 9dc910dd..6595e237 100644 --- a/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp +++ b/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp @@ -20,8 +20,8 @@ #include #include "kopetestatusgroupviewitem.h" -KopeteStatusGroupViewItem::KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , QListView *parent, const char *name ) - : QListViewItem(parent,name) +KopeteStatusGroupViewItem::KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , TQListView *parent, const char *name ) + : TQListViewItem(parent,name) { m_status = status_; } @@ -30,7 +30,7 @@ KopeteStatusGroupViewItem::~KopeteStatusGroupViewItem() { } -QString KopeteStatusGroupViewItem::key( int, bool ) const +TQString KopeteStatusGroupViewItem::key( int, bool ) const { switch (m_status) { diff --git a/kopete/kopete/contactlist/kopetestatusgroupviewitem.h b/kopete/kopete/contactlist/kopetestatusgroupviewitem.h index 8b1a930f..2f4f08b3 100644 --- a/kopete/kopete/contactlist/kopetestatusgroupviewitem.h +++ b/kopete/kopete/contactlist/kopetestatusgroupviewitem.h @@ -30,13 +30,13 @@ class KopeteStatusGroupViewItem : public QListViewItem { public: - KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , QListView *parent, const char *name=0); + KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , TQListView *parent, const char *name=0); ~KopeteStatusGroupViewItem(); private: Kopete::OnlineStatus::StatusType m_status; - QString key( int column, bool ascending ) const; + TQString key( int column, bool ascending ) const; }; 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 -#include -#include +#include +#include +#include -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 pluginData; +TQString accountId; +TQString password; +TQString autoConnect; +TQString protocol; +TQMap 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 */ -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::ConstIterator it; + TQMap::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 ) ) { diff --git a/kopete/kopete/kconf_update/kopete-nameTracking.cpp b/kopete/kopete/kconf_update/kopete-nameTracking.cpp index 391e5132..c0a556e7 100644 --- a/kopete/kopete/kconf_update/kopete-nameTracking.cpp +++ b/kopete/kopete/kconf_update/kopete-nameTracking.cpp @@ -14,60 +14,60 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include -static QTextStream qcerr( stderr, IO_WriteOnly ); +static TQTextStream qcerr( stderr, IO_WriteOnly ); int main() { KInstance* inst = new KInstance( "Update script" ); - QString filename = locateLocal( "data", QString::fromLatin1( "kopete/contactlist.xml" ) ); + TQString filename = locateLocal( "data", TQString::fromLatin1( "kopete/contactlist.xml" ) ); // Load contact list & save backup. - QFile contactListFile( filename ); + TQFile contactListFile( filename ); contactListFile.open( IO_ReadOnly ); - QDomDocument contactList; + TQDomDocument contactList; contactList.setContent( &contactListFile ); contactListFile.close(); - QDir().rename( filename, filename + QString::fromLatin1( ".bak" ) ); + TQDir().rename( filename, filename + TQString::fromLatin1( ".bak" ) ); // parse the XML file - QDomElement list = contactList.documentElement(); - QDomElement mcElement = list.firstChild().toElement(); + TQDomElement list = contactList.documentElement(); + TQDomElement mcElement = list.firstChild().toElement(); while( !mcElement.isNull() ) { // update all the MetaContacts - if( mcElement.tagName() == QString::fromLatin1("meta-contact") ) + if( mcElement.tagName() == TQString::fromLatin1("meta-contact") ) { - QDomElement displayName; - QDomElement subcontact; + TQDomElement displayName; + TQDomElement subcontact; - QDomElement elem = mcElement.firstChild().toElement(); + TQDomElement elem = mcElement.firstChild().toElement(); while( !elem.isNull() ) { - if( elem.tagName() == QString::fromLatin1( "display-name" ) ) + if( elem.tagName() == TQString::fromLatin1( "display-name" ) ) displayName = elem; - if( elem.tagName() == QString::fromLatin1( "plugin-data" ) ) + if( elem.tagName() == TQString::fromLatin1( "plugin-data" ) ) { // check if it's a contact by checking for "protocol" substring in the tag, // and the presence of a contactId child element. - QString pluginId = elem.attribute( QString::fromLatin1( "plugin-id" ) ); + TQString pluginId = elem.attribute( TQString::fromLatin1( "plugin-id" ) ); bool isProtocol = ( pluginId.contains( "protocol", false ) > 0 ); // case-insensitive search bool hasContactId = false; - QDomNode field = elem.firstChild(); + TQDomNode field = elem.firstChild(); while( !field.isNull() ) { - QDomElement fieldElem = field.toElement(); + TQDomElement fieldElem = field.toElement(); if( !fieldElem.isNull() && - fieldElem.tagName() == QString::fromLatin1( "plugin-data-field" ) && - fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "contactId" ) ) + fieldElem.tagName() == TQString::fromLatin1( "plugin-data-field" ) && + fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "contactId" ) ) { hasContactId = true; break; @@ -85,35 +85,35 @@ int main() // check if we're even tracking the subcontact's name // if displayName.isNull(), it simply won't find the attribute; no harm done bool tracking = - ( displayName.attribute( QString::fromLatin1( "trackChildNameChanges" ), - QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + ( displayName.attribute( TQString::fromLatin1( "trackChildNameChanges" ), + TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); if( !displayName.isNull() && !subcontact.isNull() && tracking ) { // collect info - QString nsCID; - QString nsPID; - QString nsAID; + TQString nsCID; + TQString nsPID; + TQString nsAID; - nsPID = subcontact.attribute( QString::fromLatin1( "plugin-id" ) ); - QDomNode field = subcontact.firstChild(); + nsPID = subcontact.attribute( TQString::fromLatin1( "plugin-id" ) ); + TQDomNode field = subcontact.firstChild(); while( !field.isNull() ) { - QDomElement fieldElem = field.toElement(); + TQDomElement fieldElem = field.toElement(); - if( !fieldElem.isNull() && fieldElem.tagName() == QString::fromLatin1( "plugin-data-field" ) ) + if( !fieldElem.isNull() && fieldElem.tagName() == TQString::fromLatin1( "plugin-data-field" ) ) { - if( fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "contactId" ) ) + if( fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "contactId" ) ) nsCID = fieldElem.text(); - if( fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "accountId" ) ) + if( fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "accountId" ) ) nsAID = fieldElem.text(); } field = field.nextSibling(); } // create the tracking info - displayName.setAttribute( QString::fromLatin1( "nameSourceContactId" ), nsCID ); - displayName.setAttribute( QString::fromLatin1( "nameSourcePluginId" ), nsPID ); - displayName.setAttribute( QString::fromLatin1( "nameSourceAccountId" ), nsAID ); + displayName.setAttribute( TQString::fromLatin1( "nameSourceContactId" ), nsCID ); + displayName.setAttribute( TQString::fromLatin1( "nameSourcePluginId" ), nsPID ); + displayName.setAttribute( TQString::fromLatin1( "nameSourceAccountId" ), nsAID ); } } @@ -122,8 +122,8 @@ int main() // Save converted contactlist contactListFile.open( IO_WriteOnly ); - QTextStream stream( &contactListFile ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( &contactListFile ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << contactList.toString( 4 ); contactListFile.flush(); contactListFile.close(); diff --git a/kopete/kopete/kconf_update/kopete-pluginloader2.cpp b/kopete/kopete/kconf_update/kopete-pluginloader2.cpp index af8daa69..d9b0fb39 100644 --- a/kopete/kopete/kconf_update/kopete-pluginloader2.cpp +++ b/kopete/kopete/kconf_update/kopete-pluginloader2.cpp @@ -16,23 +16,23 @@ ************************************************************************* */ -#include -#include +#include +#include -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 ); -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.isEmpty() && key == "Plugins" ) { - QStringList plugins = QStringList::split( ',', value ); + TQStringList plugins = TQStringList::split( ',', value ); if ( !plugins.isEmpty() ) { qcout << "[Plugins]" << endl; - for ( QStringList::Iterator it = plugins.begin(); it != plugins.end(); ++it ) + for ( TQStringList::Iterator it = plugins.begin(); it != plugins.end(); ++it ) qcout << "kopete_" << ( *it ).remove( ".desktop" ) << "Enabled=true" << endl; } qcout << "# DELETE []Plugins" << endl; @@ -46,18 +46,18 @@ void parseKey( const QString &group, const QString &key, const QString &value, c 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 ) ) { diff --git a/kopete/kopete/kimiface.h b/kopete/kopete/kimiface.h index 86711bf9..0ae3da9d 100644 --- a/kopete/kopete/kimiface.h +++ b/kopete/kopete/kimiface.h @@ -22,9 +22,9 @@ #ifndef KIMIFACE_H #define KIMIFACE_H -#include +#include #include -#include +#include #include /** @@ -45,25 +45,25 @@ k_dcop: * address book. * @return a list of KABC uids. */ - virtual QStringList allContacts() = 0; + virtual TQStringList allContacts() = 0; /** * Obtain a list of KDE address book entries who are * currently reachable. * @return a list of KABC uids who can receive a message, even if online. */ - virtual QStringList reachableContacts() = 0; + virtual TQStringList reachableContacts() = 0; /** * Obtain a list of KDE address book entries who are * currently online. * @return a list of KABC uids who are online with unspecified presence. */ - virtual QStringList onlineContacts() = 0; + virtual TQStringList onlineContacts() = 0; /** * Obtain a list of KDE address book entries who may * receive file transfers. * @return a list of KABC uids capable of file transfer. */ - virtual QStringList fileTransferContacts() = 0; + virtual TQStringList fileTransferContacts() = 0; // individual /** @@ -71,38 +71,38 @@ k_dcop: * @param uid the KABC uid you are interested in. * @return whether one of the chat programs KIMProxy talks to knows of this KABC uid. */ - virtual bool isPresent( const QString & uid ) = 0; + virtual bool isPresent( const TQString & uid ) = 0; /** * Obtain the IM app's idea of the contact's display name * Useful if KABC lookups may be too slow * @param KABC uid. * @return The corresponding display name. */ - virtual QString displayName( const QString & uid ) = 0; + virtual TQString displayName( const TQString & uid ) = 0; /** * Obtain the IM presence as a i18ned string for the specified addressee * @param uid the KABC uid you want the presence for. * @return the i18ned string describing presence. */ - virtual QString presenceString( const QString & uid ) = 0; + virtual TQString presenceString( const TQString & uid ) = 0; /** * Obtain the IM presence as a number (see KIMIface) for the specified addressee * @param uid the KABC uid you want the presence for. * @return a numeric representation of presence - currently one of 0 (Unknown), 1 (Offline), 2 (Connecting), 3 (Away), 4 (Online) */ - virtual int presenceStatus( const QString & uid ) = 0; + virtual int presenceStatus( const TQString & uid ) = 0; /** * Indicate if a given uid can receive files * @param uid the KABC uid you are interested in. * @return Whether the specified addressee can receive files. */ - virtual bool canReceiveFiles( const QString & uid ) = 0; + virtual bool canReceiveFiles( const TQString & uid ) = 0; /** * Some media are unidirectional (eg, sending SMS via a web interface). * @param uid the KABC uid you are interested in. * @return Whether the specified addressee can respond. */ - virtual bool canRespond( const QString & uid ) = 0; + virtual bool canRespond( const TQString & uid ) = 0; /** * Get the KABC uid corresponding to the supplied IM address * Protocols should be @@ -110,26 +110,26 @@ k_dcop: * @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", * @return a KABC uid or null if none found/ */ - virtual QString locate( const QString & contactId, const QString & protocol ) = 0; + virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0; // metadata /** * Obtain the icon representing IM presence for the specified addressee * @param uid the KABC uid you want the presence for. * @return a pixmap representing the uid's presence. */ - virtual QPixmap icon( const QString & uid ) = 0; + virtual TQPixmap icon( const TQString & uid ) = 0; /** * Get the supplied addressee's current context (home, work, or any). * @param uid the KABC uid you want the context for. - * @return A QString describing the context, or null if not supported. + * @return A TQString describing the context, or null if not supported. */ - virtual QString context( const QString & uid ) = 0; + virtual TQString context( const TQString & uid ) = 0; // App capabilities /** * Discover what protocols the application supports * @return the set of protocols that the application supports */ - virtual QStringList protocols() = 0; + virtual TQStringList protocols() = 0; // ACTORS /** @@ -139,18 +139,18 @@ k_dcop: * @param uid the KABC uid you want to chat with. * @param message the message to send them. */ - virtual void messageContact( const QString &uid, const QString& message ) = 0; + virtual void messageContact( const TQString &uid, const TQString& message ) = 0; /** * Open a chat to a contact, and optionally set some initial text */ - virtual void messageNewContact( const QString &contactId, const QString &protocol ) = 0; + virtual void messageNewContact( const TQString &contactId, const TQString &protocol ) = 0; /** * Start a chat session with the specified addressee * @param uid the KABC uid you want to chat with. */ - virtual void chatWithContact( const QString &uid ) = 0; + virtual void chatWithContact( const TQString &uid ) = 0; /** * Send the file to the contact @@ -159,8 +159,8 @@ k_dcop: * @param altFileName an alternate filename describing the file * @param fileSize file size in bytes */ - virtual void sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName = QString::null, uint fileSize = 0) = 0; + virtual void sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName = TQString::null, uint fileSize = 0) = 0; // MUTATORS // Contact list @@ -170,7 +170,7 @@ k_dcop: * @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", ... * @return whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported. */ - virtual bool addContact( const QString &contactId, const QString &protocol ) = 0; + virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0; // SIGNALS k_dcop_signals: /** @@ -179,7 +179,7 @@ k_dcop_signals: * @param appId the dcop application id of the program the signal originates from. * @param presence the new numeric presence @ref presenceStatus */ - void contactPresenceChanged( QString uid, QCString appId, int presence ); + void contactPresenceChanged( TQString uid, TQCString appId, int presence ); }; #endif diff --git a/kopete/kopete/kimifaceimpl.cpp b/kopete/kopete/kimifaceimpl.cpp index dd1bd962..1b835438 100644 --- a/kopete/kopete/kimifaceimpl.cpp +++ b/kopete/kopete/kimifaceimpl.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -40,22 +40,22 @@ #include "kimifaceimpl.h" -KIMIfaceImpl::KIMIfaceImpl() : DCOPObject( "KIMIface" ), QObject() +KIMIfaceImpl::KIMIfaceImpl() : DCOPObject( "KIMIface" ), TQObject() { connect( Kopete::ContactList::self(), - SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), - SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); + TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), + TQT_SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); } KIMIfaceImpl::~KIMIfaceImpl() { } -QStringList KIMIfaceImpl::allContacts() +TQStringList KIMIfaceImpl::allContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) { if ( !it.current()->metaContactId().contains(':') ) @@ -65,11 +65,11 @@ QStringList KIMIfaceImpl::allContacts() return result; } -QStringList KIMIfaceImpl::reachableContacts() +TQStringList KIMIfaceImpl::reachableContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) { if ( it.current()->isReachable() && !it.current()->metaContactId().contains(':') ) @@ -79,11 +79,11 @@ QStringList KIMIfaceImpl::reachableContacts() return result; } -QStringList KIMIfaceImpl::onlineContacts() +TQStringList KIMIfaceImpl::onlineContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() && !it.current()->metaContactId().contains(':') ) @@ -93,11 +93,11 @@ QStringList KIMIfaceImpl::onlineContacts() return result; } -QStringList KIMIfaceImpl::fileTransferContacts() +TQStringList KIMIfaceImpl::fileTransferContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) { if ( it.current()->canAcceptFiles() && !it.current()->metaContactId().contains(':') ) @@ -107,7 +107,7 @@ QStringList KIMIfaceImpl::fileTransferContacts() return result; } -bool KIMIfaceImpl::isPresent( const QString & uid ) +bool KIMIfaceImpl::isPresent( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); @@ -116,18 +116,18 @@ bool KIMIfaceImpl::isPresent( const QString & uid ) } -QString KIMIfaceImpl::displayName( const QString & uid ) +TQString KIMIfaceImpl::displayName( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); - QString name; + TQString name; if ( mc ) name = mc->displayName(); return name; } -int KIMIfaceImpl::presenceStatus( const QString & uid ) +int KIMIfaceImpl::presenceStatus( const TQString & uid ) { //kdDebug( 14000 ) << k_funcinfo << endl; int p = -1; @@ -158,10 +158,10 @@ int KIMIfaceImpl::presenceStatus( const QString & uid ) return p; } -QString KIMIfaceImpl::presenceString( const QString & uid ) +TQString KIMIfaceImpl::presenceString( const TQString & uid ) { //kdDebug( 14000 ) << "KIMIfaceImpl::presenceString" << endl; - QString p; + TQString p; Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) { @@ -172,12 +172,12 @@ QString KIMIfaceImpl::presenceString( const QString & uid ) else { kdDebug( 14000 ) << "Couldn't find MC: " << uid << endl;; - p = QString(); + p = TQString(); } return p; } -bool KIMIfaceImpl::canReceiveFiles( const QString & uid ) +bool KIMIfaceImpl::canReceiveFiles( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); @@ -188,15 +188,15 @@ bool KIMIfaceImpl::canReceiveFiles( const QString & uid ) return false; } -bool KIMIfaceImpl::canRespond( const QString & uid ) +bool KIMIfaceImpl::canRespond( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); if ( mc ) { - QPtrList list = mc->contacts(); - QPtrListIterator it( list ); + TQPtrList list = mc->contacts(); + TQPtrListIterator it( list ); Kopete::Contact *contact; while ( ( contact = it.current() ) != 0 ) { @@ -208,16 +208,16 @@ bool KIMIfaceImpl::canRespond( const QString & uid ) return false; } -QString KIMIfaceImpl::locate( const QString & contactId, const QString & protocolId ) +TQString KIMIfaceImpl::locate( const TQString & contactId, const TQString & protocolId ) { Kopete::MetaContact *mc = locateProtocolContact( contactId, protocolId ); if ( mc ) return mc->metaContactId(); else - return QString::null; + return TQString::null; } -Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & contactId, const QString & protocolId ) +Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const TQString & contactId, const TQString & protocolId ) { Kopete::MetaContact *mc = 0; // find a matching protocol @@ -226,8 +226,8 @@ Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & conta if ( protocol ) { // find its accounts - QDict accounts = Kopete::AccountManager::self()->accounts( protocol ); - QDictIterator it( accounts ); + TQDict accounts = Kopete::AccountManager::self()->accounts( protocol ); + TQDictIterator it( accounts ); for( ; it.current(); ++it ) { Kopete::Contact *c = Kopete::ContactList::self()->findContact( protocolId, it.currentKey(), contactId ); @@ -241,35 +241,35 @@ Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & conta return mc; } -QPixmap KIMIfaceImpl::icon( const QString & uid ) +TQPixmap KIMIfaceImpl::icon( const TQString & uid ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); - QPixmap p; + TQPixmap p; if ( m ) p = SmallIcon( m->statusIcon() ); return p; } -QString KIMIfaceImpl::context( const QString & uid ) +TQString KIMIfaceImpl::context( const TQString & uid ) { // TODO: support context // shush warning - QString myUid = uid; + TQString myUid = uid; - return QString::null; + return TQString::null; } -QStringList KIMIfaceImpl::protocols() +TQStringList KIMIfaceImpl::protocols() { - QValueList protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" ); - QStringList protocolList; - for ( QValueList::Iterator it = protocols.begin(); it != protocols.end(); ++it ) + TQValueList protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" ); + TQStringList protocolList; + for ( TQValueList::Iterator it = protocols.begin(); it != protocols.end(); ++it ) protocolList.append( (*it)->name() ); return protocolList; } -void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageText ) +void KIMIfaceImpl::messageContact( const TQString &uid, const TQString& messageText ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -285,14 +285,14 @@ void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageTex unknown( uid ); } -void KIMIfaceImpl::messageNewContact( const QString &contactId, const QString &protocol ) +void KIMIfaceImpl::messageNewContact( const TQString &contactId, const TQString &protocol ) { Kopete::MetaContact *mc = locateProtocolContact( contactId, protocol ); if ( mc ) mc->sendMessage(); } -void KIMIfaceImpl::chatWithContact( const QString &uid ) +void KIMIfaceImpl::chatWithContact( const TQString &uid ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -301,8 +301,8 @@ void KIMIfaceImpl::chatWithContact( const QString &uid ) unknown( uid ); } -void KIMIfaceImpl::sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName, uint fileSize) +void KIMIfaceImpl::sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName, uint fileSize) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -310,7 +310,7 @@ void KIMIfaceImpl::sendFile(const QString &uid, const KURL &sourceURL, // else, prompt to create a new MC associated with UID } -bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocolId ) +bool KIMIfaceImpl::addContact( const TQString &contactId, const TQString &protocolId ) { // find a matching protocol Kopete::Protocol *protocol = dynamic_cast( Kopete::PluginManager::self()->plugin( protocolId ) ); @@ -318,8 +318,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol if ( protocol ) { // find its accounts - QDict accounts = Kopete::AccountManager::self()->accounts( protocol ); - QDictIterator it( accounts ); + TQDict accounts = Kopete::AccountManager::self()->accounts( protocol ); + TQDictIterator it( accounts ); Kopete::Account *ac = it.toFirst(); if ( ac ) { @@ -332,8 +332,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol void KIMIfaceImpl::slotMetaContactAdded( Kopete::MetaContact *mc ) { - connect( mc, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); + connect( mc, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); } void KIMIfaceImpl::slotContactStatusChanged( Kopete::MetaContact *mc ) @@ -363,16 +363,16 @@ void KIMIfaceImpl::slotContactStatusChanged( Kopete::MetaContact *mc ) } // tell anyone who's listening over DCOP contactPresenceChanged( mc->metaContactId(), kapp->name(), p ); -/* QByteArray params; - QDataStream stream(params, IO_WriteOnly); +/* TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << mc->metaContactId(); stream << kapp->name(); stream << p; - kapp->dcopClient()->emitDCOPSignal( "contactPresenceChanged( QString, QCString, int )", params );*/ + kapp->dcopClient()->emitDCOPSignal( "contactPresenceChanged( TQString, TQCString, int )", params );*/ } } -void KIMIfaceImpl::unknown( const QString &uid ) +void KIMIfaceImpl::unknown( const TQString &uid ) { // warn the user that the KABC contact associated with this UID isn't known to kopete, // either associate an existing contact with KABC or add a new one using the ACW. @@ -384,7 +384,7 @@ void KIMIfaceImpl::unknown( const QString &uid ) } else { - QString apology = i18n( "Translators: %1 is the name of a person taken from the KDE address book, who Kopete doesn't know about. Kopete must either be told that an existing contact in Kopete is this person, or add a new contact for them", + TQString apology = i18n( "Translators: %1 is the name of a person taken from the KDE address book, who Kopete doesn't know about. Kopete must either be told that an existing contact in Kopete is this person, or add a new contact for them", "

The KDE Address Book has no instant messaging information for

%1.

If he/she is already present in the Kopete contact list, indicate the correct addressbook entry in their properties.

Otherwise, add a new contact using the Add Contact wizard.

" ); apology = apology.arg( addr.realName() ); KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, apology, i18n( "No Instant Messaging Address" ) ); diff --git a/kopete/kopete/kimifaceimpl.h b/kopete/kopete/kimifaceimpl.h index ff8c3611..e5635195 100644 --- a/kopete/kopete/kimifaceimpl.h +++ b/kopete/kopete/kimifaceimpl.h @@ -17,7 +17,7 @@ #ifndef KIMIFACEIMPL_H #define KIMIFACEIMPL_H -#include +#include #include "kimiface.h" namespace Kopete @@ -25,72 +25,72 @@ namespace Kopete class MetaContact; } -class KIMIfaceImpl : public QObject, public KIMIface +class KIMIfaceImpl : public TQObject, public KIMIface { Q_OBJECT public: KIMIfaceImpl(); ~KIMIfaceImpl(); - QStringList allContacts(); - QStringList reachableContacts(); - QStringList onlineContacts(); - QStringList fileTransferContacts(); + TQStringList allContacts(); + TQStringList reachableContacts(); + TQStringList onlineContacts(); + TQStringList fileTransferContacts(); // individual - bool isPresent( const QString &uid ); - QString displayName( const QString &uid ); - QString presenceString( const QString &uid ); - int presenceStatus( const QString &uid ); - bool canReceiveFiles( const QString &uid ); - bool canRespond( const QString &uid ); - QString locate( const QString &contactId, const QString &protocol ); + bool isPresent( const TQString &uid ); + TQString displayName( const TQString &uid ); + TQString presenceString( const TQString &uid ); + int presenceStatus( const TQString &uid ); + bool canReceiveFiles( const TQString &uid ); + bool canRespond( const TQString &uid ); + TQString locate( const TQString &contactId, const TQString &protocol ); // metadata - QPixmap icon( const QString &uid ); - QString context( const QString &uid ); + TQPixmap icon( const TQString &uid ); + TQString context( const TQString &uid ); // App capabilities - QStringList protocols(); + TQStringList protocols(); // ACTORS /** * Message a contact by their metaContactId, aka their uid in KABC. */ - void messageContact( const QString &uid, const QString& message ); + void messageContact( const TQString &uid, const TQString& message ); /** * Open a chat to a contact, and optionally set some initial text */ - void messageNewContact( const QString &contactId, const QString &protocolId ); + void messageNewContact( const TQString &contactId, const TQString &protocolId ); /** * Message a contact by their metaContactId, aka their uid in KABC. */ - void chatWithContact( const QString &uid ); + void chatWithContact( const TQString &uid ); /** * Send the file to the contact */ - void sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName = QString::null, uint fileSize = 0); + void sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName = TQString::null, uint fileSize = 0); // MUTATORS // Contact list - bool addContact( const QString &contactId, const QString &protocolId ); + bool addContact( const TQString &contactId, const TQString &protocolId ); // SIGNALS /** * DCOP Signal used to notify * external apps of status changes. */ - void contactStatusChanged( const QString &uid); + void contactStatusChanged( const TQString &uid); protected: - void unknown( const QString &uid ); + void unknown( const TQString &uid ); protected slots: void slotMetaContactAdded( Kopete::MetaContact *mc ); void slotContactStatusChanged( Kopete::MetaContact *mc ); private: - Kopete::MetaContact *locateProtocolContact( const QString & contactId, const QString & protocolId ); + Kopete::MetaContact *locateProtocolContact( const TQString & contactId, const TQString & protocolId ); }; #endif diff --git a/kopete/kopete/kopeteaccountstatusbaricon.cpp b/kopete/kopete/kopeteaccountstatusbaricon.cpp index 05855b63..a2a65355 100644 --- a/kopete/kopete/kopeteaccountstatusbaricon.cpp +++ b/kopete/kopete/kopeteaccountstatusbaricon.cpp @@ -16,23 +16,23 @@ */ #include "kopeteaccountstatusbaricon.h" -#include "qcursor.h" +#include "tqcursor.h" #include //#include -KopeteAccountStatusBarIcon::KopeteAccountStatusBarIcon( Kopete::Account *acc, QWidget *parent, +KopeteAccountStatusBarIcon::KopeteAccountStatusBarIcon( Kopete::Account *acc, TQWidget *parent, const char *name ) -: QLabel( parent, name ) +: TQLabel( parent, name ) { // kdDebug(14000) << "[KopeteAccountStatusBarIcon] Setting Initial Protocol Icon" << endl; //setMask(initialPixmap->mask()); - //setPixmap( Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, proto, 0, "status_unknown", QString::null, QString::null ).protocolIcon() ); + //setPixmap( Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, proto, 0, "status_unknown", TQString::null, TQString::null ).protocolIcon() ); //setPixmap( proto->status().protocolIcon() ); setFixedSize ( 16, 16 ); - setCursor(QCursor(Qt::PointingHandCursor)); + setCursor(TQCursor(Qt::PointingHandCursor)); show(); m_account = acc; @@ -42,15 +42,15 @@ KopeteAccountStatusBarIcon::~KopeteAccountStatusBarIcon() { } -void KopeteAccountStatusBarIcon::mousePressEvent( QMouseEvent *me ) +void KopeteAccountStatusBarIcon::mousePressEvent( TQMouseEvent *me ) { - if( me->button() == QEvent::RightButton ) + if( me->button() == TQEvent::RightButton ) { - emit rightClicked( m_account, QPoint( me->globalX(), me->globalY() ) ); + emit rightClicked( m_account, TQPoint( me->globalX(), me->globalY() ) ); } - else if( me->button() == QEvent::LeftButton ) + else if( me->button() == TQEvent::LeftButton ) { - emit leftClicked( m_account, QPoint( me->globalX(), me->globalY() ) ); + emit leftClicked( m_account, TQPoint( me->globalX(), me->globalY() ) ); } } diff --git a/kopete/kopete/kopeteaccountstatusbaricon.h b/kopete/kopete/kopeteaccountstatusbaricon.h index 7c3034c9..503008ff 100644 --- a/kopete/kopete/kopeteaccountstatusbaricon.h +++ b/kopete/kopete/kopeteaccountstatusbaricon.h @@ -18,9 +18,9 @@ #ifndef KOPETEACCOUNTSTATUSBARICON_H #define KOPETEACCOUNTSTATUSBARICON_H -#include -#include -#include +#include +#include +#include namespace Kopete { @@ -38,17 +38,17 @@ public: /** * Create a statusbar icon. */ - KopeteAccountStatusBarIcon( Kopete::Account *acc, QWidget *parent, + KopeteAccountStatusBarIcon( Kopete::Account *acc, TQWidget *parent, const char *name = 0 ); ~KopeteAccountStatusBarIcon(); signals: - void rightClicked( Kopete::Account *acc, const QPoint &p ); - void leftClicked( Kopete::Account *acc, const QPoint &p ); + void rightClicked( Kopete::Account *acc, const TQPoint &p ); + void leftClicked( Kopete::Account *acc, const TQPoint &p ); protected: - virtual void mousePressEvent( QMouseEvent *me ); + virtual void mousePressEvent( TQMouseEvent *me ); private: Kopete::Account *m_account; diff --git a/kopete/kopete/kopeteapplication.cpp b/kopete/kopete/kopeteapplication.cpp index 3a481d3f..3db6c51f 100644 --- a/kopete/kopete/kopeteapplication.cpp +++ b/kopete/kopete/kopeteapplication.cpp @@ -20,8 +20,8 @@ #include "kopeteapplication.h" -#include -#include +#include +#include #include #include @@ -65,11 +65,11 @@ KopeteApplication::KopeteApplication() * FIXME: This is a workaround for a quite odd problem: * When starting up kopete and the msn plugin gets loaded it can bring up * a messagebox, in case the msg configuration is missing. This messagebox - * will result in a QApplication::enter_loop() call, an event loop is + * will result in a TQApplication::enter_loop() call, an event loop is * created. At this point however the loop_level is 0, because this is all * still inside the KopeteApplication constructor, before the exec() call from main. * When the messagebox is finished the loop_level will drop down to zero and - * QApplication thinks the application shuts down (this is usually the case + * TQApplication thinks the application shuts down (this is usually the case * when the loop_level goes down to zero) . So it emits aboutToQuit(), to * which KApplication is connected and re-emits shutdown() , to which again * KMainWindow (a KopeteWindow instance exists already) is connected. KMainWindow's @@ -83,10 +83,10 @@ KopeteApplication::KopeteApplication() * Additionally, it makes the GUI appear less 'blocking' during startup, so * there is a secondary benefit as well here. (Martijn) */ - QTimer::singleShot( 0, this, SLOT( slotLoadPlugins() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadPlugins() ) ); m_mimeFactory = new Kopete::MimeSourceFactory; - QMimeSourceFactory::addFactory( m_mimeFactory ); + TQMimeSourceFactory::addFactory( m_mimeFactory ); //Create the emoticon installer m_emoticonHandler = new Kopete::EmoticonMimeTypeHandler; @@ -148,8 +148,8 @@ void KopeteApplication::slotLoadPlugins() */ // Prevent plugins from loading? (--disable=foo,bar) - QStringList disableArgs = QStringList::split( ',', args->getOption( "disable" ) ); - for ( QStringList::ConstIterator it = disableArgs.begin(); it != disableArgs.end(); ++it ) + TQStringList disableArgs = TQStringList::split( ',', args->getOption( "disable" ) ); + for ( TQStringList::ConstIterator it = disableArgs.begin(); it != disableArgs.end(); ++it ) { showConfigDialog = false; Kopete::PluginManager::self()->setPluginEnabled( *it, false ); @@ -160,8 +160,8 @@ void KopeteApplication::slotLoadPlugins() { config->deleteGroup( "Plugins", true ); showConfigDialog = false; - QStringList plugins = QStringList::split( ',', args->getOption( "load-plugins" ) ); - for ( QStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it ) + TQStringList plugins = TQStringList::split( ',', args->getOption( "load-plugins" ) ); + for ( TQStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it ) Kopete::PluginManager::self()->setPluginEnabled( *it, true ); } @@ -177,15 +177,15 @@ void KopeteApplication::slotLoadPlugins() showConfigDialog = false; // pretend all plugins were loaded :) - QTimer::singleShot(0, this, SLOT( slotAllPluginsLoaded() )); + TQTimer::singleShot(0, this, TQT_SLOT( slotAllPluginsLoaded() )); } else { Kopete::PluginManager::self()->loadAllPlugins(); } - connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ), - this, SLOT( slotAllPluginsLoaded() )); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ), + this, TQT_SLOT( slotAllPluginsLoaded() )); if( showConfigDialog ) { @@ -217,24 +217,24 @@ void KopeteApplication::slotAllPluginsLoaded() // Handle things like '--autoconnect foo,bar --autoconnect foobar' QCStringList connectArgsC = args->getOptionList( "autoconnect" ); - QStringList connectArgs; + TQStringList connectArgs; for ( QCStringList::ConstIterator it = connectArgsC.begin(); it != connectArgsC.end(); ++it ) { - QStringList split = QStringList::split( ',', QString::fromLatin1( *it ) ); + TQStringList split = TQStringList::split( ',', TQString::fromLatin1( *it ) ); - for ( QStringList::ConstIterator it2 = split.begin(); it2 != split.end(); ++it2 ) + for ( TQStringList::ConstIterator it2 = split.begin(); it2 != split.end(); ++it2 ) { connectArgs.append( *it2 ); } } - for ( QStringList::ConstIterator i = connectArgs.begin(); i != connectArgs.end(); ++i ) + for ( TQStringList::ConstIterator i = connectArgs.begin(); i != connectArgs.end(); ++i ) { - QRegExp rx( QString::fromLatin1( "([^\\|]*)\\|\\|(.*)" ) ); + TQRegExp rx( TQString::fromLatin1( "([^\\|]*)\\|\\|(.*)" ) ); rx.search( *i ); - QString protocolId = rx.cap( 1 ); - QString accountId = rx.cap( 2 ); + TQString protocolId = rx.cap( 1 ); + TQString accountId = rx.cap( 2 ); if ( accountId.isEmpty() ) { @@ -244,7 +244,7 @@ void KopeteApplication::slotAllPluginsLoaded() continue; } - QPtrListIterator it( Kopete::AccountManager::self()->accounts() ); + TQPtrListIterator it( Kopete::AccountManager::self()->accounts() ); Kopete::Account *account; while ( ( account = it.current() ) != 0 ) { @@ -316,7 +316,7 @@ void KopeteApplication::quitKopete() m_isShuttingDown = true; // close all windows - QPtrListIterator it(*KMainWindow::memberList); + TQPtrListIterator it(*KMainWindow::memberList); for (it.toFirst(); it.current(); ++it) { if ( !it.current()->close() ) diff --git a/kopete/kopete/kopeteapplication.h b/kopete/kopete/kopeteapplication.h index 9634adca..d9264031 100644 --- a/kopete/kopete/kopeteapplication.h +++ b/kopete/kopete/kopeteapplication.h @@ -24,7 +24,7 @@ #include #endif -#include +#include #include @@ -79,10 +79,10 @@ private slots: private: // The main window might get deleted behind our back (W_DestructiveClose), // so use a guarded pointer - QGuardedPtr m_mainWindow; + TQGuardedPtr m_mainWindow; bool m_isShuttingDown; Kopete::MimeTypeHandler *m_emoticonHandler; - QMimeSourceFactory *m_mimeFactory; + TQMimeSourceFactory *m_mimeFactory; private: void handleURLArgs(); diff --git a/kopete/kopete/kopeteballoon.cpp b/kopete/kopete/kopeteballoon.cpp index cee42240..13696da1 100644 --- a/kopete/kopete/kopeteballoon.cpp +++ b/kopete/kopete/kopeteballoon.cpp @@ -18,11 +18,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,20 +39,20 @@ #include "systemtray.h" #include "kopeteprefs.h" -KopeteActiveLabel::KopeteActiveLabel( QWidget *parent, const char *name ) +KopeteActiveLabel::KopeteActiveLabel( TQWidget *parent, const char *name ) : KActiveLabel( parent, name ) { } -KopeteActiveLabel::KopeteActiveLabel( const QString& text, QWidget *parent, +KopeteActiveLabel::KopeteActiveLabel( const TQString& text, TQWidget *parent, const char *name ) : KActiveLabel( text, parent, name ) { } -void KopeteActiveLabel::openLink( const QString& link ) +void KopeteActiveLabel::openLink( const TQString& link ) { KURL url( link ); - QString protocol = url.protocol(); + TQString protocol = url.protocol(); if ( protocol == "mailto" ) kapp->invokeMailer(url); @@ -63,26 +63,26 @@ void KopeteActiveLabel::openLink( const QString& link ) } } -KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix) -: QWidget(0L, "KopeteBalloon", WStyle_StaysOnTop | WStyle_Customize | +KopeteBalloon::KopeteBalloon(const TQString &text, const TQString &pix) +: TQWidget(0L, "KopeteBalloon", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM) { setCaption(""); - QVBoxLayout *BalloonLayout = new QVBoxLayout(this, 22, + TQVBoxLayout *BalloonLayout = new TQVBoxLayout(this, 22, KDialog::spacingHint(), "BalloonLayout"); // BEGIN Layout1 - QHBoxLayout *Layout1 = new QHBoxLayout(BalloonLayout, + TQHBoxLayout *Layout1 = new TQHBoxLayout(BalloonLayout, KDialog::spacingHint(), "Layout1"); - //QLabel *mCaption = new QLabel(text, this, "mCaption"); + //TQLabel *mCaption = new TQLabel(text, this, "mCaption"); KopeteActiveLabel *mCaption = new KopeteActiveLabel(text, this, "mCaption"); - mCaption->setPalette(QToolTip::palette()); - mCaption->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); + mCaption->setPalette(TQToolTip::palette()); + mCaption->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); if (!pix.isEmpty()) { - QLabel *mImage = new QLabel(this, "mImage"); + TQLabel *mImage = new TQLabel(this, "mImage"); mImage->setScaledContents(FALSE); mImage->setPixmap(locate("data", pix)); @@ -93,11 +93,11 @@ KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix) // BEGIN Layout2 - QHBoxLayout *Layout2 = new QHBoxLayout(BalloonLayout, + TQHBoxLayout *Layout2 = new TQHBoxLayout(BalloonLayout, KDialog::spacingHint(), "Layout2"); - QPushButton *mViewButton = new QPushButton(i18n("to view", "View"), this, + TQPushButton *mViewButton = new TQPushButton(i18n("to view", "View"), this, "mViewButton"); - QPushButton *mIgnoreButton = new QPushButton(i18n("Ignore"), this, + TQPushButton *mIgnoreButton = new TQPushButton(i18n("Ignore"), this, "mIgnoreButton"); Layout2->addStretch(); @@ -106,29 +106,29 @@ KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix) Layout2->addStretch(); // END Layout2 - setPalette(QToolTip::palette()); + setPalette(TQToolTip::palette()); setAutoMask(TRUE); - connect(mViewButton, SIGNAL(clicked()), - this, SIGNAL(signalButtonClicked())); - connect(mViewButton, SIGNAL(clicked()), - this, SLOT(deleteLater())); - connect(mIgnoreButton, SIGNAL(clicked()), - this, SIGNAL(signalIgnoreButtonClicked())); - connect(mIgnoreButton, SIGNAL(clicked()), - this, SLOT(deleteLater())); - connect(mCaption, SIGNAL(linkClicked(const QString &)), - this, SIGNAL(signalIgnoreButtonClicked())); - connect(mCaption, SIGNAL(linkClicked(const QString &)), - this, SLOT(deleteLater())); + connect(mViewButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalButtonClicked())); + connect(mViewButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(deleteLater())); + connect(mIgnoreButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalIgnoreButtonClicked())); + connect(mIgnoreButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(deleteLater())); + connect(mCaption, TQT_SIGNAL(linkClicked(const TQString &)), + this, TQT_SIGNAL(signalIgnoreButtonClicked())); + connect(mCaption, TQT_SIGNAL(linkClicked(const TQString &)), + this, TQT_SLOT(deleteLater())); KopetePrefs *p = KopetePrefs::prefs(); // Autoclose balloon if (p->balloonClose()) - QTimer::singleShot( p->balloonCloseDelay() * 1000, this, SIGNAL( signalTimeout( ) ) ); + TQTimer::singleShot( p->balloonCloseDelay() * 1000, this, TQT_SIGNAL( signalTimeout( ) ) ); } -void KopeteBalloon::setAnchor(const QPoint &anchor) +void KopeteBalloon::setAnchor(const TQPoint &anchor) { mAnchor = anchor; updateMask(); @@ -136,22 +136,22 @@ void KopeteBalloon::setAnchor(const QPoint &anchor) void KopeteBalloon::updateMask() { - QRegion mask(10, 10, width() - 20, height() - 20); - - QPoint corners[8] = { - QPoint(width() - 50, 10), - QPoint(10, 10), - QPoint(10, height() - 50), - QPoint(width() - 50, height() - 50), - QPoint(width() - 10, 10), - QPoint(10, 10), - QPoint(10, height() - 10), - QPoint(width() - 10, height() - 10) + TQRegion mask(10, 10, width() - 20, height() - 20); + + TQPoint corners[8] = { + TQPoint(width() - 50, 10), + TQPoint(10, 10), + TQPoint(10, height() - 50), + TQPoint(width() - 50, height() - 50), + TQPoint(width() - 10, 10), + TQPoint(10, 10), + TQPoint(10, height() - 10), + TQPoint(width() - 10, height() - 10) }; for (int i = 0; i < 4; ++i) { - QPointArray corner; + TQPointArray corner; corner.makeArc(corners[i].x(), corners[i].y(), 40, 40, i * 16 * 90, 16 * 90); corner.resize(corner.size() + 1); @@ -161,16 +161,16 @@ void KopeteBalloon::updateMask() // get screen-geometry for screen our anchor is on // (geometry can differ from screen to screen! - QRect deskRect = KGlobalSettings::desktopGeometry(mAnchor); + TQRect deskRect = KGlobalSettings::desktopGeometry(mAnchor); bool bottom = (mAnchor.y() + height()) > ((deskRect.y() + deskRect.height()-48)); bool right = (mAnchor.x() + width()) > ((deskRect.x() + deskRect.width()-48)); - QPointArray arrow(4); - arrow.setPoint(0, QPoint(right ? width() : 0, bottom ? height() : 0)); - arrow.setPoint(1, QPoint(right ? width() - 10 : 10, + TQPointArray arrow(4); + arrow.setPoint(0, TQPoint(right ? width() : 0, bottom ? height() : 0)); + arrow.setPoint(1, TQPoint(right ? width() - 10 : 10, bottom ? height() - 30 : 30)); - arrow.setPoint(2, QPoint(right ? width() - 30 : 30, + arrow.setPoint(2, TQPoint(right ? width() - 30 : 30, bottom ? height() - 10 : 10)); arrow.setPoint(3, arrow[0]); mask += arrow; diff --git a/kopete/kopete/kopeteballoon.h b/kopete/kopete/kopeteballoon.h index 1c30a8e4..fca7fa80 100644 --- a/kopete/kopete/kopeteballoon.h +++ b/kopete/kopete/kopeteballoon.h @@ -21,7 +21,7 @@ #ifndef KOPETEBALLOON_H #define KOPETEBALLOON_H -#include +#include #include /** @@ -33,11 +33,11 @@ class KopeteActiveLabel : public KActiveLabel Q_OBJECT public: - KopeteActiveLabel( QWidget *parent = 0, const char* name = 0 ); - KopeteActiveLabel( const QString& text, QWidget *parent = 0, const char* name = 0 ); + KopeteActiveLabel( TQWidget *parent = 0, const char* name = 0 ); + KopeteActiveLabel( const TQString& text, TQWidget *parent = 0, const char* name = 0 ); public slots: - virtual void openLink( const QString &link ); + virtual void openLink( const TQString &link ); }; @@ -53,10 +53,10 @@ class KopeteBalloon : public QWidget Q_OBJECT public: - KopeteBalloon(const QString &text, const QString &pic); + KopeteBalloon(const TQString &text, const TQString &pic); // KopeteBalloon(); - void setAnchor(const QPoint &anchor); + void setAnchor(const TQPoint &anchor); signals: void signalButtonClicked(); @@ -68,7 +68,7 @@ protected: virtual void updateMask(); private: - QPoint mAnchor; + TQPoint mAnchor; }; #endif diff --git a/kopete/kopete/kopeteeditglobalidentitywidget.cpp b/kopete/kopete/kopeteeditglobalidentitywidget.cpp index 63357068..a9cd3c0c 100644 --- a/kopete/kopete/kopeteeditglobalidentitywidget.cpp +++ b/kopete/kopete/kopeteeditglobalidentitywidget.cpp @@ -18,11 +18,11 @@ #include "kopeteeditglobalidentitywidget.h" // Qt include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // KDE include #include @@ -42,13 +42,13 @@ #include "kopetemetacontact.h" -ClickableLabel::ClickableLabel(QWidget *parent, const char *name) - : QLabel(parent, name) +ClickableLabel::ClickableLabel(TQWidget *parent, const char *name) + : TQLabel(parent, name) { - setCursor(QCursor(Qt::PointingHandCursor)); + setCursor(TQCursor(Qt::PointingHandCursor)); } -void ClickableLabel::mouseReleaseEvent(QMouseEvent *event) +void ClickableLabel::mouseReleaseEvent(TQMouseEvent *event) { if(event->button() == Qt::LeftButton) { @@ -68,13 +68,13 @@ public: ClickableLabel *labelPicture; KLineEdit *lineNickname; KLineEdit *lineStatusMessage; - QHBoxLayout *mainLayout; + TQHBoxLayout *mainLayout; int iconSize; - QString lastNickname; + TQString lastNickname; }; -KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { d = new Private; @@ -83,7 +83,7 @@ KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(QWidget *parent, createGUI(); // Update the GUI when a global identity key change. - connect(Kopete::ContactList::self(), SIGNAL(globalIdentityChanged(const QString&, const QVariant& )), this, SLOT(updateGUI(const QString&, const QVariant&))); + connect(Kopete::ContactList::self(), TQT_SIGNAL(globalIdentityChanged(const TQString&, const TQVariant& )), this, TQT_SLOT(updateGUI(const TQString&, const TQVariant&))); } KopeteEditGlobalIdentityWidget::~KopeteEditGlobalIdentityWidget() @@ -97,10 +97,10 @@ void KopeteEditGlobalIdentityWidget::setIconSize(int size) // Update the picture (change the size of it) d->iconSize = size; - d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize)); - d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize)); + d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize)); + d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize)); if( !d->myself->photo().isNull() ) - d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin))); + d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin))); } void KopeteEditGlobalIdentityWidget::iconSizeChanged() @@ -112,35 +112,35 @@ void KopeteEditGlobalIdentityWidget::iconSizeChanged() { // Update the picture (change the size of it) d->iconSize = tb->iconSize(); - d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize)); - d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize)); + d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize)); + d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize)); if( !d->myself->photo().isNull() ) - d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin))); + d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin))); } } void KopeteEditGlobalIdentityWidget::createGUI() { - d->mainLayout = new QHBoxLayout(this); + d->mainLayout = new TQHBoxLayout(this); // The picture label d->labelPicture = new ClickableLabel(this); - d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize)); - d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize)); - d->labelPicture->setFrameShape(QFrame::Box); + d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize)); + d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize)); + d->labelPicture->setFrameShape(TQFrame::Box); d->mainLayout->addWidget(d->labelPicture); - connect(d->labelPicture, SIGNAL(clicked()), this, SLOT(photoClicked())); + connect(d->labelPicture, TQT_SIGNAL(clicked()), this, TQT_SLOT(photoClicked())); // The nickname lineEdit d->lineNickname = new KLineEdit(this); d->mainLayout->addWidget(d->lineNickname); // Update the nickname when the user press return. - connect(d->lineNickname, SIGNAL(returnPressed()), this, SLOT(changeNickname())); + connect(d->lineNickname, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(changeNickname())); // Show the nickname text in red when they are change. - connect(d->lineNickname, SIGNAL(textChanged(const QString&)), this, SLOT(lineNicknameTextChanged(const QString& ))); + connect(d->lineNickname, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(lineNicknameTextChanged(const TQString& ))); } -void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVariant &value) +void KopeteEditGlobalIdentityWidget::updateGUI(const TQString &key, const TQVariant &value) { kdDebug(14000) << k_funcinfo << "Updating the GUI reflecting the global identity change." << endl; @@ -149,8 +149,8 @@ void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVarian // Update the picture and the tooltip if( !d->myself->photo().isNull() ) { - d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin))); - QToolTip::add(d->labelPicture, ""); + d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin))); + TQToolTip::add(d->labelPicture, ""); } } else if(key == Kopete::Global::Properties::self()->nickName().key()) @@ -163,7 +163,7 @@ void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVarian void KopeteEditGlobalIdentityWidget::photoClicked() { - KURL photoURL = KFileDialog::getImageOpenURL(QString::null, this, i18n("Global Photo")); + KURL photoURL = KFileDialog::getImageOpenURL(TQString::null, this, i18n("Global Photo")); if(photoURL.isEmpty()) return; @@ -174,16 +174,16 @@ void KopeteEditGlobalIdentityWidget::photoClicked() return; } - QString saveLocation(locateLocal("appdata", "global-photo.png")); - QImage photo(photoURL.path()); - photo = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(photo), 96, 96, this ); + TQString saveLocation(locateLocal("appdata", "global-photo.png")); + TQImage photo(photoURL.path()); + photo = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(photo), 96, 96, this ); if(!photo.isNull()) { if(photo.width() > 96 || photo.height() > 96) { // Scale and crop the picture. - photo = photo.smoothScale( 96, 96, QImage::ScaleMin ); + photo = photo.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(photo.width() < photo.height()) photo = photo.copy((photo.width()-photo.height())/2, 0, 96, 96); @@ -194,7 +194,7 @@ void KopeteEditGlobalIdentityWidget::photoClicked() else if (photo.width() < 32 || photo.height() < 32) { // Scale and crop the picture. - photo = photo.smoothScale( 32, 32, QImage::ScaleMin ); + photo = photo.smoothScale( 32, 32, TQImage::ScaleMin ); // crop image if not square if(photo.width() < photo.height()) photo = photo.copy((photo.width()-photo.height())/2, 0, 32, 32); @@ -222,7 +222,7 @@ void KopeteEditGlobalIdentityWidget::photoClicked() d->myself->setPhoto(KURL(saveLocation)); } -void KopeteEditGlobalIdentityWidget::lineNicknameTextChanged(const QString &text) +void KopeteEditGlobalIdentityWidget::lineNicknameTextChanged(const TQString &text) { // Display the nickname in red if they are any change. if(text != d->lastNickname) diff --git a/kopete/kopete/kopeteeditglobalidentitywidget.h b/kopete/kopete/kopeteeditglobalidentitywidget.h index 731a2cc5..208d8316 100644 --- a/kopete/kopete/kopeteeditglobalidentitywidget.h +++ b/kopete/kopete/kopeteeditglobalidentitywidget.h @@ -18,8 +18,8 @@ #ifndef KOPETEEDITGLOBALIDENTITYWIDGET_H #define KOPETEEDITGLOBALIDENTITYWIDGET_H -#include -#include +#include +#include /** * This is a simple widget added to a toolbar in KopeteWindow. @@ -34,7 +34,7 @@ class KopeteEditGlobalIdentityWidget : public QWidget { Q_OBJECT public: - KopeteEditGlobalIdentityWidget(QWidget *parent = 0, const char *name = 0); + KopeteEditGlobalIdentityWidget(TQWidget *parent = 0, const char *name = 0); virtual ~KopeteEditGlobalIdentityWidget(); public slots: @@ -57,7 +57,7 @@ private slots: /** * When a global identity key is changed, update the GUI. */ - void updateGUI(const QString &key, const QVariant &value); + void updateGUI(const TQString &key, const TQVariant &value); /** * The photo label was clicked, show a ImageFileDialog. */ @@ -65,7 +65,7 @@ private slots: /** * The nickname was changed, display the text in red to display the change. */ - void lineNicknameTextChanged(const QString &text); + void lineNicknameTextChanged(const TQString &text); /** * User press Return/Enter in the KLineEdit, commit the new nickname. */ @@ -87,13 +87,13 @@ class ClickableLabel : public QLabel { Q_OBJECT public: - ClickableLabel(QWidget *parent = 0, const char *name = 0); + ClickableLabel(TQWidget *parent = 0, const char *name = 0); signals: void clicked(); protected: - void mouseReleaseEvent(QMouseEvent *event); + void mouseReleaseEvent(TQMouseEvent *event); }; #endif diff --git a/kopete/kopete/kopeteiface.cpp b/kopete/kopete/kopeteiface.cpp index 3895e271..426424ff 100644 --- a/kopete/kopete/kopeteiface.cpp +++ b/kopete/kopete/kopeteiface.cpp @@ -53,43 +53,43 @@ KopeteIface::KopeteIface() : DCOPObject( "KopeteIface" ) "KDE_stop_screensaver()", "setActive()", false); } -QStringList KopeteIface::contacts() +TQStringList KopeteIface::contacts() { return Kopete::ContactList::self()->contacts(); } -QStringList KopeteIface::reachableContacts() +TQStringList KopeteIface::reachableContacts() { return Kopete::ContactList::self()->reachableContacts(); } -QStringList KopeteIface::onlineContacts() +TQStringList KopeteIface::onlineContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->onlineContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->onlineContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) result.append( it.current()->contactId() ); return result; } -QStringList KopeteIface::contactsStatus() +TQStringList KopeteIface::contactsStatus() { return Kopete::ContactList::self()->contactStatuses(); } -QStringList KopeteIface::fileTransferContacts() +TQStringList KopeteIface::fileTransferContacts() { return Kopete::ContactList::self()->fileTransferContacts(); } -QStringList KopeteIface::contactFileProtocols(const QString &displayName) +TQStringList KopeteIface::contactFileProtocols(const TQString &displayName) { return Kopete::ContactList::self()->contactFileProtocols(displayName); } -QString KopeteIface::messageContact( const QString &contactId, const QString &messageText ) +TQString KopeteIface::messageContact( const TQString &contactId, const TQString &messageText ) { Kopete::MetaContact *mc = Kopete::ContactList::self()->findMetaContactByContactId( contactId ); if ( !mc ) @@ -103,18 +103,18 @@ QString KopeteIface::messageContact( const QString &contactId, const QString &me return "The contact is not reachable"; //Default return value - return QString::null; + return TQString::null; } /* -void KopeteIface::sendFile(const QString &displayName, const KURL &sourceURL, - const QString &altFileName, uint fileSize) +void KopeteIface::sendFile(const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName, uint fileSize) { return Kopete::ContactList::self()->sendFile(displayName, sourceURL, altFileName, fileSize); } */ -QString KopeteIface::onlineStatus( const QString &metaContactId ) +TQString KopeteIface::onlineStatus( const TQString &metaContactId ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( metaContactId ); if( m ) @@ -126,7 +126,7 @@ QString KopeteIface::onlineStatus( const QString &metaContactId ) return "Unknown Contact"; } -void KopeteIface::messageContactById( const QString &metaContactId ) +void KopeteIface::messageContactById( const TQString &metaContactId ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( metaContactId ); if( m ) @@ -135,15 +135,15 @@ void KopeteIface::messageContactById( const QString &metaContactId ) } } -bool KopeteIface::addContact( const QString &protocolName, const QString &accountId, const QString &contactId, - const QString &displayName, const QString &groupName ) +bool KopeteIface::addContact( const TQString &protocolName, const TQString &accountId, const TQString &contactId, + const TQString &displayName, const TQString &groupName ) { //Get the protocol instance Kopete::Account *myAccount = Kopete::AccountManager::self()->findAccount( protocolName, accountId ); if( myAccount ) { - QString contactName; + TQString contactName; Kopete::Group *realGroup=0L; //If the nickName isn't specified we need to display the userId in the prompt if( displayName.isEmpty() || displayName.isNull() ) @@ -180,11 +180,11 @@ bool KopeteIface::addContact( const QString &protocolName, const QString &accoun } } -QStringList KopeteIface::accounts() +TQStringList KopeteIface::accounts() { - QStringList list; - QPtrList m_accounts=Kopete::AccountManager::self()->accounts(); - QPtrListIterator it( m_accounts ); + TQStringList list; + TQPtrList m_accounts=Kopete::AccountManager::self()->accounts(); + TQPtrListIterator it( m_accounts ); Kopete::Account *account; while ( ( account = it.current() ) != 0 ) { @@ -197,9 +197,9 @@ QStringList KopeteIface::accounts() } -void KopeteIface::connect(const QString &protocolId, const QString &accountId ) +void KopeteIface::connect(const TQString &protocolId, const TQString &accountId ) { - QPtrListIterator it( Kopete::AccountManager::self()->accounts() ); + TQPtrListIterator it( Kopete::AccountManager::self()->accounts() ); Kopete::Account *account; while ( ( account = it.current() ) != 0 ) { @@ -216,9 +216,9 @@ void KopeteIface::connect(const QString &protocolId, const QString &accountId ) } } -void KopeteIface::disconnect(const QString &protocolId, const QString &accountId ) +void KopeteIface::disconnect(const TQString &protocolId, const TQString &accountId ) { - QPtrListIterator it( Kopete::AccountManager::self()->accounts() ); + TQPtrListIterator it( Kopete::AccountManager::self()->accounts() ); Kopete::Account *account; while ( ( account = it.current() ) != 0 ) { @@ -245,11 +245,11 @@ void KopeteIface::disconnectAll() Kopete::AccountManager::self()->disconnectAll(); } -bool KopeteIface::loadPlugin( const QString &name ) +bool KopeteIface::loadPlugin( const TQString &name ) { if ( Kopete::PluginManager::self()->setPluginEnabled( name ) ) { - QString argument = name; + TQString argument = name; if ( !argument.startsWith( "kopete_" ) ) argument.prepend( "kopete_" ); return Kopete::PluginManager::self()->loadPlugin( argument ); @@ -260,11 +260,11 @@ bool KopeteIface::loadPlugin( const QString &name ) } } -bool KopeteIface::unloadPlugin( const QString &name ) +bool KopeteIface::unloadPlugin( const TQString &name ) { if ( Kopete::PluginManager::self()->setPluginEnabled( name, false ) ) { - QString argument = name; + TQString argument = name; if ( !argument.startsWith( "kopete_" ) ) argument.prepend( "kopete_" ); return Kopete::PluginManager::self()->unloadPlugin( argument ); @@ -280,7 +280,7 @@ void KopeteIface::setAway() Kopete::AccountManager::self()->setAwayAll(); } -void KopeteIface::setAway(const QString &msg, bool away) +void KopeteIface::setAway(const TQString &msg, bool away) { Kopete::AccountManager::self()->setAwayAll(msg, away); } @@ -295,7 +295,7 @@ void KopeteIface::setAutoAway() Kopete::Away::getInstance()->setAutoAway(); } -void KopeteIface::setGlobalNickname( const QString &nickname ) +void KopeteIface::setGlobalNickname( const TQString &nickname ) { if( Kopete::Config::enableGlobalIdentity() ) { @@ -316,14 +316,14 @@ void KopeteIface::setGlobalPhoto( const KURL &photoUrl ) } } -QStringList KopeteIface::contactsForDisplayName( const QString & displayName ) +TQStringList KopeteIface::contactsForDisplayName( const TQString & displayName ) { Kopete::MetaContact * mc = Kopete::ContactList::self()->findMetaContactByDisplayName( displayName ); - QStringList contactIds; + TQStringList contactIds; if ( mc ) { - QPtrList contacts = mc->contacts(); - QPtrListIterator it( contacts ); + TQPtrList contacts = mc->contacts(); + TQPtrListIterator it( contacts ); for( ; it.current(); ++it ) { contactIds.append( (*it)->contactId() ); @@ -332,13 +332,13 @@ QStringList KopeteIface::contactsForDisplayName( const QString & displayName ) return contactIds; } -QStringList KopeteIface::metacontactsForContactId( const QString & contactId ) +TQStringList KopeteIface::metacontactsForContactId( const TQString & contactId ) { Kopete::MetaContact * mc = Kopete::ContactList::self()->findMetaContactByContactId( contactId ); if ( mc ) - return QStringList( mc->displayName() ); + return TQStringList( mc->displayName() ); else - return QStringList(); + return TQStringList(); } // vim: set noet ts=4 sts=4 sw=4: diff --git a/kopete/kopete/kopeteiface.h b/kopete/kopete/kopeteiface.h index 4ca4c4d1..46a52166 100644 --- a/kopete/kopete/kopeteiface.h +++ b/kopete/kopete/kopeteiface.h @@ -19,7 +19,7 @@ #define KopeteIface_h #include -#include +#include #include #include "kopeteonlinestatus.h" @@ -35,35 +35,35 @@ public: KopeteIface(); k_dcop: - QStringList contacts(); - QStringList reachableContacts(); - QStringList onlineContacts(); - QStringList fileTransferContacts(); - QStringList contactFileProtocols(const QString &displayName); + TQStringList contacts(); + TQStringList reachableContacts(); + TQStringList onlineContacts(); + TQStringList fileTransferContacts(); + TQStringList contactFileProtocols(const TQString &displayName); - /*void sendFile(const QString &displayName, const KURL &sourceURL, - const QString &altFileName = QString::null, uint fileSize = 0);*/ + /*void sendFile(const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName = TQString::null, uint fileSize = 0);*/ // FIXME: Do we *need* this one? Sounds error prone to me, because // nicknames can contain parentheses too. - // Better add a contactStatus( const QString id ) I'd say - Martijn - QStringList contactsStatus(); + // Better add a contactStatus( const TQString id ) I'd say - Martijn + TQStringList contactsStatus(); /** * Open a chat to a contact, and optionally set some initial text */ - QString messageContact( const QString &contactId, const QString &messageText = QString::null ); + TQString messageContact( const TQString &contactId, const TQString &messageText = TQString::null ); /** * Describe the status of a contact by their metaContactId, * aka their uid in KABC. */ - QString onlineStatus( const QString &metaContactId ); + TQString onlineStatus( const TQString &metaContactId ); /** * Message a contact by their metaContactId, aka their uid in KABC. */ - void messageContactById( const QString &metaContactId ); + void messageContactById( const TQString &metaContactId ); /** * Adds a contact with the specified params. @@ -75,23 +75,23 @@ k_dcop: * @param groupName The name of the group to add the contact to * @return Weather or not the contact was added successfully */ - bool addContact( const QString &protocolName, const QString &accountId, const QString &contactId, - const QString &displayName, const QString &groupName = QString::null ); + bool addContact( const TQString &protocolName, const TQString &accountId, const TQString &contactId, + const TQString &displayName, const TQString &groupName = TQString::null ); /** * return a list of alls accounts. * form: XXXProtocol||AccountId */ - QStringList accounts(); + TQStringList accounts(); /** * connect a given account in the given protocol */ - void connect(const QString &protocolName, const QString &accountId); + void connect(const TQString &protocolName, const TQString &accountId); /** * disconnect a given account in the given protocol */ - void disconnect(const QString &protocolName, const QString &accountId); + void disconnect(const TQString &protocolName, const TQString &accountId); /** * Ask all accounts to connect @@ -108,13 +108,13 @@ k_dcop: * the name is the name of the library: example: kopete_msn * but you can ommit the kopete_ prefix */ - bool loadPlugin( const QString& name ); + bool loadPlugin( const TQString& name ); /** * unload a plugin * the name is the name of the library: example: kopete_msn * but you can ommit the kopete_ prefix */ - bool unloadPlugin( const QString& name ); + bool unloadPlugin( const TQString& name ); /** * set all account away using the global away function @@ -125,14 +125,14 @@ k_dcop: * set all account away using the global away function * and set an away message */ - void setAway( const QString &msg ) { setAway( msg, true ); } + void setAway( const TQString &msg ) { setAway( msg, true ); } /** * set all account away using the global away function * and set an away message. * @param away decides if the message is away/non-away */ - void setAway( const QString &msg, bool away ); + void setAway( const TQString &msg, bool away ); /** * set Available all accountes @@ -148,7 +148,7 @@ k_dcop: * set the global nickname if global identity is enabled. * @param nickname the new global nickname */ - void setGlobalNickname( const QString &nickname ); + void setGlobalNickname( const TQString &nickname ); /** * set the global photo if global identity is enabled. @@ -160,13 +160,13 @@ k_dcop: * get the contactIds for a given display name * @param displayName */ - QStringList contactsForDisplayName( const QString & displayName ); + TQStringList contactsForDisplayName( const TQString & displayName ); /** * get the metacontactIds that have the given contactId * @param contactId */ - QStringList metacontactsForContactId( const QString & contactId ); + TQStringList metacontactsForContactId( const TQString & contactId ); }; #endif diff --git a/kopete/kopete/kopetewindow.cpp b/kopete/kopete/kopetewindow.cpp index f3ec502e..e013a95c 100644 --- a/kopete/kopete/kopetewindow.cpp +++ b/kopete/kopete/kopetewindow.cpp @@ -21,14 +21,14 @@ #include "kopetewindow.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -82,11 +82,11 @@ #include "kopeteeditglobalidentitywidget.h" //BEGIN GlobalStatusMessageIconLabel -GlobalStatusMessageIconLabel::GlobalStatusMessageIconLabel(QWidget *parent, const char *name) - : QLabel(parent, name) +GlobalStatusMessageIconLabel::GlobalStatusMessageIconLabel(TQWidget *parent, const char *name) + : TQLabel(parent, name) {} -void GlobalStatusMessageIconLabel::mouseReleaseEvent( QMouseEvent *event ) +void GlobalStatusMessageIconLabel::mouseReleaseEvent( TQMouseEvent *event ) { if( event->button() == Qt::LeftButton || event->button() == Qt::RightButton ) { @@ -120,7 +120,7 @@ void GlobalStatusMessageIconLabel::mouseReleaseEvent( QMouseEvent *event ) * (session) quit. */ -KopeteWindow::KopeteWindow( QWidget *parent, const char *name ) +KopeteWindow::KopeteWindow( TQWidget *parent, const char *name ) : KMainWindow( parent, name, WType_TopLevel ) { // Applications should ensure that their StatusBar exists before calling createGUI() @@ -129,25 +129,25 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name ) // This fixes a "statusbar drawn over the top of the toolbar" bug // e.g. it can happen when you switch desktops on Kopete startup - m_statusBarWidget = new QHBox(statusBar(), "m_statusBarWidget"); + m_statusBarWidget = new TQHBox(statusBar(), "m_statusBarWidget"); m_statusBarWidget->setMargin( 2 ); m_statusBarWidget->setSpacing( 1 ); statusBar()->addWidget(m_statusBarWidget, 0, true ); - QHBox *statusBarMessage = new QHBox(statusBar(), "m_statusBarWidget"); + TQHBox *statusBarMessage = new TQHBox(statusBar(), "m_statusBarWidget"); m_statusBarWidget->setMargin( 2 ); m_statusBarWidget->setSpacing( 1 ); GlobalStatusMessageIconLabel *label = new GlobalStatusMessageIconLabel( statusBarMessage, "statusmsglabel" ); label->setFixedSize( 16, 16 ); label->setPixmap( SmallIcon( "kopetestatusmessage" ) ); - connect(label, SIGNAL(iconClicked( const QPoint& )), - this, SLOT(slotGlobalStatusMessageIconClicked( const QPoint& ))); - QToolTip::add( label, i18n( "Global status message" ) ); + connect(label, TQT_SIGNAL(iconClicked( const TQPoint& )), + this, TQT_SLOT(slotGlobalStatusMessageIconClicked( const TQPoint& ))); + TQToolTip::add( label, i18n( "Global status message" ) ); m_globalStatusMessage = new KSqueezedTextLabel( statusBarMessage ); statusBar()->addWidget(statusBarMessage, 1, false ); m_pluginConfig = 0L; - m_autoHideTimer = new QTimer( this ); + m_autoHideTimer = new TQTimer( this ); // -------------------------------------------------------------------------------- initView(); @@ -157,22 +157,22 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name ) // -------------------------------------------------------------------------------- // Trap all loaded plugins, so we can add their status bar icons accordingly , also used to add XMLGUIClient - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ), - this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); - connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ), - this, SLOT( slotAllPluginsLoaded() )); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ), + this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ), + this, TQT_SLOT( slotAllPluginsLoaded() )); //Connect the appropriate account signals /* Please note that I tried to put this in the slotAllPluginsLoaded() function * but it seemed to break the account icons in the statusbar --Matt */ - connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered(Kopete::Account*)), - this, SLOT(slotAccountRegistered(Kopete::Account*))); - connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered(const Kopete::Account*)), - this, SLOT(slotAccountUnregistered(const Kopete::Account*))); + connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered(Kopete::Account*)), + this, TQT_SLOT(slotAccountRegistered(Kopete::Account*))); + connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered(const Kopete::Account*)), + this, TQT_SLOT(slotAccountUnregistered(const Kopete::Account*))); - connect( m_autoHideTimer, SIGNAL( timeout() ), this, SLOT( slotAutoHide() ) ); - connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ), - this, SLOT( slotContactListAppearanceChanged() ) ); + connect( m_autoHideTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoHide() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ), + this, TQT_SLOT( slotContactListAppearanceChanged() ) ); createGUI ( "kopeteui.rc", false ); @@ -186,7 +186,7 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name ) slotPluginLoaded( *it ); // If some account alrady loaded, build the status icon - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() ) slotAccountRegistered(a); @@ -209,22 +209,22 @@ void KopeteWindow::initActions() actionCollection(), "AddContact" ); actionAddContact->setDelayed( false ); // this signal mapper is needed to call slotAddContact with the correct arguments - addContactMapper = new QSignalMapper( this ); - connect( addContactMapper, SIGNAL( mapped( const QString & ) ), - this, SLOT( slotAddContactDialogInternal( const QString & ) ) ); + addContactMapper = new TQSignalMapper( this ); + connect( addContactMapper, TQT_SIGNAL( mapped( const TQString & ) ), + this, TQT_SLOT( slotAddContactDialogInternal( const TQString & ) ) ); /* ConnectAll is now obsolete. "Go online" has replaced it. actionConnect = new KAction( i18n( "&Connect Accounts" ), "connect_creating", - 0, Kopete::AccountManager::self(), SLOT( connectAll() ), + 0, Kopete::AccountManager::self(), TQT_SLOT( connectAll() ), actionCollection(), "ConnectAll" ); */ actionDisconnect = new KAction( i18n( "O&ffline" ), "connect_no", - 0, this, SLOT( slotDisconnectAll() ), + 0, this, TQT_SLOT( slotDisconnectAll() ), actionCollection(), "DisconnectAll" ); actionExportContacts = new KAction( i18n( "&Export Contacts..." ), "", 0, this, - SLOT( showExportDialog() ),actionCollection(), "ExportContacts" ); + TQT_SLOT( showExportDialog() ),actionCollection(), "ExportContacts" ); /* the connection menu has been replaced by the set status menu actionConnectionMenu = new KActionMenu( i18n("Connection"),"connect_established", @@ -238,28 +238,28 @@ void KopeteWindow::initActions() actionDisconnect->setEnabled(false); selectAway = new KAction( i18n("&Away"), SmallIcon("kopeteaway"), 0, - this, SLOT( slotGlobalAway() ), actionCollection(), + this, TQT_SLOT( slotGlobalAway() ), actionCollection(), "SetAwayAll" ); selectBusy = new KAction( i18n("&Busy"), SmallIcon("kopeteaway"), 0, - this, SLOT( slotGlobalBusy() ), actionCollection(), + this, TQT_SLOT( slotGlobalBusy() ), actionCollection(), "SetBusyAll" ); actionSetInvisible = new KAction( i18n( "&Invisible" ), "kopeteavailable", 0 , - this, SLOT( slotSetInvisibleAll() ), actionCollection(), + this, TQT_SLOT( slotSetInvisibleAll() ), actionCollection(), "SetInvisibleAll" ); /*actionSetAvailable = new KAction( i18n( "&Online" ), "kopeteavailable", 0 , Kopete::AccountManager::self(), - SLOT( setAvailableAll() ), actionCollection(), + TQT_SLOT( setAvailableAll() ), actionCollection(), "SetAvailableAll" );*/ actionSetAvailable = new KAction( i18n("&Online"), SmallIcon("kopeteavailable"), 0, this, - SLOT( slotGlobalAvailable() ), actionCollection(), + TQT_SLOT( slotGlobalAvailable() ), actionCollection(), "SetAvailableAll" ); actionAwayMenu = new KActionMenu( i18n("&Set Status"), "kopeteavailable", @@ -273,40 +273,40 @@ void KopeteWindow::initActions() actionPrefs = KopeteStdAction::preferences( actionCollection(), "settings_prefs" ); - KStdAction::quit(this, SLOT(slotQuit()), actionCollection()); + KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection()); setStandardToolBarMenuEnabled(true); - menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), actionCollection(), "settings_showmenubar" ); - statusbarAction = KStdAction::showStatusbar(this, SLOT(showStatusbar()), actionCollection(), "settings_showstatusbar"); + menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection(), "settings_showmenubar" ); + statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(showStatusbar()), actionCollection(), "settings_showstatusbar"); - KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), actionCollection(), "settings_keys" ); + KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection(), "settings_keys" ); new KAction( i18n( "Configure Plugins..." ), "input_devices_settings", 0, this, - SLOT( slotConfigurePlugins() ), actionCollection(), "settings_plugins" ); + TQT_SLOT( slotConfigurePlugins() ), actionCollection(), "settings_plugins" ); new KAction( i18n( "Configure &Global Shortcuts..." ), "configure_shortcuts", 0, this, - SLOT( slotConfGlobalKeys() ), actionCollection(), "settings_global" ); + TQT_SLOT( slotConfGlobalKeys() ), actionCollection(), "settings_global" ); - KStdAction::configureToolbars( this, SLOT(slotConfToolbar()), actionCollection() ); - KStdAction::configureNotifications(this, SLOT(slotConfNotifications()), actionCollection(), "settings_notifications" ); + KStdAction::configureToolbars( this, TQT_SLOT(slotConfToolbar()), actionCollection() ); + KStdAction::configureNotifications(this, TQT_SLOT(slotConfNotifications()), actionCollection(), "settings_notifications" ); actionShowOffliners = new KToggleAction( i18n( "Show Offline &Users" ), "show_offliners", CTRL + Key_U, - this, SLOT( slotToggleShowOffliners() ), actionCollection(), "settings_show_offliners" ); + this, TQT_SLOT( slotToggleShowOffliners() ), actionCollection(), "settings_show_offliners" ); actionShowEmptyGroups = new KToggleAction( i18n( "Show Empty &Groups" ), "folder", CTRL + Key_G, - this, SLOT( slotToggleShowEmptyGroups() ), actionCollection(), "settings_show_empty_groups" ); + this, TQT_SLOT( slotToggleShowEmptyGroups() ), actionCollection(), "settings_show_empty_groups" ); actionShowOffliners->setCheckedState(i18n("Hide Offline &Users")); actionShowEmptyGroups->setCheckedState(i18n("Hide Empty &Groups")); // quick search bar - QLabel *searchLabel = new QLabel( i18n("Se&arch:"), 0, "kde toolbar widget" ); - QWidget *searchBar = new Kopete::UI::ListView::SearchLine( 0, contactlist, "quicksearch_bar" ); + TQLabel *searchLabel = new TQLabel( i18n("Se&arch:"), 0, "kde toolbar widget" ); + TQWidget *searchBar = new Kopete::UI::ListView::SearchLine( 0, contactlist, "quicksearch_bar" ); searchLabel->setBuddy( searchBar ); KWidgetAction *quickSearch = new KWidgetAction( searchBar, i18n( "Quick Search Bar" ), 0, 0, 0, actionCollection(), "quicksearch_bar" ); new KWidgetAction( searchLabel, i18n( "Search:" ), 0, 0, 0, actionCollection(), "quicksearch_label" ); quickSearch->setAutoSized( true ); // quick search bar - clear button KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ), - QApplication::reverseLayout() ? "clear_left" : "locationbar_erase", - 0, searchBar, SLOT( clear() ), actionCollection(), "quicksearch_reset" ); + TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", + 0, searchBar, TQT_SLOT( clear() ), actionCollection(), "quicksearch_reset" ); resetQuickSearch->setWhatsThis( i18n( "Reset Quick Search\n" "Resets the quick search so that all contacts and groups are shown again." ) ); @@ -319,22 +319,22 @@ void KopeteWindow::initActions() // KActionMenu for selecting the global status message(kopeteonlinestatus_0) KActionMenu * setStatusMenu = new KActionMenu( i18n( "Set Status Message" ), "kopeteeditstatusmessage", actionCollection(), "SetStatusMessage" ); setStatusMenu->setDelayed( false ); - connect( setStatusMenu->popupMenu(), SIGNAL( aboutToShow() ), SLOT(slotBuildStatusMessageMenu() ) ); - connect( setStatusMenu->popupMenu(), SIGNAL( activated( int ) ), SLOT(slotStatusMessageSelected( int ) ) ); + connect( setStatusMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT(slotBuildStatusMessageMenu() ) ); + connect( setStatusMenu->popupMenu(), TQT_SIGNAL( activated( int ) ), TQT_SLOT(slotStatusMessageSelected( int ) ) ); // sync actions, config and prefs-dialog - connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); slotConfigChanged(); globalAccel = new KGlobalAccel( this ); - globalAccel->insert( QString::fromLatin1("Read Message"), i18n("Read Message"), i18n("Read the next pending message"), - CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+Key_I, Kopete::ChatSessionManager::self(), SLOT(slotReadMessage()) ); + globalAccel->insert( TQString::fromLatin1("Read Message"), i18n("Read Message"), i18n("Read the next pending message"), + CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+Key_I, Kopete::ChatSessionManager::self(), TQT_SLOT(slotReadMessage()) ); - globalAccel->insert( QString::fromLatin1("Show/Hide Contact List"), i18n("Show/Hide Contact List"), i18n("Show or hide the contact list"), - CTRL+SHIFT+Key_S, KKey::QtWIN+CTRL+Key_S, this, SLOT(slotShowHide()) ); + globalAccel->insert( TQString::fromLatin1("Show/Hide Contact List"), i18n("Show/Hide Contact List"), i18n("Show or hide the contact list"), + CTRL+SHIFT+Key_S, KKey::QtWIN+CTRL+Key_S, this, TQT_SLOT(slotShowHide()) ); - globalAccel->insert( QString::fromLatin1("Set Away/Back"), i18n("Set Away/Back"), i18n("Sets away from keyboard or sets back"), - CTRL+SHIFT+Key_W, KKey::QtWIN+CTRL+SHIFT+Key_W, this, SLOT(slotToggleAway()) ); + globalAccel->insert( TQString::fromLatin1("Set Away/Back"), i18n("Set Away/Back"), i18n("Sets away from keyboard or sets back"), + CTRL+SHIFT+Key_W, KKey::QtWIN+CTRL+SHIFT+Key_W, this, TQT_SLOT(slotToggleAway()) ); globalAccel->readSettings(); globalAccel->updateConnections(); @@ -371,7 +371,7 @@ void KopeteWindow::slotToggleAway() } else { - QString awayReason = mAway->getMessage( 0 ); + TQString awayReason = mAway->getMessage( 0 ); slotGlobalAway(); } } @@ -391,9 +391,9 @@ void KopeteWindow::initSystray() //actionConnectionMenu->plug ( tm, 1 ); tm->insertSeparator( 1 ); - QObject::connect( m_tray, SIGNAL( aboutToShowMenu( KPopupMenu * ) ), - this, SLOT( slotTrayAboutToShowMenu( KPopupMenu * ) ) ); - QObject::connect( m_tray, SIGNAL( quitSelected() ), this, SLOT( slotQuit() ) ); + TQObject::connect( m_tray, TQT_SIGNAL( aboutToShowMenu( KPopupMenu * ) ), + this, TQT_SLOT( slotTrayAboutToShowMenu( KPopupMenu * ) ) ); + TQObject::connect( m_tray, TQT_SIGNAL( quitSelected() ), this, TQT_SLOT( slotQuit() ) ); } KopeteWindow::~KopeteWindow() @@ -401,7 +401,7 @@ KopeteWindow::~KopeteWindow() delete m_pluginConfig; } -bool KopeteWindow::eventFilter( QObject* target, QEvent* event ) +bool KopeteWindow::eventFilter( TQObject* target, TQEvent* event ) { KToolBar* toolBar = dynamic_cast( target ); KAction* resetAction = actionCollection()->action( "quicksearch_reset" ); @@ -409,7 +409,7 @@ bool KopeteWindow::eventFilter( QObject* target, QEvent* event ) if ( toolBar && resetAction && resetAction->isPlugged( toolBar ) ) { - if ( event->type() == QEvent::Hide ) + if ( event->type() == TQEvent::Hide ) { resetAction->activate(); return true; @@ -430,16 +430,16 @@ void KopeteWindow::loadOptions() // FIXME: HACK: Is there a way to do that automatic ? editGlobalIdentityWidget->setIconSize(toolBar("editGlobalIdentityBar")->iconSize()); - connect(toolBar("editGlobalIdentityBar"), SIGNAL(modechange()), editGlobalIdentityWidget, SLOT(iconSizeChanged())); + connect(toolBar("editGlobalIdentityBar"), TQT_SIGNAL(modechange()), editGlobalIdentityWidget, TQT_SLOT(iconSizeChanged())); applyMainWindowSettings( config, "General Options" ); config->setGroup("General Options"); - QPoint pos = config->readPointEntry("Position"); + TQPoint pos = config->readPointEntry("Position"); move(pos); - QSize size = config->readSizeEntry("Geometry"); + TQSize size = config->readSizeEntry("Geometry"); if(size.isEmpty()) // Default size - resize( QSize(220, 350) ); + resize( TQSize(220, 350) ); else resize(size); @@ -449,7 +449,7 @@ void KopeteWindow::loadOptions() m_autoHideTimeout = p->contactListAutoHideTimeout(); - QString tmp = config->readEntry("State", "Shown"); + TQString tmp = config->readEntry("State", "Shown"); if ( tmp == "Minimized" && p->showTray()) { showMinimized(); @@ -518,9 +518,9 @@ void KopeteWindow::slotToggleShowOffliners() KopetePrefs *p = KopetePrefs::prefs(); p->setShowOffline ( actionShowOffliners->isChecked() ); - disconnect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + disconnect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); p->save(); - connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); } void KopeteWindow::slotToggleShowEmptyGroups() @@ -528,9 +528,9 @@ void KopeteWindow::slotToggleShowEmptyGroups() KopetePrefs *p = KopetePrefs::prefs(); p->setShowEmptyGroups ( actionShowEmptyGroups->isChecked() ); - disconnect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + disconnect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); p->save(); - connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); } void KopeteWindow::slotConfigChanged() @@ -578,8 +578,8 @@ void KopeteWindow::slotConfToolbar() { saveMainWindowSettings(KGlobal::config(), "General Options"); KEditToolbar *dlg = new KEditToolbar(factory()); - connect( dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotUpdateToolbar()) ); - connect( dlg, SIGNAL(finished()) , dlg, SLOT(deleteLater())); + connect( dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotUpdateToolbar()) ); + connect( dlg, TQT_SIGNAL(finished()) , dlg, TQT_SLOT(deleteLater())); dlg->show(); } @@ -612,7 +612,7 @@ void KopeteWindow::slotSetInvisibleAll() void KopeteWindow::slotDisconnectAll() { m_globalStatusMessage->setText( "" ); - m_globalStatusMessageStored = QString(); + m_globalStatusMessageStored = TQString(); Kopete::AccountManager::self()->disconnectAll(); } @@ -651,7 +651,7 @@ bool KopeteWindow::queryExit() return false; } -void KopeteWindow::closeEvent( QCloseEvent *e ) +void KopeteWindow::closeEvent( TQCloseEvent *e ) { // if there's a system tray applet and we are not shutting down then just do what needs to be done if a // window is closed. @@ -704,46 +704,46 @@ void KopeteWindow::slotAccountRegistered( Kopete::Account *account ) actionDisconnect->setEnabled(true); connect( account->myself(), - SIGNAL(onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ), - this, SLOT( slotAccountStatusIconChanged( Kopete::Contact * ) ) ); + TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotAccountStatusIconChanged( Kopete::Contact * ) ) ); -// connect( account, SIGNAL( iconAppearanceChanged() ), SLOT( slotAccountStatusIconChanged() ) ); - connect( account, SIGNAL( colorChanged(const QColor& ) ), SLOT( slotAccountStatusIconChanged() ) ); +// connect( account, TQT_SIGNAL( iconAppearanceChanged() ), TQT_SLOT( slotAccountStatusIconChanged() ) ); + connect( account, TQT_SIGNAL( colorChanged(const TQColor& ) ), TQT_SLOT( slotAccountStatusIconChanged() ) ); connect( account->myself(), - SIGNAL(propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotAccountStatusIconChanged( Kopete::Contact* ) ) ); + TQT_SIGNAL(propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotAccountStatusIconChanged( Kopete::Contact* ) ) ); KopeteAccountStatusBarIcon *sbIcon = new KopeteAccountStatusBarIcon( account, m_statusBarWidget ); - connect( sbIcon, SIGNAL( rightClicked( Kopete::Account *, const QPoint & ) ), - SLOT( slotAccountStatusIconRightClicked( Kopete::Account *, - const QPoint & ) ) ); - connect( sbIcon, SIGNAL( leftClicked( Kopete::Account *, const QPoint & ) ), - SLOT( slotAccountStatusIconRightClicked( Kopete::Account *, - const QPoint & ) ) ); + connect( sbIcon, TQT_SIGNAL( rightClicked( Kopete::Account *, const TQPoint & ) ), + TQT_SLOT( slotAccountStatusIconRightClicked( Kopete::Account *, + const TQPoint & ) ) ); + connect( sbIcon, TQT_SIGNAL( leftClicked( Kopete::Account *, const TQPoint & ) ), + TQT_SLOT( slotAccountStatusIconRightClicked( Kopete::Account *, + const TQPoint & ) ) ); m_accountStatusBarIcons.insert( account, sbIcon ); slotAccountStatusIconChanged( account->myself() ); // add an item for this account to the add contact actionmenu - QString s = "actionAdd%1Contact"; + TQString s = "actionAdd%1Contact"; s.arg( account->accountId() ); - KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , addContactMapper, SLOT( map() ), account, s.latin1() ); - addContactMapper->setMapping( action, account->protocol()->pluginId() + QChar(0xE000) + account->accountId() ); + KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , addContactMapper, TQT_SLOT( map() ), account, s.latin1() ); + addContactMapper->setMapping( action, account->protocol()->pluginId() + TQChar(0xE000) + account->accountId() ); actionAddContact->insert( action ); } void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account) { // kdDebug(14000) << k_funcinfo << "Called." << endl; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); if (accounts.isEmpty()) { // actionConnect->setEnabled(false); actionDisconnect->setEnabled(false); } - // the (void*) is to remove the const. i don't know why QPtrList doesn't accept const ptr as key. + // the (void*) is to remove the const. i don't know why TQPtrList doesn't accept const ptr as key. KopeteAccountStatusBarIcon *sbIcon = static_cast( m_accountStatusBarIcons[ (void*)account ] ); if( !sbIcon ) @@ -755,7 +755,7 @@ void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account) makeTrayToolTip(); // update add contact actionmenu - QString s = "actionAdd%1Contact"; + TQString s = "actionAdd%1Contact"; s.arg( account->accountId() ); // KAction * action = actionCollection()->action( account->accountId() ); Kopete::Account * myAccount = const_cast< Kopete::Account * > ( account ); @@ -778,11 +778,11 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact ) { kdDebug( 14000 ) << k_funcinfo << contact->property( Kopete::Global::Properties::self()->awayMessage() ).value() << endl; // update the global status label if the change doesn't -// QString newAwayMessage = contact->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); +// TQString newAwayMessage = contact->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); Kopete::OnlineStatus status = contact->onlineStatus(); /* if ( status.status() != Kopete::OnlineStatus::Connecting ) { - QString globalMessage = m_globalStatusMessage->text(); + TQString globalMessage = m_globalStatusMessage->text(); if ( newAwayMessage != globalMessage ) m_globalStatusMessage->setText( "" /* i18n("status message to show when different accounts have different status messages", "(multiple)" )*/ /*); }*/ @@ -799,8 +799,8 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact ) else //If the account has not status message, it may be because the protocol doesn't support it (Bug 132609) { // or because the user just set an empty status to this account. // We will check if another account has still a status message, if yes, we will use it, if not, we will clear it. - QString statusMessageToUse; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQString statusMessageToUse; + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a = accounts.first(); a; a = accounts.next()) { Kopete::Contact *self = a->myself(); @@ -823,22 +823,22 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact ) // Adds tooltip for each status icon, // useful in case you have many accounts // over one protocol - QToolTip::remove( i ); - QToolTip::add( i, contact->toolTip() ); + TQToolTip::remove( i ); + TQToolTip::add( i, contact->toolTip() ); // Because we want null pixmaps to detect the need for a loadMovie // we can't use the SmallIcon() method directly KIconLoader *loader = KGlobal::instance()->iconLoader(); - QMovie mv = loader->loadMovie( status.overlayIcons().first(), KIcon::Small ); + TQMovie mv = loader->loadMovie( status.overlayIcons().first(), KIcon::Small ); if ( mv.isNull() ) { // No movie found, fallback to pixmap // Get the icon for our status - //QPixmap pm = SmallIcon( icon ); - QPixmap pm = status.iconFor( contact->account() ); + //TQPixmap pm = SmallIcon( icon ); + TQPixmap pm = status.iconFor( contact->account() ); // No Pixmap found, fallback to Unknown if( pm.isNull() ) @@ -859,10 +859,10 @@ void KopeteWindow::makeTrayToolTip() //the tool-tip of the systemtray. if(m_tray) { - QToolTip::remove(m_tray); + TQToolTip::remove(m_tray); - QString tt = QString::fromLatin1(""); - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQString tt = TQString::fromLatin1(""); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a = accounts.first(); a; a = accounts.next()) { Kopete::Contact *self = a->myself(); @@ -871,45 +871,45 @@ void KopeteWindow::makeTrayToolTip() .arg( a->protocol()->displayName() ).arg( a->accountLabel(), KURL::encode_string( a->protocol()->pluginId() ), KURL::encode_string( a->accountId() ), self->onlineStatus().description() ); } - tt += QString::fromLatin1(""); - QToolTip::add(m_tray, tt); + tt += TQString::fromLatin1(""); + TQToolTip::add(m_tray, tt); } } -void KopeteWindow::slotAccountStatusIconRightClicked( Kopete::Account *account, const QPoint &p ) +void KopeteWindow::slotAccountStatusIconRightClicked( Kopete::Account *account, const TQPoint &p ) { KActionMenu *actionMenu = account->actionMenu(); if ( !actionMenu ) return; - connect( actionMenu->popupMenu(), SIGNAL( aboutToHide() ), actionMenu, SLOT( deleteLater() ) ); + connect( actionMenu->popupMenu(), TQT_SIGNAL( aboutToHide() ), actionMenu, TQT_SLOT( deleteLater() ) ); actionMenu->popupMenu()->popup( p ); } void KopeteWindow::slotTrayAboutToShowMenu( KPopupMenu * popup ) { - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() ) { KActionMenu *menu = a->actionMenu(); if( menu ) menu->plug(popup, 1 ); - connect(popup , SIGNAL(aboutToHide()) , menu , SLOT(deleteLater())); + connect(popup , TQT_SIGNAL(aboutToHide()) , menu , TQT_SLOT(deleteLater())); } } -/*void KopeteWindow::slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const QPoint &p ) +/*void KopeteWindow::slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const TQPoint &p ) { //kdDebug( 14000 ) << k_funcinfo << endl; if ( Kopete::AccountManager::self()->accounts( proto ).count() > 0 ) { KActionMenu *menu = proto->protocolActions(); - connect( menu->popupMenu(), SIGNAL( aboutToHide() ), menu, SLOT( deleteLater() ) ); + connect( menu->popupMenu(), TQT_SIGNAL( aboutToHide() ), menu, TQT_SLOT( deleteLater() ) ); menu->popupMenu()->popup( p ); } }*/ @@ -919,19 +919,19 @@ void KopeteWindow::showExportDialog() ( new KabcExportWizard( this, "export_contact_dialog" ) )->show(); } -void KopeteWindow::leaveEvent( QEvent * ) +void KopeteWindow::leaveEvent( TQEvent * ) { startAutoHideTimer(); } -void KopeteWindow::showEvent( QShowEvent * ) +void KopeteWindow::showEvent( TQShowEvent * ) { startAutoHideTimer(); } void KopeteWindow::slotAutoHide() { - if ( this->geometry().contains( QCursor::pos() ) == false ) + if ( this->geometry().contains( TQCursor::pos() ) == false ) { /* The autohide-timer doesn't need to emit * timeouts when the window is hidden already. */ @@ -948,10 +948,10 @@ void KopeteWindow::startAutoHideTimer() // Iterate each connected account, updating its status message bug keeping the // same onlinestatus. Then update Kopete::Away and the UI. -void KopeteWindow::setStatusMessage( const QString & message ) +void KopeteWindow::setStatusMessage( const TQString & message ) { bool changed = false; - for ( QPtrListIterator it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it ) + for ( TQPtrListIterator it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it ) { Kopete::Contact *self = it.current()->myself(); bool isInvisible = self && self->onlineStatus().status() == Kopete::OnlineStatus::Invisible; @@ -968,28 +968,28 @@ void KopeteWindow::setStatusMessage( const QString & message ) void KopeteWindow::slotBuildStatusMessageMenu() { - QObject * senderObj = const_cast( sender() ); + TQObject * senderObj = const_cast( sender() ); m_globalStatusMessageMenu = static_cast( senderObj ); m_globalStatusMessageMenu->clear(); // pop up a menu containing the away messages, and a lineedit // see kopeteaway //messageMenu = new KPopupMenu( this ); // messageMenu->insertTitle( i18n( "Status Message" ) ); - QHBox * newMessageBox = new QHBox( 0 ); + TQHBox * newMessageBox = new TQHBox( 0 ); newMessageBox->setMargin( 1 ); - QLabel * newMessagePix = new QLabel( newMessageBox ); + TQLabel * newMessagePix = new TQLabel( newMessageBox ); newMessagePix->setPixmap( SmallIcon( "edit" ) ); -/* QLabel * newMessageLabel = new QLabel( i18n( "Add " ), newMessageBox );*/ - m_newMessageEdit = new QLineEdit( newMessageBox, "newmessage" ); +/* TQLabel * newMessageLabel = new TQLabel( i18n( "Add " ), newMessageBox );*/ + m_newMessageEdit = new TQLineEdit( newMessageBox, "newmessage" ); newMessageBox->setFocusProxy( m_newMessageEdit ); - newMessageBox->setFocusPolicy( QWidget::ClickFocus ); + newMessageBox->setFocusPolicy( TQWidget::ClickFocus ); /* newMessageLabel->setFocusProxy( newMessageEdit ); newMessageLabel->setBuddy( newMessageEdit ); - newMessageLabel->setFocusPolicy( QWidget::ClickFocus );*/ + newMessageLabel->setFocusPolicy( TQWidget::ClickFocus );*/ newMessagePix->setFocusProxy( m_newMessageEdit ); - newMessagePix->setFocusPolicy( QWidget::ClickFocus ); - connect( m_newMessageEdit, SIGNAL( returnPressed() ), SLOT( slotNewStatusMessageEntered() ) ); + newMessagePix->setFocusPolicy( TQWidget::ClickFocus ); + connect( m_newMessageEdit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotNewStatusMessageEntered() ) ); m_globalStatusMessageMenu->insertItem( newMessageBox ); @@ -998,13 +998,13 @@ void KopeteWindow::slotBuildStatusMessageMenu() m_globalStatusMessageMenu->insertItem( SmallIcon( "remove" ), i18n( "No Message" ), i++ ); m_globalStatusMessageMenu->insertSeparator(); - QStringList awayMessages = Kopete::Away::getInstance()->getMessages(); - for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it, ++i ) + TQStringList awayMessages = Kopete::Away::getInstance()->getMessages(); + for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it, ++i ) { m_globalStatusMessageMenu->insertItem( KStringHandler::rsqueeze( *it ), i ); } -// connect( m_globalStatusMessageMenu, SIGNAL( activated( int ) ), SLOT( slotStatusMessageSelected( int ) ) ); -// connect( messageMenu, SIGNAL( aboutToHide() ), messageMenu, SLOT( deleteLater() ) ); +// connect( m_globalStatusMessageMenu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotStatusMessageSelected( int ) ) ); +// connect( messageMenu, TQT_SIGNAL( aboutToHide() ), messageMenu, TQT_SLOT( deleteLater() ) ); m_newMessageEdit->setFocus(); @@ -1023,27 +1023,27 @@ void KopeteWindow::slotStatusMessageSelected( int i ) void KopeteWindow::slotNewStatusMessageEntered() { m_globalStatusMessageMenu->close(); - QString newMessage = m_newMessageEdit->text(); + TQString newMessage = m_newMessageEdit->text(); if ( !newMessage.isEmpty() ) Kopete::Away::getInstance()->addMessage( newMessage ); setStatusMessage( m_newMessageEdit->text() ); } -void KopeteWindow::slotGlobalStatusMessageIconClicked( const QPoint &position ) +void KopeteWindow::slotGlobalStatusMessageIconClicked( const TQPoint &position ) { KPopupMenu *statusMessageIconMenu = new KPopupMenu(this, "statusMessageIconMenu"); - connect(statusMessageIconMenu, SIGNAL( aboutToShow() ), - this, SLOT(slotBuildStatusMessageMenu())); - connect( statusMessageIconMenu, SIGNAL( activated( int ) ), - SLOT( slotStatusMessageSelected( int ) ) ); + connect(statusMessageIconMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT(slotBuildStatusMessageMenu())); + connect( statusMessageIconMenu, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotStatusMessageSelected( int ) ) ); statusMessageIconMenu->popup(position); } -void KopeteWindow::slotAddContactDialogInternal( const QString & accountIdentifier ) +void KopeteWindow::slotAddContactDialogInternal( const TQString & accountIdentifier ) { - QString protocolId = accountIdentifier.section( QChar(0xE000), 0, 0 ); - QString accountId = accountIdentifier.section( QChar(0xE000), 1, 1 ); + TQString protocolId = accountIdentifier.section( TQChar(0xE000), 0, 0 ); + TQString accountId = accountIdentifier.section( TQChar(0xE000), 1, 1 ); Kopete::Account *account = Kopete::AccountManager::self()->findAccount( protocolId, accountId ); showAddContactDialog( account ); } @@ -1059,7 +1059,7 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account ) i18n( "Add Contact" ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); - QVBox * mainWid = new QVBox( addDialog ); + TQVBox * mainWid = new TQVBox( addDialog ); AddContactPage *addContactPage = account->protocol()->createAddContactWidget( mainWid, account ); @@ -1068,10 +1068,10 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account ) // Populate the groups list Kopete::GroupList groups=Kopete::ContactList::self()->groups(); - QDict groupItems; + TQDict groupItems; for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QString groupname = it->displayName(); + TQString groupname = it->displayName(); if ( !groupname.isEmpty() ) { groupItems.insert( groupname, it ); @@ -1087,7 +1087,7 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account ) else { addDialog->setMainWidget( mainWid ); - if( addDialog->exec() == QDialog::Accepted ) + if( addDialog->exec() == TQDialog::Accepted ) { if( addContactPage->validateData() ) { diff --git a/kopete/kopete/kopetewindow.h b/kopete/kopete/kopetewindow.h index cc466883..158b2805 100644 --- a/kopete/kopete/kopetewindow.h +++ b/kopete/kopete/kopetewindow.h @@ -20,10 +20,10 @@ #ifndef KOPETEWINDOW_H #define KOPETEWINDOW_H -#include +#include #include -#include +#include class QHBox; class QTimer; @@ -63,15 +63,15 @@ class KopeteWindow : public KMainWindow Q_OBJECT public: - KopeteWindow ( QWidget *parent = 0, const char *name = 0 ); + KopeteWindow ( TQWidget *parent = 0, const char *name = 0 ); ~KopeteWindow(); - virtual bool eventFilter( QObject* o, QEvent* e ); + virtual bool eventFilter( TQObject* o, TQEvent* e ); protected: - virtual void closeEvent( QCloseEvent *ev ); - virtual void leaveEvent( QEvent* ev ); - virtual void showEvent( QShowEvent* ev ); + virtual void closeEvent( TQCloseEvent *ev ); + virtual void leaveEvent( TQEvent* ev ); + virtual void showEvent( TQShowEvent* ev ); private slots: void showMenubar(); @@ -89,7 +89,7 @@ private slots: /* show the global status message selector menu */ - void setStatusMessage( const QString & ); + void setStatusMessage( const TQString & ); /** * Checks if the mousecursor is in the contact list. @@ -146,13 +146,13 @@ private slots: /** * Show a context menu for a protocol */ -// void slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const QPoint &p ); +// void slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const TQPoint &p ); /** * Show a context menu for an account */ void slotAccountStatusIconRightClicked( Kopete::Account *a, - const QPoint &p ); + const TQPoint &p ); void slotTrayAboutToShowMenu(KPopupMenu *); @@ -183,15 +183,15 @@ private slots: /** * Show the set global status message menu when clicking on the icon in the status bar. */ - void slotGlobalStatusMessageIconClicked( const QPoint &position ); + void slotGlobalStatusMessageIconClicked( const TQPoint &position ); /** - * Extracts protocolId and accountId from the single QString argument signalled by a QSignalMapper, + * Extracts protocolId and accountId from the single TQString argument signalled by a TQSignalMapper, * get the account, and call showAddContactDialog. - * @param accountIdentifer QString of protocolId and accountId, concatenated with QChar( 0xE000 ) - * We need both to uniquely identify an account, but QSignalMapper only emits one QString. + * @param accountIdentifer TQString of protocolId and accountId, concatenated with TQChar( 0xE000 ) + * We need both to uniquely identify an account, but TQSignalMapper only emits one TQString. */ - void slotAddContactDialogInternal( const QString & accountIdentifier ); + void slotAddContactDialogInternal( const TQString & accountIdentifier ); public: KopeteContactListView *contactlist; @@ -238,27 +238,27 @@ private: int docked; bool hidden; int deskRight; - QPoint position; - QHBox *m_statusBarWidget; + TQPoint position; + TQHBox *m_statusBarWidget; KopeteSystemTray *m_tray; bool m_autoHide; unsigned int m_autoHideTimeout; - QTimer* m_autoHideTimer; - QSignalMapper* addContactMapper; + TQTimer* m_autoHideTimer; + TQSignalMapper* addContactMapper; KopetePluginConfig *m_pluginConfig; /** * This is really a dictionary of KopeteAccountStatusBarIcon objects, but - * QPtrDict requires a full class definition to be known to make + * TQPtrDict requires a full class definition to be known to make * that work. And since I don't want to include that whole file here, - * use QObject instead. + * use TQObject instead. */ - QPtrDict m_accountStatusBarIcons; + TQPtrDict m_accountStatusBarIcons; KSqueezedTextLabel * m_globalStatusMessage; KPopupMenu * m_globalStatusMessageMenu; - QLineEdit * m_newMessageEdit; - QString m_globalStatusMessageStored; + TQLineEdit * m_newMessageEdit; + TQString m_globalStatusMessageStored; }; @@ -266,13 +266,13 @@ class GlobalStatusMessageIconLabel : public QLabel { Q_OBJECT public: - GlobalStatusMessageIconLabel(QWidget *parent = 0, const char *name = 0); + GlobalStatusMessageIconLabel(TQWidget *parent = 0, const char *name = 0); protected: - void mouseReleaseEvent(QMouseEvent *event); + void mouseReleaseEvent(TQMouseEvent *event); signals: - void iconClicked(const QPoint &position); + void iconClicked(const TQPoint &position); }; diff --git a/kopete/kopete/systemtray.cpp b/kopete/kopete/systemtray.cpp index 5ed018c5..d71b3816 100644 --- a/kopete/kopete/systemtray.cpp +++ b/kopete/kopete/systemtray.cpp @@ -19,9 +19,9 @@ #include "systemtray.h" -#include -#include -#include +#include +#include +#include #include #include @@ -41,7 +41,7 @@ KopeteSystemTray* KopeteSystemTray::s_systemTray = 0L; -KopeteSystemTray* KopeteSystemTray::systemTray( QWidget *parent, const char* name ) +KopeteSystemTray* KopeteSystemTray::systemTray( TQWidget *parent, const char* name ) { if( !s_systemTray ) s_systemTray = new KopeteSystemTray( parent, name ); @@ -49,27 +49,27 @@ KopeteSystemTray* KopeteSystemTray::systemTray( QWidget *parent, const char* nam return s_systemTray; } -KopeteSystemTray::KopeteSystemTray(QWidget* parent, const char* name) +KopeteSystemTray::KopeteSystemTray(TQWidget* parent, const char* name) : KSystemTray(parent,name) { // kdDebug(14010) << "Creating KopeteSystemTray" << endl; - QToolTip::add( this, kapp->aboutData()->shortDescription() ); + TQToolTip::add( this, kapp->aboutData()->shortDescription() ); mIsBlinkIcon = false; mIsBlinking = false; - mBlinkTimer = new QTimer(this, "mBlinkTimer"); + mBlinkTimer = new TQTimer(this, "mBlinkTimer"); mKopeteIcon = loadIcon("kopete"); - connect(mBlinkTimer, SIGNAL(timeout()), this, SLOT(slotBlink())); - connect(Kopete::ChatSessionManager::self() , SIGNAL(newEvent(Kopete::MessageEvent*)), - this, SLOT(slotNewEvent(Kopete::MessageEvent*))); - connect(KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged())); + connect(mBlinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBlink())); + connect(Kopete::ChatSessionManager::self() , TQT_SIGNAL(newEvent(Kopete::MessageEvent*)), + this, TQT_SLOT(slotNewEvent(Kopete::MessageEvent*))); + connect(KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged())); connect(Kopete::AccountManager::self(), - SIGNAL(accountOnlineStatusChanged(Kopete::Account *, + TQT_SIGNAL(accountOnlineStatusChanged(Kopete::Account *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &)), - this, SLOT(slotReevaluateAccountStates())); + this, TQT_SLOT(slotReevaluateAccountStates())); // the slot called by default by the quit action, KSystemTray::maybeQuit(), // just closes the parent window, which is hard to distinguish in that window's closeEvent() @@ -81,7 +81,7 @@ KopeteSystemTray::KopeteSystemTray(QWidget* parent, const char* name) KAction *quit = actionCollection()->action( "file_quit" ); quit->disconnect(); KopeteWindow *myParent = static_cast( parent ); - connect( quit, SIGNAL( activated() ), myParent, SLOT( slotQuit() ) ); + connect( quit, TQT_SIGNAL( activated() ), myParent, TQT_SLOT( slotQuit() ) ); //setPixmap(mKopeteIcon); slotReevaluateAccountStates(); @@ -97,11 +97,11 @@ KopeteSystemTray::~KopeteSystemTray() Kopete::UI::Global::setSysTrayWId( 0 ); } -void KopeteSystemTray::mousePressEvent( QMouseEvent *me ) +void KopeteSystemTray::mousePressEvent( TQMouseEvent *me ) { if ( - (me->button() == QEvent::MidButton || - (me->button() == QEvent::LeftButton && KopetePrefs::prefs()->trayflashNotifyLeftClickOpensMessage())) && + (me->button() == TQEvent::MidButton || + (me->button() == TQEvent::LeftButton && KopetePrefs::prefs()->trayflashNotifyLeftClickOpensMessage())) && mIsBlinking ) { mouseDoubleClickEvent( me ); @@ -111,7 +111,7 @@ void KopeteSystemTray::mousePressEvent( QMouseEvent *me ) KSystemTray::mousePressEvent( me ); } -void KopeteSystemTray::mouseDoubleClickEvent( QMouseEvent *me ) +void KopeteSystemTray::mouseDoubleClickEvent( TQMouseEvent *me ) { if ( !mIsBlinking ) { @@ -130,12 +130,12 @@ void KopeteSystemTray::contextMenuAboutToShow( KPopupMenu *me ) emit aboutToShowMenu( me ); } -void KopeteSystemTray::startBlink( const QString &icon ) +void KopeteSystemTray::startBlink( const TQString &icon ) { startBlink( KGlobal::iconLoader()->loadIcon( icon , KIcon::Panel ) ); } -void KopeteSystemTray::startBlink( const QPixmap &icon ) +void KopeteSystemTray::startBlink( const TQPixmap &icon ) { mBlinkIcon = icon; if ( mBlinkTimer->isActive() == false ) @@ -153,10 +153,10 @@ void KopeteSystemTray::startBlink( const QPixmap &icon ) } } -void KopeteSystemTray::startBlink( const QMovie &movie ) +void KopeteSystemTray::startBlink( const TQMovie &movie ) { //kdDebug( 14010 ) << k_funcinfo << "starting movie." << endl; - const_cast( movie ).unpause(); + const_cast( movie ).unpause(); setMovie( movie ); mIsBlinking = true; } @@ -164,7 +164,7 @@ void KopeteSystemTray::startBlink( const QMovie &movie ) void KopeteSystemTray::startBlink() { if ( mMovie.isNull() ) - mMovie = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Panel ); + mMovie = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Panel ); startBlink( mMovie ); } @@ -205,8 +205,8 @@ void KopeteSystemTray::slotNewEvent( Kopete::MessageEvent *event ) mBalloonEventList.append( event ); } - connect(event, SIGNAL(done(Kopete::MessageEvent*)), - this, SLOT(slotEventDone(Kopete::MessageEvent*))); + connect(event, TQT_SIGNAL(done(Kopete::MessageEvent*)), + this, TQT_SLOT(slotEventDone(Kopete::MessageEvent*))); if( event->message().manager() != 0 ) { @@ -262,7 +262,7 @@ void KopeteSystemTray::removeBalloonEvent(Kopete::MessageEvent *event) { //delay the addBalloon to let the time to event be deleted //in case a contact has been deleted cf Bug 100196 - QTimer::singleShot(0, this, SLOT(addBalloon())); + TQTimer::singleShot(0, this, TQT_SLOT(addBalloon())); } else { @@ -291,10 +291,10 @@ void KopeteSystemTray::addBalloon() if ( msg.from() ) { - QString msgText = squashMessage( msg ); + TQString msgText = squashMessage( msg ); kdDebug(14010) << k_funcinfo << "msg text=" << msgText << endl; - QString msgFrom; + TQString msgFrom; if( msg.from()->metaContact() ) msgFrom = msg.from()->metaContact()->displayName(); else @@ -302,11 +302,11 @@ void KopeteSystemTray::addBalloon() m_balloon = new KopeteBalloon( i18n( "New Message from %1:
\"%2\"
" ) - .arg( QStyleSheet::escape( msgFrom ), msgText ), QString::null ); - connect(m_balloon, SIGNAL(signalBalloonClicked()), mBalloonEventList.first() , SLOT(apply())); - connect(m_balloon, SIGNAL(signalButtonClicked()), mBalloonEventList.first() , SLOT(apply())); - connect(m_balloon, SIGNAL(signalIgnoreButtonClicked()), mBalloonEventList.first() , SLOT(ignore())); - connect(m_balloon, SIGNAL(signalTimeout()), this , SLOT(slotRemoveBalloon())); + .arg( TQStyleSheet::escape( msgFrom ), msgText ), TQString::null ); + connect(m_balloon, TQT_SIGNAL(signalBalloonClicked()), mBalloonEventList.first() , TQT_SLOT(apply())); + connect(m_balloon, TQT_SIGNAL(signalButtonClicked()), mBalloonEventList.first() , TQT_SLOT(apply())); + connect(m_balloon, TQT_SIGNAL(signalIgnoreButtonClicked()), mBalloonEventList.first() , TQT_SLOT(ignore())); + connect(m_balloon, TQT_SIGNAL(signalTimeout()), this , TQT_SLOT(slotRemoveBalloon())); m_balloon->setAnchor(mapToGlobal(pos())); m_balloon->show(); KWin::setOnAllDesktops(m_balloon->winId(), true); @@ -337,7 +337,7 @@ void KopeteSystemTray::slotReevaluateAccountStates() bool bOffline = false; Kopete::Contact *c = 0; - for (QPtrListIterator it(Kopete::AccountManager::self()->accounts()); it.current(); ++it) + for (TQPtrListIterator it(Kopete::AccountManager::self()->accounts()); it.current(); ++it) { c = it.current()->myself(); if (!c) @@ -383,11 +383,11 @@ void KopeteSystemTray::slotReevaluateAccountStates() } -QString KopeteSystemTray::squashMessage( const Kopete::Message& msg ) +TQString KopeteSystemTray::squashMessage( const Kopete::Message& msg ) { - QString msgText = msg.parsedBody(); + TQString msgText = msg.parsedBody(); - QRegExp rx( "(((http://)?(.+)))" ); + TQRegExp rx( "(((http://)?(.+)))" ); rx.setMinimal( true ); if ( rx.search( msgText ) == -1 ) { @@ -397,31 +397,31 @@ QString KopeteSystemTray::squashMessage( const Kopete::Message& msg ) // Escape it after snipping it to not snip entities msgText =msg.plainBody() ; if( msgText.length() > 30 ) - msgText = msgText.left( 30 ) + QString::fromLatin1( " ..." ); + msgText = msgText.left( 30 ) + TQString::fromLatin1( " ..." ); msgText=Kopete::Message::escape(msgText); } else { - QString plainText = msg.plainBody(); + TQString plainText = msg.plainBody(); if ( plainText.length() > 30 ) { - QString fullUrl = rx.cap( 2 ); - QString shorterUrl; + TQString fullUrl = rx.cap( 2 ); + TQString shorterUrl; if ( fullUrl.length() > 30 ) { - QString urlWithoutProtocol = rx.cap( 4 ); + TQString urlWithoutProtocol = rx.cap( 4 ); shorterUrl = urlWithoutProtocol.left( 27 ) - + QString::fromLatin1( "... " ); + + TQString::fromLatin1( "... " ); } else { shorterUrl = fullUrl.left( 27 ) - + QString::fromLatin1( "... " ); + + TQString::fromLatin1( "... " ); } // remove message text - msgText = QString::fromLatin1( "... " ) + + msgText = TQString::fromLatin1( "... " ) + rx.cap( 1 ) + - QString::fromLatin1( " ..." ); + TQString::fromLatin1( " ..." ); // find last occurrence of URL (the one inside the tag) int revUrlOffset = msgText.findRev( fullUrl ); msgText.replace( revUrlOffset, diff --git a/kopete/kopete/systemtray.h b/kopete/kopete/systemtray.h index 223cb173..997ebb9b 100644 --- a/kopete/kopete/systemtray.h +++ b/kopete/kopete/systemtray.h @@ -20,8 +20,8 @@ #ifndef SYSTEMTRAY_H #define SYSTEMTRAY_H -#include -#include +#include +#include #include @@ -47,14 +47,14 @@ public: /** * Retrieve the system tray instance */ - static KopeteSystemTray* systemTray( QWidget* parent = 0, const char* name = 0 ); + static KopeteSystemTray* systemTray( TQWidget* parent = 0, const char* name = 0 ); ~KopeteSystemTray(); // One method, multiple interfaces :-) - void startBlink( const QString &icon ); - void startBlink( const QPixmap &icon ); - void startBlink( const QMovie &movie ); + void startBlink( const TQString &icon ); + void startBlink( const TQPixmap &icon ); + void startBlink( const TQMovie &movie ); void startBlink(); void stopBlink(); @@ -62,8 +62,8 @@ public: KPopupMenu *contextMenu() const { return KSystemTray::contextMenu(); }; protected: - virtual void mousePressEvent( QMouseEvent *e ); - virtual void mouseDoubleClickEvent( QMouseEvent *me ); + virtual void mousePressEvent( TQMouseEvent *e ); + virtual void mouseDoubleClickEvent( TQMouseEvent *me ); virtual void contextMenuAboutToShow( KPopupMenu * ); signals: @@ -79,22 +79,22 @@ private slots: void addBalloon(); private: - KopeteSystemTray( QWidget* parent, const char* name ); - QString squashMessage( const Kopete::Message& msgText ); + KopeteSystemTray( TQWidget* parent, const char* name ); + TQString squashMessage( const Kopete::Message& msgText ); void removeBalloonEvent(Kopete::MessageEvent *); - QTimer *mBlinkTimer; - QPixmap mKopeteIcon; - QPixmap mBlinkIcon; - QMovie mMovie; + TQTimer *mBlinkTimer; + TQPixmap mKopeteIcon; + TQPixmap mBlinkIcon; + TQMovie mMovie; bool mIsBlinkIcon; bool mIsBlinking; static KopeteSystemTray* s_systemTray; - QPtrList mEventList; - QPtrList mBalloonEventList; + TQPtrList mEventList; + TQPtrList mBalloonEventList; KopeteBalloon *m_balloon; }; diff --git a/kopete/libkopete/avdevice/kxv.cpp b/kopete/libkopete/avdevice/kxv.cpp index 942a823b..f573bd50 100644 --- a/kopete/libkopete/avdevice/kxv.cpp +++ b/kopete/libkopete/avdevice/kxv.cpp @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include @@ -177,7 +177,7 @@ bool KXv::init(Drawable d) #endif } -bool KXvDevice::grabStill(QImage* /*pix*/, int /*dw*/, int /*dh*/) +bool KXvDevice::grabStill(TQImage* /*pix*/, int /*dw*/, int /*dh*/) { #ifndef HAVE_LIBXV return false; @@ -186,14 +186,14 @@ bool KXvDevice::grabStill(QImage* /*pix*/, int /*dw*/, int /*dh*/) #endif } -int KXvDevice::displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh) +int KXvDevice::displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh) { if (!widget) return -1; return displayImage(widget->winId(), data, w, h, 0, 0, w, h, dw, dh); } -int KXvDevice::displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh) +int KXvDevice::displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh) { if (!widget) return -1; @@ -255,7 +255,7 @@ int KXvDevice::displayImage(Window win, const unsigned char *const data, int w, } -bool KXvDevice::startVideo(QWidget *w, int dw, int dh) +bool KXvDevice::startVideo(TQWidget *w, int dw, int dh) { if (!w) return false; return startVideo(w->winId(), dw, dh); @@ -338,7 +338,7 @@ KXvDevice::KXvDevice() xv_attr = NULL; xv_port = -1; xv_encoding = -1; - xv_name = QString::null; + xv_name = TQString::null; xv_type = -1; xv_adaptor = -1; _shm = false; @@ -443,7 +443,7 @@ bool KXvDevice::init() kdDebug() << "Image formats for port " << xv_port << endl; for (int i = 0; i < xv_formats; i++) { assert(fo); - QString imout; + TQString imout; imout.sprintf(" 0x%x (%c%c%c%c) %s", fo[i].id, fo[i].id & 0xff, @@ -463,7 +463,7 @@ bool KXvDevice::init() } -bool KXvDevice::supportsWidget(QWidget *w) +bool KXvDevice::supportsWidget(TQWidget *w) { #ifndef HAVE_LIBXV return false; @@ -509,7 +509,7 @@ const KXvDeviceAttributes& KXvDevice::attributes() } -bool KXvDevice::getAttributeRange(const QString& attribute, int *min, int *max) +bool KXvDevice::getAttributeRange(const TQString& attribute, int *min, int *max) { for (KXvDeviceAttribute *at = _attrs.first(); at != NULL; at = _attrs.next()) { if (at->name == attribute) { @@ -522,7 +522,7 @@ bool KXvDevice::getAttributeRange(const QString& attribute, int *min, int *max) } -bool KXvDevice::getAttribute(const QString& attribute, int *val) +bool KXvDevice::getAttribute(const TQString& attribute, int *val) { #ifndef HAVE_LIBXV return false; @@ -539,7 +539,7 @@ bool KXvDevice::getAttribute(const QString& attribute, int *val) } -bool KXvDevice::setAttribute(const QString& attribute, int val) +bool KXvDevice::setAttribute(const TQString& attribute, int val) { #ifndef HAVE_LIBXV return false; @@ -556,7 +556,7 @@ bool KXvDevice::setAttribute(const QString& attribute, int val) } -const QString& KXvDevice::name() const +const TQString& KXvDevice::name() const { return xv_name; } @@ -567,12 +567,12 @@ int KXvDevice::port() const return xv_port; } -const QStringList& KXvDevice::encodings() const +const TQStringList& KXvDevice::encodings() const { return _encodingList; } -bool KXvDevice::encoding(QString& encoding) +bool KXvDevice::encoding(TQString& encoding) { #ifndef HAVE_LIBXV return false; @@ -591,7 +591,7 @@ bool KXvDevice::encoding(QString& encoding) #endif } -bool KXvDevice::setEncoding(const QString& e) +bool KXvDevice::setEncoding(const TQString& e) { #ifdef HAVE_LIBXV for (unsigned int i = 0; i < xv_encodings; i++) { diff --git a/kopete/libkopete/avdevice/kxv.h b/kopete/libkopete/avdevice/kxv.h index 6f7602bf..8b3e14dd 100644 --- a/kopete/libkopete/avdevice/kxv.h +++ b/kopete/libkopete/avdevice/kxv.h @@ -24,9 +24,9 @@ #include #include -#include -#include -#include +#include +#include +#include class QWidget; class QImage; @@ -35,7 +35,7 @@ class KXvPrivate; class KXvDevice; class KXvDevicePrivate; -typedef QPtrList KXvDeviceList; +typedef TQPtrList KXvDeviceList; class KXv @@ -81,7 +81,7 @@ private: class KXvDeviceAttribute { public: - QString name; + TQString name; int min; int max; int flags; @@ -89,7 +89,7 @@ public: Atom atom(); }; -typedef QPtrList KXvDeviceAttributes; +typedef TQPtrList KXvDeviceAttributes; class KXvDevice @@ -108,41 +108,41 @@ public: /* * return the range for a given attribute */ - bool getAttributeRange(const QString& attribute, int *min, int *max); + bool getAttributeRange(const TQString& attribute, int *min, int *max); /* * get the current value of a given attribute */ - bool getAttribute(const QString& attribute, int *val); + bool getAttribute(const TQString& attribute, int *val); /* * set the current value of a given attribute */ - bool setAttribute(const QString& attribute, int val); + bool setAttribute(const TQString& attribute, int val); - bool grabStill(QImage *pix, int dw, int dh); + bool grabStill(TQImage *pix, int dw, int dh); /* * True if this device can operate on the given widget */ - bool supportsWidget(QWidget *w); + bool supportsWidget(TQWidget *w); /* * Display the given image with Xv. */ - int displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh); + int displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh); int displayImage(Window win, const unsigned char *const data, int w, int h, int dw, int dh); /* * Display a portion of the given image with Xv. */ - int displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); + int displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); int displayImage(Window win, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); /* * Start a video stream in widget w, width dw, height dh */ - bool startVideo(QWidget *w, int dw, int dh); + bool startVideo(TQWidget *w, int dw, int dh); bool startVideo(Window w, int dw, int dh); /* @@ -168,7 +168,7 @@ public: /* * Name of the device */ - const QString& name() const; + const TQString& name() const; /* * The Xv port for this device @@ -178,17 +178,17 @@ public: /* * The list of encodings/norms available */ - const QStringList& encodings() const; + const TQStringList& encodings() const; /* * get encoding */ - bool encoding(QString& encoding); + bool encoding(TQString& encoding); /* * Set the encoding to the given one. This should be taken from the list. */ - bool setEncoding(const QString& e); + bool setEncoding(const TQString& e); /* * Set the image format. (ex YUV) @@ -218,7 +218,7 @@ protected: KXvDeviceAttributes _attrs; int xv_type, xv_adaptor; - QString xv_name; + TQString xv_name; int xv_port; unsigned int xv_encodings; int xv_encoding; @@ -228,7 +228,7 @@ protected: GC xv_gc; Window xv_last_win; - QStringList _encodingList; + TQStringList _encodingList; int xv_formats; void *xv_formatvalues; diff --git a/kopete/libkopete/avdevice/qvideo.cpp b/kopete/libkopete/avdevice/qvideo.cpp index 8d153e58..d8d91602 100644 --- a/kopete/libkopete/avdevice/qvideo.cpp +++ b/kopete/libkopete/avdevice/qvideo.cpp @@ -27,7 +27,7 @@ #include "qvideo.h" #include -#include +#include #include #include @@ -71,7 +71,7 @@ bool QVideo::findDisplayProperties(ImageFormat& fmt, int& depth, unsigned int& b int bpp = 0; int d = 0; - vi_out.screen = QPaintDevice::x11AppScreen(); + vi_out.screen = TQPaintDevice::x11AppScreen(); vi_in = XGetVisualInfo(qt_xdisplay(), mask, &vi_out, &nvis); if (vi_in) { diff --git a/kopete/libkopete/avdevice/qvideostream.cpp b/kopete/libkopete/avdevice/qvideostream.cpp index 18773946..05bbf209 100644 --- a/kopete/libkopete/avdevice/qvideostream.cpp +++ b/kopete/libkopete/avdevice/qvideostream.cpp @@ -20,9 +20,9 @@ */ #include "qvideostream.h" -#include -#include -#include +#include +#include +#include #include #include "kxv.h" @@ -43,30 +43,30 @@ extern "C" { class QVideoStreamGLWidget : public QGLWidget { public: - QVideoStreamGLWidget(QWidget* parent = 0, const char* name = 0); + QVideoStreamGLWidget(TQWidget* parent = 0, const char* name = 0); virtual ~QVideoStreamGLWidget(); - void setInputSize(const QSize& sz); + void setInputSize(const TQSize& sz); void display(const unsigned char *const img, int x, int y, int sw, int sh); private: virtual void resizeGL(int w, int h); void initializeGL(); - virtual bool eventFilter( QObject *o, QEvent *e ); - void calc(QPoint& p, QPoint& v); + virtual bool eventFilter( TQObject *o, TQEvent *e ); + void calc(TQPoint& p, TQPoint& v); - QSize _inputSize; + TQSize _inputSize; GLuint _tex; int _tw, _th; - QWidget* _w; + TQWidget* _w; int _maxGL; - QSize _sz; + TQSize _sz; bool _glfun; - QPoint _ul, _ur, _ll, _lr; - QPoint _vul, _vur, _vll, _vlr; - QTimer* _glfunTimer; + TQPoint _ul, _ur, _ll, _lr; + TQPoint _vul, _vur, _vll, _vlr; + TQTimer* _glfunTimer; }; #endif @@ -98,8 +98,8 @@ QVideoStreamPrivate::~QVideoStreamPrivate() delete xvHandle; } -QVideoStream::QVideoStream(QWidget *widget, const char* name) - : QObject(widget, name), +QVideoStream::QVideoStream(TQWidget *widget, const char* name) + : TQObject(widget, name), d(new QVideoStreamPrivate), _w(widget), _methods(METHOD_NONE), @@ -127,7 +127,7 @@ QVideoStream::QVideoStream(QWidget *widget, const char* name) } #ifdef HAVE_GL - if (QGLFormat::hasOpenGL()) { + if (TQGLFormat::hasOpenGL()) { _methods = (VideoMethod)(_methods | METHOD_GL); } #endif @@ -309,7 +309,7 @@ QVideo::VideoMethod QVideoStream::setMethod(VideoMethod method) return _method; } -QSize QVideoStream::maxSize() const +TQSize QVideoStream::maxSize() const { return _size; } @@ -324,7 +324,7 @@ int QVideoStream::maxHeight() const return _size.height(); } -QSize QVideoStream::size() const +TQSize QVideoStream::size() const { return _size; } @@ -339,7 +339,7 @@ int QVideoStream::height() const return _size.height(); } -QSize QVideoStream::setSize(const QSize& sz) +TQSize QVideoStream::setSize(const TQSize& sz) { _size = sz; return _size; @@ -365,7 +365,7 @@ int QVideoStream::setHeight(int height) return _size.height(); } -QSize QVideoStream::inputSize() const +TQSize QVideoStream::inputSize() const { return _inputSize; } @@ -380,7 +380,7 @@ int QVideoStream::inputHeight() const return _inputSize.height(); } -QSize QVideoStream::setInputSize(const QSize& sz) +TQSize QVideoStream::setInputSize(const TQSize& sz) { if (sz == _inputSize) return _inputSize; @@ -532,19 +532,19 @@ QVideoStream& QVideoStream::operator<<(const unsigned char *const img) // --------------------------------------------------------------------------------------- #ifdef HAVE_GL -QVideoStreamGLWidget::QVideoStreamGLWidget(QWidget* parent, const char* name) - : QGLWidget(QGLFormat(QGL::DoubleBuffer | QGL::Rgba | QGL::DirectRendering), parent, name), +QVideoStreamGLWidget::QVideoStreamGLWidget(TQWidget* parent, const char* name) + : TQGLWidget(TQGLFormat(TQGL::DoubleBuffer | TQGL::Rgba | TQGL::DirectRendering), parent, name), _tex(0), _w(parent), _glfun(false) { kdDebug() << "QVideoStreamGLWidget::QVideoStreamGLWidget()" << endl; - connect(_w, SIGNAL(resized(int, int)), - this, SLOT(resize(int, int))); + connect(_w, TQT_SIGNAL(resized(int, int)), + this, TQT_SLOT(resize(int, int))); topLevelWidget()->installEventFilter(this); - _glfunTimer = new QTimer(); + _glfunTimer = new TQTimer(); } QVideoStreamGLWidget::~QVideoStreamGLWidget() @@ -558,12 +558,12 @@ QVideoStreamGLWidget::~QVideoStreamGLWidget() } } -bool QVideoStreamGLWidget::eventFilter(QObject*, QEvent* e) +bool QVideoStreamGLWidget::eventFilter(TQObject*, TQEvent* e) { - // For some reason, KeyPress does not work (yields 2), QEvent::KeyPress is unknown... What the f...???? + // For some reason, KeyPress does not work (yields 2), TQEvent::KeyPress is unknown... What the f...???? // I am too lazy to scan the header files for the reason. if(e->type() == 6) { - QKeyEvent* ke = static_cast(e); + TQKeyEvent* ke = static_cast(e); if(ke->key() == Qt::Key_Pause) { _glfunTimer->start(500, true); } else if (_glfunTimer->isActive() && (ke->key() == Qt::Key_Escape)) { @@ -578,7 +578,7 @@ void QVideoStreamGLWidget::initializeGL() kdDebug() << "QVideoStreamGLWidget::initializeGL()" << endl; setAutoBufferSwap(false); - QGLFormat f = format(); + TQGLFormat f = format(); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &_maxGL); kdDebug() << "OpenGL capabilities (* = required):" << endl; kdDebug() << " Valid context*: " << isValid() << endl; @@ -598,15 +598,15 @@ void QVideoStreamGLWidget::initializeGL() glShadeModel(GL_FLAT); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - _vul = QPoint( 4, 10); - _vur = QPoint(-8, 4); - _vll = QPoint(10, -4); - _vlr = QPoint(-8, -10); + _vul = TQPoint( 4, 10); + _vur = TQPoint(-8, 4); + _vll = TQPoint(10, -4); + _vlr = TQPoint(-8, -10); } void QVideoStreamGLWidget::resizeGL(int w, int h) { - _sz = QSize(w, h); + _sz = TQSize(w, h); glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); @@ -615,13 +615,13 @@ void QVideoStreamGLWidget::resizeGL(int w, int h) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - _ul = QPoint(0, 0); - _ur = QPoint(w, 0); - _ll = QPoint(0, h); - _lr = QPoint(w, h); + _ul = TQPoint(0, 0); + _ur = TQPoint(w, 0); + _ll = TQPoint(0, h); + _lr = TQPoint(w, h); } -void QVideoStreamGLWidget::setInputSize(const QSize& sz) +void QVideoStreamGLWidget::setInputSize(const TQSize& sz) { makeCurrent(); @@ -705,7 +705,7 @@ void QVideoStreamGLWidget::display(const unsigned char *const img, int x, int y, glDisable(GL_TEXTURE_2D); } -void QVideoStreamGLWidget::calc(QPoint& p, QPoint& v) +void QVideoStreamGLWidget::calc(TQPoint& p, TQPoint& v) { p += v; diff --git a/kopete/libkopete/avdevice/qvideostream.h b/kopete/libkopete/avdevice/qvideostream.h index f1b0ca24..24b7fb40 100644 --- a/kopete/libkopete/avdevice/qvideostream.h +++ b/kopete/libkopete/avdevice/qvideostream.h @@ -29,11 +29,11 @@ #endif #ifdef HAVE_GL -#include +#include #include #endif -#include +#include #include "qvideo.h" class QVideoStreamPrivate; @@ -41,12 +41,12 @@ class QVideoStreamPrivate; /** * QT-style video stream driver. */ -class QVideoStream : public QObject, public QVideo +class QVideoStream : public TQObject, public QVideo { Q_OBJECT public: - QVideoStream(QWidget *widget, const char* name = 0); + QVideoStream(TQWidget *widget, const char* name = 0); ~QVideoStream(); /* output method */ @@ -55,25 +55,25 @@ public: VideoMethod setMethod(VideoMethod method); /* max output sizes */ - QSize maxSize() const; + TQSize maxSize() const; int maxWidth() const; int maxHeight() const; /* output sizes */ - QSize size() const; + TQSize size() const; int width() const; int height() const; - QSize setSize(const QSize& sz); + TQSize setSize(const TQSize& sz); int setWidth(int width); int setHeight(int height); /* input sizes */ - QSize inputSize() const; + TQSize inputSize() const; int inputWidth() const; int inputHeight() const; - QSize setInputSize(const QSize& sz); + TQSize setInputSize(const TQSize& sz); int setInputWidth(int width); int setInputHeight(int height); @@ -95,12 +95,12 @@ public slots: private: QVideoStreamPrivate* d; - QWidget* _w; + TQWidget* _w; VideoMethod _methods; // list of methods VideoMethod _method; // the current method ImageFormat _format; - QSize _size; - QSize _inputSize; + TQSize _size; + TQSize _inputSize; bool _init; ImageFormat _xFormat; diff --git a/kopete/libkopete/avdevice/videocontrol.h b/kopete/libkopete/avdevice/videocontrol.h index 2675be6e..c4db3b9d 100644 --- a/kopete/libkopete/avdevice/videocontrol.h +++ b/kopete/libkopete/avdevice/videocontrol.h @@ -30,9 +30,9 @@ #define __s64 long long #endif // __s64 -#include +#include #include -#include +#include #include "kopete_export.h" namespace Kopete { @@ -67,7 +67,7 @@ public: protected: __u32 m_id; control_type m_type; - QString m_name; + TQString m_name; __s32 m_minimum; __s32 m_maximum; __s32 m_step; diff --git a/kopete/libkopete/avdevice/videodevice.cpp b/kopete/libkopete/avdevice/videodevice.cpp index ada02ae5..00ab8266 100644 --- a/kopete/libkopete/avdevice/videodevice.cpp +++ b/kopete/libkopete/avdevice/videodevice.cpp @@ -71,7 +71,7 @@ void VideoDevice::enumerateMenu (void) { if (0 == xioctl (VIDIOC_QUERYMENU, &querymenu)) { - kdDebug(14010) << k_funcinfo << " " << QString::fromLocal8Bit((const char*)querymenu.name) << endl; + kdDebug(14010) << k_funcinfo << " " << TQString::fromLocal8Bit((const char*)querymenu.name) << endl; } else { @@ -111,9 +111,9 @@ int VideoDevice::errnoReturn(const char* s) } /*! - \fn VideoDevice::setFileName(QString name) + \fn VideoDevice::setFileName(TQString name) */ -int VideoDevice::setFileName(QString filename) +int VideoDevice::setFileName(TQString filename) { /// @todo implement me full_filename=filename; @@ -133,7 +133,7 @@ int VideoDevice::open() kdDebug(14010) << k_funcinfo << "Device is already open" << endl; return EXIT_SUCCESS; } - descriptor = ::open (QFile::encodeName(full_filename), O_RDWR, 0); + descriptor = ::open (TQFile::encodeName(full_filename), O_RDWR, 0); if(isOpen()) { kdDebug(14010) << k_funcinfo << "File " << full_filename << " was opened successfuly" << endl; @@ -200,7 +200,7 @@ int VideoDevice::checkDevice() m_videocapture=true; kdDebug(14010) << k_funcinfo << "checkDevice(): " << full_filename << " is a V4L2 device." << endl; m_driver = VIDEODEV_DRIVER_V4L2; - m_model=QString::fromLocal8Bit((const char*)V4L2_capabilities.card); + m_model=TQString::fromLocal8Bit((const char*)V4L2_capabilities.card); // Detect maximum and minimum resolution supported by the V4L2 device @@ -259,7 +259,7 @@ int VideoDevice::checkDevice() if(inputisok==EXIT_SUCCESS) { VideoInput tempinput; - tempinput.name = QString::fromLocal8Bit((const char*)videoinput.name); + tempinput.name = TQString::fromLocal8Bit((const char*)videoinput.name); tempinput.hastuner = videoinput.type & V4L2_INPUT_TYPE_TUNER; tempinput.m_standards = videoinput.std; m_input.push_back(tempinput); @@ -300,8 +300,8 @@ for (currentid = V4L2_CID_BASE; currentid < V4L2_CID_LASTP1; currentid++) if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) continue; -//kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << endl; -kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; +//kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << endl; +kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; /* switch (queryctrl.type) { @@ -332,7 +332,7 @@ for (currentid = V4L2_CID_PRIVATE_BASE;; currentid++) if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) continue; -kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; +kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; if (queryctrl.type == V4L2_CTRL_TYPE_MENU) enumerateMenu (); @@ -376,7 +376,7 @@ kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const c { kdDebug(14010) << k_funcinfo << full_filename << " is a V4L device." << endl; m_driver = VIDEODEV_DRIVER_V4L; - m_model=QString::fromLocal8Bit((const char*)V4L_capabilities.name); + m_model=TQString::fromLocal8Bit((const char*)V4L_capabilities.name); if(V4L_capabilities.type & VID_TYPE_CAPTURE) m_videocapture=true; if(V4L_capabilities.type & VID_TYPE_CHROMAKEY) @@ -405,7 +405,7 @@ kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const c if(inputisok==EXIT_SUCCESS) { VideoInput tempinput; - tempinput.name = QString::fromLocal8Bit((const char*)videoinput.name); + tempinput.name = TQString::fromLocal8Bit((const char*)videoinput.name); tempinput.hastuner=videoinput.flags & VIDEO_VC_TUNER; // TODO: The routine to detect the appropriate video standards for V4L must be placed here m_input.push_back(tempinput); @@ -1190,15 +1190,15 @@ int VideoDevice::getFrame(imagebuffer *imgbuffer) } /*! - \fn Kopete::AV::VideoDevice::getImage(const QImage *qimage) + \fn Kopete::AV::VideoDevice::getImage(const TQImage *qimage) */ -int VideoDevice::getImage(QImage *qimage) +int VideoDevice::getImage(TQImage *qimage) { /// @todo implement me // do NOT delete qimage here, as it is received as a parameter if (qimage->width() != width() || qimage->height() != height()) - qimage->create(width(), height(),32, QImage::IgnoreEndian); + qimage->create(width(), height(),32, TQImage::IgnoreEndian); uchar *bits=qimage->bits(); // kDebug() << "Capturing in " << pixelFormatName(m_currentbuffer.pixelformat); @@ -2106,9 +2106,9 @@ int VideoDevice::pixelFormatDepth(pixel_format pixelformat) return 0; } -QString VideoDevice::pixelFormatName(pixel_format pixelformat) +TQString VideoDevice::pixelFormatName(pixel_format pixelformat) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(pixelformat) { @@ -2156,9 +2156,9 @@ QString VideoDevice::pixelFormatName(pixel_format pixelformat) return returnvalue; } -QString VideoDevice::pixelFormatName(int pixelformat) +TQString VideoDevice::pixelFormatName(int pixelformat) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(m_driver) { @@ -2410,9 +2410,9 @@ __u64 VideoDevice::signalStandardCode(signal_standard standard) return STANDARD_NONE; } -QString VideoDevice::signalStandardName(signal_standard standard) +TQString VideoDevice::signalStandardName(signal_standard standard) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(standard) { @@ -2455,9 +2455,9 @@ QString VideoDevice::signalStandardName(signal_standard standard) return returnvalue; } -QString VideoDevice::signalStandardName(int standard) +TQString VideoDevice::signalStandardName(int standard) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(m_driver) { diff --git a/kopete/libkopete/avdevice/videodevice.h b/kopete/libkopete/avdevice/videodevice.h index 982ab5f3..2482c183 100644 --- a/kopete/libkopete/avdevice/videodevice.h +++ b/kopete/libkopete/avdevice/videodevice.h @@ -61,10 +61,10 @@ #endif // __linux__ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "videoinput.h" @@ -191,7 +191,7 @@ struct imagebuffer int height; int width; pixel_format pixelformat; - QValueVector data; // maybe it should be a rawbuffer instead of it? It could make us avoid a memory copy + TQValueVector data; // maybe it should be a rawbuffer instead of it? It could make us avoid a memory copy }; struct rawbuffer // raw buffer { @@ -204,7 +204,7 @@ class VideoDevice{ public: VideoDevice(); ~VideoDevice(); - int setFileName(QString filename); + int setFileName(TQString filename); int open(); bool isOpen(); int checkDevice(); @@ -223,13 +223,13 @@ public: int pixelFormatCode(pixel_format pixelformat); pixel_format pixelFormatForPalette( int palette ); int pixelFormatDepth(pixel_format pixelformat); - QString pixelFormatName(pixel_format pixelformat); - QString pixelFormatName(int pixelformat); + TQString pixelFormatName(pixel_format pixelformat); + TQString pixelFormatName(int pixelformat); int detectPixelFormats(); __u64 signalStandardCode(signal_standard standard); - QString signalStandardName(signal_standard standard); - QString signalStandardName(int standard); + TQString signalStandardName(signal_standard standard); + TQString signalStandardName(int standard); int detectSignalStandards(); int currentInput(); @@ -238,7 +238,7 @@ public: int startCapturing(); int getFrame(); int getFrame(imagebuffer *imgbuffer); - int getImage(QImage *qimage); + int getImage(TQImage *qimage); int stopCapturing(); int close(); @@ -268,10 +268,10 @@ public: bool canAsyncIO(); bool canStream(); - QString m_model; - QString m_name; + TQString m_model; + TQString m_name; size_t m_modelindex; // Defines what's the number of a device when more than 1 device of a given model is present; - QString full_filename; + TQString full_filename; videodev_driver m_driver; int descriptor; @@ -292,16 +292,16 @@ void enumerateMenu (void); struct video_capability V4L_capabilities; struct video_buffer V4L_videobuffer; #endif - QValueVector m_input; - QValueVector m_control; -// QFile file; + TQValueVector m_input; + TQValueVector m_control; +// TQFile file; protected: int currentwidth, minwidth, maxwidth, currentheight, minheight, maxheight; bool m_disablemmap; bool m_workaroundbrokendriver; - QValueVector m_rawbuffers; + TQValueVector m_rawbuffers; unsigned int m_streambuffers; imagebuffer m_currentbuffer; int m_buffer_size; diff --git a/kopete/libkopete/avdevice/videodevicemodelpool.cpp b/kopete/libkopete/avdevice/videodevicemodelpool.cpp index c6fc533e..875d926b 100644 --- a/kopete/libkopete/avdevice/videodevicemodelpool.cpp +++ b/kopete/libkopete/avdevice/videodevicemodelpool.cpp @@ -40,7 +40,7 @@ size_t VideoDeviceModelPool::size() return m_devicemodel.size(); } -size_t VideoDeviceModelPool::addModel( QString newmodel ) +size_t VideoDeviceModelPool::addModel( TQString newmodel ) { VideoDeviceModel newdevicemodel; newdevicemodel.model=newmodel; diff --git a/kopete/libkopete/avdevice/videodevicemodelpool.h b/kopete/libkopete/avdevice/videodevicemodelpool.h index 54d801c4..76499033 100644 --- a/kopete/libkopete/avdevice/videodevicemodelpool.h +++ b/kopete/libkopete/avdevice/videodevicemodelpool.h @@ -18,8 +18,8 @@ #ifndef KOPETE_AVVIDEODEVICEMODELPOOL_H #define KOPETE_AVVIDEODEVICEMODELPOOL_H -#include -#include +#include +#include #include #include "kopete_export.h" @@ -34,16 +34,16 @@ class VideoDeviceModelPool{ struct VideoDeviceModel { - QString model; + TQString model; size_t count; }; - QValueVector m_devicemodel; + TQValueVector m_devicemodel; public: VideoDeviceModelPool(); ~VideoDeviceModelPool(); void clear(); size_t size(); - size_t addModel(QString newmodel); + size_t addModel(TQString newmodel); }; } diff --git a/kopete/libkopete/avdevice/videodevicepool.cpp b/kopete/libkopete/avdevice/videodevicepool.cpp index 2651addb..39f6a7c7 100644 --- a/kopete/libkopete/avdevice/videodevicepool.cpp +++ b/kopete/libkopete/avdevice/videodevicepool.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include "videodevice.h" #include "videodevicepool.h" @@ -414,9 +414,9 @@ int VideoDevicePool::getFrame() } /*! - \fn VideoDevicePool::getQImage(QImage *qimage) + \fn VideoDevicePool::getQImage(TQImage *qimage) */ -int VideoDevicePool::getImage(QImage *qimage) +int VideoDevicePool::getImage(TQImage *qimage) { // kdDebug(14010) << k_funcinfo << "VideoDevicePool::getImage() called." << endl; if(m_videodevice.size()) @@ -424,7 +424,7 @@ int VideoDevicePool::getImage(QImage *qimage) else { kdDebug(14010) << k_funcinfo << "VideoDevicePool::getImage() fallback for no device." << endl; - qimage->create(m_buffer.width, m_buffer.height,32, QImage::IgnoreEndian); + qimage->create(m_buffer.width, m_buffer.height,32, TQImage::IgnoreEndian); uchar *bits=qimage->bits(); switch(m_buffer.pixelformat) { @@ -609,9 +609,9 @@ int VideoDevicePool::scanDevices() kdDebug(14010) << k_funcinfo << "called" << endl; #if defined(__linux__) && defined(ENABLE_AV) - QDir videodevice_dir; - const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/v4l/"); - const QString videodevice_dir_filter=QString::fromLocal8Bit("video*"); + TQDir videodevice_dir; + const TQString videodevice_dir_path=TQString::fromLocal8Bit("/dev/v4l/"); + const TQString videodevice_dir_filter=TQString::fromLocal8Bit("video*"); VideoDevice videodevice; m_videodevice.clear(); @@ -619,8 +619,8 @@ int VideoDevicePool::scanDevices() videodevice_dir.setPath(videodevice_dir_path); videodevice_dir.setNameFilter(videodevice_dir_filter); - videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | QDir::Readable | QDir::Writable ); - videodevice_dir.setSorting( QDir::Name ); + videodevice_dir.setFilter( TQDir::System | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable ); + videodevice_dir.setSorting( TQDir::Name ); kdDebug(14010) << k_funcinfo << "Looking for devices in " << videodevice_dir_path << endl; const QFileInfoList *list = videodevice_dir.entryInfoList(); @@ -628,15 +628,15 @@ int VideoDevicePool::scanDevices() if (!list) { kdDebug(14010) << k_funcinfo << "Found no suitable devices in " << videodevice_dir_path << endl; - QDir videodevice_dir; - const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/"); - const QString videodevice_dir_filter=QString::fromLocal8Bit("video*"); + TQDir videodevice_dir; + const TQString videodevice_dir_path=TQString::fromLocal8Bit("/dev/"); + const TQString videodevice_dir_filter=TQString::fromLocal8Bit("video*"); VideoDevice videodevice; videodevice_dir.setPath(videodevice_dir_path); videodevice_dir.setNameFilter(videodevice_dir_filter); - videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | QDir::Readable | QDir::Writable ); - videodevice_dir.setSorting( QDir::Name ); + videodevice_dir.setFilter( TQDir::System | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable ); + videodevice_dir.setSorting( TQDir::Name ); kdDebug(14010) << k_funcinfo << "Looking for devices in " << videodevice_dir_path << endl; const QFileInfoList *list = videodevice_dir.entryInfoList(); @@ -648,7 +648,7 @@ int VideoDevicePool::scanDevices() } QFileInfoListIterator fileiterator ( *list ); - QFileInfo *fileinfo; + TQFileInfo *fileinfo; kdDebug(14010) << k_funcinfo << "scanning devices in " << videodevice_dir_path << "..." << endl; while ( (fileinfo = fileiterator.current()) != 0 ) @@ -676,7 +676,7 @@ int VideoDevicePool::scanDevices() } QFileInfoListIterator fileiterator ( *list ); - QFileInfo *fileinfo; + TQFileInfo *fileinfo; kdDebug(14010) << k_funcinfo << "scanning devices in " << videodevice_dir_path << "..." << endl; while ( (fileinfo = fileiterator.current()) != 0 ) @@ -760,7 +760,7 @@ void VideoDevicePool::loadConfig() { KConfig *config = KGlobal::config(); config->setGroup("Video Device Settings"); - const QString currentdevice = config->readEntry("Current Device", QString::null); + const TQString currentdevice = config->readEntry("Current Device", TQString::null); kdDebug(14010) << k_funcinfo << "Current device: " << currentdevice << endl; // m_current_device = 0; // Must check this thing because of the fact that multiple loadConfig in other methodas can do bad things. Watch out! @@ -768,28 +768,28 @@ void VideoDevicePool::loadConfig() VideoDeviceVector::iterator vditerator; for( vditerator = m_videodevice.begin(); vditerator != m_videodevice.end(); ++vditerator ) { - const QString modelindex = QString::fromLocal8Bit ( "Model %1 Device %2") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex); + const TQString modelindex = TQString::fromLocal8Bit ( "Model %1 Device %2") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex); if(modelindex == currentdevice) { m_current_device = vditerator - m_videodevice.begin(); // kdDebug(14010) << k_funcinfo << "This place will be used to set " << modelindex << " as the current device ( " << (vditerator - m_videodevice.begin()) << " )." << endl; } - const QString name = config->readEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), (*vditerator).m_model); - const int currentinput = config->readNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), 0); + const TQString name = config->readEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), (*vditerator).m_model); + const int currentinput = config->readNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), 0); kdDebug(14010) << k_funcinfo << "Device name: " << name << endl; kdDebug(14010) << k_funcinfo << "Device current input: " << currentinput << endl; (*vditerator).selectInput(currentinput); for (size_t input = 0 ; input < (*vditerator).m_input.size(); input++) { - const float brightness = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float contrast = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float saturation = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float whiteness = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float hue = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const bool autobrightnesscontrast = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); - const bool autocolorcorrection = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); - const bool imageasmirror = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 mageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const float brightness = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float contrast = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float saturation = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float whiteness = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float hue = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const bool autobrightnesscontrast = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const bool autocolorcorrection = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const bool imageasmirror = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 mageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); (*vditerator).setBrightness(brightness); (*vditerator).setContrast(contrast); (*vditerator).setSaturation(saturation); @@ -833,7 +833,7 @@ void VideoDevicePool::saveConfig() } */ // Stores what is the current video device in use - const QString currentdevice = QString::fromLocal8Bit ( "Model %1 Device %2" ) .arg(m_videodevice[m_current_device].m_model) .arg(m_videodevice[m_current_device].m_modelindex); + const TQString currentdevice = TQString::fromLocal8Bit ( "Model %1 Device %2" ) .arg(m_videodevice[m_current_device].m_model) .arg(m_videodevice[m_current_device].m_modelindex); config->writeEntry( "Current Device", currentdevice); VideoDeviceVector::iterator vditerator; @@ -843,8 +843,8 @@ void VideoDevicePool::saveConfig() kdDebug(14010) << "Model:" << (*vditerator).m_model << ":Index:" << (*vditerator).m_modelindex << ":Current input:" << (*vditerator).currentInput() << endl; // Stores current input for the given video device - const QString name = QString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); - const QString currentinput = QString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); + const TQString name = TQString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); + const TQString currentinput = TQString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); config->writeEntry( name, (*vditerator).m_name); config->writeEntry( currentinput, (*vditerator).currentInput()); @@ -859,14 +859,14 @@ void VideoDevicePool::saveConfig() kdDebug(14010) << "Model:" << (*vditerator).m_model << ":Index:" << (*vditerator).m_modelindex << ":Input:" << input << ":Automatic color correction : " << (*vditerator).m_input[input].getAutoColorCorrection() << endl; // Stores configuration about each channel - const QString brightness = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString contrast = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString saturation = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString whiteness = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString hue = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString autobrightnesscontrast = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString autocolorcorrection = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString imageasmirror = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 ImageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString brightness = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString contrast = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString saturation = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString whiteness = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString hue = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString autobrightnesscontrast = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString autocolorcorrection = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString imageasmirror = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 ImageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); config->writeEntry( brightness, (*vditerator).m_input[input].getBrightness()); config->writeEntry( contrast, (*vditerator).m_input[input].getContrast()); config->writeEntry( saturation, (*vditerator).m_input[input].getSaturation()); diff --git a/kopete/libkopete/avdevice/videodevicepool.h b/kopete/libkopete/avdevice/videodevicepool.h index 1fbdb3e1..75ed9ed4 100644 --- a/kopete/libkopete/avdevice/videodevicepool.h +++ b/kopete/libkopete/avdevice/videodevicepool.h @@ -18,16 +18,16 @@ #ifndef KOPETE_AVVIDEODEVICE_H #define KOPETE_AVVIDEODEVICE_H -#include +#include #include #include "videoinput.h" #include "videodevicemodelpool.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "videodevice.h" #include "kopete_export.h" @@ -45,7 +45,7 @@ This class allows kopete to check for the existence, open, configure, test, set @author Cláudio da Silveira Pinheiro */ -typedef QValueVector VideoDeviceVector; +typedef TQValueVector VideoDeviceVector; class VideoDevicePoolPrivate; @@ -68,7 +68,7 @@ public: int startCapturing(); int stopCapturing(); int readFrame(); - int getImage(QImage *qimage); + int getImage(TQImage *qimage); int selectInput(int newinput); int setInputParameters(); int scanDevices(); @@ -113,7 +113,7 @@ protected: unsigned int m_current_device; struct imagebuffer m_buffer; // only used when no devices were found - QMutex m_ready; + TQMutex m_ready; private: VideoDevicePool(); static VideoDevicePool* s_self; diff --git a/kopete/libkopete/avdevice/videoinput.h b/kopete/libkopete/avdevice/videoinput.h index 3381663e..9fc109ad 100644 --- a/kopete/libkopete/avdevice/videoinput.h +++ b/kopete/libkopete/avdevice/videoinput.h @@ -28,9 +28,9 @@ #define __u64 unsigned long long #endif // __u64*/ -#include +#include #include -#include +#include #include "kopete_export.h" #include "videocontrol.h" @@ -46,7 +46,7 @@ class KOPETE_EXPORT VideoInput{ public: VideoInput(); ~VideoInput(); - QString name; + TQString name; int hastuner; __u64 m_standards; @@ -69,7 +69,7 @@ public: bool setImageAsMirror(bool imageasmirror); protected: - QValueVector m_control; + TQValueVector m_control; float m_brightness; float m_contrast; float m_saturation; diff --git a/kopete/libkopete/clientiface.h b/kopete/libkopete/clientiface.h index 02162189..6a7229b7 100644 --- a/kopete/libkopete/clientiface.h +++ b/kopete/libkopete/clientiface.h @@ -10,31 +10,31 @@ class ClientIface : virtual public DCOPObject K_DCOP k_dcop: /** Get the set of networks that the daemon is aware of. Mostly for debug */ - virtual QStringList networks() = 0; + virtual TQStringList networks() = 0; /** * Get the status of the connection to the given host. * @param host * @return a NetworkStatus::EnumStatus representing the state of the connection to the given host */ - virtual int status( const QString & host = QString::null ) = 0; + virtual int status( const TQString & host = TQString::null ) = 0; /** * Request a connection to the named host, registering the application's usage of this connection * @param host The hostname the client wants to connect to. * @param userInitiated Indicates whether the connection is a direct result of a user action or is a background task. Used by the daemon to decide whether to create an on-demand connection. * @return An NetworkStatus::EnumRequestResult indicating whether the request was accepted */ - virtual int request( const QString & host, bool userInitiated ) = 0; + virtual int request( const TQString & host, bool userInitiated ) = 0; /** * Indicate that a previously registered connection to the given host is no longer needed by this client * @param host The hostname being relinquished. */ - virtual void relinquish( const QString & host ) = 0; + virtual void relinquish( const TQString & host ) = 0; /** * Indicate that a communication failure has occured for a given host * @param host The hostname for which the failure occurred. * @return True indicates the caller should try again to lookup the host, as the daemon has another IP address available. */ - virtual bool reportFailure( const QString & host ) = 0; + virtual bool reportFailure( const TQString & host ) = 0; /** * Utility method to check the daemon's status */ @@ -44,13 +44,13 @@ k_dcop_signals: * @param host The host which the application has indicated it is using * @param status The new status of the network used to reach host. */ - void statusChange( QString host, int status ); + void statusChange( TQString host, int status ); /** * The network would like to shut down - any clients using this host are to finish using it immediately and call * relinquish() when done. * @param host The host, registered as in use by applications, which is about to be disconnected. */ - void shutdownRequested( QString host ); + void shutdownRequested( TQString host ); }; #endif diff --git a/kopete/libkopete/compat/kpixmapregionselectordialog.cpp b/kopete/libkopete/compat/kpixmapregionselectordialog.cpp index ee9d185e..c394af0f 100644 --- a/kopete/libkopete/compat/kpixmapregionselectordialog.cpp +++ b/kopete/libkopete/compat/kpixmapregionselectordialog.cpp @@ -19,16 +19,16 @@ #include "kpixmapregionselectordialog.h" #include -#include -#include +#include +#include #include #include -KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(QWidget *parent, +KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, i18n("Select Region of Image"), Help|Ok|Cancel, Ok, true ) { - QVBox *vbox=new QVBox(this); - new QLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox); + TQVBox *vbox=new TQVBox(this); + new TQLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox); m_pixmapSelectorWidget= new KPixmapRegionSelectorWidget(vbox); vbox->setSpacing( KDialog::spacingHint() ); @@ -40,86 +40,86 @@ KPixmapRegionSelectorDialog::~KPixmapRegionSelectorDialog() { } -QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, QWidget *parent ) +TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QRect rect; + TQRect rect; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion(); return rect; } -QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent ) +TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QRect rect; + TQRect rect; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion(); return rect; } -QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, QWidget *parent ) +TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QImage image; + TQImage image; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) image = dialog.pixmapRegionSelectorWidget()->selectedImage(); return image; } -QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent ) +TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QImage image; + TQImage image; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) image = dialog.pixmapRegionSelectorWidget()->selectedImage(); return image; diff --git a/kopete/libkopete/compat/kpixmapregionselectordialog.h b/kopete/libkopete/compat/kpixmapregionselectordialog.h index 1c15067e..ffc5551e 100644 --- a/kopete/libkopete/compat/kpixmapregionselectordialog.h +++ b/kopete/libkopete/compat/kpixmapregionselectordialog.h @@ -20,7 +20,7 @@ #ifndef __KPIXMAPREGIONSELECTORDIALOG_H__ #define __KPIXMAPREGIONSELECTORDIALOG_H__ -#include +#include #include #include @@ -47,7 +47,7 @@ public: * later the setPixmap method of the KPixmapRegionSelectorWidget widget of * the new object. */ - KPixmapRegionSelectorDialog(QWidget *parent=0L, const char *name=0L, + KPixmapRegionSelectorDialog(TQWidget *parent=0L, const char *name=0L, bool modal = false ); /** * The destructor of the dialog @@ -68,7 +68,7 @@ public: * @returns the selected rectangle, or an invalid rectangle if the user * pressed the Cancel button. */ - static QRect getSelectedRegion(const QPixmap &pixmap, QWidget *parent = 0L ); + static TQRect getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -78,7 +78,7 @@ public: * @returns the selected rectangle, or an invalid rectangle if the user * pressed the Cancel button. */ - static QRect getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L ); + static TQRect getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -87,7 +87,7 @@ public: * @returns the selected image, or an invalid image if the user * pressed the Cancel button. */ - static QImage getSelectedImage(const QPixmap &pixmap, QWidget *parent = 0L ); + static TQImage getSelectedImage(const TQPixmap &pixmap, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -97,7 +97,7 @@ public: * @returns the selected image, or an invalid image if the user * pressed the Cancel button. */ - static QImage getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L ); + static TQImage getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L ); protected: KPixmapRegionSelectorWidget *m_pixmapSelectorWidget; diff --git a/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp b/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp index da2be5f9..ada867bb 100644 --- a/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp +++ b/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp @@ -24,29 +24,29 @@ */ #include "kpixmapregionselectorwidget.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include -KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( QWidget *parent, - const char *name) : QWidget( parent, name) +KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( TQWidget *parent, + const char *name) : TQWidget( parent, name) { - QHBoxLayout * hboxLayout=new QHBoxLayout( this ); + TQHBoxLayout * hboxLayout=new TQHBoxLayout( this ); hboxLayout->addStretch(); - QVBoxLayout * vboxLayout=new QVBoxLayout( hboxLayout ); + TQVBoxLayout * vboxLayout=new TQVBoxLayout( hboxLayout ); vboxLayout->addStretch(); - m_label = new QLabel(this, "pixmapHolder"); + m_label = new TQLabel(this, "pixmapHolder"); m_label->setBackgroundMode( Qt::NoBackground ); m_label->installEventFilter( this ); @@ -64,7 +64,7 @@ KPixmapRegionSelectorWidget::~KPixmapRegionSelectorWidget() { } -void KPixmapRegionSelectorWidget::setPixmap( const QPixmap &pixmap ) +void KPixmapRegionSelectorWidget::setPixmap( const TQPixmap &pixmap ) { Q_ASSERT(!pixmap.isNull()); //This class isn't designed to deal with null pixmaps. m_originalPixmap = pixmap; @@ -79,12 +79,12 @@ void KPixmapRegionSelectorWidget::resetSelection() updatePixmap(); } -QRect KPixmapRegionSelectorWidget::selectedRegion() const +TQRect KPixmapRegionSelectorWidget::selectedRegion() const { return m_selectedRegion; } -void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect) +void KPixmapRegionSelectorWidget::setSelectedRegion(const TQRect &rect) { if (!rect.isValid()) resetSelection(); else @@ -92,7 +92,7 @@ void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect) m_selectedRegion=rect; updatePixmap(); - QRect r=unzoomedSelectedRegion(); + TQRect r=unzoomedSelectedRegion(); } } @@ -102,7 +102,7 @@ void KPixmapRegionSelectorWidget::updatePixmap() if (m_selectedRegion.width()>m_originalPixmap.width()) m_selectedRegion.setWidth( m_originalPixmap.width() ); if (m_selectedRegion.height()>m_originalPixmap.height()) m_selectedRegion.setHeight( m_originalPixmap.height() ); - QPainter painter; + TQPainter painter; if (m_linedPixmap.isNull()) { m_linedPixmap = m_originalPixmap; @@ -110,21 +110,21 @@ void KPixmapRegionSelectorWidget::updatePixmap() painter.begin(&m_linedPixmap); painter.setRasterOp( Qt::XorROP ); painter.fillRect(0,0,m_linedPixmap.width(), m_linedPixmap.height(), - QBrush( QColor(255,255,255), Qt::BDiagPattern) ); + TQBrush( TQColor(255,255,255), Qt::BDiagPattern) ); painter.end(); - QImage image=m_linedPixmap.convertToImage(); - image=KImageEffect::fade(image, (float)0.4, QColor(0,0,0)); + TQImage image=m_linedPixmap.convertToImage(); + image=KImageEffect::fade(image, (float)0.4, TQColor(0,0,0)); m_linedPixmap.convertFromImage(image); } - QPixmap pixmap = m_linedPixmap; + TQPixmap pixmap = m_linedPixmap; painter.begin(&pixmap); painter.drawPixmap( m_selectedRegion.topLeft(), m_originalPixmap, m_selectedRegion ); - painter.setPen( QColor(255,255,255) ); + painter.setPen( TQColor(255,255,255) ); painter.setRasterOp( Qt::XorROP ); painter.drawRect( m_selectedRegion ); @@ -141,12 +141,12 @@ KPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu() popup->insertTitle(i18n("Image Operations")); KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw", - 0, this, SLOT(rotateClockwise()), + 0, this, TQT_SLOT(rotateClockwise()), popup, "rotateclockwise"); action->plug(popup); action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", - 0, this, SLOT(rotateCounterclockwise()), + 0, this, TQT_SLOT(rotateCounterclockwise()), popup, "rotatecounterclockwise"); action->plug(popup); @@ -161,7 +161,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction { int w=m_originalPixmap.width(); int h=m_originalPixmap.height(); - QImage img=m_unzoomedPixmap.convertToImage(); + TQImage img=m_unzoomedPixmap.convertToImage(); img= KImageEffect::rotate(img, direction); m_unzoomedPixmap.convertFromImage(img); @@ -169,7 +169,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction img= KImageEffect::rotate(img, direction); m_originalPixmap.convertFromImage(img); - m_linedPixmap=QPixmap(); + m_linedPixmap=TQPixmap(); if (m_forcedAspectRatio>0 && m_forcedAspectRatio!=1) resetSelection(); @@ -206,12 +206,12 @@ void KPixmapRegionSelectorWidget::rotateCounterclockwise() rotate(KImageEffect::Rotate270); } -bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) +bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) { - if ( ev->type() == QEvent::MouseButtonPress ) + if ( ev->type() == TQEvent::MouseButtonPress ) { - QMouseEvent *mev= (QMouseEvent *)(ev); - //kdDebug() << QString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; + TQMouseEvent *mev= (TQMouseEvent *)(ev); + //kdDebug() << TQString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; if ( mev->button() == RightButton ) { @@ -221,7 +221,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; }; - QCursor cursor; + TQCursor cursor; if ( m_selectedRegion.contains( mev->pos() ) && m_selectedRegion!=m_originalPixmap.rect() ) @@ -234,7 +234,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) m_state=Resizing; cursor.setShape( Qt::CrossCursor ); } - QApplication::setOverrideCursor(cursor); + TQApplication::setOverrideCursor(cursor); m_tempFirstClick=mev->pos(); @@ -242,11 +242,11 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; } - if ( ev->type() == QEvent::MouseMove ) + if ( ev->type() == TQEvent::MouseMove ) { - QMouseEvent *mev= (QMouseEvent *)(ev); + TQMouseEvent *mev= (TQMouseEvent *)(ev); - //kdDebug() << QString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; + //kdDebug() << TQString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; if ( m_state == Resizing ) { @@ -300,26 +300,26 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; } - if ( ev->type() == QEvent::MouseButtonRelease ) + if ( ev->type() == TQEvent::MouseButtonRelease ) { - QMouseEvent *mev= (QMouseEvent *)(ev); + TQMouseEvent *mev= (TQMouseEvent *)(ev); if ( m_state == Resizing && mev->pos() == m_tempFirstClick) resetSelection(); m_state=None; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return TRUE; } - QWidget::eventFilter(obj, ev); + TQWidget::eventFilter(obj, ev); return FALSE; } -QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startPoint, const QPoint & _endPoint ) +TQRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const TQPoint & startPoint, const TQPoint & _endPoint ) { - QPoint endPoint = _endPoint; + TQPoint endPoint = _endPoint; if ( endPoint.x() < 0 ) endPoint.setX(0); else if ( endPoint.x() > m_originalPixmap.width() ) endPoint.setX(m_originalPixmap.width()); if ( endPoint.y() < 0 ) endPoint.setY(0); @@ -382,20 +382,20 @@ QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startP x=startPoint.x()-w; } - return QRect(x,y,w,h); + return TQRect(x,y,w,h); } -QRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const +TQRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const { - return QRect((int)(m_selectedRegion.x()/m_zoomFactor), + return TQRect((int)(m_selectedRegion.x()/m_zoomFactor), (int)(m_selectedRegion.y()/m_zoomFactor), (int)(m_selectedRegion.width()/m_zoomFactor), (int)(m_selectedRegion.height()/m_zoomFactor)); } -QImage KPixmapRegionSelectorWidget::selectedImage() const +TQImage KPixmapRegionSelectorWidget::selectedImage() const { - QImage origImage=m_unzoomedPixmap.convertToImage(); + TQImage origImage=m_unzoomedPixmap.convertToImage(); return origImage.copy(unzoomedSelectedRegion()); } @@ -415,25 +415,25 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height) m_maxHeight=height; m_originalPixmap=m_unzoomedPixmap; - if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=QRect(); + if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=TQRect(); -// kdDebug() << QString(" original Pixmap :") << m_originalPixmap.rect() << endl; -// kdDebug() << QString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl; +// kdDebug() << TQString(" original Pixmap :") << m_originalPixmap.rect() << endl; +// kdDebug() << TQString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl; if ( !m_originalPixmap.isNull() && ( m_originalPixmap.width() > m_maxWidth || m_originalPixmap.height() > m_maxHeight ) ) { /* We have to resize the pixmap to get it complete on the screen */ - QImage image=m_originalPixmap.convertToImage(); - m_originalPixmap.convertFromImage( image.smoothScale( width, height, QImage::ScaleMin ) ); + TQImage image=m_originalPixmap.convertToImage(); + m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQImage::ScaleMin ) ); double oldZoomFactor = m_zoomFactor; m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width(); if (m_selectedRegion.isValid()) { m_selectedRegion= - QRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor), + TQRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.y()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.width()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.height()*m_zoomFactor/oldZoomFactor) ); @@ -442,7 +442,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height) if (!m_selectedRegion.isValid()) m_selectedRegion = m_originalPixmap.rect(); - m_linedPixmap=QPixmap(); + m_linedPixmap=TQPixmap(); updatePixmap(); resize(m_label->width(), m_label->height()); } diff --git a/kopete/libkopete/compat/kpixmapregionselectorwidget.h b/kopete/libkopete/compat/kpixmapregionselectorwidget.h index a4a9cfcf..6b0a319b 100644 --- a/kopete/libkopete/compat/kpixmapregionselectorwidget.h +++ b/kopete/libkopete/compat/kpixmapregionselectorwidget.h @@ -19,10 +19,10 @@ #ifndef __KPIXMAPREGIONSELECTORWIDGET_H__ #define __KPIXMAPREGIONSELECTORWIDGET_H__ -#include -#include -#include -#include +#include +#include +#include +#include #include class KPopupMenu; @@ -48,7 +48,7 @@ public: /** * Constructor for a KPixmapRegionSelectorWidget. */ - KPixmapRegionSelectorWidget( QWidget *parent = 0L, const char *name=0L); + KPixmapRegionSelectorWidget( TQWidget *parent = 0L, const char *name=0L); /** * Destructor for a KPixmapRegionSelectorWidget @@ -60,28 +60,28 @@ public: * @param pixmap The pixmap. Must be non-null. * */ - void setPixmap( const QPixmap &pixmap ); + void setPixmap( const TQPixmap &pixmap ); /** * @return the original whole pixmap that we're using in this widget as the * pixmap the user is selecting a region from. */ - QPixmap pixmap() const { return m_unzoomedPixmap; }; + TQPixmap pixmap() const { return m_unzoomedPixmap; }; /** * Sets the selected region to be @p rect (in zoomed pixmap coordinates) */ - void setSelectedRegion(const QRect &rect); + void setSelectedRegion(const TQRect &rect); /** * Returns the selected region ( in zoomed pixmap coordinates ) */ - QRect selectedRegion() const; + TQRect selectedRegion() const; /** * Returns the selected region ( in unzoomed, original pixmap coordinates ) */ - QRect unzoomedSelectedRegion() const; + TQRect unzoomedSelectedRegion() const; /** * Resets the selection to use the whole image @@ -89,10 +89,10 @@ public: void resetSelection(); /** - * @returns a QImage object with just the region the user selected from the + * @returns a TQImage object with just the region the user selected from the * image */ - QImage selectedImage() const; + TQImage selectedImage() const; /** * Sets the aspect ration that the selected subimage should have. The way to @@ -140,7 +140,7 @@ protected: virtual KPopupMenu *createPopupMenu(); private: - bool eventFilter(QObject *obj, QEvent *ev); + bool eventFilter(TQObject *obj, TQEvent *ev); /** * Recalculates the pixmap that is shown based on the current selected area, @@ -148,18 +148,18 @@ private: */ void updatePixmap(); - QRect calcSelectionRectangle( const QPoint &startPoint, const QPoint & endPoint ); + TQRect calcSelectionRectangle( const TQPoint &startPoint, const TQPoint & endPoint ); enum CursorState { None=0, Resizing, Moving }; CursorState m_state; - QPixmap m_unzoomedPixmap; - QPixmap m_originalPixmap; - QPixmap m_linedPixmap; - QRect m_selectedRegion; - QLabel *m_label; + TQPixmap m_unzoomedPixmap; + TQPixmap m_originalPixmap; + TQPixmap m_linedPixmap; + TQRect m_selectedRegion; + TQLabel *m_label; - QPoint m_tempFirstClick; + TQPoint m_tempFirstClick; double m_forcedAspectRatio; int m_maxWidth, m_maxHeight; diff --git a/kopete/libkopete/connectionmanager.cpp b/kopete/libkopete/connectionmanager.cpp index b2dd7825..dcfa0ee1 100644 --- a/kopete/libkopete/connectionmanager.cpp +++ b/kopete/libkopete/connectionmanager.cpp @@ -20,13 +20,13 @@ class ConnectionManagerPrivate }; // Connection manager itself -ConnectionManager::ConnectionManager( QObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),QObject( parent, name ) +ConnectionManager::ConnectionManager( TQObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),TQObject( parent, name ) { d = new ConnectionManagerPrivate; d->m_stub = new ClientIface_stub( kapp->dcopClient(), "kded", "networkstatus" ); - connectDCOPSignal( "kded", "networkstatus", "statusChange(QString,int)", "slotStatusChanged(QString,int)", false ); + connectDCOPSignal( "kded", "networkstatus", "statusChange(TQString,int)", "slotStatusChanged(TQString,int)", false ); d->m_userInitiatedOnly = false; initialise(); } @@ -50,7 +50,7 @@ void ConnectionManager::initialise() void ConnectionManager::updateStatus() { - NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( QString::null ); + NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString::null ); kdDebug() << k_funcinfo << endl; switch ( daemonStatus ) { @@ -87,7 +87,7 @@ ConnectionManager::~ConnectionManager() delete d; } -NetworkStatus::EnumStatus ConnectionManager::status( const QString & host ) +NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host ) { // need also to check that the daemon hasn't died updateStatus(); @@ -100,7 +100,7 @@ NetworkStatus::EnumStatus ConnectionManager::status( const QString & host ) return NetworkStatus::NoNetworks; } -NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * mainWidget, const QString & host, bool userInitiated ) +NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated ) { kdDebug() << k_funcinfo << endl; NetworkStatus::EnumRequestResult result; @@ -123,12 +123,12 @@ NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * return result; } -void ConnectionManager::relinquishConnection( const QString & host ) +void ConnectionManager::relinquishConnection( const TQString & host ) { d->m_stub->relinquish( host ); } -void ConnectionManager::slotStatusChanged( QString host, int status ) +void ConnectionManager::slotStatusChanged( TQString host, int status ) { kdDebug() << k_funcinfo << endl; updateStatus(); @@ -139,7 +139,7 @@ void ConnectionManager::slotStatusChanged( QString host, int status ) emit statusChanged( host, (NetworkStatus::EnumStatus)status ); } -bool ConnectionManager::askToConnect( QWidget * mainWidget ) +bool ConnectionManager::askToConnect( TQWidget * mainWidget ) { i18n( "A network connection was disconnected. The application is now in offline mode. Do you want the application to resume network operations when the network is available again?" ); i18n( "This application is currently in offline mode. Do you want to connect?" ); @@ -147,7 +147,7 @@ bool ConnectionManager::askToConnect( QWidget * mainWidget ) i18n("This application is currently in offline mode. Do you want to connect in order to carry out this operation?"), i18n("Leave Offline Mode?"), i18n("Connect"), i18n("Stay Offline"), - QString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); + TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); } #include "connectionmanager.moc" diff --git a/kopete/libkopete/connectionmanager.h b/kopete/libkopete/connectionmanager.h index b78df8d4..63217183 100644 --- a/kopete/libkopete/connectionmanager.h +++ b/kopete/libkopete/connectionmanager.h @@ -23,7 +23,7 @@ class ConnectionManagerPrivate; -class KOPETE_EXPORT ConnectionManager : public QObject, virtual public DCOPObject +class KOPETE_EXPORT ConnectionManager : public TQObject, virtual public DCOPObject { Q_OBJECT K_DCOP @@ -31,25 +31,25 @@ class KOPETE_EXPORT ConnectionManager : public QObject, virtual public DCOPObjec static ConnectionManager* self(); enum State { Inactive, Online, Offline, Pending }; virtual ~ConnectionManager(); - NetworkStatus::EnumStatus status( const QString & host ); + NetworkStatus::EnumStatus status( const TQString & host ); // check if a hostname is available. Ask user if offline. Request host - NetworkStatus::EnumRequestResult requestConnection( QWidget* mainWidget, const QString & host, bool userInitiated ); + NetworkStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated ); // method to relinquish a connection - void relinquishConnection( const QString & host ); + void relinquishConnection( const TQString & host ); signals: // signal that the network for a hostname is up/down - void statusChanged( const QString & host, NetworkStatus::EnumStatus status ); + void statusChanged( const TQString & host, NetworkStatus::EnumStatus status ); protected: // sets up internal state void initialise(); // reread the desktop status from the daemon and update internal state void updateStatus(); // ask if the user would like to reconnect - bool askToConnect( QWidget * mainWidget ); + bool askToConnect( TQWidget * mainWidget ); k_dcop: - void slotStatusChanged( QString host, int status ); + void slotStatusChanged( TQString host, int status ); private: - ConnectionManager( QObject *parent, const char * name ); + ConnectionManager( TQObject *parent, const char * name ); ConnectionManagerPrivate *d; static ConnectionManager * s_self; }; diff --git a/kopete/libkopete/kabcpersistence.cpp b/kopete/libkopete/kabcpersistence.cpp index 527a99a4..93d55b35 100644 --- a/kopete/libkopete/kabcpersistence.cpp +++ b/kopete/libkopete/kabcpersistence.cpp @@ -15,8 +15,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -47,19 +47,19 @@ namespace Kopete /** * utility function to merge two QStrings containing individual elements separated by 0xE000 */ -static QString unionContents( QString arg1, QString arg2 ) +static TQString unionContents( TQString arg1, TQString arg2 ) { - QChar separator( 0xE000 ); - QStringList outList = QStringList::split( separator, arg1 ); - QStringList arg2List = QStringList::split( separator, arg2 ); - for ( QStringList::iterator it = arg2List.begin(); it != arg2List.end(); ++it ) + TQChar separator( 0xE000 ); + TQStringList outList = TQStringList::split( separator, arg1 ); + TQStringList arg2List = TQStringList::split( separator, arg2 ); + for ( TQStringList::iterator it = arg2List.begin(); it != arg2List.end(); ++it ) if ( !outList.contains( *it ) ) outList.append( *it ); - QString out = outList.join( separator ); + TQString out = outList.join( separator ); return out; } -KABCPersistence::KABCPersistence( QObject * parent, const char * name ) : QObject( parent, name ) +KABCPersistence::KABCPersistence( TQObject * parent, const char * name ) : TQObject( parent, name ) { s_pendingResources.setAutoDelete( false ); } @@ -72,7 +72,7 @@ KABCPersistence *KABCPersistence::s_self = 0L; bool KABCPersistence::s_addrBookWritePending = false; -QPtrList KABCPersistence::s_pendingResources; +TQPtrList KABCPersistence::s_pendingResources; KABC::AddressBook* KABCPersistence::s_addressBook = 0; @@ -112,29 +112,29 @@ void KABCPersistence::write( MetaContact * mc ) else { // collate the instant messaging data to be inserted into the address book - QMap addressMap; - QPtrList contacts = mc->contacts(); - QPtrListIterator cIt( contacts ); + TQMap addressMap; + TQPtrList contacts = mc->contacts(); + TQPtrListIterator cIt( contacts ); while ( Contact * c = cIt.current() ) { - QStringList addresses = addressMap[ c->protocol()->addressBookIndexField() ]; + TQStringList addresses = addressMap[ c->protocol()->addressBookIndexField() ]; addresses.append( c->contactId() ); addressMap.insert( c->protocol()->addressBookIndexField(), addresses ); ++cIt; } // insert a custom field for each protocol - QMap::ConstIterator it = addressMap.begin(); + TQMap::ConstIterator it = addressMap.begin(); for ( ; it != addressMap.end(); ++it ) { // read existing data for this key - QString currentCustomForProtocol = theAddressee.custom( it.key(), QString::fromLatin1( "All" ) ); + TQString currentCustomForProtocol = theAddressee.custom( it.key(), TQString::fromLatin1( "All" ) ); // merge without duplicating - QString toWrite = unionContents( currentCustomForProtocol, it.data().join( QChar( 0xE000 ) ) ); + TQString toWrite = unionContents( currentCustomForProtocol, it.data().join( TQChar( 0xE000 ) ) ); // Note if nothing ends up in the KABC data, this is because insertCustom does nothing if any param is empty. kdDebug( 14010 ) << k_funcinfo << "Writing: " << it.key() << ", " << "All" << ", " << toWrite << endl; - theAddressee.insertCustom( it.key(), QString::fromLatin1( "All" ), toWrite ); - QString check = theAddressee.custom( it.key(), QString::fromLatin1( "All" ) ); + theAddressee.insertCustom( it.key(), TQString::fromLatin1( "All" ), toWrite ); + TQString check = theAddressee.custom( it.key(), TQString::fromLatin1( "All" ) ); } ab->insertAddressee( theAddressee ); //kdDebug( 14010 ) << k_funcinfo << "dumping addressbook before write " << endl; @@ -150,16 +150,16 @@ void KABCPersistence::write( MetaContact * mc ) kdDebug( 14010 ) << k_funcinfo << "...FOUND ONE!" << endl; // Store address book fields - QMap >::ConstIterator appIt = d->addressBook.begin(); + TQMap >::ConstIterator appIt = d->addressBook.begin(); for( ; appIt != d->addressBook.end(); ++appIt ) { - QMap::ConstIterator addrIt = appIt.data().begin(); + TQMap::ConstIterator addrIt = appIt.data().begin(); for( ; addrIt != appIt.data().end(); ++addrIt ) { // read existing data for this key - QString currentCustom = theAddressee.custom( appIt.key(), addrIt.key() ); + TQString currentCustom = theAddressee.custom( appIt.key(), addrIt.key() ); // merge without duplicating - QString toWrite = unionContents( currentCustom, addrIt.data() ); + TQString toWrite = unionContents( currentCustom, addrIt.data() ); // write the result // Note if nothing ends up in the KABC data, this is because insertCustom does nothing if any param is empty. kdDebug( 14010 ) << k_funcinfo << "Writing: " << appIt.key() << ", " << addrIt.key() << ", " << toWrite << endl; @@ -178,7 +178,7 @@ void KABCPersistence::writeAddressBook( const KABC::Resource * res) if ( !s_addrBookWritePending ) { s_addrBookWritePending = true; - QTimer::singleShot( 2000, this, SLOT( slotWriteAddressBook() ) ); + TQTimer::singleShot( 2000, this, TQT_SLOT( slotWriteAddressBook() ) ); } } @@ -186,7 +186,7 @@ void KABCPersistence::slotWriteAddressBook() { //kdDebug( 14010 ) << k_funcinfo << endl; KABC::AddressBook* ab = addressBook(); - QPtrListIterator it( s_pendingResources ); + TQPtrListIterator it( s_pendingResources ); for ( ; it.current(); ++it ) { //kdDebug( 14010 ) << "Writing resource " << it.current()->resourceName() << endl; @@ -229,16 +229,16 @@ void KABCPersistence::removeKABC( MetaContact *) { // remove the link //kdDebug( 14010 ) << k_funcinfo << "...not found." << endl; - d->metaContactId=QString::null; + d->metaContactId=TQString::null; } else { //kdDebug( 14010 ) << k_funcinfo << "...FOUND ONE!" << endl; // Remove address book fields - QMap >::ConstIterator appIt = d->addressBook.begin(); + TQMap >::ConstIterator appIt = d->addressBook.begin(); for( ; appIt != d->addressBook.end(); ++appIt ) { - QMap::ConstIterator addrIt = appIt.data().begin(); + TQMap::ConstIterator addrIt = appIt.data().begin(); for( ; addrIt != appIt.data().end(); ++addrIt ) { // FIXME: This assumes Kopete is the only app writing these fields @@ -265,29 +265,29 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) if ( !addr.isEmpty() ) // if we are associated with KABC { // load the set of addresses from KABC - QStringList customs = addr.customs(); + TQStringList customs = addr.customs(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = customs.begin(); it != customs.end(); ++it ) { - QString app, name, value; + TQString app, name, value; splitField( *it, app, name, value ); kdDebug( 14010 ) << "app=" << app << " name=" << name << " value=" << value << endl; - if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) ) + if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) ) { - if ( name == QString::fromLatin1( "All" ) ) + if ( name == TQString::fromLatin1( "All" ) ) { kdDebug( 14010 ) << " syncing \"" << app << ":" << name << " with contactlist " << endl; // Get the protocol name from the custom field // by chopping the 'messaging/' prefix from the custom field app name - QString protocolName = app.right( app.length() - 10 ); + TQString protocolName = app.right( app.length() - 10 ); // munge Jabber hack - if ( protocolName == QString::fromLatin1( "xmpp" ) ) - protocolName = QString::fromLatin1( "jabber" ); + if ( protocolName == TQString::fromLatin1( "xmpp" ) ) + protocolName = TQString::fromLatin1( "jabber" ); // Check Kopete supports it - Protocol * proto = dynamic_cast( PluginManager::self()->loadPlugin( QString::fromLatin1( "kopete_" ) + protocolName ) ); + Protocol * proto = dynamic_cast( PluginManager::self()->loadPlugin( TQString::fromLatin1( "kopete_" ) + protocolName ) ); if ( !proto ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, @@ -297,20 +297,20 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } // See if we need to add each contact in this protocol - QStringList addresses = QStringList::split( QChar( 0xE000 ), value ); - QStringList::iterator end = addresses.end(); - for ( QStringList::iterator it = addresses.begin(); it != end; ++it ) + TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), value ); + TQStringList::iterator end = addresses.end(); + for ( TQStringList::iterator it = addresses.begin(); it != end; ++it ) { // check whether each one is present in Kopete // Is it in the contact list? // First discard anything after an 0xE120, this is used by IRC to separate nick and server group name, but // IRC doesn't support this properly yet, so the user will have to select an appropriate account manually - int separatorPos = (*it).find( QChar( 0xE120 ) ); + int separatorPos = (*it).find( TQChar( 0xE120 ) ); if ( separatorPos != -1 ) *it = (*it).left( separatorPos ); - QDict accounts = Kopete::AccountManager::self()->accounts( proto ); - QDictIterator acs(accounts); + TQDict accounts = Kopete::AccountManager::self()->accounts( proto ); + TQDictIterator acs(accounts); Kopete::MetaContact *otherMc = 0; for ( acs.toFirst(); acs.current(); ++acs ) { @@ -332,14 +332,14 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } kdDebug( 14010 ) << *it << " already exists in OTHER metacontact, move here?" << endl; // find the Kopete::Contact and attempt to move it to this metacontact. - otherMc->findContact( proto->pluginId(), QString::null, *it )->setMetaContact( mc ); + otherMc->findContact( proto->pluginId(), TQString::null, *it )->setMetaContact( mc ); } else { // if not, prompt to add it kdDebug( 14010 ) << proto->pluginId() << "://" << *it << " was not found in the contact list. Prompting to add..." << endl; if ( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), - i18n( "An address was added to this contact by another application.
Would you like to use it in Kopete?
Protocol: %1
Address: %2
" ).arg( proto->displayName() ).arg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), QString::fromLatin1( "ImportFromKABC" ) ) ) + i18n( "An address was added to this contact by another application.
Would you like to use it in Kopete?
Protocol: %1
Address: %2
" ).arg( proto->displayName() ).arg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), TQString::fromLatin1( "ImportFromKABC" ) ) ) { // Check the accounts for this protocol are all connected // Most protocols do not allow you to add contacts while offline @@ -369,7 +369,7 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) AccountSelector *accSelector = new AccountSelector(proto, chooser, "accSelector"); chooser->setMainWidget(accSelector); - if ( chooser->exec() == QDialog::Rejected ) + if ( chooser->exec() == TQDialog::Rejected ) continue; chosen = accSelector->selectedItem(); @@ -418,11 +418,11 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } // FIXME: Remove when IM address API is in KABC (KDE 4) -void KABCPersistence::splitField( const QString &str, QString &app, QString &name, QString &value ) +void KABCPersistence::splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { int colon = str.find( ':' ); if ( colon != -1 ) { - QString tmp = str.left( colon ); + TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); int dash = tmp.find( '-' ); diff --git a/kopete/libkopete/kabcpersistence.h b/kopete/libkopete/kabcpersistence.h index fa02fb64..f827270f 100644 --- a/kopete/libkopete/kabcpersistence.h +++ b/kopete/libkopete/kabcpersistence.h @@ -54,7 +54,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject */ static KABCPersistence* self(); - KABCPersistence( QObject * parent = 0, const char * name = 0 ); + KABCPersistence( TQObject * parent = 0, const char * name = 0 ); ~KABCPersistence(); /** * @brief Access Kopete's KDE address book instance @@ -86,7 +86,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject void writeAddressBook( const KABC::Resource * res ); protected: - static void splitField( const QString &str, QString &app, QString &name, QString &value ); + static void splitField( const TQString &str, TQString &app, TQString &name, TQString &value ); void dumpAB(); protected slots: @@ -98,7 +98,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject static KABCPersistence * s_self; static KABC::AddressBook* s_addressBook; static bool s_addrBookWritePending; - static QPtrList s_pendingResources; + static TQPtrList s_pendingResources; }; } // end namespace Kopete diff --git a/kopete/libkopete/kautoconfig.cpp b/kopete/libkopete/kautoconfig.cpp index a1885537..d54e3123 100644 --- a/kopete/libkopete/kautoconfig.cpp +++ b/kopete/libkopete/kautoconfig.cpp @@ -21,8 +21,8 @@ #include "kautoconfig.h" #include -#include -#include +#include +#include #include #include #include @@ -63,12 +63,12 @@ public: { init(); } // Widgets to parse - QPtrList widgets; + TQPtrList widgets; // Name of the group that KConfig should be set to for each widget. - QMap groups; + TQMap groups; // Child widgets of widgets to ignore - QPtrList ignore; + TQPtrList ignore; // Reset to false after saveSettings returns true. bool changed; @@ -79,18 +79,18 @@ public: #endif // Known widgets that can be configured - QMap > autoWidgets; + TQMap > autoWidgets; // Default values for the widgets. - QMap defaultValues; - // Widgets to not get properties on (QLabel etc) - QAsciiDict ignoreTheseWidgets; + TQMap defaultValues; + // Widgets to not get properties on (TQLabel etc) + TQAsciiDict ignoreTheseWidgets; void init(){ - ignoreTheseWidgets.insert("QLabel", new int(1)); - ignoreTheseWidgets.insert("QFrame", new int(2)); - ignoreTheseWidgets.insert("QGroupBox", new int(3)); - ignoreTheseWidgets.insert("QButtonGroup", new int(4)); - ignoreTheseWidgets.insert("QWidget", new int(5)); + ignoreTheseWidgets.insert("TQLabel", new int(1)); + ignoreTheseWidgets.insert("TQFrame", new int(2)); + ignoreTheseWidgets.insert("TQGroupBox", new int(3)); + ignoreTheseWidgets.insert("TQButtonGroup", new int(4)); + ignoreTheseWidgets.insert("TQWidget", new int(5)); ignoreTheseWidgets.setAutoDelete(true); static bool defaultKDEPropertyMapInstalled = false; @@ -101,13 +101,13 @@ public: } }; -KAutoConfig::KAutoConfig(KConfig *kconfig, QObject *parent, - const char *name) : QObject(parent, name), config(kconfig) { +KAutoConfig::KAutoConfig(KConfig *kconfig, TQObject *parent, + const char *name) : TQObject(parent, name), config(kconfig) { d = new KAutoConfigPrivate(); } -KAutoConfig::KAutoConfig(QObject *parent, const char *name) : - QObject(parent, name), config(KGlobal::config()) { +KAutoConfig::KAutoConfig(TQObject *parent, const char *name) : + TQObject(parent, name), config(KGlobal::config()) { d = new KAutoConfigPrivate(); } @@ -115,15 +115,15 @@ KAutoConfig::~KAutoConfig(){ delete d; } -void KAutoConfig::addWidget(QWidget *widget, const QString &group){ +void KAutoConfig::addWidget(TQWidget *widget, const TQString &group){ functionCallPostOrderCheck("addWidget",); d->groups.insert(widget, group); d->widgets.append(widget); - QPtrList newAutoConfigWidget; + TQPtrList newAutoConfigWidget; d->autoWidgets.insert(widget, newAutoConfigWidget ); } -void KAutoConfig::ignoreSubWidget(QWidget *widget){ +void KAutoConfig::ignoreSubWidget(TQWidget *widget){ functionCallPostOrderCheck("ignoreSubWidget",); d->ignore.append(widget); } @@ -141,51 +141,51 @@ bool KAutoConfig::retrieveSettings(bool trackChanges){ if(trackChanges){ // QT - changedMap.insert(QString::fromLatin1("QButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QCheckBox"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QPushButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QRadioButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QComboBox"), SIGNAL(activated (int))); + changedMap.insert(TQString::fromLatin1("TQButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQCheckBox"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQPushButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQRadioButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQComboBox"), TQT_SIGNAL(activated (int))); //qsqlproperty map doesn't store the text, but the value! - //changedMap.insert(QString::fromLatin1("QComboBox"), SIGNAL(textChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QDateEdit"), SIGNAL(valueChanged(const QDate &))); - changedMap.insert(QString::fromLatin1("QDateTimeEdit"), SIGNAL(valueChanged(const QDateTime &))); - changedMap.insert(QString::fromLatin1("QDial"), SIGNAL(valueChanged (int))); - changedMap.insert(QString::fromLatin1("QLineEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QSlider"), SIGNAL(valueChanged(int))); - changedMap.insert(QString::fromLatin1("QSpinBox"), SIGNAL(valueChanged(int))); - changedMap.insert(QString::fromLatin1("QTimeEdit"), SIGNAL(valueChanged(const QTime &))); - changedMap.insert(QString::fromLatin1("QTextEdit"), SIGNAL(textChanged())); - changedMap.insert(QString::fromLatin1("QTextBrowser"), SIGNAL(sourceChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QMultiLineEdit"), SIGNAL(textChanged())); - changedMap.insert(QString::fromLatin1("QListBox"), SIGNAL(selectionChanged())); - changedMap.insert(QString::fromLatin1("QTabWidget"), SIGNAL(currentChanged(QWidget *))); + //changedMap.insert(TQString::fromLatin1("TQComboBox"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("QDateEdit"), TQT_SIGNAL(valueChanged(const TQDate &))); + changedMap.insert(TQString::fromLatin1("QDateTimeEdit"), TQT_SIGNAL(valueChanged(const TQDateTime &))); + changedMap.insert(TQString::fromLatin1("TQDial"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert(TQString::fromLatin1("TQLineEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("TQSlider"), TQT_SIGNAL(valueChanged(int))); + changedMap.insert(TQString::fromLatin1("TQSpinBox"), TQT_SIGNAL(valueChanged(int))); + changedMap.insert(TQString::fromLatin1("QTimeEdit"), TQT_SIGNAL(valueChanged(const TQTime &))); + changedMap.insert(TQString::fromLatin1("TQTextEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert(TQString::fromLatin1("TQTextBrowser"), TQT_SIGNAL(sourceChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("TQMultiLineEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert(TQString::fromLatin1("TQListBox"), TQT_SIGNAL(selectionChanged())); + changedMap.insert(TQString::fromLatin1("TQTabWidget"), TQT_SIGNAL(currentChanged(TQWidget *))); // KDE - changedMap.insert( QString::fromLatin1("KComboBox"), SIGNAL(activated (int))); - changedMap.insert( QString::fromLatin1("KFontCombo"), SIGNAL(activated (int))); - changedMap.insert( QString::fromLatin1("KFontRequester"), SIGNAL(fontSelected(const QFont &))); - changedMap.insert( QString::fromLatin1("KFontChooser"), SIGNAL(fontSelected(const QFont &))); - changedMap.insert( QString::fromLatin1("KHistoryCombo"), SIGNAL(activated (int))); - - changedMap.insert( QString::fromLatin1("KColorButton"), SIGNAL(changed(const QColor &))); - changedMap.insert( QString::fromLatin1("KDatePicker"), SIGNAL(dateSelected (QDate))); - changedMap.insert( QString::fromLatin1("KEditListBox"), SIGNAL(changed())); - changedMap.insert( QString::fromLatin1("KListBox"), SIGNAL(selectionChanged())); - changedMap.insert( QString::fromLatin1("KLineEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KPasswordEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KRestrictedLine"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KTextBrowser"), SIGNAL(sourceChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KTextEdit"), SIGNAL(textChanged())); - changedMap.insert( QString::fromLatin1("KURLRequester"), SIGNAL(textChanged (const QString& ))); - changedMap.insert( QString::fromLatin1("KIntNumInput"), SIGNAL(valueChanged (int))); - changedMap.insert( QString::fromLatin1("KIntSpinBox"), SIGNAL(valueChanged (int))); - changedMap.insert( QString::fromLatin1("KDoubleNumInput"), SIGNAL(valueChanged (double))); + changedMap.insert( TQString::fromLatin1("KComboBox"), TQT_SIGNAL(activated (int))); + changedMap.insert( TQString::fromLatin1("KFontCombo"), TQT_SIGNAL(activated (int))); + changedMap.insert( TQString::fromLatin1("KFontRequester"), TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( TQString::fromLatin1("KFontChooser"), TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( TQString::fromLatin1("KHistoryCombo"), TQT_SIGNAL(activated (int))); + + changedMap.insert( TQString::fromLatin1("KColorButton"), TQT_SIGNAL(changed(const TQColor &))); + changedMap.insert( TQString::fromLatin1("KDatePicker"), TQT_SIGNAL(dateSelected (TQDate))); + changedMap.insert( TQString::fromLatin1("KEditListBox"), TQT_SIGNAL(changed())); + changedMap.insert( TQString::fromLatin1("KListBox"), TQT_SIGNAL(selectionChanged())); + changedMap.insert( TQString::fromLatin1("KLineEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KPasswordEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KRestrictedLine"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KTextBrowser"), TQT_SIGNAL(sourceChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KTextEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert( TQString::fromLatin1("KURLRequester"), TQT_SIGNAL(textChanged (const TQString& ))); + changedMap.insert( TQString::fromLatin1("KIntNumInput"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert( TQString::fromLatin1("KIntSpinBox"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert( TQString::fromLatin1("KDoubleNumInput"), TQT_SIGNAL(valueChanged (double))); } // Go through all of the children of the widgets and find all known widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; bool usingDefaultValues = false; while ( (widget = it.current()) != 0 ) { ++it; @@ -198,30 +198,30 @@ bool KAutoConfig::retrieveSettings(bool trackChanges){ bool KAutoConfig::saveSettings() { functionCallPreOrderCheck("saveSettings", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator it( d->autoWidgets[widget] ); + TQWidget *groupWidget; bool widgetChanged = false; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); #if KDE_IS_VERSION( 3, 1, 90 ) - if(!config->hasDefault(QString::fromLatin1(groupWidget->name())) && currentValue == defaultValue){ - config->revertToDefault(QString::fromLatin1(groupWidget->name())); + if(!config->hasDefault(TQString::fromLatin1(groupWidget->name())) && currentValue == defaultValue){ + config->revertToDefault(TQString::fromLatin1(groupWidget->name())); widgetChanged = true; } else{ #endif - QVariant savedValue = config->readPropertyEntry(groupWidget->name(), + TQVariant savedValue = config->readPropertyEntry(groupWidget->name(), defaultValue); if(savedValue != currentValue){ config->writeEntry(groupWidget->name(), currentValue); @@ -248,21 +248,21 @@ bool KAutoConfig::saveSettings() { bool KAutoConfig::hasChanged() const { functionCallPreOrderCheck("hasChanged", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); - QVariant savedValue = config->readPropertyEntry(groupWidget->name(), + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); + TQVariant savedValue = config->readPropertyEntry(groupWidget->name(), defaultValue); // Return once just one item is found to have changed. @@ -277,20 +277,20 @@ bool KAutoConfig::hasChanged() const { bool KAutoConfig::isDefault() const { functionCallPreOrderCheck("isDefault", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); if(currentValue != defaultValue){ //qDebug("groupWidget %s, has changed: default: %s new: %s", groupWidget->name(), defaultValue.toString().latin1(), currentValue.toString().latin1()); return false; @@ -303,20 +303,20 @@ bool KAutoConfig::isDefault() const { void KAutoConfig::resetSettings() const { functionCallPreOrderCheck("resetSettings",); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant defaultValue = d->defaultValues[groupWidget]; if(defaultValue != propertyMap->property(groupWidget)){ propertyMap->setProperty(groupWidget, defaultValue); d->changed = true; @@ -328,21 +328,21 @@ void KAutoConfig::resetSettings() const { void KAutoConfig::reloadSettings() const { functionCallPreOrderCheck("reloadSettings", ); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *pageWidget; + TQPtrListIterator it( d->widgets ); + TQWidget *pageWidget; while ( (pageWidget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[pageWidget]); // Go through the known widgets of this page and reload - QPtrListIterator it( d->autoWidgets[pageWidget] ); - QWidget *widget; + TQPtrListIterator it( d->autoWidgets[pageWidget] ); + TQWidget *widget; while ( (widget = it.current()) != 0 ){ ++it; - QVariant defaultSetting = d->defaultValues[widget]; - QVariant setting = + TQVariant defaultSetting = d->defaultValues[widget]; + TQVariant setting = config->readPropertyEntry(widget->name(), defaultSetting); propertyMap->setProperty(widget, setting); } @@ -350,23 +350,23 @@ void KAutoConfig::reloadSettings() const { d->changed = false; } -bool KAutoConfig::parseChildren(const QWidget *widget, - QPtrList& currentGroup, bool trackChanges){ +bool KAutoConfig::parseChildren(const TQWidget *widget, + TQPtrList& currentGroup, bool trackChanges){ bool valueChanged = false; - const QPtrList *listOfChildren = widget->children(); + const TQPtrList *listOfChildren = widget->children(); if(!listOfChildren) return valueChanged; - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); - QPtrListIterator it( *listOfChildren ); - QObject *object; + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); + TQPtrListIterator it( *listOfChildren ); + TQObject *object; while ( (object = it.current()) != 0 ) { ++it; if(!object->isWidgetType()){ continue; } - QWidget *childWidget = (QWidget *)object; + TQWidget *childWidget = (TQWidget *)object; if(d->ignore.containsRef(childWidget)){ continue; } @@ -385,12 +385,12 @@ bool KAutoConfig::parseChildren(const QWidget *widget, if( d->ignoreTheseWidgets[childWidget->className()] == 0 && childWidget->name(0) != NULL ) { - QVariant defaultSetting = propertyMap->property(childWidget); + TQVariant defaultSetting = propertyMap->property(childWidget); if(defaultSetting.isValid()) { parseTheChildren = false; // Disable the widget if it is immutable? - if(config->entryIsImmutable( QString::fromLatin1(childWidget->name()))) + if(config->entryIsImmutable( TQString::fromLatin1(childWidget->name()))) childWidget->setEnabled(false); else { @@ -401,22 +401,22 @@ bool KAutoConfig::parseChildren(const QWidget *widget, d->defaultValues.insert(childWidget, defaultSetting); } // Get/Set settings and connect up the changed signal - QVariant setting = + TQVariant setting = config->readPropertyEntry(childWidget->name(), defaultSetting); if(setting != defaultSetting) { propertyMap->setProperty(childWidget, setting); valueChanged = true; } - if(trackChanges && changedMap.find(QString::fromLatin1(childWidget->className())) != + if(trackChanges && changedMap.find(TQString::fromLatin1(childWidget->className())) != changedMap.end()) { - connect(childWidget, changedMap[QString::fromLatin1(childWidget->className())], - this, SIGNAL(widgetModified())); + connect(childWidget, changedMap[TQString::fromLatin1(childWidget->className())], + this, TQT_SIGNAL(widgetModified())); } #ifndef NDEBUG else if(trackChanges && - changedMap.find(QString::fromLatin1(childWidget->className())) == changedMap.end()) + changedMap.find(TQString::fromLatin1(childWidget->className())) == changedMap.end()) { // Without a signal kautoconfigdialog could incorectly // enable/disable the buttons diff --git a/kopete/libkopete/kautoconfig.h b/kopete/libkopete/kautoconfig.h index a4cd243b..f3122fee 100644 --- a/kopete/libkopete/kautoconfig.h +++ b/kopete/libkopete/kautoconfig.h @@ -20,8 +20,8 @@ #ifndef KAUTOCONFIG_H #define KAUTOCONFIG_H -#include -#include +#include +#include #include "kopete_export.h" @@ -53,11 +53,11 @@ class QWidget; * If one of the widgets needs special treatment it can be specified to be * ignored using the ignoreSubWidget() function. * - * KAutoConfig uses the QSqlPropertyMap class to determine if it can do + * KAutoConfig uses the TQSqlPropertyMap class to determine if it can do * anything to a widget. Note that KAutoConfig doesn't require a database, * it simply uses the functionality that is built into the QSqlPropertyMap * class. New widgets can be added to the map using - * QSqlPropertyMap::installDefaultMap(). Note that you can't just add any + * TQSqlPropertyMap::installDefaultMap(). Note that you can't just add any * class. The class must have a matching Q_PROPERTY(...) macro defined. * * For example (note that KColorButton is already added and it doesn't need to @@ -65,18 +65,18 @@ class QWidget; * * kcolorbutton.h defines the following property: * \code - * Q_PROPERTY( QColor color READ color WRITE setColor ) + * Q_PROPERTY( TQColor color READ color WRITE setColor ) * \endcode * * To add KColorButton the following code would be inserted in the main. * * \code - * QSqlPropertyMap *map = QSqlPropertyMap::defaultMap(); + * TQSqlPropertyMap *map = TQSqlPropertyMap::defaultMap(); * map.insert("KColorButton", "color"); - * QSqlPropertyMap::installDefaultMap(map); + * TQSqlPropertyMap::installDefaultMap(map); * \endcode * - * If you add a new widget to the QSqlPropertyMap and wish to be notified when + * If you add a new widget to the TQSqlPropertyMap and wish to be notified when * it is modified you should add its signal using addWidgetChangedSignal(). * If the Apply and Default buttons and enabled/disabled by KAutoConfigDialog * automatically then this must be done. @@ -85,7 +85,7 @@ class QWidget; * @since 3.2 * @author Benjamin C Meyer */ -class KOPETE_EXPORT KAutoConfig : public QObject { +class KOPETE_EXPORT KAutoConfig : public TQObject { Q_OBJECT @@ -103,7 +103,7 @@ signals: * contains the one or more modified setting. * @see settingsChanged() */ - void settingsChanged( QWidget *widget ); + void settingsChanged( TQWidget *widget ); /** * If retrieveSettings() was told to track changes then if @@ -123,7 +123,7 @@ public: * @param parent - Parent object. * @param name - Object name. */ - KAutoConfig( KConfig *kconfig, QObject *parent=0, const char *name=0 ); + KAutoConfig( KConfig *kconfig, TQObject *parent=0, const char *name=0 ); /** * Constructor. @@ -132,7 +132,7 @@ public: * @param parent - Parent object. * @param name - Object name. */ - KAutoConfig( QObject *parent=0, const char *name=0 ); + KAutoConfig( TQObject *parent=0, const char *name=0 ); /** * Destructor. Deletes private class. @@ -150,7 +150,7 @@ public: * group it should be added separately and also ignored. * @see ignoreSubWidget() */ - void addWidget( QWidget *widget, const QString &group ); + void addWidget( TQWidget *widget, const TQString &group ); /** * Ignore the specified child widget when performing an action. Doesn't @@ -159,7 +159,7 @@ public: * @param widget - Pointer to the widget that should be ignored. * Note: Widgets that don't have a name are ignored automatically. **/ - void ignoreSubWidget( QWidget *widget ); + void ignoreSubWidget( TQWidget *widget ); /** * Traverse the specified widgets to see if anything is different then the @@ -185,17 +185,17 @@ public: * * Example: * \code - * addWidgetChangedSignal( "QCheckbox", SIGNAL(stateChanged(int)) ); + * addWidgetChangedSignal( "QCheckbox", TQT_SIGNAL(stateChanged(int)) ); * \endcode * * This is generally used in conjunction with the addition of a class - * to QSqlPropertyMap so KAutoConfig can get/set its values. + * to TQSqlPropertyMap so KAutoConfig can get/set its values. * * @param widgetName - The class name of the widget (className()). - * @param signal - The signal (with "SIGNAL()" wrapper) that should be called. + * @param signal - The signal (with "TQT_SIGNAL()" wrapper) that should be called. */ - inline void addWidgetChangedSignal( const QString &widgetName, - const QCString &signal ){ + inline void addWidgetChangedSignal( const TQString &widgetName, + const TQCString &signal ){ changedMap.insert( widgetName, signal ); } @@ -248,7 +248,7 @@ protected: /** * Map of the classes and the signals that they emit when changed. */ - QMap changedMap; + TQMap changedMap; /** * Recursive function that finds all known children. @@ -262,8 +262,8 @@ protected: * @return bool - If a widget was set to something other then its default. * @see retrieveSettings() */ - bool parseChildren( const QWidget *widget, - QPtrList¤tGroup, bool trackChanges ); + bool parseChildren( const TQWidget *widget, + TQPtrList¤tGroup, bool trackChanges ); private: class KAutoConfigPrivate; diff --git a/kopete/libkopete/kcautoconfigmodule.cpp b/kopete/libkopete/kcautoconfigmodule.cpp index 9ef34be1..122a3e7b 100644 --- a/kopete/libkopete/kcautoconfigmodule.cpp +++ b/kopete/libkopete/kcautoconfigmodule.cpp @@ -19,7 +19,7 @@ #include "kcautoconfigmodule.h" -#include +#include #include @@ -30,41 +30,41 @@ class KCAutoConfigModule::KCAutoConfigModulePrivate }; -KCAutoConfigModule::KCAutoConfigModule( QWidget * parent, const char * name, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( TQWidget * parent, const char * name, const TQStringList & args ) : KCModule( parent, name, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(widgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(widgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KInstance * instance, QWidget * parent, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KInstance * instance, TQWidget * parent, const TQStringList & args ) : KCModule( instance, parent, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KConfig *config,QWidget * parent, const char * name, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KConfig *config,TQWidget * parent, const char * name, const TQStringList & args ) : KCModule( parent, name, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( config, this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KConfig *config , KInstance * instance, QWidget * parent, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KConfig *config , KInstance * instance, TQWidget * parent, const TQStringList & args ) : KCModule( instance, parent, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( config, this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } @@ -99,9 +99,9 @@ KAutoConfig *KCAutoConfigModule::autoConfig() return d->kautoconfig; } -void KCAutoConfigModule::setMainWidget(QWidget *widget, const QString& group ) +void KCAutoConfigModule::setMainWidget(TQWidget *widget, const TQString& group ) { - QBoxLayout * l = new QVBoxLayout( this ); + TQBoxLayout * l = new TQVBoxLayout( this ); l->addWidget( widget ); d->kautoconfig->addWidget(widget,group); diff --git a/kopete/libkopete/kcautoconfigmodule.h b/kopete/libkopete/kcautoconfigmodule.h index 6076b211..fcca6047 100644 --- a/kopete/libkopete/kcautoconfigmodule.h +++ b/kopete/libkopete/kcautoconfigmodule.h @@ -36,10 +36,10 @@ class KConfig; * config page with QDesigner, and add it to the module * This can be done using the setMainWidget() method: * \code - * typedef KGenericFactory MyPageConfigFactory; + * typedef KGenericFactory MyPageConfigFactory; * K_EXPORT_COMPONENT_FACTORY( kcm_mypageconfig, MyPageConfigFactory( "kcm_mypageconfig" ) ) * - * MyPageConfig( QWidget * parent, const char *, const QStringList & args ) + * MyPageConfig( TQWidget * parent, const char *, const TQStringList & args ) * : KCAutoConfigModule( MyPageConfigFactory::instance(), parent, args ) * { * setMainWidget( new MyPageConfigBase(this) , "MyGroup" ); @@ -57,12 +57,12 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule /** * Standard KCModule constructor. Use KGlobal::config() */ - KCAutoConfigModule( QWidget * parent = 0, const char * name = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule( TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** * Standard KCModule constructor. Use KGlobal::config() */ - KCAutoConfigModule( KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule( KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() ); /** * Constructor. @@ -73,7 +73,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * * @todo document what the args mean (inherited from KCModule?) */ - KCAutoConfigModule(KConfig* config, KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule(KConfig* config, KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() ); /** * Constructor, much like the one above, except with @@ -83,7 +83,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * @param name name of the object * @param args special arguments for this KCM */ - KCAutoConfigModule(KConfig* config, QWidget * parent = 0, const char * name=0 , const QStringList & args = QStringList() ); + KCAutoConfigModule(KConfig* config, TQWidget * parent = 0, const char * name=0 , const TQStringList & args = TQStringList() ); ~KCAutoConfigModule(); @@ -97,7 +97,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * @param widget the widget to place on the page and to add in the KAutoConfig * @param group the name of the group where settings are stored in the config file */ - void setMainWidget(QWidget *widget, const QString& group); + void setMainWidget(TQWidget *widget, const TQString& group); /** * @brief a reference to the KAutoConfig diff --git a/kopete/libkopete/knotification.cpp b/kopete/libkopete/knotification.cpp index 737fe102..4b41b48b 100644 --- a/kopete/libkopete/knotification.cpp +++ b/kopete/libkopete/knotification.cpp @@ -33,20 +33,20 @@ #include -#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include //TODO, make the KNotification aware of the systemtray. #include "kopeteuiglobal.h" -static WId checkWinId( const QString &/*appName*/, WId senderWinId ) +static WId checkWinId( const TQString &/*appName*/, WId senderWinId ) { if(senderWinId==0) senderWinId=Kopete::UI::Global::sysTrayWId(); @@ -57,14 +57,14 @@ static WId checkWinId( const QString &/*appName*/, WId senderWinId ) struct KNotification::Private { - QWidget *widget; - QString text; - QStringList actions; + TQWidget *widget; + TQString text; + TQStringList actions; int level; }; -KNotification::KNotification(QObject *parent) : - QObject(parent) , d(new Private) +KNotification::KNotification(TQObject *parent) : + TQObject(parent) , d(new Private) { m_linkClicked = false; } @@ -75,20 +75,20 @@ KNotification::~KNotification() } -void KNotification::notifyByExecute(const QString &command, const QString& event, - const QString& fromApp, const QString& text, +void KNotification::notifyByExecute(const TQString &command, const TQString& event, + const TQString& fromApp, const TQString& text, int winId, int eventId) { if (!command.isEmpty()) { // kdDebug() << "executing command '" << command << "'" << endl; - QMap subst; + TQMap subst; subst.insert( 'e', event ); subst.insert( 'a', fromApp ); subst.insert( 's', text ); - subst.insert( 'w', QString::number( winId )); - subst.insert( 'i', QString::number( eventId )); - QString execLine = KMacroExpander::expandMacrosShellQuote( command, subst ); + subst.insert( 'w', TQString::number( winId )); + subst.insert( 'i', TQString::number( eventId )); + TQString execLine = KMacroExpander::expandMacrosShellQuote( command, subst ); if ( execLine.isEmpty() ) execLine = command; // fallback @@ -108,7 +108,7 @@ void KNotification::notifyByMessagebox() if ( d->text.isEmpty() ) return; - QString action=d->actions[0]; + TQString action=d->actions[0]; WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; if( action.isEmpty()) @@ -134,21 +134,21 @@ void KNotification::notifyByMessagebox() else { //we may show the specific action button int result=0; - QGuardedPtr _this=this; //this can be deleted + TQGuardedPtr _this=this; //this can be deleted switch( d->level ) { default: case KNotifyClient::Notification: - result = KMessageBox::questionYesNo(d->widget, d->text, i18n( "Notification" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::questionYesNo(d->widget, d->text, i18n( "Notification" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Warning: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Warning" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Warning" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Error: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Error" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Error" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Catastrophe: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Fatal" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Fatal" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; } if(result==KMessageBox::Yes && _this) @@ -160,30 +160,30 @@ void KNotification::notifyByMessagebox() -void KNotification::notifyByPassivePopup(const QPixmap &pix ) +void KNotification::notifyByPassivePopup(const TQPixmap &pix ) { - QString appName = QString::fromAscii( KNotifyClient::instance()->instanceName() ); + TQString appName = TQString::fromAscii( KNotifyClient::instance()->instanceName() ); KIconLoader iconLoader( appName ); - KConfig eventsFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); + KConfig eventsFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); KConfigGroup config( &eventsFile, "!Global!" ); - QString iconName = config.readEntry( "IconName", appName ); - QPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); - QString title = config.readEntry( "Comment", appName ); + TQString iconName = config.readEntry( "IconName", appName ); + TQPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); + TQString title = config.readEntry( "Comment", appName ); //KPassivePopup::message(title, text, icon, senderWinId); WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; KPassivePopup *pop = new KPassivePopup( checkWinId(appName, winId) ); - QObject::connect(this, SIGNAL(closed()), pop, SLOT(deleteLater())); + TQObject::connect(this, TQT_SIGNAL(closed()), pop, TQT_SLOT(deleteLater())); - QVBox *vb = pop->standardView( title, pix.isNull() ? d->text: QString::null , icon ); - QVBox *vb2=vb; + TQVBox *vb = pop->standardView( title, pix.isNull() ? d->text: TQString::null , icon ); + TQVBox *vb2=vb; if(!pix.isNull()) { - QHBox *hb = new QHBox(vb); + TQHBox *hb = new TQHBox(vb); hb->setSpacing(KDialog::spacingHint()); - QLabel *pil=new QLabel(hb); + TQLabel *pil=new TQLabel(hb); pil->setPixmap(pix); pil->setScaledContents(true); if(pix.height() > 80 && pix.height() > pix.width() ) @@ -196,27 +196,27 @@ void KNotification::notifyByPassivePopup(const QPixmap &pix ) pil->setMaximumWidth(80); pil->setMaximumHeight(80*pix.height()/pix.width()); } - vb=new QVBox(hb); - QLabel *msg = new QLabel( d->text, vb, "msg_label" ); + vb=new TQVBox(hb); + TQLabel *msg = new TQLabel( d->text, vb, "msg_label" ); msg->setAlignment( AlignLeft ); } if ( !d->actions.isEmpty() ) { - QString linkCode=QString::fromLatin1("

"); + TQString linkCode=TQString::fromLatin1("

"); int i=0; - for ( QStringList::ConstIterator it = d->actions.begin() ; it != d->actions.end(); ++it ) + for ( TQStringList::ConstIterator it = d->actions.begin() ; it != d->actions.end(); ++it ) { i++; - linkCode+=QString::fromLatin1(" %2 ").arg( QString::number(i) , QStyleSheet::escape(*it) ); + linkCode+=TQString::fromLatin1(" %2 ").arg( TQString::number(i) , TQStyleSheet::escape(*it) ); } - linkCode+=QString::fromLatin1("

"); + linkCode+=TQString::fromLatin1("

"); KActiveLabel *link = new KActiveLabel(linkCode , vb ); //link->setAlignment( AlignRight ); - QObject::disconnect(link, SIGNAL(linkClicked(const QString &)), link, SLOT(openLink(const QString &))); - QObject::connect(link, SIGNAL(linkClicked(const QString &)), this, SLOT(slotPopupLinkClicked(const QString &))); - QObject::connect(link, SIGNAL(linkClicked(const QString &)), pop, SLOT(hide())); + TQObject::disconnect(link, TQT_SIGNAL(linkClicked(const TQString &)), link, TQT_SLOT(openLink(const TQString &))); + TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SLOT(slotPopupLinkClicked(const TQString &))); + TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), pop, TQT_SLOT(hide())); } pop->setAutoDelete( true ); @@ -227,7 +227,7 @@ void KNotification::notifyByPassivePopup(const QPixmap &pix ) } -void KNotification::slotPopupLinkClicked(const QString &adr) +void KNotification::slotPopupLinkClicked(const TQString &adr) { m_linkClicked = true; unsigned int action=adr.toUInt(); @@ -236,7 +236,7 @@ void KNotification::slotPopupLinkClicked(const QString &adr) activate(action); - // since we've hidden the message (KNotification::notifyByPassivePopup(const QPixmap &pix )) + // since we've hidden the message (KNotification::notifyByPassivePopup(const TQPixmap &pix )) // we must now schedule overselves for deletion close(); } @@ -274,7 +274,7 @@ void KNotification::raiseWidget() } -void KNotification::raiseWidget(QWidget *w) +void KNotification::raiseWidget(TQWidget *w) { //TODO this funciton is far from finished. if(w->isTopLevel()) @@ -284,10 +284,10 @@ void KNotification::raiseWidget(QWidget *w) } else { - QWidget *pw=w->parentWidget(); + TQWidget *pw=w->parentWidget(); raiseWidget(pw); - if( QTabWidget *tab_widget=dynamic_cast(pw)) + if( TQTabWidget *tab_widget=dynamic_cast(pw)) { tab_widget->showPage(w); } @@ -298,9 +298,9 @@ void KNotification::raiseWidget(QWidget *w) -KNotification *KNotification::event( const QString& message , const QString& text, - const QPixmap& pixmap, QWidget *widget, - const QStringList &actions, unsigned int flags) +KNotification *KNotification::event( const TQString& message , const TQString& text, + const TQPixmap& pixmap, TQWidget *widget, + const TQStringList &actions, unsigned int flags) { /* NOTE: this function still use the KNotifyClient, * in the future (KDE4) all the function of the knotifyclient will be moved there. @@ -308,15 +308,15 @@ KNotification *KNotification::event( const QString& message , const QString& tex */ int level=KNotifyClient::Default; - QString sound; - QString file; - QString commandline; + TQString sound; + TQString file; + TQString commandline; // get config file - KConfig eventsFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); + KConfig eventsFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); eventsFile.setGroup(message); - KConfig configFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+".eventsrc" ), true, false); + KConfig configFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+".eventsrc" ), true, false); configFile.setGroup(message); int present=KNotifyClient::getPresentation(message); @@ -327,7 +327,7 @@ KNotification *KNotification::event( const QString& message , const QString& tex // get sound file name if( present & KNotifyClient::Sound ) { - QString theSound = configFile.readPathEntry( "soundfile" ); + TQString theSound = configFile.readPathEntry( "soundfile" ); if ( theSound.isEmpty() ) theSound = eventsFile.readPathEntry( "default_sound" ); if ( !theSound.isEmpty() ) @@ -336,7 +336,7 @@ KNotification *KNotification::event( const QString& message , const QString& tex // get log file name if( present & KNotifyClient::Logfile ) { - QString theFile = configFile.readPathEntry( "logfile" ); + TQString theFile = configFile.readPathEntry( "logfile" ); if ( theFile.isEmpty() ) theFile = eventsFile.readPathEntry( "default_logfile" ); if ( !theFile.isEmpty() ) @@ -357,9 +357,9 @@ KNotification *KNotification::event( const QString& message , const QString& tex return userEvent( text, pixmap, widget, actions, present , level, sound, file, commandline, flags ); } -KNotification *KNotification::userEvent( const QString& text, const QPixmap& pixmap, QWidget *widget, - QStringList actions,int present, int level, const QString &sound, const QString &file, - const QString &commandline, unsigned int flags) +KNotification *KNotification::userEvent( const TQString& text, const TQPixmap& pixmap, TQWidget *widget, + TQStringList actions,int present, int level, const TQString &sound, const TQString &file, + const TQString &commandline, unsigned int flags) { /* NOTE: this function still use the KNotifyClient, @@ -391,17 +391,17 @@ KNotification *KNotification::userEvent( const QString& text, const QPixmap& pix } if ( present & KNotifyClient::Messagebox ) { - QTimer::singleShot(0,notify,SLOT(notifyByMessagebox())); + TQTimer::singleShot(0,notify,TQT_SLOT(notifyByMessagebox())); } else //not a message box (because closing the event when a message box is there is suicide) if(flags & CloseOnTimeout) { - QTimer::singleShot(6*1000, notify, SLOT(close())); + TQTimer::singleShot(6*1000, notify, TQT_SLOT(close())); } if ( present & KNotifyClient::Execute ) { - QString appname = QString::fromAscii( KNotifyClient::instance()->instanceName() ); - notify->notifyByExecute(commandline, QString::null,appname,text, winId, 0 ); + TQString appname = TQString::fromAscii( KNotifyClient::instance()->instanceName() ); + notify->notifyByExecute(commandline, TQString::null,appname,text, winId, 0 ); } return notify; @@ -422,10 +422,10 @@ KNotification *KNotification::userEvent( const QString& text, const QPixmap& pix #include "kopetenotifyevent.h" #include "kopetemetacontact.h" #include "kopeteuiglobal.h" -#include +#include -static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaContact * mc, const QString &message, bool& suppress) +static KNotification *performCustomNotifications( TQWidget *widget, Kopete::MetaContact * mc, const TQString &message, bool& suppress) { KNotification *n=0L; //kdDebug( 14010 ) << k_funcinfo << endl; @@ -445,8 +445,8 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC bool checkingMetaContact = true; Kopete::NotifyDataObject * dataObj = mc; do { - QString sound; - QString text; + TQString sound; + TQString text; if ( dataObj ) { @@ -479,7 +479,7 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC evt->firePresentation( Kopete::EventPresentation::Chat ); } // fire the event - n=KNotification::userEvent( text, mc->photo(), widget, QStringList() , present, 0, sound, QString::null, QString::null , KNotification::CloseOnTimeout); + n=KNotification::userEvent( text, mc->photo(), widget, TQStringList() , present, 0, sound, TQString::null, TQString::null , KNotification::CloseOnTimeout); } } @@ -502,9 +502,9 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC -KNotification *KNotification::event( Kopete::MetaContact *mc, const QString& message , - const QString& text, const QPixmap& pixmap, QWidget *widget, - const QStringList &actions, unsigned int flags) +KNotification *KNotification::event( Kopete::MetaContact *mc, const TQString& message , + const TQString& text, const TQPixmap& pixmap, TQWidget *widget, + const TQStringList &actions, unsigned int flags) { if (message.isEmpty()) return 0; diff --git a/kopete/libkopete/knotification.h b/kopete/libkopete/knotification.h index 83752f2f..a99f70d2 100644 --- a/kopete/libkopete/knotification.h +++ b/kopete/libkopete/knotification.h @@ -21,9 +21,9 @@ #define KNOTIFICATION_H -#include -#include -#include +#include +#include +#include #include "kopete_export.h" class QWidget; @@ -91,7 +91,7 @@ public: * When the notification is activated, the widget might be raised. * Depending of the configuration, the taskbar entry of the window containing the widget may blink. */ - QWidget *widget(); + TQWidget *widget(); signals: /** @@ -139,21 +139,21 @@ public slots: private: struct Private; Private *d; - KNotification(QObject *parent=0L); + KNotification(TQObject *parent=0L); /** * recursive function that raise the widget. @p w * * @see raiseWidget() */ - static void raiseWidget(QWidget *w); + static void raiseWidget(TQWidget *w); bool m_linkClicked; private slots: void notifyByMessagebox(); - void notifyByPassivePopup(const QPixmap &pix); - void notifyByExecute(const QString &command, const QString& event,const QString& fromApp, const QString& text, int winId, int eventId); - void slotPopupLinkClicked(const QString &); + void notifyByPassivePopup(const TQPixmap &pix); + void notifyByExecute(const TQString &command, const TQString& event,const TQString& fromApp, const TQString& text, int winId, int eventId); + void slotPopupLinkClicked(const TQString &); public: @@ -168,7 +168,7 @@ public: * Make sure you use one of the CloseOnTimeOut or CloseWhenWidgetActivated, if not, * you have to close yourself the notification. * - * @note the text is shown in a QLabel, you should make sure to escape the html is needed. + * @note the text is shown in a TQLabel, you should make sure to escape the html is needed. * * @param eventId is the name of the event * @param text is the text of the notification to show in the popup. @@ -177,9 +177,9 @@ public: * @param actions is a list of action texts. * @param flags is a bitmask of NotificationsFlags */ - static KNotification *event( const QString& eventId , const QString& text=QString::null, - const QPixmap& pixmap=QPixmap(), QWidget *widget=0L, - const QStringList &actions=QStringList(), unsigned int flags=CloseOnTimeout); + static KNotification *event( const TQString& eventId , const TQString& text=TQString::null, + const TQPixmap& pixmap=TQPixmap(), TQWidget *widget=0L, + const TQStringList &actions=TQStringList(), unsigned int flags=CloseOnTimeout); /** @@ -196,19 +196,19 @@ public: * @param commandLine the command line to run if selected with @p parent * @param flags Indicates the way in which the notification should be handled */ - static KNotification *userEvent( const QString& text, const QPixmap& pixmap, - QWidget *widget, QStringList actions,int present, int level, - const QString &sound, const QString &file, - const QString &commandLine, unsigned int flags); + static KNotification *userEvent( const TQString& text, const TQPixmap& pixmap, + TQWidget *widget, TQStringList actions,int present, int level, + const TQString &sound, const TQString &file, + const TQString &commandLine, unsigned int flags); /** * @todo find a proper way to do context-dependent notifications */ - static KNotification *event( Kopete::MetaContact *mc, const QString& eventId , const QString& text=QString::null, - const QPixmap& pixmap=QPixmap(), QWidget *widget=0L, - const QStringList &actions=QStringList(),unsigned int flags=CloseOnTimeout); + static KNotification *event( Kopete::MetaContact *mc, const TQString& eventId , const TQString& text=TQString::null, + const TQPixmap& pixmap=TQPixmap(), TQWidget *widget=0L, + const TQStringList &actions=TQStringList(),unsigned int flags=CloseOnTimeout); }; diff --git a/kopete/libkopete/kopeteaccount.cpp b/kopete/libkopete/kopeteaccount.cpp index 52bb26bc..acce1da1 100644 --- a/kopete/libkopete/kopeteaccount.cpp +++ b/kopete/libkopete/kopeteaccount.cpp @@ -16,8 +16,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -54,7 +54,7 @@ namespace Kopete class Account::Private { public: - Private( Protocol *protocol, const QString &accountId ) + Private( Protocol *protocol, const TQString &accountId ) : protocol( protocol ), id( accountId ) , excludeconnect( true ), priority( 0 ), myself( 0 ) , suppressStatusTimer( 0 ), suppressStatusNotification( false ) @@ -66,38 +66,38 @@ public: ~Private() { delete blackList; } Protocol *protocol; - QString id; - QString accountLabel; + TQString id; + TQString accountLabel; bool excludeconnect; uint priority; - QDict contacts; - QColor color; + TQDict contacts; + TQColor color; Contact *myself; - QTimer suppressStatusTimer; + TQTimer suppressStatusTimer; bool suppressStatusNotification; Kopete::BlackLister *blackList; KConfigGroup *configGroup; uint connectionTry; - QString customIcon; + TQString customIcon; Kopete::OnlineStatus restoreStatus; - QString restoreMessage; + TQString restoreMessage; }; -Account::Account( Protocol *parent, const QString &accountId, const char *name ) - : QObject( parent, name ), d( new Private( parent, accountId ) ) +Account::Account( Protocol *parent, const TQString &accountId, const char *name ) + : TQObject( parent, name ), d( new Private( parent, accountId ) ) { - d->configGroup=new KConfigGroup(KGlobal::config(), QString::fromLatin1( "Account_%1_%2" ).arg( d->protocol->pluginId(), d->id )); + d->configGroup=new KConfigGroup(KGlobal::config(), TQString::fromLatin1( "Account_%1_%2" ).arg( d->protocol->pluginId(), d->id )); d->excludeconnect = d->configGroup->readBoolEntry( "ExcludeConnect", false ); d->color = d->configGroup->readColorEntry( "Color", &d->color ); - d->customIcon = d->configGroup->readEntry( "Icon", QString() ); + d->customIcon = d->configGroup->readEntry( "Icon", TQString() ); d->priority = d->configGroup->readNumEntry( "Priority", 0 ); d->restoreStatus = Kopete::OnlineStatus::Online; d->restoreMessage = ""; - QObject::connect( &d->suppressStatusTimer, SIGNAL( timeout() ), - this, SLOT( slotStopSuppression() ) ); + TQObject::connect( &d->suppressStatusTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( slotStopSuppression() ) ); } Account::~Account() @@ -106,7 +106,7 @@ Account::~Account() // Delete all registered child contacts first while ( !d->contacts.isEmpty() ) - delete *QDictIterator( d->contacts ); + delete *TQDictIterator( d->contacts ); kdDebug( 14010 ) << k_funcinfo << " account '" << d->id << "' about to emit accountDestroyed " << endl; emit accountDestroyed(this); @@ -128,14 +128,14 @@ void Account::disconnected( DisconnectReason reason ) //reconnect if needed if(reason == BadPassword ) { - QTimer::singleShot(0, this, SLOT(reconnect())); + TQTimer::singleShot(0, this, TQT_SLOT(reconnect())); } else if ( KopetePrefs::prefs()->reconnectOnDisconnect() == true && reason > Manual ) { d->connectionTry++; //use a timer to allow the plugins to clean up after return if(d->connectionTry < 3) - QTimer::singleShot(10000, this, SLOT(reconnect())); // wait 10 seconds before reconnect + TQTimer::singleShot(10000, this, TQT_SLOT(reconnect())); // wait 10 seconds before reconnect } if(reason== OtherClient) { @@ -148,17 +148,17 @@ Protocol *Account::protocol() const return d->protocol; } -QString Account::accountId() const +TQString Account::accountId() const { return d->id; } -const QColor Account::color() const +const TQColor Account::color() const { return d->color; } -void Account::setColor( const QColor &color ) +void Account::setColor( const TQColor &color ) { d->color = color; if ( d->color.isValid() ) @@ -180,12 +180,12 @@ uint Account::priority() const } -QPixmap Account::accountIcon(const int size) const +TQPixmap Account::accountIcon(const int size) const { - QString icon= d->customIcon.isEmpty() ? d->protocol->pluginIcon() : d->customIcon; + TQString icon= d->customIcon.isEmpty() ? d->protocol->pluginIcon() : d->customIcon; // FIXME: this code is duplicated with OnlineStatus, can we merge it somehow? - QPixmap base = KGlobal::instance()->iconLoader()->loadIcon( + TQPixmap base = KGlobal::instance()->iconLoader()->loadIcon( icon, KIcon::Small, size ); if ( d->color.isValid() ) @@ -196,7 +196,7 @@ QPixmap Account::accountIcon(const int size) const if ( size > 0 && base.width() != size ) { - base = QPixmap( base.convertToImage().smoothScale( size, size ) ); + base = TQPixmap( base.convertToImage().smoothScale( size, size ) ); } return base; @@ -207,12 +207,12 @@ KConfigGroup* Kopete::Account::configGroup() const return d->configGroup; } -void Account::setAccountLabel( const QString &label ) +void Account::setAccountLabel( const TQString &label ) { d->accountLabel = label; } -QString Account::accountLabel() const +TQString Account::accountLabel() const { if( d->accountLabel.isNull() ) return d->id; @@ -233,8 +233,8 @@ bool Account::excludeConnect() const void Account::registerContact( Contact *c ) { d->contacts.insert( c->contactId(), c ); - QObject::connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - SLOT( contactDestroyed( Kopete::Contact * ) ) ); + TQObject::connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + TQT_SLOT( contactDestroyed( Kopete::Contact * ) ) ); } void Account::contactDestroyed( Contact *c ) @@ -243,13 +243,13 @@ void Account::contactDestroyed( Contact *c ) } -const QDict& Account::contacts() +const TQDict& Account::contacts() { return d->contacts; } -Kopete::MetaContact* Account::addContact( const QString &contactId, const QString &displayName , Group *group, AddMode mode ) +Kopete::MetaContact* Account::addContact( const TQString &contactId, const TQString &displayName , Group *group, AddMode mode ) { if ( contactId == d->myself->contactId() ) @@ -316,7 +316,7 @@ Kopete::MetaContact* Account::addContact( const QString &contactId, const QStrin return parentContact; } -bool Account::addContact(const QString &contactId , MetaContact *parent, AddMode mode ) +bool Account::addContact(const TQString &contactId , MetaContact *parent, AddMode mode ) { if ( contactId == myself()->contactId() ) { @@ -362,7 +362,7 @@ KActionMenu * Account::actionMenu() { //default implementation KActionMenu *menu = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this ); - QString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); menu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), nick.isNull() ? accountLabel() : i18n( "%2 <%1>" ).arg( accountLabel(), nick ) @@ -370,7 +370,7 @@ KActionMenu * Account::actionMenu() OnlineStatusManager::self()->createAccountStatusActions(this, menu); menu->popupMenu()->insertSeparator(); - menu->insert( new KAction ( i18n( "Properties" ), 0, this, SLOT( editAccount() ), menu, "actionAccountProperties" ) ); + menu->insert( new KAction ( i18n( "Properties" ), 0, this, TQT_SLOT( editAccount() ), menu, "actionAccountProperties" ) ); return menu; } @@ -397,20 +397,20 @@ void Account::setMyself( Contact *myself ) if ( d->myself ) { - QObject::disconnect( d->myself, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - QObject::disconnect( d->myself, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ); + TQObject::disconnect( d->myself, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + TQObject::disconnect( d->myself, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ); } d->myself = myself; // d->contacts.remove( myself->contactId() ); - QObject::connect( d->myself, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - QObject::connect( d->myself, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ); + TQObject::connect( d->myself, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + TQObject::connect( d->myself, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ); if ( isConnected() != wasConnected ) emit isConnectedChanged(); @@ -454,15 +454,15 @@ void Account::setAllContactsStatus( const Kopete::OnlineStatus &status ) d->suppressStatusNotification = true; d->suppressStatusTimer.start( 5000, true ); - for ( QDictIterator it( d->contacts ); it.current(); ++it ) + for ( TQDictIterator it( d->contacts ); it.current(); ++it ) if ( it.current() != d->myself ) it.current()->setOnlineStatus( status ); } void Account::slotContactPropertyChanged( Contact * /* contact */, - const QString &key, const QVariant &old, const QVariant &newVal ) + const TQString &key, const TQVariant &old, const TQVariant &newVal ) { - if ( key == QString::fromLatin1("awayMessage") && old != newVal && isConnected() ) + if ( key == TQString::fromLatin1("awayMessage") && old != newVal && isConnected() ) { d->restoreMessage = newVal.toString(); // kdDebug( 14010 ) << k_funcinfo << "account " << d->id << " restoreMessage " << d->restoreMessage << endl; @@ -493,22 +493,22 @@ BlackLister* Account::blackLister() return d->blackList; } -void Account::block( const QString &contactId ) +void Account::block( const TQString &contactId ) { d->blackList->addContact( contactId ); } -void Account::unblock( const QString &contactId ) +void Account::unblock( const TQString &contactId ) { d->blackList->removeContact( contactId ); } -bool Account::isBlocked( const QString &contactId ) +bool Account::isBlocked( const TQString &contactId ) { return d->blackList->isBlocked( contactId ); } -void Account::editAccount(QWidget *parent) +void Account::editAccount(TQWidget *parent) { KDialogBase *editDialog = new KDialogBase( parent, "KopeteAccountConfig::editDialog", true, i18n( "Edit Account" ), KDialogBase::Ok | KDialogBase::Cancel, @@ -521,15 +521,15 @@ void Account::editAccount(QWidget *parent) // FIXME: Why the #### is EditAccountWidget not a QWidget?!? This sideways casting // is braindead and error-prone. Looking at MSN the only reason I can see is // because it allows direct subclassing of designer widgets. But what is - // wrong with embedding the designer widget in an empty QWidget instead? + // wrong with embedding the designer widget in an empty TQWidget instead? // Also, if this REALLY has to be a pure class and not a widget, then the // class should at least be renamed to EditAccountIface instead - Martijn - QWidget *w = dynamic_cast( m_accountWidget ); + TQWidget *w = dynamic_cast( m_accountWidget ); if ( !w ) return; editDialog->setMainWidget( w ); - if ( editDialog->exec() == QDialog::Accepted ) + if ( editDialog->exec() == TQDialog::Accepted ) { if( m_accountWidget->validateData() ) m_accountWidget->apply(); @@ -538,22 +538,22 @@ void Account::editAccount(QWidget *parent) editDialog->deleteLater(); } -void Account::setPluginData( Plugin* /*plugin*/, const QString &key, const QString &value ) +void Account::setPluginData( Plugin* /*plugin*/, const TQString &key, const TQString &value ) { configGroup()->writeEntry(key,value); } -QString Account::pluginData( Plugin* /*plugin*/, const QString &key ) const +TQString Account::pluginData( Plugin* /*plugin*/, const TQString &key ) const { return configGroup()->readEntry(key); } -void Account::setAway(bool away, const QString& reason) +void Account::setAway(bool away, const TQString& reason) { setOnlineStatus( OnlineStatusManager::self()->onlineStatus(protocol() , away ? OnlineStatusManager::Away : OnlineStatusManager::Online) , reason ); } -void Account::setCustomIcon( const QString & i) +void Account::setCustomIcon( const TQString & i) { d->customIcon = i; if(!i.isEmpty()) @@ -563,7 +563,7 @@ void Account::setCustomIcon( const QString & i) emit colorChanged( color() ); } -QString Account::customIcon() const +TQString Account::customIcon() const { return d->customIcon; } diff --git a/kopete/libkopete/kopeteaccount.h b/kopete/libkopete/kopeteaccount.h index f3c2d338..4e905d31 100644 --- a/kopete/libkopete/kopeteaccount.h +++ b/kopete/libkopete/kopeteaccount.h @@ -23,8 +23,8 @@ #include "kopete_export.h" -#include -#include +#include +#include class QDomNode; class KActionMenu; @@ -68,10 +68,10 @@ class KOPETE_EXPORT Account : public QObject Q_OBJECT Q_ENUMS( AddMode ) - Q_PROPERTY( QString accountId READ accountId ) + Q_PROPERTY( TQString accountId READ accountId ) Q_PROPERTY( bool excludeConnect READ excludeConnect WRITE setExcludeConnect ) - Q_PROPERTY( QColor color READ color WRITE setColor ) - Q_PROPERTY( QPixmap accountIcon READ accountIcon ) + Q_PROPERTY( TQColor color READ color WRITE setColor ) + Q_PROPERTY( TQPixmap accountIcon READ accountIcon ) Q_PROPERTY( bool isConnected READ isConnected ) Q_PROPERTY( bool isAway READ isAway ) Q_PROPERTY( bool suppressStatusNotification READ suppressStatusNotification ) @@ -100,9 +100,9 @@ public: * @param parent the protocol for this account. The account is a child object of the * protocol, so it will be automatically deleted when the protocol is. * @param accountID the unique ID of this account. - * @param name the name of this QObject. + * @param name the name of this TQObject. */ - Account(Protocol *parent, const QString &accountID, const char *name=0L); + Account(Protocol *parent, const TQString &accountID, const char *name=0L); ~Account(); /** @@ -113,12 +113,12 @@ public: /** * \return the unique ID of this account used as the login */ - QString accountId() const; + TQString accountId() const; /** * \return The label of this account, for the GUI */ - QString accountLabel() const; + TQString accountLabel() const; /** * \brief Get the priority of this account. @@ -157,7 +157,7 @@ public: * * \return the user color for this account */ - const QColor color() const; + const TQColor color() const; /** * \brief Set the color for this account. @@ -166,7 +166,7 @@ public: * * @sa @ref color() */ - void setColor( const QColor &color); + void setColor( const TQColor &color); /** * \brief Get the icon for this account. @@ -176,23 +176,23 @@ public: * @param size the size of the icon. If the size is 0, the default size is used. * @return the icon for this account, colored if needed */ - QPixmap accountIcon( const int size = 0 ) const; + TQPixmap accountIcon( const int size = 0 ) const; /** * \brief change the account icon. * by default the icon of an account is the protocol one, but it may be overide it. - * Set QString::null to go back to the default (the protocol icon) + * Set TQString::null to go back to the default (the protocol icon) * * this call will emit colorChanged() */ - void setCustomIcon( const QString& ); + void setCustomIcon( const TQString& ); /** * \brief return the icon base * This is the custom account icon set with setIcon. if this icon is null, then the protocol icon is used * don't use this funciton to get the icon that need to be displayed, use accountIcon */ - QString customIcon() const; + TQString customIcon() const; @@ -229,7 +229,7 @@ public: * so you can safely use static_cast to your own derived contact class * if needed. */ - const QDict& contacts(); + const TQDict& contacts(); /** * Indicates whether or not we should suppress status notifications @@ -264,13 +264,13 @@ public: * If @p mode is @c DontChangeKABC, no additional action is carried out. * * @param contactId the @ref Contact::contactId of the contact to create - * @param displayName the displayname (alias) of the new metacontact. Leave as QString::null if + * @param displayName the displayname (alias) of the new metacontact. Leave as TQString::null if * no alias is known, then by default, the nick will be taken as alias and tracked if changed. * @param group the group to add the created metacontact to, or 0 for the top-level group. * @param mode the mode used to add the contact. Use DontChangeKABC when deserializing. * @return the new created metacontact or 0L if the operation failed */ - MetaContact* addContact( const QString &contactId, const QString &displayName = QString::null, Group *group = 0, AddMode mode = DontChangeKABC ) ; + MetaContact* addContact( const TQString &contactId, const TQString &displayName = TQString::null, Group *group = 0, AddMode mode = DontChangeKABC ) ; /** * @brief Create a new contact, adding it to an existing metacontact @@ -280,12 +280,12 @@ public: * * @param contactId the @ref Contact::contactId of the contact to create * @param parent the parent metacontact (must not be 0) - * @param mode the mode used to add the contact. See addContact(const QString&,const QString&,Group*,AddMode) for details. + * @param mode the mode used to add the contact. See addContact(const TQString&,const TQString&,Group*,AddMode) for details. * * @return @c true if creation of the contact succeeded or the contact was already in the list, * @c false otherwise. */ - bool addContact( const QString &contactId, MetaContact *parent, AddMode mode = DontChangeKABC ); + bool addContact( const TQString &contactId, MetaContact *parent, AddMode mode = DontChangeKABC ); /** * @brief Indicate whether the account is connected at all. @@ -338,7 +338,7 @@ public: /** * \return @c true if the contact with ID @p contactId is in the blacklist, @c false otherwise. */ - virtual bool isBlocked( const QString &contactId ); + virtual bool isBlocked( const TQString &contactId ); protected: /** @@ -372,7 +372,7 @@ protected: * @param parentContact the metacontact to add this contact to * @return @c true if creating the contact succeeded, @c false on failure. */ - virtual bool createContact( const QString &contactId, MetaContact *parentContact ) =0; + virtual bool createContact( const TQString &contactId, MetaContact *parentContact ) =0; /** @@ -380,7 +380,7 @@ protected: * * @param label The label to set */ - void setAccountLabel( const QString &label ); + void setAccountLabel( const TQString &label ); protected slots: /** @@ -417,7 +417,7 @@ signals: * also emited when the icon change * @todo probably rename to accountIconChanged */ - void colorChanged( const QColor & ); + void colorChanged( const TQColor & ); /** * Emitted when the account is deleted. @@ -470,7 +470,7 @@ public slots: * * @todo change ; make use of setOnlineStatus */ - virtual void setAway( bool away, const QString &reason = QString::null ); + virtual void setAway( bool away, const TQString &reason = TQString::null ); /** * Reimplement this function to set the online status @@ -478,12 +478,12 @@ public slots: * @param reason is the away message to set. * @note If needed, you need to connect. if the offline status is given, you should disconnect */ - virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null ) = 0; + virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null ) = 0; /** * Display the edit account widget for the account */ - void editAccount( QWidget* parent = 0L ); + void editAccount( TQWidget* parent = 0L ); /** * Add a user to the blacklist. The default implementation calls @@ -491,7 +491,7 @@ public slots: * * @param contactId the contact to be added to the blacklist */ - virtual void block( const QString &contactId ); + virtual void block( const TQString &contactId ); /** * Remove a user from the blacklist. The default implementation calls @@ -499,7 +499,7 @@ public slots: * * @param contactId the contact to be removed from the blacklist */ - virtual void unblock( const QString &contactId ); + virtual void unblock( const TQString &contactId ); private slots: /** @@ -520,7 +520,7 @@ private slots: /** * The @ref myself() contact's property changed. */ - void slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ); + void slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ); /** * Stop the suppression of status notification (connected to a timer) @@ -539,13 +539,13 @@ public: * @todo remove * @deprecated use configGroup */ - void setPluginData( Plugin* /*plugin*/, const QString &key, const QString &value ) KDE_DEPRECATED; + void setPluginData( Plugin* /*plugin*/, const TQString &key, const TQString &value ) KDE_DEPRECATED; /** * @todo remove * @deprecated use configGroup */ - QString pluginData( Plugin* /*plugin*/, const QString &key ) const KDE_DEPRECATED; + TQString pluginData( Plugin* /*plugin*/, const TQString &key ) const KDE_DEPRECATED; }; } //END namespace Kopete diff --git a/kopete/libkopete/kopeteaccountmanager.cpp b/kopete/libkopete/kopeteaccountmanager.cpp index b00f080e..d12aa7ce 100644 --- a/kopete/libkopete/kopeteaccountmanager.cpp +++ b/kopete/libkopete/kopeteaccountmanager.cpp @@ -18,9 +18,9 @@ #include "kopeteaccountmanager.h" -#include -#include -#include +#include +#include +#include #include #include @@ -44,7 +44,7 @@ class AccountManager::Private { public: - class AccountPtrList : public QPtrList + class AccountPtrList : public TQPtrList { protected: int compareItems( AccountPtrList::Item a, AccountPtrList::Item b ) @@ -75,7 +75,7 @@ AccountManager * AccountManager::self() AccountManager::AccountManager() -: QObject( qApp, "KopeteAccountManager" ) +: TQObject( qApp, "KopeteAccountManager" ) { d = new Private; } @@ -90,7 +90,7 @@ AccountManager::~AccountManager() bool AccountManager::isAnyAccountConnected() { - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if(it.current()->isConnected()) return true; @@ -100,17 +100,17 @@ bool AccountManager::isAnyAccountConnected() void AccountManager::connectAll() { - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) if(!it.current()->excludeConnect()) it.current()->connect(); } -void AccountManager::setAvailableAll( const QString &awayReason ) +void AccountManager::setAvailableAll( const TQString &awayReason ) { Away::setGlobalAway( false ); bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( anyConnected ) { @@ -125,16 +125,16 @@ void AccountManager::setAvailableAll( const QString &awayReason ) void AccountManager::disconnectAll() { - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) it.current()->disconnect(); } -void AccountManager::setAwayAll( const QString &awayReason, bool away ) +void AccountManager::setAwayAll( const TQString &awayReason, bool away ) { Away::setGlobalAway( true ); bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { // FIXME: ICQ's invisible online should be set to invisible away Contact *self = it.current()->myself(); @@ -152,12 +152,12 @@ void AccountManager::setAwayAll( const QString &awayReason, bool away ) } } -void AccountManager::setOnlineStatus( uint category , const QString& awayMessage, uint flags ) +void AccountManager::setOnlineStatus( uint category , const TQString& awayMessage, uint flags ) { OnlineStatusManager::Categories katgor=(OnlineStatusManager::Categories)category; bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { Account *account = it.current(); Kopete::OnlineStatus status = OnlineStatusManager::self()->onlineStatus(account->protocol() , katgor); @@ -175,25 +175,25 @@ void AccountManager::setOnlineStatus( uint category , const QString& awayMessage } -QColor AccountManager::guessColor( Protocol *protocol ) const +TQColor AccountManager::guessColor( Protocol *protocol ) const { // In a perfect wold, we should check if the color is actually not used by the account. // Anyway, this is not really required, It would be a difficult job for about nothing more. // -- Olivier int protocolCount = 0; - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol()->pluginId() == protocol->pluginId() ) protocolCount++; } // let's figure a color - QColor color; + TQColor color; switch ( protocolCount % 7 ) { case 0: - color = QColor(); + color = TQColor(); break; case 1: color = Qt::red; @@ -230,7 +230,7 @@ Account* AccountManager::registerAccount( Account *account ) } // If this account already exists, do nothing - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( ( account->protocol() == it.current()->protocol() ) && ( account->accountId() == it.current()->accountId() ) ) { @@ -243,12 +243,12 @@ Account* AccountManager::registerAccount( Account *account ) d->accounts.sort(); // Connect to the account's status changed signal - connect(account->myself(), SIGNAL(onlineStatusChanged(Kopete::Contact *, + connect(account->myself(), TQT_SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &)), - this, SLOT(slotAccountOnlineStatusChanged(Kopete::Contact *, + this, TQT_SLOT(slotAccountOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &))); - connect(account, SIGNAL(accountDestroyed(const Kopete::Account *)) , this, SLOT( unregisterAccount(const Kopete::Account *) )); + connect(account, TQT_SIGNAL(accountDestroyed(const Kopete::Account *)) , this, TQT_SLOT( unregisterAccount(const Kopete::Account *) )); emit accountRegistered( account ); return account; @@ -261,15 +261,15 @@ void AccountManager::unregisterAccount( const Account *account ) emit accountUnregistered( account ); } -const QPtrList& AccountManager::accounts() const +const TQPtrList& AccountManager::accounts() const { return d->accounts; } -QDict AccountManager::accounts( const Protocol *protocol ) const +TQDict AccountManager::accounts( const Protocol *protocol ) const { - QDict dict; - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + TQDict dict; + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol() == protocol && !it.current()->accountId().isNull() ) dict.insert( it.current()->accountId(), it.current() ); @@ -278,9 +278,9 @@ QDict AccountManager::accounts( const Protocol *protocol ) const return dict; } -Account * AccountManager::findAccount( const QString &protocolId, const QString &accountId ) +Account * AccountManager::findAccount( const TQString &protocolId, const TQString &accountId ) { - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol()->pluginId() == protocolId && it.current()->accountId() == accountId ) return it.current(); @@ -299,7 +299,7 @@ void AccountManager::removeAccount( Account *account ) KConfigGroup *configgroup = account->configGroup(); // Clean up the contact list - QDictIterator it( account->contacts() ); + TQDictIterator it( account->contacts() ); for ( ; it.current(); ++it ) { Contact* c = it.current(); @@ -312,7 +312,7 @@ void AccountManager::removeAccount( Account *account ) { //get the first group and it's members Group* group = mc->groups().first(); - QPtrList groupMembers = group->members(); + TQPtrList groupMembers = group->members(); ContactList::self()->removeMetaContact( mc ); if ( groupMembers.count() == 1 && groupMembers.findRef( mc ) != -1 ) ContactList::self()->removeGroup( group ); @@ -332,7 +332,7 @@ void AccountManager::removeAccount( Account *account ) { // FIXME: pluginId() should return the internal name and not the class name, so // we can get rid of this hack - Olivier/Martijn - QString protocolName = protocol->pluginId().remove( QString::fromLatin1( "Protocol" ) ).lower(); + TQString protocolName = protocol->pluginId().remove( TQString::fromLatin1( "Protocol" ) ).lower(); PluginManager::self()->setPluginEnabled( protocolName, false ); PluginManager::self()->unloadPlugin( protocolName ); @@ -344,7 +344,7 @@ void AccountManager::save() //kdDebug( 14010 ) << k_funcinfo << endl; d->accounts.sort(); - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { KConfigBase *config = it.current()->configGroup(); @@ -357,22 +357,22 @@ void AccountManager::save() void AccountManager::load() { - connect( PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ), - this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); + connect( PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ), + this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); // Iterate over all groups that start with "Account_" as those are accounts // and load the required protocols if the account is enabled. // Don't try to optimize duplicate calls out, the plugin queue is smart enough // (and fast enough) to handle that without adding complexity here KConfig *config = KGlobal::config(); - QStringList accountGroups = config->groupList().grep( QRegExp( QString::fromLatin1( "^Account_" ) ) ); - for ( QStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) + TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::fromLatin1( "^Account_" ) ) ); + for ( TQStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) { config->setGroup( *it ); - QString protocol = config->readEntry( "Protocol" ); - if ( protocol.endsWith( QString::fromLatin1( "Protocol" ) ) ) - protocol = QString::fromLatin1( "kopete_" ) + protocol.lower().remove( QString::fromLatin1( "protocol" ) ); + TQString protocol = config->readEntry( "Protocol" ); + if ( protocol.endsWith( TQString::fromLatin1( "Protocol" ) ) ) + protocol = TQString::fromLatin1( "kopete_" ) + protocol.lower().remove( TQString::fromLatin1( "protocol" ) ); if ( config->readBoolEntry( "Enabled", true ) ) PluginManager::self()->loadPlugin( protocol, PluginManager::LoadAsync ); @@ -388,8 +388,8 @@ void AccountManager::slotPluginLoaded( Plugin *plugin ) // Iterate over all groups that start with "Account_" as those are accounts // and parse them if they are from this protocol KConfig *config = KGlobal::config(); - QStringList accountGroups = config->groupList().grep( QRegExp( QString::fromLatin1( "^Account_" ) ) ); - for ( QStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) + TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::fromLatin1( "^Account_" ) ) ); + for ( TQStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) { config->setGroup( *it ); @@ -400,7 +400,7 @@ void AccountManager::slotPluginLoaded( Plugin *plugin ) if ( !config->readBoolEntry( "Enabled", true ) ) continue; - QString accountId = config->readEntry( "AccountId" ); + TQString accountId = config->readEntry( "AccountId" ); if ( accountId.isEmpty() ) { kdWarning( 14010 ) << k_funcinfo << diff --git a/kopete/libkopete/kopeteaccountmanager.h b/kopete/libkopete/kopeteaccountmanager.h index ed0c939a..75ebf667 100644 --- a/kopete/libkopete/kopeteaccountmanager.h +++ b/kopete/libkopete/kopeteaccountmanager.h @@ -19,9 +19,9 @@ #ifndef __kopeteaccountmanager_h__ #define __kopeteaccountmanager_h__ -#include -#include -#include +#include +#include +#include #include "kopete_export.h" @@ -65,16 +65,16 @@ public: * \brief Retrieve the list of accounts * \return a list of all the accounts */ - const QPtrList & accounts() const; + const TQPtrList & accounts() const; /** - * \brief Retrieve a QDict of accounts for the given protocol + * \brief Retrieve a TQDict of accounts for the given protocol * * The list is guaranteed to contain only accounts for the specified * protocol * \param p is the Protocol object you want accounts for */ - QDict accounts( const Protocol *p ) const; + TQDict accounts( const Protocol *p ) const; /** * \brief Return the account asked @@ -82,7 +82,7 @@ public: * \param accountId is the ID for the account you want * \return the Account object found or NULL if no account was found */ - Account* findAccount( const QString &protocolId, const QString &accountId ); + Account* findAccount( const TQString &protocolId, const TQString &accountId ); /** * \brief Delete the account and clean the config data @@ -97,7 +97,7 @@ public: * Guesses a color for the next account of a given protocol based on the already registered colors * \return the color guessed for the account */ - QColor guessColor( Protocol *protocol ) const ; + TQColor guessColor( Protocol *protocol ) const ; /** * @brief Register the account. @@ -142,7 +142,7 @@ public slots: * @param flags is a bitmask of SetOnlineStatusFlag */ void setOnlineStatus( /*Kopete::OnlineStatusManager::Categories*/ uint category, - const QString& awayMessage = QString::null, uint flags=0); + const TQString& awayMessage = TQString::null, uint flags=0); /** * \brief Set all accounts to away at once. @@ -152,7 +152,7 @@ public slots: * @param awayReason is the away message that will be set. * @param away decides whether the message is away/non-away */ - void setAwayAll( const QString &awayReason = QString::null, bool away=true ); + void setAwayAll( const TQString &awayReason = TQString::null, bool away=true ); /** * \brief Connect or make available every account. @@ -162,7 +162,7 @@ public slots: * This is a slot, so you can connect directly to it from e.g. a KAction. * @param awayReason is the away(status) message that will be set. */ - void setAvailableAll( const QString &awayReason = QString::null ); + void setAvailableAll( const TQString &awayReason = TQString::null ); /** * \internal diff --git a/kopete/libkopete/kopeteaway.cpp b/kopete/libkopete/kopeteaway.cpp index fa500e0c..1c920f31 100644 --- a/kopete/libkopete/kopeteaway.cpp +++ b/kopete/libkopete/kopeteaway.cpp @@ -30,7 +30,7 @@ #include "kopeteprefs.h" #include -#include +#include #include #include @@ -59,18 +59,18 @@ struct KopeteAwayPrivate { - QString awayMessage; - QString autoAwayMessage; + TQString awayMessage; + TQString autoAwayMessage; bool useAutoAwayMessage; bool globalAway; - QStringList awayMessageList; - QTime idleTime; - QTimer *timer; + TQStringList awayMessageList; + TQTime idleTime; + TQTimer *timer; bool autoaway; bool goAvailable; int awayTimeout; bool useAutoAway; - QPtrList autoAwayAccounts; + TQPtrList autoAwayAccounts; int mouse_x; int mouse_y; @@ -87,7 +87,7 @@ struct KopeteAwayPrivate Kopete::Away *Kopete::Away::instance = 0L; -Kopete::Away::Away() : QObject( kapp , "Kopete::Away") +Kopete::Away::Away() : TQObject( kapp , "Kopete::Away") { int dummy = 0; dummy = dummy; // shut up @@ -95,8 +95,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") d = new KopeteAwayPrivate; // Set up the away messages - d->awayMessage = QString::null; - d->autoAwayMessage = QString::null; + d->awayMessage = TQString::null; + d->autoAwayMessage = TQString::null; d->useAutoAwayMessage = false; d->globalAway = false; d->autoaway = false; @@ -143,7 +143,7 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") load(); - KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(), this, SLOT( load() ) ); + KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(), this, TQT_SLOT( load() ) ); // Set up the config object KConfig *config = KGlobal::config(); /* Load the saved away messages */ @@ -156,8 +156,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") } else if(config->hasKey("Titles")) // Old config format { - QStringList titles = config->readListEntry("Titles"); // Get the titles - for(QStringList::iterator i = titles.begin(); i != titles.end(); ++i) + TQStringList titles = config->readListEntry("Titles"); // Get the titles + for(TQStringList::iterator i = titles.begin(); i != titles.end(); ++i) { d->awayMessageList.append( config->readEntry(*i) ); // And add it to the list } @@ -188,8 +188,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") } // init the timer - d->timer = new QTimer(this, "AwayTimer"); - connect(d->timer, SIGNAL(timeout()), this, SLOT(slotTimerTimeout())); + d->timer = new TQTimer(this, "AwayTimer"); + connect(d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerTimeout())); d->timer->start(4000); //init the time and other @@ -203,17 +203,17 @@ Kopete::Away::~Away() delete d; } -QString Kopete::Away::message() +TQString Kopete::Away::message() { return getInstance()->d->awayMessage; } -QString Kopete::Away::autoAwayMessage() +TQString Kopete::Away::autoAwayMessage() { return getInstance()->d->autoAwayMessage; } -void Kopete::Away::setGlobalAwayMessage(const QString &message) +void Kopete::Away::setGlobalAwayMessage(const TQString &message) { if( !message.isEmpty() ) { @@ -223,7 +223,7 @@ void Kopete::Away::setGlobalAwayMessage(const QString &message) } } -void Kopete::Away::setAutoAwayMessage(const QString &message) +void Kopete::Away::setAutoAwayMessage(const TQString &message) { if( !message.isEmpty() ) { @@ -275,17 +275,17 @@ void Kopete::Away::load() d->useAutoAwayMessage=config->readBoolEntry("UseAutoAwayMessage", false); } -QStringList Kopete::Away::getMessages() +TQStringList Kopete::Away::getMessages() { return d->awayMessageList; } -QString Kopete::Away::getMessage( uint messageNumber ) +TQString Kopete::Away::getMessage( uint messageNumber ) { - QStringList::iterator it = d->awayMessageList.at( messageNumber ); + TQStringList::iterator it = d->awayMessageList.at( messageNumber ); if( it != d->awayMessageList.end() ) { - QString str = *it; + TQString str = *it; d->awayMessageList.prepend( str ); d->awayMessageList.remove( it ); save(); @@ -293,11 +293,11 @@ QString Kopete::Away::getMessage( uint messageNumber ) } else { - return QString::null; + return TQString::null; } } -void Kopete::Away::addMessage(const QString &message) +void Kopete::Away::addMessage(const TQString &message) { d->awayMessageList.prepend( message ); if( (int)d->awayMessageList.count() > KopetePrefs::prefs()->rememberedMessages() ) @@ -496,7 +496,7 @@ void Kopete::Away::setAutoAway() // Set all accounts that are not away already to away. // We remember them so later we only set the accounts to // available that we set to away (and not the user). - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() ) { if(i->myself()->onlineStatus().status() == Kopete::OnlineStatus::Online) diff --git a/kopete/libkopete/kopeteaway.h b/kopete/libkopete/kopeteaway.h index 544dff75..b907f024 100644 --- a/kopete/libkopete/kopeteaway.h +++ b/kopete/libkopete/kopeteaway.h @@ -19,9 +19,9 @@ #ifndef KOPETEAWAY_HI #define KOPETEAWAY_HI -#include -#include -#include +#include +#include +#include #include "kopeteawaydialog.h" #include "kopete_export.h" @@ -72,13 +72,13 @@ public: * @brief Gets the current global away message * @return The global away message */ - static QString message(); + static TQString message(); /** * @brief Gets the current global auto away message * @return The global auto away message */ - static QString autoAwayMessage(); + static TQString autoAwayMessage(); /** * This method sets the global away message, @@ -86,7 +86,7 @@ public: * @brief Sets the global away message * @param message The message you want to set */ - void setGlobalAwayMessage(const QString &message); + void setGlobalAwayMessage(const TQString &message); /** * This method sets the global auto away message, @@ -94,7 +94,7 @@ public: * @brief Sets the global auto away message * @param message The message you want to set */ - void setAutoAwayMessage(const QString &message); + void setAutoAwayMessage(const TQString &message); /** * @brief Sets global away for all protocols @@ -111,11 +111,11 @@ public: * @brief Function to get the titles of user defined away messages * @return List of away message titles * - * This function can be used to retrieve a QStringList of the away message titles, - * these titles can be passed to getMessage(QString title) to retrieve the + * This function can be used to retrieve a TQStringList of the away message titles, + * these titles can be passed to getMessage(TQString title) to retrieve the * corresponding message. */ - QStringList getMessages(); + TQStringList getMessages(); /** * @brief Function to get an away message @@ -125,7 +125,7 @@ public: * This function retrieves the away message that corresponds to the ringbuffer index * passed in. */ - QString getMessage( uint messageNumber ); + TQString getMessage( uint messageNumber ); /** * @brief Adds an away message to the ringbuffer @@ -134,7 +134,7 @@ public: * This function will add an away message to the ringbuffer of user defined * away messages. */ - void addMessage(const QString &message); + void addMessage(const TQString &message); /** * time in seconds the user has been idle diff --git a/kopete/libkopete/kopeteawayaction.cpp b/kopete/libkopete/kopeteawayaction.cpp index 84622c7e..ded2a830 100644 --- a/kopete/libkopete/kopeteawayaction.cpp +++ b/kopete/libkopete/kopeteawayaction.cpp @@ -36,34 +36,34 @@ public: }; -AwayAction::AwayAction(const QString &text, const QIconSet &pix, const KShortcut &cut, - const QObject *receiver, const char *slot, QObject *parent, const char *name ) +AwayAction::AwayAction(const TQString &text, const TQIconSet &pix, const KShortcut &cut, + const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) : KSelectAction(text, pix, cut, parent, name ) , d(new Private( OnlineStatus() ) ) { - QObject::connect( Kopete::Away::getInstance(), SIGNAL( messagesChanged() ), - this, SLOT( slotAwayChanged() ) ); + TQObject::connect( Kopete::Away::getInstance(), TQT_SIGNAL( messagesChanged() ), + this, TQT_SLOT( slotAwayChanged() ) ); - QObject::connect( this, SIGNAL( awayMessageSelected( const QString & ) ), + TQObject::connect( this, TQT_SIGNAL( awayMessageSelected( const TQString & ) ), receiver, slot ); - QObject::connect( this, SIGNAL( activated( int ) ), - this, SLOT( slotSelectAway( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotSelectAway( int ) ) ); slotAwayChanged(); } -AwayAction::AwayAction( const OnlineStatus& status, const QString &text, const QIconSet &pix, const KShortcut &cut, - const QObject *receiver, const char *slot, QObject *parent, const char *name ) +AwayAction::AwayAction( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, const KShortcut &cut, + const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) : KSelectAction(text, pix, cut, parent, name ) , d(new Private( status ) ) { - QObject::connect( Kopete::Away::getInstance(), SIGNAL( messagesChanged() ), - this, SLOT( slotAwayChanged() ) ); + TQObject::connect( Kopete::Away::getInstance(), TQT_SIGNAL( messagesChanged() ), + this, TQT_SLOT( slotAwayChanged() ) ); - QObject::connect( this, SIGNAL( awayMessageSelected( const Kopete::OnlineStatus &, const QString & ) ), + TQObject::connect( this, TQT_SIGNAL( awayMessageSelected( const Kopete::OnlineStatus &, const TQString & ) ), receiver, slot ); - QObject::connect( this, SIGNAL( activated( int ) ), - this, SLOT( slotSelectAway( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotSelectAway( int ) ) ); slotAwayChanged(); } @@ -75,16 +75,16 @@ AwayAction::~AwayAction() void AwayAction::slotAwayChanged() { - QStringList awayMessages = Kopete::Away::getInstance()->getMessages(); - for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) + TQStringList awayMessages = Kopete::Away::getInstance()->getMessages(); + for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) { (*it) = KStringHandler::rsqueeze( *it ); } d->reasonCount = awayMessages.count(); - QStringList menu; + TQStringList menu; menu << i18n( "No Message" ); menu << i18n( "New Message..." ); - menu << QString::null ; //separator + menu << TQString::null ; //separator menu += awayMessages ; setItems( menu ); setCurrentItem( -1 ); @@ -96,7 +96,7 @@ void AwayAction::slotSelectAway( int index ) setCurrentItem( -1 ); Kopete::Away *mAway = Kopete::Away::getInstance(); - QString awayReason; + TQString awayReason; // Index == -1 means this is a result of Global Away all. // Use the last entered message (0) @@ -106,11 +106,11 @@ void AwayAction::slotSelectAway( int index ) switch(index) { case 0: - awayReason = QString::null; + awayReason = TQString::null; break; case 1: bool ok; - awayReason = KInputDialog::getText( i18n( "New Away Message" ), i18n( "Please enter your away reason:" ) , QString::null , &ok ); + awayReason = KInputDialog::getText( i18n( "New Away Message" ), i18n( "Please enter your away reason:" ) , TQString::null , &ok ); if(!ok) //the user canceled return; if( !awayReason.isEmpty() ) diff --git a/kopete/libkopete/kopeteawayaction.h b/kopete/libkopete/kopeteawayaction.h index f8ab9d64..c787e7e7 100644 --- a/kopete/libkopete/kopeteawayaction.h +++ b/kopete/libkopete/kopeteawayaction.h @@ -46,20 +46,20 @@ class KOPETE_EXPORT AwayAction : public KSelectAction * @p text, @p pix, @p cut, @p receiver, @p slot, @p parent and * @p name are all handled by KSelectAction. **/ - AwayAction(const QString &text, const QIconSet &pix, - const KShortcut &cut, const QObject *receiver, const char *slot, - QObject *parent, const char *name = 0); + AwayAction(const TQString &text, const TQIconSet &pix, + const KShortcut &cut, const TQObject *receiver, const char *slot, + TQObject *parent, const char *name = 0); /** * Constructor * @param status the OnlineStatus that appears in the signal - * @param slot must have the following signature: ( const OnlineStatus &, const QString & ) + * @param slot must have the following signature: ( const OnlineStatus &, const TQString & ) * @p text, @p pix, @p cut, @p receiver, @p slot, @p parent and * @p name are all handled by KSelectAction. **/ - AwayAction(const OnlineStatus &status, const QString &text, const QIconSet &pix, - const KShortcut &cut, const QObject *receiver, const char *slot, - QObject *parent, const char *name = 0); + AwayAction(const OnlineStatus &status, const TQString &text, const TQIconSet &pix, + const KShortcut &cut, const TQObject *receiver, const char *slot, + TQObject *parent, const char *name = 0); /** * Destructor. @@ -70,12 +70,12 @@ class KOPETE_EXPORT AwayAction : public KSelectAction /** * @brief Emits when the user selects an away message */ - void awayMessageSelected( const QString & ); + void awayMessageSelected( const TQString & ); /** * same as above, but with the saved status */ - void awayMessageSelected( const Kopete::OnlineStatus& , const QString & ); + void awayMessageSelected( const Kopete::OnlineStatus& , const TQString & ); private slots: void slotAwayChanged(); diff --git a/kopete/libkopete/kopeteawaydialog.cpp b/kopete/libkopete/kopeteawaydialog.cpp index 0dbb7023..19d9fb9c 100644 --- a/kopete/libkopete/kopeteawaydialog.cpp +++ b/kopete/libkopete/kopeteawaydialog.cpp @@ -33,7 +33,7 @@ public: KopeteAwayDialog_Base *base; }; -KopeteAwayDialog::KopeteAwayDialog( QWidget *parent, const char *name ) +KopeteAwayDialog::KopeteAwayDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Global Away Message" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ) { @@ -44,7 +44,7 @@ KopeteAwayDialog::KopeteAwayDialog( QWidget *parent, const char *name ) d->base = new KopeteAwayDialog_Base( this ); setMainWidget( d->base ); - QObject::connect( d->base->cmbHistory, SIGNAL( activated( int ) ), this, SLOT( slotComboBoxSelection( int ) ) ); + TQObject::connect( d->base->cmbHistory, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotComboBoxSelection( int ) ) ); awayInstance = Kopete::Away::getInstance(); mExtendedAwayType = 0; @@ -99,8 +99,8 @@ void KopeteAwayDialog::cancelAway( int /* awayType */ ) void KopeteAwayDialog::init() { - QStringList awayMessages = awayInstance->getMessages(); - for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) + TQStringList awayMessages = awayInstance->getMessages(); + for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) { *it = KStringHandler::rsqueeze( *it ); } @@ -113,7 +113,7 @@ void KopeteAwayDialog::init() d->base->txtOneShot->setCursorPosition( 0 ); } -QString KopeteAwayDialog::getSelectedAwayMessage() +TQString KopeteAwayDialog::getSelectedAwayMessage() { mLastUserAwayMessage = d->base->txtOneShot->text(); return mLastUserAwayMessage; diff --git a/kopete/libkopete/kopeteawaydialog.h b/kopete/libkopete/kopeteawaydialog.h index 313cafe2..517e419c 100644 --- a/kopete/libkopete/kopeteawaydialog.h +++ b/kopete/libkopete/kopeteawaydialog.h @@ -60,7 +60,7 @@ public: * @param parent The object that owns this * @param name Name for this object */ - KopeteAwayDialog( QWidget *parent = 0, const char *name = 0 ); + KopeteAwayDialog( TQWidget *parent = 0, const char *name = 0 ); /** * Destructor @@ -78,7 +78,7 @@ protected: * \brief Gets the last selected away message * @return An away message */ - QString getSelectedAwayMessage(); + TQString getSelectedAwayMessage(); /** * \brief Sets the user away @@ -178,13 +178,13 @@ private: * saved away message, whichever was * last chosen */ - QString mLastUserAwayMessage; + TQString mLastUserAwayMessage; /** * The last message that the user typed in the * line edit */ - QString mLastUserTypedMessage; + TQString mLastUserTypedMessage; /** * This is used to store the type of away that we're diff --git a/kopete/libkopete/kopeteblacklister.cpp b/kopete/libkopete/kopeteblacklister.cpp index 8ec5c54b..29dbf727 100644 --- a/kopete/libkopete/kopeteblacklister.cpp +++ b/kopete/libkopete/kopeteblacklister.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace Kopete { @@ -28,21 +28,21 @@ namespace Kopete class BlackLister::Private { public: - QStringList blacklist; - QString owner; - QString protocol; + TQStringList blacklist; + TQString owner; + TQString protocol; }; -BlackLister::BlackLister(const QString &protocolId, const QString &accountId, QObject *parent, const char *name) - : QObject(parent, name), d( new Private ) +BlackLister::BlackLister(const TQString &protocolId, const TQString &accountId, TQObject *parent, const char *name) + : TQObject(parent, name), d( new Private ) { KConfig *config = KGlobal::config(); d->owner = accountId; d->protocol = protocolId; config->setGroup("BlackLister"); - d->blacklist = config->readListEntry( d->protocol + QString::fromLatin1("_") + d->owner ); + d->blacklist = config->readListEntry( d->protocol + TQString::fromLatin1("_") + d->owner ); } BlackLister::~BlackLister() @@ -51,7 +51,7 @@ BlackLister::~BlackLister() } -bool BlackLister::isBlocked(const QString &contactId) +bool BlackLister::isBlocked(const TQString &contactId) { return (d->blacklist.find( contactId ) != d->blacklist.end() ); } @@ -61,7 +61,7 @@ bool BlackLister::isBlocked(Contact *contact) return isBlocked(contact->contactId()); } -void BlackLister::addContact(const QString &contactId) +void BlackLister::addContact(const TQString &contactId) { if( !isBlocked(contactId) ) { @@ -73,14 +73,14 @@ void BlackLister::addContact(const QString &contactId) void BlackLister::addContact(Contact *contact) { - QString temp = contact->contactId(); + TQString temp = contact->contactId(); addContact( temp ); } void BlackLister::removeContact(Contact *contact) { - QString temp = contact->contactId(); + TQString temp = contact->contactId(); removeContact( temp ); } @@ -90,11 +90,11 @@ void BlackLister::saveToDisk() KConfig *config = KGlobal::config(); config->setGroup("BlackLister"); - config->writeEntry( d->protocol + QString::fromLatin1("_") + d->owner, d->blacklist ); + config->writeEntry( d->protocol + TQString::fromLatin1("_") + d->owner, d->blacklist ); config->sync(); } -void BlackLister::removeContact(const QString &contactId) +void BlackLister::removeContact(const TQString &contactId) { if( isBlocked(contactId) ) { diff --git a/kopete/libkopete/kopeteblacklister.h b/kopete/libkopete/kopeteblacklister.h index ed3e5566..c2df1bca 100644 --- a/kopete/libkopete/kopeteblacklister.h +++ b/kopete/libkopete/kopeteblacklister.h @@ -16,7 +16,7 @@ #ifndef KOPETEBLACKLISTER_H #define KOPETEBLACKLISTER_H -#include +#include namespace Kopete { @@ -51,10 +51,10 @@ public: * Create an instance, and read the blacklist from disk if it exists. * @param protocolId is the ID of the protocol owning accountId * @param accountId is the ID of the owning Account. - * @param parent The QObject parent for this class. - * @param name The QObject name for this class. + * @param parent The TQObject parent for this class. + * @param name The TQObject name for this class. */ - BlackLister( const QString &protocolId, const QString &accountId, QObject *parent = 0, const char *name = 0 ); + BlackLister( const TQString &protocolId, const TQString &accountId, TQObject *parent = 0, const char *name = 0 ); ~BlackLister(); /** @@ -65,7 +65,7 @@ public: /** * \return @c true if the contact with ID @p contactId is blocked, @c false otherwise. */ - bool isBlocked( const QString &contactId ); + bool isBlocked( const TQString &contactId ); public slots: /** @@ -74,7 +74,7 @@ public slots: * This function emits the @ref contactAdded() signal. * @param contactId is the ID of the contact to be added to the list. */ - void addContact( const QString &contactId ); + void addContact( const TQString &contactId ); /** * @overload @@ -93,7 +93,7 @@ public slots: /** * @overload */ - void removeContact( const QString &contactId ); + void removeContact( const TQString &contactId ); signals: /** @@ -102,7 +102,7 @@ signals: * Connect to this signal if you want to perform additional actions, * and you prefer not to derive from this class. */ - void contactAdded( const QString &contactId ); + void contactAdded( const TQString &contactId ); /** * \brief A contact has been removed from the list @@ -110,7 +110,7 @@ signals: * Connect to this signal if you want to perform additional actions, * and you prefer not to derive from this class. */ - void contactRemoved( const QString &contactId ); + void contactRemoved( const TQString &contactId ); private: void saveToDisk(); diff --git a/kopete/libkopete/kopetechatsession.cpp b/kopete/libkopete/kopetechatsession.cpp index 9ebf1d07..91866cce 100644 --- a/kopete/libkopete/kopetechatsession.cpp +++ b/kopete/libkopete/kopetechatsession.cpp @@ -22,8 +22,8 @@ #include "kopetechatsession.h" -#include -#include +#include +#include #include #include @@ -49,14 +49,14 @@ class KMMPrivate public: Kopete::ContactPtrList mContactList; const Kopete::Contact *mUser; - QMap contactStatus; + TQMap contactStatus; Kopete::Protocol *mProtocol; bool isEmpty; bool mCanBeDeleted; unsigned int refcount; bool customDisplayName; - QDateTime awayTime; - QString displayName; + TQDateTime awayTime; + TQString displayName; KopeteView *view; bool mayInvite; Kopete::MessageHandlerChain::Ptr chains[3]; @@ -64,7 +64,7 @@ public: Kopete::ChatSession::ChatSession( const Kopete::Contact *user, Kopete::ContactPtrList others, Kopete::Protocol *protocol, const char *name ) -: QObject( user->account(), name ) +: TQObject( user->account(), name ) { d = new KMMPrivate; d->mUser = user; @@ -79,11 +79,11 @@ Kopete::ChatSession::ChatSession( const Kopete::Contact *user, for ( Kopete::Contact *c = others.first(); c; c = others.next() ) addContact( c, true ); - connect( user, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this, - SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( user, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this, + TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); if( user->metaContact() ) - connect( user->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + connect( user->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); slotUpdateDisplayName(); } @@ -111,8 +111,8 @@ void Kopete::ChatSession::setContactOnlineStatus( const Kopete::Contact *contact { Kopete::OnlineStatus oldStatus = d->contactStatus[ contact ]; d->contactStatus[ contact ] = status; - disconnect( contact, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( contact, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldStatus ); } @@ -124,7 +124,7 @@ const Kopete::OnlineStatus Kopete::ChatSession::contactOnlineStatus( const Kopet return contact->onlineStatus(); } -const QString Kopete::ChatSession::displayName() +const TQString Kopete::ChatSession::displayName() { if ( d->displayName.isNull() ) { @@ -134,7 +134,7 @@ const QString Kopete::ChatSession::displayName() return d->displayName; } -void Kopete::ChatSession::setDisplayName( const QString &newName ) +void Kopete::ChatSession::setDisplayName( const TQString &newName ) { d->displayName = newName; d->customDisplayName = true; @@ -152,17 +152,17 @@ void Kopete::ChatSession::slotUpdateDisplayName() if ( !c ) return; - d->displayName=QString::null; + d->displayName=TQString::null; do { if(! d->displayName.isNull() ) - d->displayName.append( QString::fromLatin1( ", " ) ) ; + d->displayName.append( TQString::fromLatin1( ", " ) ) ; if ( c->metaContact() ) d->displayName.append( c->metaContact()->displayName() ); else { - QString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); d->displayName.append( nick.isEmpty() ? c->contactId() : nick ); } c=d->mContactList.next(); @@ -171,7 +171,7 @@ void Kopete::ChatSession::slotUpdateDisplayName() //If we have only 1 contact, add the status of him if ( d->mContactList.count() == 1 ) { - d->displayName.append( QString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) ); + d->displayName.append( TQString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) ); } emit displayNameChanged(); @@ -248,7 +248,7 @@ void Kopete::ChatSession::sendMessage( Kopete::Message &message ) emit messageSent( sentMessage, this ); if ( !account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) { - KNotification::event(QString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); + KNotification::event(TQString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); } } else @@ -264,7 +264,7 @@ void Kopete::ChatSession::messageSucceeded() void Kopete::ChatSession::emitNudgeNotification() { - KNotification::event( QString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); + KNotification::event( TQString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); } void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) @@ -273,9 +273,9 @@ void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) if ( msg.direction() == Kopete::Message::Inbound ) { - QString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString(); if ( KopetePrefs::prefs()->highlightEnabled() && !nick.isEmpty() && - msg.plainBody().contains( QRegExp( QString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) ) + msg.plainBody().contains( TQRegExp( TQString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) ) { msg.setImportance( Kopete::Message::Highlight ); } @@ -320,18 +320,18 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) d->mContactList.remove( old ); d->mContactList.append( c ); - disconnect( old, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( old, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); if ( old->metaContact() ) { - disconnect( old->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( old->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + disconnect( old->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( old->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - disconnect( old, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); + disconnect( old, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); emit contactAdded( c, suppress ); - emit contactRemoved( old, QString::null ); + emit contactRemoved( old, TQString::null ); } else { @@ -339,24 +339,24 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) emit contactAdded( c, suppress ); } - connect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + connect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); ; if ( c->metaContact() ) { - connect( c->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - connect( c->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + connect( c->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + connect( c->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); - connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); slotUpdateDisplayName(); } d->isEmpty = false; } -void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const QString& reason, Kopete::Message::MessageFormat format, bool suppressNotification ) +void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const TQString& reason, Kopete::Message::MessageFormat format, bool suppressNotification ) { kdDebug( 14010 ) << k_funcinfo << endl; if ( !c || !d->mContactList.contains( c ) ) @@ -371,17 +371,17 @@ void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const QString { d->mContactList.remove( c ); - disconnect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); if ( c->metaContact() ) { - disconnect( c->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( c->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + disconnect( c->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( c->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); slotUpdateDisplayName(); } @@ -396,7 +396,7 @@ void Kopete::ChatSession::receivedTypingMsg( const Kopete::Contact *c, bool t ) emit remoteTyping( c, t ); } -void Kopete::ChatSession::receivedTypingMsg( const QString &contactId, bool t ) +void Kopete::ChatSession::receivedTypingMsg( const TQString &contactId, bool t ) { for ( Kopete::Contact *it = d->mContactList.first(); it; it = d->mContactList.next() ) { @@ -413,7 +413,7 @@ void Kopete::ChatSession::typing( bool t ) emit myselfTyping( t ); } -void Kopete::ChatSession::receivedEventNotification( const QString& notificationText) +void Kopete::ChatSession::receivedEventNotification( const TQString& notificationText) { emit eventNotification( notificationText ); } @@ -436,14 +436,14 @@ void Kopete::ChatSession::deref () deleteLater(); } -KopeteView* Kopete::ChatSession::view( bool canCreate, const QString &requestedPlugin ) +KopeteView* Kopete::ChatSession::view( bool canCreate, const TQString &requestedPlugin ) { if ( !d->view && canCreate ) { d->view = Kopete::ChatSessionManager::self()->createView( this, requestedPlugin ); if ( d->view ) { - connect( d->view->mainWidget(), SIGNAL( closing( KopeteView * ) ), this, SLOT( slotViewDestroyed( ) ) ); + connect( d->view->mainWidget(), TQT_SIGNAL( closing( KopeteView * ) ), this, TQT_SLOT( slotViewDestroyed( ) ) ); } else { @@ -479,7 +479,7 @@ void Kopete::ChatSession::slotContactDestroyed( Kopete::Contact *contact ) // in the best case, we should ask the protocol to recreate a temporary contact. // (remember: the contact may be deleted when the users removes it from the contactlist, or when closing kopete ) d->mContactList.remove( contact ); - emit contactRemoved( contact, QString::null ); + emit contactRemoved( contact, TQString::null ); if ( d->mContactList.isEmpty() ) deleteLater(); @@ -490,7 +490,7 @@ bool Kopete::ChatSession::mayInvite() const return d->mayInvite; } -void Kopete::ChatSession::inviteContact(const QString& ) +void Kopete::ChatSession::inviteContact(const TQString& ) { //default implementation do nothing } diff --git a/kopete/libkopete/kopetechatsession.h b/kopete/libkopete/kopetechatsession.h index 86d5fa64..928ac7d5 100644 --- a/kopete/libkopete/kopetechatsession.h +++ b/kopete/libkopete/kopetechatsession.h @@ -23,9 +23,9 @@ #ifndef __KOPETECHATSESSION_H__ #define __KOPETECHATSESSION_H__ -#include -#include -#include +#include +#include +#include #include @@ -51,8 +51,8 @@ class ChatSessionManager; class MessageHandlerChain; class TemporaryKMMCallbackAppendMessageHandler; -typedef QPtrList ContactPtrList; -typedef QValueList MessageList; +typedef TQPtrList ContactPtrList; +typedef TQValueList MessageList; /** @@ -71,7 +71,7 @@ typedef QValueList MessageList; * so plugins can add childClients of this client to add their own actions in the * chatwindow. */ -class KOPETE_EXPORT ChatSession : public QObject , public KXMLGUIClient +class KOPETE_EXPORT ChatSession : public TQObject , public KXMLGUIClient { // friend class so the object factory can access the protected constructor friend class ChatSessionManager; @@ -114,14 +114,14 @@ public: * * Used for named chats */ - const QString displayName(); + const TQString displayName(); /** * @brief change the displayname * * change the display name of the chat */ - void setDisplayName( const QString &displayName ); + void setDisplayName( const TQString &displayName ); /** * @brief set a specified KOS for specified contact in this KMM @@ -148,7 +148,7 @@ public: * @param requestedPlugin Specifies the view plugin to use if we have to create one. */ // FIXME: canCreate should definitely be an enum and not a bool - Martijn - KopeteView* view( bool canCreate = false, const QString &requestedPlugin = QString::null ); + KopeteView* view( bool canCreate = false, const TQString &requestedPlugin = TQString::null ); /** * says if you may invite contact from the same account to this chat with @ref inviteContact @@ -166,7 +166,7 @@ public: * * the default implementaiton do nothing */ - virtual void inviteContact(const QString &contactId); + virtual void inviteContact(const TQString &contactId); /** * Returns the message handler chain for the message direction @p dir. @@ -216,7 +216,7 @@ signals: /** * @brief a contact is no longer in this chat */ - void contactRemoved( const Kopete::Contact *contact, const QString &reason, Kopete::Message::MessageFormat format = Message::PlainText, bool contactRemoved = false ); + void contactRemoved( const Kopete::Contact *contact, const TQString &reason, Kopete::Message::MessageFormat format = Message::PlainText, bool contactRemoved = false ); /** * @brief a contact in this chat has changed his status @@ -248,7 +248,7 @@ signals: * Signals that a an event has to be displayed in the statusbar. * The chatwindow connects to this signal to update the statusbar. */ - void eventNotification( const QString& notificationText); + void eventNotification( const TQString& notificationText); /** * @brief A contact within the chat session changed his photo. @@ -264,17 +264,17 @@ public slots: /** * Got a typing notification from a user. This is a convenience version - * of the above method that takes a QString contactId instead of a full + * of the above method that takes a TQString contactId instead of a full * Kopete::Contact */ - void receivedTypingMsg( const QString &contactId, bool isTyping = true ); + void receivedTypingMsg( const TQString &contactId, bool isTyping = true ); /** * @brief Got an event notification from a user. * It will emit the signal eventNotification(). Use this slot in your protocols * and plugins to change chatwindow statusBar text. */ - void receivedEventNotification( const QString& notificationText ); + void receivedEventNotification( const TQString& notificationText ); /** * Show a message to the chatwindow, or append it to the queue. @@ -310,7 +310,7 @@ public slots: * @param format The format of the message * @param suppressNotification prevents a notification of the removal in the chat view. See note in @ref addContact */ - void removeContact( const Kopete::Contact *contact, const QString& reason = QString::null, Kopete::Message::MessageFormat format = Message::PlainText, bool suppressNotification = false ); + void removeContact( const Kopete::Contact *contact, const TQString& reason = TQString::null, Kopete::Message::MessageFormat format = Message::PlainText, bool suppressNotification = false ); /** * Set if the KMM will be deleted when the chatwindow is deleted. It is useful if you want diff --git a/kopete/libkopete/kopetechatsessionmanager.cpp b/kopete/libkopete/kopetechatsessionmanager.cpp index 9b7dd489..4805927b 100644 --- a/kopete/libkopete/kopetechatsessionmanager.cpp +++ b/kopete/libkopete/kopetechatsessionmanager.cpp @@ -29,7 +29,7 @@ namespace Kopete { class ChatSessionManager::Private { public: - QValueList sessions; + TQValueList sessions; // UI::ChatView *activeView; }; @@ -43,9 +43,9 @@ ChatSessionManager* ChatSessionManager::self() return s_self; } -ChatSessionManager::ChatSessionManager( QObject* parent, +ChatSessionManager::ChatSessionManager( TQObject* parent, const char* name ) - : QObject( parent, name ) + : TQObject( parent, name ) { d=new Private; s_self = this; @@ -54,7 +54,7 @@ ChatSessionManager::ChatSessionManager( QObject* parent, ChatSessionManager::~ChatSessionManager() { s_self = 0L; - QValueListIterator it; + TQValueListIterator it; for ( it=d->sessions.begin() ; it!=d->sessions.end() ; ++it ) { kdDebug( 14010 ) << k_funcinfo << "Unloading KMM: Why this KMM isn't yet unloaded?" << endl; @@ -67,13 +67,13 @@ ChatSession* ChatSessionManager::findChatSession(const Contact *user, ContactPtrList chatContacts, Protocol *protocol) { ChatSession *result = 0L; - QValueList::Iterator it; + TQValueList::Iterator it; for ( it= d->sessions.begin(); it!=d->sessions.end() && !result ; ++it ) { ChatSession* cs=(*it); if ( cs->protocol() == protocol && user == cs->myself() ) { - QPtrList contactlist = cs->members(); + TQPtrList contactlist = cs->members(); // set this to false if chatContacts doesn't contain current cs's contactlist bool halfMatch = true; @@ -128,15 +128,15 @@ void ChatSessionManager::registerChatSession(ChatSession * result) * There's no need for a slot here... just add a public remove() * method and call from KMM's destructor */ - connect( result, SIGNAL( messageAppended( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToDisplay( Kopete::Message & ) ) ); - connect( result, SIGNAL( messageSent( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToSend(Kopete::Message & ) ) ); - connect( result, SIGNAL( messageReceived( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToReceive(Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageAppended( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageSent( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToSend(Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageReceived( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToReceive(Kopete::Message & ) ) ); - connect( result, SIGNAL(messageAppended( Kopete::Message &, Kopete::ChatSession *) ), - SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ) ); + connect( result, TQT_SIGNAL(messageAppended( Kopete::Message &, Kopete::ChatSession *) ), + TQT_SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ) ); emit chatSessionCreated(result); } @@ -148,12 +148,12 @@ void ChatSessionManager::removeSession( ChatSession *session) d->sessions.remove( session ); } -QValueList ChatSessionManager::sessions( ) +TQValueList ChatSessionManager::sessions( ) { return d->sessions; } -KopeteView * ChatSessionManager::createView( ChatSession *kmm , const QString &requestedPlugin ) +KopeteView * ChatSessionManager::createView( ChatSession *kmm , const TQString &requestedPlugin ) { KopeteView *newView = KopeteViewManager::viewManager()->view(kmm,requestedPlugin); if(!newView) @@ -162,17 +162,17 @@ KopeteView * ChatSessionManager::createView( ChatSession *kmm , const QString &r return 0L; } - QObject *viewObject = dynamic_cast(newView); + TQObject *viewObject = dynamic_cast(newView); if(viewObject) { - connect(viewObject, SIGNAL(activated(KopeteView *)), - this, SIGNAL(viewActivated(KopeteView *))); - connect(viewObject, SIGNAL(closing(KopeteView *)), - this, SIGNAL(viewClosing(KopeteView *))); + connect(viewObject, TQT_SIGNAL(activated(KopeteView *)), + this, TQT_SIGNAL(viewActivated(KopeteView *))); + connect(viewObject, TQT_SIGNAL(closing(KopeteView *)), + this, TQT_SIGNAL(viewClosing(KopeteView *))); } else { - kdWarning(14010) << "Failed to cast view to QObject *" << endl; + kdWarning(14010) << "Failed to cast view to TQObject *" << endl; } emit viewCreated( newView ) ; diff --git a/kopete/libkopete/kopetechatsessionmanager.h b/kopete/libkopete/kopetechatsessionmanager.h index e41eb14d..efabd604 100644 --- a/kopete/libkopete/kopetechatsessionmanager.h +++ b/kopete/libkopete/kopetechatsessionmanager.h @@ -18,10 +18,10 @@ #ifndef KOPETEMESSAGEMANAGERFACTORY_H #define KOPETEMESSAGEMANAGERFACTORY_H -#include -#include -#include -#include +#include +#include +#include +#include #include "kopetechatsession.h" #include "kopetemessage.h" @@ -37,8 +37,8 @@ class Contact; class Protocol; class MessageEvent; -typedef QPtrList ContactPtrList; -typedef QValueList MessageList; +typedef TQPtrList ContactPtrList; +typedef TQValueList MessageList; /** * @author Duncan Mac-Vicar Prett @@ -85,7 +85,7 @@ public: /** * Get a list of all open sessions. */ - QValueList sessions(); + TQValueList sessions(); /** * @internal @@ -97,7 +97,7 @@ public: * create a new view for the manager. * only the manager should call this function */ - KopeteView *createView( Kopete::ChatSession * , const QString &requestedPlugin = QString::null ); + KopeteView *createView( Kopete::ChatSession * , const TQString &requestedPlugin = TQString::null ); /** * Post a new event. this will emit the @ref newEvent signal @@ -175,7 +175,7 @@ public slots: void slotReadMessage(); private: - ChatSessionManager( QObject* parent = 0, const char* name = 0 ); + ChatSessionManager( TQObject* parent = 0, const char* name = 0 ); class Private; Private *d; diff --git a/kopete/libkopete/kopetecommandhandler.cpp b/kopete/libkopete/kopetecommandhandler.cpp index b761ec08..cd4dcd8c 100644 --- a/kopete/libkopete/kopetecommandhandler.cpp +++ b/kopete/libkopete/kopetecommandhandler.cpp @@ -15,14 +15,14 @@ */ #include -#include +#include #include #include #include #include #include #include -#include +#include #include "kopetechatsessionmanager.h" #include "kopeteprotocol.h" @@ -36,36 +36,36 @@ using Kopete::CommandList; -typedef QMap PluginCommandMap; -typedef QMap CommandMap; +typedef TQMap PluginCommandMap; +typedef TQMap CommandMap; typedef QPair ManagerPair; -class KopeteCommandGUIClient : public QObject, public KXMLGUIClient +class KopeteCommandGUIClient : public TQObject, public KXMLGUIClient { public: - KopeteCommandGUIClient( Kopete::ChatSession *manager ) : QObject(manager), KXMLGUIClient(manager) + KopeteCommandGUIClient( Kopete::ChatSession *manager ) : TQObject(manager), KXMLGUIClient(manager) { - setXMLFile( QString::fromLatin1("kopetecommandui.rc") ); + setXMLFile( TQString::fromLatin1("kopetecommandui.rc") ); - QDomDocument doc = domDocument(); - QDomNode menu = doc.documentElement().firstChild().firstChild().firstChild(); + TQDomDocument doc = domDocument(); + TQDomNode menu = doc.documentElement().firstChild().firstChild().firstChild(); CommandList mCommands = Kopete::CommandHandler::commandHandler()->commands( manager->protocol() ); - for( QDictIterator it( mCommands ); it.current(); ++it ) + for( TQDictIterator it( mCommands ); it.current(); ++it ) { KAction *a = static_cast( it.current() ); actionCollection()->insert( a ); - QDomElement newNode = doc.createElement( QString::fromLatin1("Action") ); - newNode.setAttribute( QString::fromLatin1("name"), - QString::fromLatin1( a->name() ) ); + TQDomElement newNode = doc.createElement( TQString::fromLatin1("Action") ); + newNode.setAttribute( TQString::fromLatin1("name"), + TQString::fromLatin1( a->name() ) ); bool added = false; - for( QDomElement n = menu.firstChild().toElement(); + for( TQDomElement n = menu.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if( QString::fromLatin1(a->name()) < n.attribute(QString::fromLatin1("name"))) + if( TQString::fromLatin1(a->name()) < n.attribute(TQString::fromLatin1("name"))) { menu.insertBefore( newNode, n ); added = true; @@ -87,14 +87,14 @@ struct CommandHandlerPrivate { PluginCommandMap pluginCommands; Kopete::CommandHandler *s_handler; - QMap processMap; + TQMap processMap; bool inCommand; - QPtrList m_commands; + TQPtrList m_commands; }; CommandHandlerPrivate *Kopete::CommandHandler::p = 0L; -Kopete::CommandHandler::CommandHandler() : QObject( qApp ) +Kopete::CommandHandler::CommandHandler() : TQObject( qApp ) { p->s_handler = this; p->inCommand = false; @@ -103,41 +103,41 @@ Kopete::CommandHandler::CommandHandler() : QObject( qApp ) mCommands.setAutoDelete( true ); p->pluginCommands.insert( this, mCommands ); - registerCommand( this, QString::fromLatin1("help"), SLOT( slotHelpCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("help"), TQT_SLOT( slotHelpCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /help [] - Used to list available commands, or show help for a specified command." ), 0, 1 ); - registerCommand( this, QString::fromLatin1("close"), SLOT( slotCloseCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("close"), TQT_SLOT( slotCloseCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /close - Closes the current view." ) ); // FIXME: What's the difference with /close? The help doesn't explain it - Martijn - registerCommand( this, QString::fromLatin1("part"), SLOT( slotPartCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("part"), TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /part - Closes the current view." ) ); - registerCommand( this, QString::fromLatin1("clear"), SLOT( slotClearCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("clear"), TQT_SLOT( slotClearCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /clear - Clears the active view's chat buffer." ) ); - //registerCommand( this, QString::fromLatin1("me"), SLOT( slotMeCommand( const QString &, Kopete::ChatSession * ) ), + //registerCommand( this, TQString::fromLatin1("me"), TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession * ) ), // i18n( "USAGE: /me - Formats message as in ' went to the store'." ) ); - registerCommand( this, QString::fromLatin1("away"), SLOT( slotAwayCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("away"), TQT_SLOT( slotAwayCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /away [] - Marks you as away/back for the current account only." ) ); - registerCommand( this, QString::fromLatin1("awayall"), SLOT( slotAwayAllCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("awayall"), TQT_SLOT( slotAwayAllCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /awayall [] - Marks you as away/back for all accounts." ) ); - registerCommand( this, QString::fromLatin1("say"), SLOT( slotSayCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("say"), TQT_SLOT( slotSayCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /say - Say text in this chat. This is the same as just typing a message, but is very " "useful for scripts." ), 1 ); - registerCommand( this, QString::fromLatin1("exec"), SLOT( slotExecCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("exec"), TQT_SLOT( slotExecCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /exec [-o] - Executes the specified command and displays the output in the chat buffer. " "If -o is specified, the output is sent to all members of the chat."), 1 ); - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin*) ), - this, SLOT(slotPluginLoaded(Kopete::Plugin*) ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin*) ), + this, TQT_SLOT(slotPluginLoaded(Kopete::Plugin*) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( viewCreated( KopeteView * ) ), - this, SLOT( slotViewCreated( KopeteView* ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( viewCreated( KopeteView * ) ), + this, TQT_SLOT( slotViewCreated( KopeteView* ) ) ); } Kopete::CommandHandler::~CommandHandler() @@ -156,45 +156,45 @@ Kopete::CommandHandler *Kopete::CommandHandler::commandHandler() return p->s_handler; } -void Kopete::CommandHandler::registerCommand( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help, uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +void Kopete::CommandHandler::registerCommand( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help, uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) { - QString lowerCommand = command.lower(); + TQString lowerCommand = command.lower(); Kopete::Command *mCommand = new Kopete::Command( parent, lowerCommand, handlerSlot, help, - Normal, QString::null, minArgs, maxArgs, cut, pix); + Normal, TQString::null, minArgs, maxArgs, cut, pix); p->pluginCommands[ parent ].insert( lowerCommand, mCommand ); } -void Kopete::CommandHandler::unregisterCommand( QObject *parent, const QString &command ) +void Kopete::CommandHandler::unregisterCommand( TQObject *parent, const TQString &command ) { if( p->pluginCommands[ parent ].find(command) ) p->pluginCommands[ parent ].remove( command ); } -void Kopete::CommandHandler::registerAlias( QObject *parent, const QString &alias, const QString &formatString, - const QString &help, CommandType type, uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +void Kopete::CommandHandler::registerAlias( TQObject *parent, const TQString &alias, const TQString &formatString, + const TQString &help, CommandType type, uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) { - QString lowerAlias = alias.lower(); + TQString lowerAlias = alias.lower(); Kopete::Command *mCommand = new Kopete::Command( parent, lowerAlias, 0L, help, type, formatString, minArgs, maxArgs, cut, pix ); p->pluginCommands[ parent ].insert( lowerAlias, mCommand ); } -void Kopete::CommandHandler::unregisterAlias( QObject *parent, const QString &alias ) +void Kopete::CommandHandler::unregisterAlias( TQObject *parent, const TQString &alias ) { if( p->pluginCommands[ parent ].find(alias) ) p->pluginCommands[ parent ].remove( alias ); } -bool Kopete::CommandHandler::processMessage( const QString &msg, Kopete::ChatSession *manager ) +bool Kopete::CommandHandler::processMessage( const TQString &msg, Kopete::ChatSession *manager ) { if( p->inCommand ) return false; - QRegExp splitRx( QString::fromLatin1("^/([\\S]+)(.*)") ); - QString command; - QString args; + TQRegExp splitRx( TQString::fromLatin1("^/([\\S]+)(.*)") ); + TQString command; + TQString args; if(splitRx.search(msg) != -1) { command = splitRx.cap(1); @@ -222,21 +222,21 @@ bool Kopete::CommandHandler::processMessage( const QString &msg, Kopete::ChatSes bool Kopete::CommandHandler::processMessage( Kopete::Message &msg, Kopete::ChatSession *manager ) { - QString messageBody = msg.plainBody(); + TQString messageBody = msg.plainBody(); return processMessage( messageBody, manager ); } -void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotHelpCommand( const TQString &args, Kopete::ChatSession *manager ) { - QString output; + TQString output; if( args.isEmpty() ) { int commandCount = 0; output = i18n( "Available Commands:\n" ); CommandList mCommands = commands( manager->myself()->protocol() ); - QDictIterator it( mCommands ); + TQDictIterator it( mCommands ); for( ; it.current(); ++it ) { output.append( it.current()->command().upper() + '\t' ); @@ -250,7 +250,7 @@ void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatS } else { - QString command = parseArguments( args ).front().lower(); + TQString command = parseArguments( args ).front().lower(); Kopete::Command *c = commands( manager->myself()->protocol() )[ command ]; if( c && !c->help().isNull() ) output = c->help(); @@ -262,7 +262,7 @@ void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatS manager->appendMessage(msg); } -void Kopete::CommandHandler::slotSayCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotSayCommand( const TQString &args, Kopete::ChatSession *manager ) { //Just say whatever is passed Kopete::Message msg(manager->myself(), manager->members(), args, @@ -270,23 +270,23 @@ void Kopete::CommandHandler::slotSayCommand( const QString &args, Kopete::ChatSe manager->sendMessage(msg); } -void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotExecCommand( const TQString &args, Kopete::ChatSession *manager ) { if( !args.isEmpty() ) { KProcess *proc = 0L; - if ( kapp->authorize( QString::fromLatin1( "shell_access" ) ) ) + if ( kapp->authorize( TQString::fromLatin1( "shell_access" ) ) ) proc = new KProcess(manager); if( proc ) { - *proc << QString::fromLatin1("sh") << QString::fromLatin1("-c"); + *proc << TQString::fromLatin1("sh") << TQString::fromLatin1("-c"); - QStringList argsList = parseArguments( args ); - if( argsList.front() == QString::fromLatin1("-o") ) + TQStringList argsList = parseArguments( args ); + if( argsList.front() == TQString::fromLatin1("-o") ) { p->processMap.insert( proc, ManagerPair(manager, Kopete::Message::Outbound) ); - *proc << args.section(QRegExp(QString::fromLatin1("\\s+")), 1); + *proc << args.section(TQRegExp(TQString::fromLatin1("\\s+")), 1); } else { @@ -294,8 +294,8 @@ void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatS *proc << args; } - connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotExecReturnedData(KProcess *, char *, int))); - connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotExecReturnedData(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotExecReturnedData(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotExecReturnedData(KProcess *, char *, int))); proc->start( KProcess::NotifyOnExit, KProcess::AllOutput ); } else @@ -308,19 +308,19 @@ void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatS } } -void Kopete::CommandHandler::slotClearCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotClearCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->clear(); } -void Kopete::CommandHandler::slotPartCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotPartCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->closeView(); } -void Kopete::CommandHandler::slotAwayCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotAwayCommand( const TQString &args, Kopete::ChatSession *manager ) { bool goAway = !manager->account()->isAway(); @@ -330,7 +330,7 @@ void Kopete::CommandHandler::slotAwayCommand( const QString &args, Kopete::ChatS manager->account()->setAway( goAway, args ); } -void Kopete::CommandHandler::slotAwayAllCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotAwayAllCommand( const TQString &args, Kopete::ChatSession *manager ) { if( manager->account()->isAway() ) Kopete::AccountManager::self()->setAvailableAll(); @@ -344,7 +344,7 @@ void Kopete::CommandHandler::slotAwayAllCommand( const QString &args, Kopete::Ch } } -void Kopete::CommandHandler::slotCloseCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotCloseCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->closeView(); @@ -353,7 +353,7 @@ void Kopete::CommandHandler::slotCloseCommand( const QString &, Kopete::ChatSess void Kopete::CommandHandler::slotExecReturnedData(KProcess *proc, char *buff, int bufflen ) { kdDebug(14010) << k_funcinfo << endl; - QString buffer = QString::fromLocal8Bit( buff, bufflen ); + TQString buffer = TQString::fromLocal8Bit( buff, bufflen ); ManagerPair mgrPair = p->processMap[ proc ]; Kopete::Message msg( mgrPair.first->myself(), mgrPair.first->members(), buffer, mgrPair.second, Kopete::Message::PlainText ); if( mgrPair.second == Kopete::Message::Outbound ) @@ -368,10 +368,10 @@ void Kopete::CommandHandler::slotExecFinished(KProcess *proc) p->processMap.remove( proc ); } -QStringList Kopete::CommandHandler::parseArguments( const QString &args ) +TQStringList Kopete::CommandHandler::parseArguments( const TQString &args ) { - QStringList arguments; - QRegExp quotedArgs( QString::fromLatin1("\"(.*)\"") ); + TQStringList arguments; + TQRegExp quotedArgs( TQString::fromLatin1("\"(.*)\"") ); quotedArgs.setMinimal( true ); if ( quotedArgs.search( args ) != -1 ) @@ -380,14 +380,14 @@ QStringList Kopete::CommandHandler::parseArguments( const QString &args ) arguments.append( quotedArgs.cap(i) ); } - QStringList otherArgs = QStringList::split( QRegExp(QString::fromLatin1("\\s+")), args.section( quotedArgs, 0 ) ); - for( QStringList::Iterator it = otherArgs.begin(); it != otherArgs.end(); ++it ) + TQStringList otherArgs = TQStringList::split( TQRegExp(TQString::fromLatin1("\\s+")), args.section( quotedArgs, 0 ) ); + for( TQStringList::Iterator it = otherArgs.begin(); it != otherArgs.end(); ++it ) arguments.append( *it ); return arguments; } -bool Kopete::CommandHandler::commandHandled( const QString &command ) +bool Kopete::CommandHandler::commandHandled( const TQString &command ) { for( PluginCommandMap::Iterator it = p->pluginCommands.begin(); it != p->pluginCommands.end(); ++it ) { @@ -398,7 +398,7 @@ bool Kopete::CommandHandler::commandHandled( const QString &command ) return false; } -bool Kopete::CommandHandler::commandHandledByProtocol( const QString &command, Kopete::Protocol *protocol ) +bool Kopete::CommandHandler::commandHandledByProtocol( const TQString &command, Kopete::Protocol *protocol ) { // Make sure the protocol is not NULL if(!protocol) @@ -406,7 +406,7 @@ bool Kopete::CommandHandler::commandHandledByProtocol( const QString &command, K // Fetch the commands for the protocol CommandList commandList = commands( protocol ); - QDictIterator it ( commandList ); + TQDictIterator it ( commandList ); // Loop through commands and check if they match the supplied command for( ; it.current(); ++it ) @@ -453,7 +453,7 @@ CommandList Kopete::CommandHandler::commands( Kopete::Protocol *protocol ) void Kopete::CommandHandler::addCommands( CommandList &from, CommandList &to, CommandType type ) { - QDictIterator itDict( from ); + TQDictIterator itDict( from ); for( ; itDict.current(); ++itDict ) { if( !to[ itDict.currentKey() ] && @@ -469,17 +469,17 @@ void Kopete::CommandHandler::slotViewCreated( KopeteView *view ) void Kopete::CommandHandler::slotPluginLoaded( Kopete::Plugin *plugin ) { - connect( plugin, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotPluginDestroyed( QObject * ) ) ); + connect( plugin, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotPluginDestroyed( TQObject * ) ) ); if( !p->pluginCommands.contains( plugin ) ) { - //Create a QDict optomized for a larger # of commands, and case insensitive + //Create a TQDict optomized for a larger # of commands, and case insensitive CommandList mCommands(31, false); mCommands.setAutoDelete( true ); p->pluginCommands.insert( plugin, mCommands ); } } -void Kopete::CommandHandler::slotPluginDestroyed( QObject *plugin ) +void Kopete::CommandHandler::slotPluginDestroyed( TQObject *plugin ) { p->pluginCommands.remove( static_cast(plugin) ); } diff --git a/kopete/libkopete/kopetecommandhandler.h b/kopete/libkopete/kopetecommandhandler.h index f763ace6..9632f872 100644 --- a/kopete/libkopete/kopetecommandhandler.h +++ b/kopete/libkopete/kopetecommandhandler.h @@ -17,7 +17,7 @@ #ifndef _KOPETECOMMANDHANDLER_H_ #define _KOPETECOMMANDHANDLER_H_ -#include +#include #include #include "kopetemessage.h" @@ -38,7 +38,7 @@ class Plugin; class Protocol; class Command; -typedef QDict CommandList; +typedef TQDict CommandList; /** * @author Jason Keirstead @@ -76,7 +76,7 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param parent The plugin who owns this command * @param command The command we want to handle, not including the '/' * @param handlerSlot The slot used to handle the command. This slot must - * accept two parameters, a QString of arguments, and a Kopete::ChatSession + * accept two parameters, a TQString of arguments, and a Kopete::ChatSession * pointer to the manager under which the command was sent. * @param help An optional help string to be shown when the user uses * /help \ @@ -85,9 +85,9 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param cut a default keyboard shortcut * @param pix icon name, the icon will be shown in menus */ - void registerCommand( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help = QString::null, uint minArgs = 0, int maxArgs = -1, - const KShortcut &cut = 0, const QString &pix = QString::null ); + void registerCommand( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help = TQString::null, uint minArgs = 0, int maxArgs = -1, + const KShortcut &cut = 0, const TQString &pix = TQString::null ); /** * \brief Register a command alias. @@ -106,15 +106,15 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param cut a default keyboard shortcut * @param pix icon name, the icon will be shown in menus */ - void registerAlias( QObject *parent, - const QString &alias, - const QString &formatString, - const QString &help = QString::null, + void registerAlias( TQObject *parent, + const TQString &alias, + const TQString &formatString, + const TQString &help = TQString::null, CommandType = SystemAlias, uint minArgs = 0, int maxArgs = -1, const KShortcut &cut = 0, - const QString &pix = QString::null ); + const TQString &pix = TQString::null ); /** * \brief Unregister a command. @@ -126,16 +126,16 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param parent The plugin who owns this command * @param command The command to unload */ - void unregisterCommand( QObject *parent, const QString &command ); + void unregisterCommand( TQObject *parent, const TQString &command ); /** * \brief Unregister an alias. * - * \see unregisterCommand( QObject *parent, const QString &command ) + * \see unregisterCommand( TQObject *parent, const TQString &command ) * @param parent The plugin who owns this alias * @param alias The alais to unload */ - void unregisterAlias( QObject *parent, const QString &alias ); + void unregisterAlias( TQObject *parent, const TQString &alias ); /** * \brief Process a message to see if any commands should be handled @@ -150,17 +150,17 @@ class KOPETE_EXPORT CommandHandler : public QObject * \brief Process a message to see if any commands should be handled * * \see processMessage( Kopete::Message &msg, Kopete::ChatSession *manager) - * \param msg A QString contain the message + * \param msg A TQString contain the message * \param manager the Kopete::ChatSession who will own the message * \return true if the command was handled, false if the command was not handled. */ - bool processMessage( const QString &msg, ChatSession *manager ); + bool processMessage( const TQString &msg, ChatSession *manager ); /** - * Parses a string of command arguments into a QStringList. Quoted + * Parses a string of command arguments into a TQStringList. Quoted * blocks within the arguments string are treated as one argument. */ - static QStringList parseArguments( const QString &args ); + static TQStringList parseArguments( const TQString &args ); /** * \brief Check if a command is already handled @@ -168,7 +168,7 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param command The command to check * @return True if the command is already being handled, False if not */ - bool commandHandled( const QString &command ); + bool commandHandled( const TQString &command ); /** * \brief Check if a command is already handled by a spesific protocol @@ -177,24 +177,24 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param protocol The protocol to check * @return True if the command is already being handled, False if not */ - bool commandHandledByProtocol( const QString &command, Protocol *protocol); + bool commandHandledByProtocol( const TQString &command, Protocol *protocol); private slots: void slotPluginLoaded( Kopete::Plugin * ); - void slotPluginDestroyed( QObject * ); + void slotPluginDestroyed( TQObject * ); void slotExecReturnedData(KProcess *proc, char *buff, int bufflen ); void slotExecFinished(KProcess *proc); void slotViewCreated( KopeteView *view ); - void slotHelpCommand( const QString & args, Kopete::ChatSession *manager ); - void slotClearCommand( const QString & args, Kopete::ChatSession *manager ); - void slotPartCommand( const QString & args, Kopete::ChatSession *manager ); - void slotCloseCommand( const QString & args, Kopete::ChatSession *manager ); - //void slotMeCommand( const QString & args, Kopete::ChatSession *manager ); - void slotExecCommand( const QString & args, Kopete::ChatSession *manager ); - void slotAwayCommand( const QString & args, Kopete::ChatSession *manager ); - void slotAwayAllCommand( const QString & args, Kopete::ChatSession *manager ); - void slotSayCommand( const QString & args, Kopete::ChatSession *manager ); + void slotHelpCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotClearCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotPartCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotCloseCommand( const TQString & args, Kopete::ChatSession *manager ); + //void slotMeCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotExecCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotAwayCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotAwayAllCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotSayCommand( const TQString & args, Kopete::ChatSession *manager ); private: /** diff --git a/kopete/libkopete/kopetecontact.cpp b/kopete/libkopete/kopetecontact.cpp index 15cb27df..546958ef 100644 --- a/kopete/libkopete/kopetecontact.cpp +++ b/kopete/libkopete/kopetecontact.cpp @@ -19,7 +19,7 @@ #include "kopetecontact.h" -#include +#include #include @@ -47,14 +47,14 @@ #include "kopeteemoticons.h" //For the moving to another metacontact dialog -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include namespace Kopete { @@ -68,19 +68,19 @@ public: MetaContact *metaContact; - QString contactId; - QString icon; + TQString contactId; + TQString icon; - QTime idleTimer; + TQTime idleTimer; unsigned long int idleTime; Kopete::ContactProperty::Map properties; }; -Contact::Contact( Account *account, const QString &contactId, - MetaContact *parent, const QString &icon ) - : QObject( parent ) +Contact::Contact( Account *account, const TQString &contactId, + MetaContact *parent, const TQString &icon ) + : TQObject( parent ) { d = new Private; @@ -98,7 +98,7 @@ Contact::Contact( Account *account, const QString &contactId, if ( account ) { account->registerContact( this ); - connect( account, SIGNAL( isConnectedChanged() ), SLOT( slotAccountIsConnectedChanged() ) ); + connect( account, TQT_SIGNAL( isConnectedChanged() ), TQT_SLOT( slotAccountIsConnectedChanged() ) ); } // Need to check this because myself() may have no parent @@ -106,8 +106,8 @@ Contact::Contact( Account *account, const QString &contactId, // (ex: for unit tests or chat window style preview) if( parent && protocol() ) { - connect( parent, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + connect( parent, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); parent->addContact( this ); } @@ -146,7 +146,7 @@ void Contact::setOnlineStatus( const OnlineStatus &status ) if( oldStatus.status() == OnlineStatus::Offline && status.status() != OnlineStatus::Offline ) { - setProperty( globalProps->onlineSince(), QDateTime::currentDateTime() ); + setProperty( globalProps->onlineSince(), TQDateTime::currentDateTime() ); /*kdDebug(14010) << k_funcinfo << "REMOVING lastSeen property for " << d->displayName << endl;*/ removeProperty( globalProps->lastSeen() ); @@ -158,7 +158,7 @@ void Contact::setOnlineStatus( const OnlineStatus &status ) removeProperty( globalProps->onlineSince() ); /*kdDebug(14010) << k_funcinfo << "SETTING lastSeen property for " << d->displayName << endl;*/ - setProperty( globalProps->lastSeen(), QDateTime::currentDateTime() ); + setProperty( globalProps->lastSeen(), TQDateTime::currentDateTime() ); } if ( this == account()->myself() || account()->isConnected() ) @@ -177,7 +177,7 @@ void Contact::slotAccountIsConnectedChanged() } -void Contact::sendFile( const KURL &, const QString &, uint ) +void Contact::sendFile( const KURL &, const TQString &, uint ) { kdWarning( 14010 ) << k_funcinfo << "Plugin " << protocol()->pluginId() << " has enabled file sending, " @@ -199,18 +199,18 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) KPopupMenu *menu = new KPopupMenu(); // insert title - QString titleText; - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString titleText; + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nick.isEmpty() ) - titleText = QString::fromLatin1( "%1 (%2)" ).arg( contactId(), onlineStatus().description() ); + titleText = TQString::fromLatin1( "%1 (%2)" ).arg( contactId(), onlineStatus().description() ); else - titleText = QString::fromLatin1( "%1 <%2> (%3)" ).arg( nick, contactId(), onlineStatus().description() ); + titleText = TQString::fromLatin1( "%1 <%2> (%3)" ).arg( nick, contactId(), onlineStatus().description() ); menu->insertTitle( titleText ); if( metaContact() && metaContact()->isTemporary() && contactId() != account()->myself()->contactId() ) { - KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), QString::fromLatin1( "add_user" ), - 0, this, SLOT( slotAddContact() ), menu, "actionAddContact" ); + KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::fromLatin1( "add_user" ), + 0, this, TQT_SLOT( slotAddContact() ), menu, "actionAddContact" ); actionAddContact->plug( menu ); menu->insertSeparator(); } @@ -219,15 +219,15 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) bool reach = account()->isConnected() && isReachable(); bool myself = (this == account()->myself()); - KAction *actionSendMessage = KopeteStdAction::sendMessage( this, SLOT( sendMessage() ), menu, "actionSendMessage" ); + KAction *actionSendMessage = KopeteStdAction::sendMessage( this, TQT_SLOT( sendMessage() ), menu, "actionSendMessage" ); actionSendMessage->setEnabled( reach && !myself ); actionSendMessage->plug( menu ); - KAction *actionChat = KopeteStdAction::chat( this, SLOT( startChat() ), menu, "actionChat" ); + KAction *actionChat = KopeteStdAction::chat( this, TQT_SLOT( startChat() ), menu, "actionChat" ); actionChat->setEnabled( reach && !myself ); actionChat->plug( menu ); - KAction *actionSendFile = KopeteStdAction::sendFile( this, SLOT( sendFile() ), menu, "actionSendFile" ); + KAction *actionSendFile = KopeteStdAction::sendFile( this, TQT_SLOT( sendFile() ), menu, "actionSendFile" ); actionSendFile->setEnabled( reach && d->fileCapable && !myself ); actionSendFile->plug( menu ); @@ -235,7 +235,7 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) // through the use of the customContextMenuActions() function // Get the custom actions from the protocols ( pure virtual function ) - QPtrList *customActions = customContextMenuActions( manager ); + TQPtrList *customActions = customContextMenuActions( manager ); if( customActions && !customActions->isEmpty() ) { menu->insertSeparator(); @@ -248,19 +248,19 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) menu->insertSeparator(); if( metaContact() && !metaContact()->isTemporary() ) - KopeteStdAction::changeMetaContact( this, SLOT( changeMetaContact() ), menu, "actionChangeMetaContact" )->plug( menu ); + KopeteStdAction::changeMetaContact( this, TQT_SLOT( changeMetaContact() ), menu, "actionChangeMetaContact" )->plug( menu ); - KopeteStdAction::contactInfo( this, SLOT( slotUserInfo() ), menu, "actionUserInfo" )->plug( menu ); + KopeteStdAction::contactInfo( this, TQT_SLOT( slotUserInfo() ), menu, "actionUserInfo" )->plug( menu ); #if 0 //this is not fully implemented yet (and doesn't work). disable for now - Olivier 2005-01-11 if ( account()->isBlocked( d->contactId ) ) - KopeteStdAction::unblockContact( this, SLOT( slotUnblock() ), menu, "actionUnblockContact" )->plug( menu ); + KopeteStdAction::unblockContact( this, TQT_SLOT( slotUnblock() ), menu, "actionUnblockContact" )->plug( menu ); else - KopeteStdAction::blockContact( this, SLOT( slotBlock() ), menu, "actionBlockContact" )->plug( menu ); + KopeteStdAction::blockContact( this, TQT_SLOT( slotBlock() ), menu, "actionBlockContact" )->plug( menu ); #endif if( metaContact() && !metaContact()->isTemporary() ) - KopeteStdAction::deleteContact( this, SLOT( slotDelete() ), menu, "actionDeleteContact" )->plug( menu ); + KopeteStdAction::deleteContact( this, TQT_SLOT( slotDelete() ), menu, "actionDeleteContact" )->plug( menu ); return menu; } @@ -270,19 +270,19 @@ void Contact::changeMetaContact() KDialogBase *moveDialog = new KDialogBase( Kopete::UI::Global::mainWidget(), "moveDialog", true, i18n( "Move Contact" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ); - QVBox *w = new QVBox( moveDialog ); + TQVBox *w = new TQVBox( moveDialog ); w->setSpacing( KDialog::spacingHint() ); Kopete::UI::MetaContactSelectorWidget *selector = new Kopete::UI::MetaContactSelectorWidget(w); selector->setLabelMessage(i18n( "Select the meta contact to which you want to move this contact:" )); // exclude this metacontact as a target metacontact for the move selector->excludeMetaContact( metaContact() ); - QCheckBox *chkCreateNew = new QCheckBox( i18n( "Create a new metacontact for this contact" ), w ); - QWhatsThis::add( chkCreateNew , i18n( "If you select this option, a new metacontact will be created in the top-level group " + TQCheckBox *chkCreateNew = new TQCheckBox( i18n( "Create a new metacontact for this contact" ), w ); + TQWhatsThis::add( chkCreateNew , i18n( "If you select this option, a new metacontact will be created in the top-level group " "with the name of this contact and the contact will be moved to it." ) ); - QObject::connect( chkCreateNew , SIGNAL( toggled(bool) ) , selector , SLOT ( setDisabled(bool) ) ) ; + TQObject::connect( chkCreateNew , TQT_SIGNAL( toggled(bool) ) , selector , TQT_SLOT ( setDisabled(bool) ) ) ; moveDialog->setMainWidget(w); - if( moveDialog->exec() == QDialog::Accepted ) + if( moveDialog->exec() == TQDialog::Accepted ) { Kopete::MetaContact *mc = selector->metaContact(); if(chkCreateNew->isChecked()) @@ -314,14 +314,14 @@ void Contact::setMetaContact( MetaContact *m ) { //only one contact, including this one, that mean the contact will be empty efter the move result = KMessageBox::questionYesNoCancel( Kopete::UI::Global::mainWidget(), i18n( "You are moving the contact `%1' to the meta contact `%2'.\n" "`%3' will be empty afterwards. Do you want to delete this contact?" ) - .arg(contactId(), m ? m->displayName() : QString::null, old->displayName()) - , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , QString::fromLatin1("delete_old_contact_when_move") ); + .arg(contactId(), m ? m->displayName() : TQString::null, old->displayName()) + , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::fromLatin1("delete_old_contact_when_move") ); if(result==KMessageBox::Cancel) return; } old->removeContact( this ); - disconnect( old, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + disconnect( old, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); if(result==KMessageBox::Yes) { @@ -346,19 +346,19 @@ void Contact::setMetaContact( MetaContact *m ) // between adding completely new contacts (which should be written to kabc) and restoring upon restart // (where no write is needed). KABCPersistence::self()->write( m ); - connect( d->metaContact, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + connect( d->metaContact, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); } sync(); } -void Contact::serialize( QMap &/*serializedData*/, - QMap & /* addressBookData */ ) +void Contact::serialize( TQMap &/*serializedData*/, + TQMap & /* addressBookData */ ) { } -void Contact::serializeProperties(QMap &serializedData) +void Contact::serializeProperties(TQMap &serializedData) { Kopete::ContactProperty::Map::ConstIterator it;// = d->properties.ConstIterator; @@ -367,8 +367,8 @@ void Contact::serializeProperties(QMap &serializedData) if (!it.data().tmpl().persistent()) continue; - QVariant val = it.data().value(); - QString key = QString::fromLatin1("prop_%1_%2").arg(QString::fromLatin1(val.typeName()), it.key()); + TQVariant val = it.data().value(); + TQString key = TQString::fromLatin1("prop_%1_%2").arg(TQString::fromLatin1(val.typeName()), it.key()); serializedData[key] = val.toString(); @@ -376,28 +376,28 @@ void Contact::serializeProperties(QMap &serializedData) } // end serializeProperties() void Contact::deserializeProperties( - QMap &serializedData ) + TQMap &serializedData ) { - QMap::ConstIterator it; + TQMap::ConstIterator it; for ( it=serializedData.begin(); it != serializedData.end(); ++it ) { - QString key = it.key(); + TQString key = it.key(); - if ( !key.startsWith( QString::fromLatin1("prop_") ) ) // avoid parsing other serialized data + if ( !key.startsWith( TQString::fromLatin1("prop_") ) ) // avoid parsing other serialized data continue; - QStringList keyList = QStringList::split( QChar('_'), key, false ); + TQStringList keyList = TQStringList::split( TQChar('_'), key, false ); if( keyList.count() < 3 ) // invalid key, not enough parts in string "prop_X_Y" continue; key = keyList[2]; // overwrite key var with the real key name this property has - QString type( keyList[1] ); // needed for QVariant casting + TQString type( keyList[1] ); // needed for TQVariant casting - QVariant variant( it.data() ); - if( !variant.cast(QVariant::nameToType(type.latin1())) ) + TQVariant variant( it.data() ); + if( !variant.cast(TQVariant::nameToType(type.latin1())) ) { kdDebug(14010) << k_funcinfo << - "Casting QVariant to needed type FAILED" << + "Casting TQVariant to needed type FAILED" << "key=" << key << ", type=" << type << endl; continue; } @@ -425,14 +425,14 @@ bool Contact::isReachable() void Contact::startChat() { - KopeteView *v=manager( CanCreate )->view(true, QString::fromLatin1("kopete_chatwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_chatwindow") ); if(v) v->raise(true); } void Contact::sendMessage() { - KopeteView *v=manager( CanCreate )->view(true, QString::fromLatin1("kopete_emailwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_emailwindow") ); if(v) v->raise(true); } @@ -458,8 +458,8 @@ void Contact::slotDelete() { if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n( "Are you sure you want to remove the contact '%1' from your contact list?" ). - arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), QString::fromLatin1("delete_user") ), - QString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) + arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), TQString::fromLatin1("delete_user") ), + TQString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue ) { deleteContact(); @@ -478,7 +478,7 @@ MetaContact * Contact::metaContact() const return d->metaContact; } -QString Contact::contactId() const +TQString Contact::contactId() const { return d->contactId; } @@ -500,23 +500,23 @@ void Contact::sync(unsigned int) /* Default implementation does nothing */ } -QString& Contact::icon() const +TQString& Contact::icon() const { return d->icon; } -void Contact::setIcon( const QString& icon ) +void Contact::setIcon( const TQString& icon ) { d->icon = icon; return; } -QPtrList *Contact::customContextMenuActions() +TQPtrList *Contact::customContextMenuActions() { return 0L; } -QPtrList *Contact::customContextMenuActions( ChatSession * /* manager */ ) +TQPtrList *Contact::customContextMenuActions( ChatSession * /* manager */ ) { return customContextMenuActions(); } @@ -568,17 +568,17 @@ void Contact::setIdleTime( unsigned long int t ) } -QStringList Contact::properties() const +TQStringList Contact::properties() const { return d->properties.keys(); } -bool Contact::hasProperty(const QString &key) const +bool Contact::hasProperty(const TQString &key) const { return d->properties.contains(key); } -const ContactProperty &Contact::property(const QString &key) const +const ContactProperty &Contact::property(const TQString &key) const { if(hasProperty(key)) return d->properties[key]; @@ -597,7 +597,7 @@ const Kopete::ContactProperty &Contact::property( void Contact::setProperty(const Kopete::ContactPropertyTmpl &tmpl, - const QVariant &value) + const TQVariant &value) { if(tmpl.isNull() || tmpl.key().isEmpty()) { @@ -606,13 +606,13 @@ void Contact::setProperty(const Kopete::ContactPropertyTmpl &tmpl, return; } - if(value.isNull() || value.canCast(QVariant::String) && value.toString().isEmpty()) + if(value.isNull() || value.canCast(TQVariant::String) && value.toString().isEmpty()) { removeProperty(tmpl); } else { - QVariant oldValue = property(tmpl.key()).value(); + TQVariant oldValue = property(tmpl.key()).value(); if(oldValue != value) { @@ -629,29 +629,29 @@ void Contact::removeProperty(const Kopete::ContactPropertyTmpl &tmpl) if(!tmpl.isNull() && !tmpl.key().isEmpty()) { - QVariant oldValue = property(tmpl.key()).value(); + TQVariant oldValue = property(tmpl.key()).value(); d->properties.remove(tmpl.key()); - emit propertyChanged(this, tmpl.key(), oldValue, QVariant()); + emit propertyChanged(this, tmpl.key(), oldValue, TQVariant()); } } -QString Contact::toolTip() const +TQString Contact::toolTip() const { Kopete::ContactProperty p; - QString tip; - QStringList shownProps = KopetePrefs::prefs()->toolTipContents(); + TQString tip; + TQStringList shownProps = KopetePrefs::prefs()->toolTipContents(); // -------------------------------------------------------------------------- // Fixed part of tooltip - QString iconName = QString::fromLatin1("kopete-contact-icon:%1:%2:%3") + TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") .arg( KURL::encode_string( protocol()->pluginId() ), KURL::encode_string( account()->accountId() ), KURL::encode_string( contactId() ) ); // TODO: the nickname should be a configurable properties, like others. -Olivier - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nick.isEmpty() ) { tip = i18n( "DISPLAY NAME
 CONTACT STATUS", @@ -671,39 +671,39 @@ QString Contact::toolTip() const // -------------------------------------------------------------------------- // Configurable part of tooltip - for(QStringList::Iterator it=shownProps.begin(); it!=shownProps.end(); ++it) + for(TQStringList::Iterator it=shownProps.begin(); it!=shownProps.end(); ++it) { - if((*it) == QString::fromLatin1("FormattedName")) + if((*it) == TQString::fromLatin1("FormattedName")) { - QString name = formattedName(); + TQString name = formattedName(); if(!name.isEmpty()) { tip += i18n("
Full Name: FORMATTED NAME", - "
Full Name: %1").arg(QStyleSheet::escape(name)); + "
Full Name: %1").arg(TQStyleSheet::escape(name)); } } - else if ((*it) == QString::fromLatin1("FormattedIdleTime")) + else if ((*it) == TQString::fromLatin1("FormattedIdleTime")) { - QString time = formattedIdleTime(); + TQString time = formattedIdleTime(); if(!time.isEmpty()) { tip += i18n("
Idle: FORMATTED IDLE TIME", "
Idle: %1").arg(time); } } - else if ((*it) == QString::fromLatin1("homePage")) + else if ((*it) == TQString::fromLatin1("homePage")) { - QString url = property(*it).value().toString(); + TQString url = property(*it).value().toString(); if(!url.isEmpty()) { tip += i18n("
Home Page: FORMATTED URL", "
Home Page: %2"). - arg( KURL::encode_string( url ), Kopete::Message::escape( QStyleSheet::escape(url) ) ); + arg( KURL::encode_string( url ), Kopete::Message::escape( TQStyleSheet::escape(url) ) ); } } - else if ((*it) == QString::fromLatin1("awayMessage")) + else if ((*it) == TQString::fromLatin1("awayMessage")) { - QString awaymsg = property(*it).value().toString(); + TQString awaymsg = property(*it).value().toString(); if(!awaymsg.isEmpty()) { tip += i18n("
Away Message: FORMATTED AWAY MESSAGE", @@ -715,20 +715,20 @@ QString Contact::toolTip() const p = property(*it); if(!p.isNull()) { - QVariant val = p.value(); - QString valueText; + TQVariant val = p.value(); + TQString valueText; switch(val.type()) { - case QVariant::DateTime: + case TQVariant::DateTime: valueText = KGlobal::locale()->formatDateTime(val.toDateTime()); valueText = Kopete::Message::escape( valueText ); break; - case QVariant::Date: + case TQVariant::Date: valueText = KGlobal::locale()->formatDate(val.toDate()); valueText = Kopete::Message::escape( valueText ); break; - case QVariant::Time: + case TQVariant::Time: valueText = KGlobal::locale()->formatTime(val.toTime()); valueText = Kopete::Message::escape( valueText ); break; @@ -745,7 +745,7 @@ QString Contact::toolTip() const tip += i18n("
PROPERTY LABEL: PROPERTY VALUE", "
%2: %1"). - arg( valueText, QStyleSheet::escape(p.tmpl().label()) ); + arg( valueText, TQStyleSheet::escape(p.tmpl().label()) ); } } } @@ -753,16 +753,16 @@ QString Contact::toolTip() const return tip; } -QString Kopete::Contact::formattedName() const +TQString Kopete::Contact::formattedName() const { - if( hasProperty(QString::fromLatin1("FormattedName")) ) - return property(QString::fromLatin1("FormattedName")).value().toString(); + if( hasProperty(TQString::fromLatin1("FormattedName")) ) + return property(TQString::fromLatin1("FormattedName")).value().toString(); - QString ret; + TQString ret; Kopete::ContactProperty first, last; - first = property(QString::fromLatin1("firstName")); - last = property(QString::fromLatin1("lastName")); + first = property(TQString::fromLatin1("firstName")); + last = property(TQString::fromLatin1("lastName")); if(!first.isNull()) { if(!last.isNull()) // contact has both first and last name @@ -784,9 +784,9 @@ QString Kopete::Contact::formattedName() const return ret; } -QString Kopete::Contact::formattedIdleTime() const +TQString Kopete::Contact::formattedIdleTime() const { - QString ret; + TQString ret; unsigned long int leftTime = idleTime(); if ( leftTime > 0 ) @@ -837,14 +837,14 @@ void Kopete::Contact::slotUnblock() account()->unblock( d->contactId ); } -void Kopete::Contact::setNickName( const QString &name ) +void Kopete::Contact::setNickName( const TQString &name ) { setProperty( Kopete::Global::Properties::self()->nickName(), name ); } -QString Kopete::Contact::nickName() const +TQString Kopete::Contact::nickName() const { - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( !nick.isEmpty() ) return nick; diff --git a/kopete/libkopete/kopetecontact.h b/kopete/libkopete/kopetecontact.h index 8f02bfc2..e093c5eb 100644 --- a/kopete/libkopete/kopetecontact.h +++ b/kopete/libkopete/kopetecontact.h @@ -20,7 +20,7 @@ #ifndef __KOPETECONTACT_H__ #define __KOPETECONTACT_H__ -#include +#include #include #include #include "kopeteglobal.h" @@ -41,7 +41,7 @@ class OnlineStatus; class Plugin; class Protocol; class Account; -typedef QPtrList GroupList; +typedef TQPtrList GroupList; /** * @author Duncan Mac-Vicar P. @@ -56,16 +56,16 @@ class KOPETE_EXPORT Contact : public QObject Q_OBJECT Q_ENUMS( CanCreateFlags ) - Q_PROPERTY( QString formattedName READ formattedName ) - Q_PROPERTY( QString formattedIdleTime READ formattedIdleTime ) + Q_PROPERTY( TQString formattedName READ formattedName ) + Q_PROPERTY( TQString formattedIdleTime READ formattedIdleTime ) Q_PROPERTY( bool isOnline READ isOnline ) Q_PROPERTY( bool fileCapable READ isFileCapable WRITE setFileCapable ) Q_PROPERTY( bool canAcceptFiles READ canAcceptFiles ) //Q_PROPERTY( bool isReachable READ isReachable ) - Q_PROPERTY( QString contactId READ contactId ) - Q_PROPERTY( QString icon READ icon WRITE setIcon ) - Q_PROPERTY( QString toolTip READ toolTip ) - Q_PROPERTY( QString nickName READ nickName WRITE setNickName ) + Q_PROPERTY( TQString contactId READ contactId ) + Q_PROPERTY( TQString icon READ icon WRITE setIcon ) + Q_PROPERTY( TQString toolTip READ toolTip ) + Q_PROPERTY( TQString nickName READ nickName WRITE setNickName ) //Q_PROPERTY( unsigned long idleTime READ idleTime WRITE setIdleTime ) public: @@ -86,8 +86,8 @@ public: * @param parent is the parent @ref MetaContact this Contact is part of * @param icon is an optional icon */ - Contact( Account *account, const QString &id, MetaContact *parent, - const QString &icon = QString::null ); + Contact( Account *account, const TQString &id, MetaContact *parent, + const TQString &icon = TQString::null ); ~Contact(); @@ -110,7 +110,7 @@ public: * * @return The unique id of the contact */ - QString contactId() const; + TQString contactId() const; /** * \brief Get the protocol that the contact belongs to. @@ -172,17 +172,17 @@ public: * * Most plugins don't need more than these fields, so they only need * to set the address book fields themselves. If you have nothing to - * save at all you can clear the QMap, an empty map is treated as + * save at all you can clear the TQMap, an empty map is treated as * 'nothing to save'. * - * The provided addressBookFields QMap contains the index field as + * The provided addressBookFields TQMap contains the index field as * marked with @ref Plugin::addAddressBookField() with the - * contact id as value. If no index field is available the QMap is + * contact id as value. If no index field is available the TQMap is * simply passed as an empty map. * * @sa Protocol::deserializeContact */ - virtual void serialize( QMap &serializedData, QMap &addressBookData ); + virtual void serialize( TQMap &serializedData, TQMap &addressBookData ); /** * @brief Serialize the contacts persistent properties for storage in the contact list. @@ -192,12 +192,12 @@ public: * In contrary to @ref serialize() this does not need to be reimplemented. * */ - void serializeProperties(QMap &serializedData); + void serializeProperties(TQMap &serializedData); /** * @brief Deserialize the contacts persistent properties */ - void deserializeProperties(QMap &serializedData); + void deserializeProperties(TQMap &serializedData); /** * @brief Get the online status of the contact @@ -222,12 +222,12 @@ public: * @return Collection of menu items to be show on the context menu * @todo if possible, try to use KXMLGUI */ - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); /** * @todo What is this function for ? */ - virtual QPtrList *customContextMenuActions( ChatSession *manager ); + virtual TQPtrList *customContextMenuActions( ChatSession *manager ); /** * @brief Get the Context Menu for this contact @@ -288,7 +288,7 @@ public: * If null, the protocol icon need to be used. * The icon is not colored, nor has the status icon overloaded */ - QString& icon() const; + TQString& icon() const; /** * @brief Change the icon to use for this contact @@ -298,7 +298,7 @@ public: * * if you want to go back to the protocol icon, set a null string. */ - void setIcon( const QString& icon ); + void setIcon( const TQString& icon ); /** * \brief Get the time (in seconds) this contact has been idle @@ -322,25 +322,25 @@ public: void setIdleTime(unsigned long int); /** - * @return A QStringList containing all property keys + * @return A TQStringList containing all property keys **/ - QStringList properties() const; + TQStringList properties() const; /** * Check for existance of a certain property stored * using "key". * \param key the property to check for **/ - bool hasProperty(const QString &key) const; + bool hasProperty(const TQString &key) const; /** * \brief Get the value of a property with key "key". * - * If you don't know the type of the returned QVariant, you will need + * If you don't know the type of the returned TQVariant, you will need * to check for it. * \return the value of the property **/ - const Kopete::ContactProperty &property(const QString &key) const; + const Kopete::ContactProperty &property(const TQString &key) const; const Kopete::ContactProperty &property(const Kopete::ContactPropertyTmpl &tmpl) const; /** @@ -350,27 +350,27 @@ public: * taken from this one * @param value The value to store * - * \note Setting a NULL value or an empty QString castable value + * \note Setting a NULL value or an empty TQString castable value * removes the property if it already existed. * Don't abuse this for property-removal, instead use * @ref removeProperty() if you want to remove on purpose. * The Removal is done to clean up the list of properties and to purge them * from UI. **/ - void setProperty(const Kopete::ContactPropertyTmpl &tmpl, const QVariant &value); + void setProperty(const Kopete::ContactPropertyTmpl &tmpl, const TQVariant &value); /** * \brief Convenience method to set the nickName property to the specified value * @param name The nickname to set */ - void setNickName( const QString &name ); + void setNickName( const TQString &name ); /** * \brief Convenience method to retrieve the nickName property. * * This method will return the contactId if there has been no nickName property set */ - QString nickName() const; + TQString nickName() const; /** * \brief Remove a property if it exists @@ -384,20 +384,20 @@ public: * Makes use of formattedName() and formattedIdleTime(). * \return an RTF tooltip depending on KopetePrefs settings **/ - QString toolTip() const; + TQString toolTip() const; /** * Returns a formatted string of "firstName" and/or "lastName" properties * if present. * Suitable for GUI display **/ - QString formattedName() const; + TQString formattedName() const; /** * Returns a formatted string of idleTime(). * Suitable for GUI display **/ - QString formattedIdleTime() const; + TQString formattedIdleTime() const; /** * used in @ref sync() @@ -475,7 +475,7 @@ public slots: * file size (such as over asocket */ virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); private slots: @@ -532,11 +532,11 @@ signals: * One of the contact's properties has changed. * @param contact this contact, useful for listening to signals from more than one contact * @param key the key whose value has changed - * @param oldValue the value before the change, or an invalid QVariant if the property is new - * @param newValue the value after the change, or an invalid QVariant if the property was removed + * @param oldValue the value before the change, or an invalid TQVariant if the property is new + * @param newValue the value after the change, or an invalid TQVariant if the property was removed */ - void propertyChanged( Kopete::Contact *contact, const QString &key, - const QVariant &oldValue, const QVariant &newValue ); + void propertyChanged( Kopete::Contact *contact, const TQString &key, + const TQVariant &oldValue, const TQVariant &newValue ); protected: virtual void virtual_hook(uint id, void *data); diff --git a/kopete/libkopete/kopetecontactlist.cpp b/kopete/libkopete/kopetecontactlist.cpp index 9aab9f2f..6e33f257 100644 --- a/kopete/libkopete/kopetecontactlist.cpp +++ b/kopete/libkopete/kopetecontactlist.cpp @@ -20,9 +20,9 @@ #include "kopetecontactlist.h" -#include -#include -#include +#include +#include +#include #include #include @@ -51,12 +51,12 @@ class ContactList::Private /** Flag: do not save the contactlist until she is completely loaded */ bool loaded ; - QPtrList contacts; - QPtrList groups; - QPtrList selectedMetaContacts; - QPtrList selectedGroups; + TQPtrList contacts; + TQPtrList groups; + TQPtrList selectedMetaContacts; + TQPtrList selectedGroups; - QTimer *saveTimer; + TQTimer *saveTimer; MetaContact *myself; @@ -80,7 +80,7 @@ ContactList *ContactList::self() } ContactList::ContactList() - : QObject( kapp, "KopeteContactList" ) + : TQObject( kapp, "KopeteContactList" ) { d=new Private; @@ -92,14 +92,14 @@ ContactList::ContactList() d->loaded=false; // automatically save on changes to the list - d->saveTimer = new QTimer( this, "saveTimer" ); - connect( d->saveTimer, SIGNAL( timeout() ), SLOT ( save() ) ); - - connect( this, SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupAdded( Kopete::Group * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupRemoved( Kopete::Group * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ), SLOT( slotSaveLater() ) ); + d->saveTimer = new TQTimer( this, "saveTimer" ); + connect( d->saveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT ( save() ) ); + + connect( this, TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupAdded( Kopete::Group * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ), TQT_SLOT( slotSaveLater() ) ); } ContactList::~ContactList() @@ -108,21 +108,21 @@ ContactList::~ContactList() delete d; } -QPtrList ContactList::metaContacts() const +TQPtrList ContactList::metaContacts() const { return d->contacts; } -QPtrList ContactList::groups() const +TQPtrList ContactList::groups() const { return d->groups; } -MetaContact *ContactList::metaContact( const QString &metaContactId ) const +MetaContact *ContactList::metaContact( const TQString &metaContactId ) const { - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { @@ -146,8 +146,8 @@ Group * ContactList::group(unsigned int groupId) const } -Contact *ContactList::findContact( const QString &protocolId, - const QString &accountId, const QString &contactId ) const +Contact *ContactList::findContact( const TQString &protocolId, + const TQString &accountId, const TQString &contactId ) const { //Browsing metacontacts is too slow, better to uses the Dict of the account. Account *i=AccountManager::self()->findAccount(protocolId,accountId); @@ -160,9 +160,9 @@ Contact *ContactList::findContact( const QString &protocolId, } -MetaContact *ContactList::findMetaContactByDisplayName( const QString &displayName ) const +MetaContact *ContactList::findMetaContactByDisplayName( const TQString &displayName ) const { - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { // kdDebug(14010) << "Display Name: " << it.current()->displayName() << "\n"; @@ -174,10 +174,10 @@ MetaContact *ContactList::findMetaContactByDisplayName( const QString &displayNa return 0L; } -MetaContact* ContactList::findMetaContactByContactId( const QString &contactId ) const +MetaContact* ContactList::findMetaContactByContactId( const TQString &contactId ) const { - QPtrList acts=AccountManager::self()->accounts(); - QPtrListIterator it( acts ); + TQPtrList acts=AccountManager::self()->accounts(); + TQPtrListIterator it( acts ); for ( ; it.current(); ++it ) { Contact *c=(*it)->contacts()[contactId]; @@ -187,7 +187,7 @@ MetaContact* ContactList::findMetaContactByContactId( const QString &contactId ) return 0L; } -Group * ContactList::findGroup(const QString& displayName, int type) +Group * ContactList::findGroup(const TQString& displayName, int type) { if( type == Group::Temporary ) return Group::temporary(); @@ -205,12 +205,12 @@ Group * ContactList::findGroup(const QString& displayName, int type) } -QPtrList ContactList::selectedMetaContacts() const +TQPtrList ContactList::selectedMetaContacts() const { return d->selectedMetaContacts; } -QPtrList ContactList::selectedGroups() const +TQPtrList ContactList::selectedGroups() const { return d->selectedGroups; } @@ -224,9 +224,9 @@ void ContactList::addMetaContact( MetaContact *mc ) d->contacts.append( mc ); emit metaContactAdded( mc ); - connect( mc, SIGNAL( persistentDataChanged( ) ), SLOT( slotSaveLater() ) ); - connect( mc, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( metaContactAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( metaContactRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( persistentDataChanged( ) ), TQT_SLOT( slotSaveLater() ) ); + connect( mc, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( metaContactAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( metaContactRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); } @@ -245,7 +245,7 @@ void ContactList::removeMetaContact(MetaContact *m) } //removes subcontact from server here and now. - QPtrList cts=m->contacts(); + TQPtrList cts=m->contacts(); for( Contact *c = cts.first(); c; c = cts.next() ) { c->deleteContact(); @@ -263,7 +263,7 @@ void ContactList::addGroup( Group * g ) { d->groups.append( g ); emit groupAdded( g ); - connect( g , SIGNAL ( displayNameChanged(Kopete::Group* , const QString & )) , this , SIGNAL ( groupRenamed(Kopete::Group* , const QString & )) ) ; + connect( g , TQT_SIGNAL ( displayNameChanged(Kopete::Group* , const TQString & )) , this , TQT_SIGNAL ( groupRenamed(Kopete::Group* , const TQString & )) ) ; } } @@ -281,7 +281,7 @@ void ContactList::removeGroup( Group *g ) } -void ContactList::setSelectedItems(QPtrList metaContacts , QPtrList groups) +void ContactList::setSelectedItems(TQPtrList metaContacts , TQPtrList groups) { kdDebug( 14010 ) << k_funcinfo << metaContacts.count() << " metacontacts, " << groups.count() << " groups selected" << endl; d->selectedMetaContacts=metaContacts; @@ -304,11 +304,11 @@ void ContactList::loadGlobalIdentity() if(Kopete::Config::enableGlobalIdentity()) { // Disconnect to make sure it will not cause duplicate calls. - disconnect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - disconnect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + disconnect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + disconnect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); - connect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - connect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + connect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + connect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); // Ensure that the myself metaContactId is always the KABC whoAmI KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); @@ -324,8 +324,8 @@ void ContactList::loadGlobalIdentity() } else { - disconnect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - disconnect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + disconnect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + disconnect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); } } @@ -370,7 +370,7 @@ void ContactList::load() { loadXML(); // Apply the global identity when all the protocols plugins are loaded. - connect(PluginManager::self(), SIGNAL(allPluginsLoaded()), this, SLOT(loadGlobalIdentity())); + connect(PluginManager::self(), TQT_SIGNAL(allPluginsLoaded()), this, TQT_SLOT(loadGlobalIdentity())); } void ContactList::loadXML() @@ -378,25 +378,25 @@ void ContactList::loadXML() // don't save when we're in the middle of this... d->loaded = false; - QString filename = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( filename.isEmpty() ) { d->loaded=true; return ; } - QDomDocument contactList( QString::fromLatin1( "kopete-contact-list" ) ); + TQDomDocument contactList( TQString::fromLatin1( "kopete-contact-list" ) ); - QFile contactListFile( filename ); + TQFile contactListFile( filename ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); - QDomElement list = contactList.documentElement(); + TQDomElement list = contactList.documentElement(); - QString versionString = list.attribute( QString::fromLatin1( "version" ), QString::null ); + TQString versionString = list.attribute( TQString::fromLatin1( "version" ), TQString::null ); uint version = 0; - if( QRegExp( QString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) ) - version = versionString.replace( QString::fromLatin1( "." ), QString::null ).toUInt(); + if( TQRegExp( TQString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) ) + version = versionString.replace( TQString::fromLatin1( "." ), TQString::null ).toUInt(); if( version < Private::ContactListVersion ) { @@ -410,7 +410,7 @@ void ContactList::loadXML() convertContactList( filename, version, Private::ContactListVersion ); - contactList = QDomDocument ( QString::fromLatin1( "kopete-contact-list" ) ); + contactList = TQDomDocument ( TQString::fromLatin1( "kopete-contact-list" ) ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); @@ -420,13 +420,13 @@ void ContactList::loadXML() addGroup( Kopete::Group::topLevel() ); - QDomElement element = list.firstChild().toElement(); + TQDomElement element = list.firstChild().toElement(); while( !element.isNull() ) { - if( element.tagName() == QString::fromLatin1("meta-contact") ) + if( element.tagName() == TQString::fromLatin1("meta-contact") ) { //TODO: id isn't used - //QString id = element.attribute( "id", QString::null ); + //TQString id = element.attribute( "id", TQString::null ); Kopete::MetaContact *metaContact = new Kopete::MetaContact(); if ( !metaContact->fromXML( element ) ) { @@ -439,7 +439,7 @@ void ContactList::loadXML() metaContact ); } } - else if( element.tagName() == QString::fromLatin1("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() == QString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() ) + else if( element.tagName() == TQString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() ) { if( !myself()->fromXML( element ) ) { @@ -473,94 +473,94 @@ void ContactList::loadXML() d->loaded=true; } -void ContactList::convertContactList( const QString &fileName, uint /* fromVersion */, uint /* toVersion */ ) +void ContactList::convertContactList( const TQString &fileName, uint /* fromVersion */, uint /* toVersion */ ) { // For now, ignore fromVersion and toVersion. These are meant for future // changes to allow incremental (multi-pass) conversion so we don't have // to rewrite the whole conversion code for each change. - QDomDocument contactList( QString::fromLatin1( "messaging-contact-list" ) ); - QFile contactListFile( fileName ); + TQDomDocument contactList( TQString::fromLatin1( "messaging-contact-list" ) ); + TQFile contactListFile( fileName ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); - QDomElement oldList = contactList.documentElement(); + TQDomElement oldList = contactList.documentElement(); - QDomDocument newList( QString::fromLatin1( "kopete-contact-list" ) ); - newList.appendChild( newList.createProcessingInstruction( QString::fromLatin1( "xml" ), QString::fromLatin1( "version=\"1.0\"" ) ) ); + TQDomDocument newList( TQString::fromLatin1( "kopete-contact-list" ) ); + newList.appendChild( newList.createProcessingInstruction( TQString::fromLatin1( "xml" ), TQString::fromLatin1( "version=\"1.0\"" ) ) ); - QDomElement newRoot = newList.createElement( QString::fromLatin1( "kopete-contact-list" ) ); + TQDomElement newRoot = newList.createElement( TQString::fromLatin1( "kopete-contact-list" ) ); newList.appendChild( newRoot ); - newRoot.setAttribute( QString::fromLatin1( "version" ), QString::fromLatin1( "1.0" ) ); + newRoot.setAttribute( TQString::fromLatin1( "version" ), TQString::fromLatin1( "1.0" ) ); - QDomNode oldNode = oldList.firstChild(); + TQDomNode oldNode = oldList.firstChild(); while( !oldNode.isNull() ) { - QDomElement oldElement = oldNode.toElement(); + TQDomElement oldElement = oldNode.toElement(); if( !oldElement.isNull() ) { - if( oldElement.tagName() == QString::fromLatin1("meta-contact") ) + if( oldElement.tagName() == TQString::fromLatin1("meta-contact") ) { // Ignore ID, it is not used in the current list anyway - QDomElement newMetaContact = newList.createElement( QString::fromLatin1( "meta-contact" ) ); + TQDomElement newMetaContact = newList.createElement( TQString::fromLatin1( "meta-contact" ) ); newRoot.appendChild( newMetaContact ); // Plugin data is stored completely different, and requires // some bookkeeping to convert properly - QMap pluginData; - QStringList icqData; - QStringList gaduData; + TQMap pluginData; + TQStringList icqData; + TQStringList gaduData; // ICQ and Gadu can only be converted properly if the address book fields // are already parsed. Therefore, scan for those first and add the rest // afterwards - QDomNode oldContactNode = oldNode.firstChild(); + TQDomNode oldContactNode = oldNode.firstChild(); while( !oldContactNode.isNull() ) { - QDomElement oldContactElement = oldContactNode.toElement(); - if( !oldContactElement.isNull() && oldContactElement.tagName() == QString::fromLatin1("address-book-field") ) + TQDomElement oldContactElement = oldContactNode.toElement(); + 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. - QString id = oldContactElement.attribute( QString::fromLatin1( "id" ), QString::null ); - QString data = oldContactElement.text(); - - QString app, key, val; - QString separator = QString::fromLatin1( "," ); - if( id == QString::fromLatin1( "messaging/gadu" ) ) - separator = QString::fromLatin1( "\n" ); - else if( id == QString::fromLatin1( "messaging/icq" ) ) - separator = QString::fromLatin1( ";" ); - else if( id == QString::fromLatin1( "messaging/jabber" ) ) - id = QString::fromLatin1( "messaging/xmpp" ); - - if( id == QString::fromLatin1( "messaging/gadu" ) || id == QString::fromLatin1( "messaging/icq" ) || - id == QString::fromLatin1( "messaging/winpopup" ) || id == QString::fromLatin1( "messaging/xmpp" ) ) + TQString id = oldContactElement.attribute( TQString::fromLatin1( "id" ), TQString::null ); + TQString data = oldContactElement.text(); + + TQString app, key, val; + 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 = QString::fromLatin1( "All" ); - val = data.replace( separator, QChar( 0xE000 ) ); + key = TQString::fromLatin1( "All" ); + val = data.replace( separator, TQChar( 0xE000 ) ); } if( !app.isEmpty() ) { - QDomElement addressBookField = newList.createElement( QString::fromLatin1( "address-book-field" ) ); + TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); newMetaContact.appendChild( addressBookField ); - addressBookField.setAttribute( QString::fromLatin1( "app" ), app ); - addressBookField.setAttribute( QString::fromLatin1( "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 == QString::fromLatin1( "messaging/icq" ) ) - icqData = QStringList::split( QChar( 0xE000 ), val ); - else if( id == QString::fromLatin1("messaging/gadu") ) - gaduData = QStringList::split( QChar( 0xE000 ), val ); + if( id == TQString::fromLatin1( "messaging/icq" ) ) + icqData = TQStringList::split( TQChar( 0xE000 ), val ); + else if( id == TQString::fromLatin1("messaging/gadu") ) + gaduData = TQStringList::split( TQChar( 0xE000 ), val ); } } oldContactNode = oldContactNode.nextSibling(); @@ -570,172 +570,172 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi oldContactNode = oldNode.firstChild(); while( !oldContactNode.isNull() ) { - QDomElement oldContactElement = oldContactNode.toElement(); + TQDomElement oldContactElement = oldContactNode.toElement(); if( !oldContactElement.isNull() ) { - if( oldContactElement.tagName() == QString::fromLatin1("display-name") ) + if( oldContactElement.tagName() == TQString::fromLatin1("display-name") ) { - QDomElement displayName = newList.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( newList.createTextNode( oldContactElement.text() ) ); newMetaContact.appendChild( displayName ); } - else if( oldContactElement.tagName() == QString::fromLatin1("groups") ) + else if( oldContactElement.tagName() == TQString::fromLatin1("groups") ) { - QDomElement groups = newList.createElement( QString::fromLatin1( "groups" ) ); + TQDomElement groups = newList.createElement( TQString::fromLatin1( "groups" ) ); newMetaContact.appendChild( groups ); - QDomNode oldGroup = oldContactElement.firstChild(); + TQDomNode oldGroup = oldContactElement.firstChild(); while( !oldGroup.isNull() ) { - QDomElement oldGroupElement = oldGroup.toElement(); - if ( oldGroupElement.tagName() == QString::fromLatin1("group") ) + TQDomElement oldGroupElement = oldGroup.toElement(); + if ( oldGroupElement.tagName() == TQString::fromLatin1("group") ) { - QDomElement group = newList.createElement( QString::fromLatin1( "group" ) ); + TQDomElement group = newList.createElement( TQString::fromLatin1( "group" ) ); group.appendChild( newList.createTextNode( oldGroupElement.text() ) ); groups.appendChild( group ); } - else if ( oldGroupElement.tagName() == QString::fromLatin1("top-level") ) + else if ( oldGroupElement.tagName() == TQString::fromLatin1("top-level") ) { - QDomElement group = newList.createElement( QString::fromLatin1( "top-level" ) ); + TQDomElement group = newList.createElement( TQString::fromLatin1( "top-level" ) ); groups.appendChild( group ); } oldGroup = oldGroup.nextSibling(); } } - else if( oldContactElement.tagName() == QString::fromLatin1( "plugin-data" ) ) + else if( oldContactElement.tagName() == TQString::fromLatin1( "plugin-data" ) ) { // Convert the plugin data - QString id = oldContactElement.attribute( QString::fromLatin1( "plugin-id" ), QString::null ); - QString data = oldContactElement.text(); + TQString id = oldContactElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ); + TQString data = oldContactElement.text(); bool convertOldAim = false; uint fieldCount = 1; - QString addressBookLabel; - if( id == QString::fromLatin1("MSNProtocol") ) + TQString addressBookLabel; + if( id == TQString::fromLatin1("MSNProtocol") ) { fieldCount = 3; - addressBookLabel = QString::fromLatin1("msn"); + addressBookLabel = TQString::fromLatin1("msn"); } - else if( id == QString::fromLatin1("IRCProtocol") ) + else if( id == TQString::fromLatin1("IRCProtocol") ) { fieldCount = 3; - addressBookLabel = QString::fromLatin1("irc"); + addressBookLabel = TQString::fromLatin1("irc"); } - else if( id == QString::fromLatin1("OscarProtocol") ) + else if( id == TQString::fromLatin1("OscarProtocol") ) { fieldCount = 2; - addressBookLabel = QString::fromLatin1("aim"); + addressBookLabel = TQString::fromLatin1("aim"); } - else if( id == QString::fromLatin1("AIMProtocol") ) + else if( id == TQString::fromLatin1("AIMProtocol") ) { - id = QString::fromLatin1("OscarProtocol"); + id = TQString::fromLatin1("OscarProtocol"); convertOldAim = true; - addressBookLabel = QString::fromLatin1("aim"); + addressBookLabel = TQString::fromLatin1("aim"); } - else if( id == QString::fromLatin1("ICQProtocol") || id == QString::fromLatin1("WPProtocol") || id == QString::fromLatin1("GaduProtocol") ) + else if( id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) { fieldCount = 1; } - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) { fieldCount = 4; } - else if( id == QString::fromLatin1("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 = QString::fromLatin1("sms"); + addressBookLabel = TQString::fromLatin1("sms"); } if( pluginData[ id ].isNull() ) { - pluginData[ id ] = newList.createElement( QString::fromLatin1( "plugin-data" ) ); - pluginData[ id ].setAttribute( QString::fromLatin1( "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 == QString::fromLatin1( "MSNProtocol" ) || id == QString::fromLatin1( "OscarProtocol" ) || - id == QString::fromLatin1( "AIMProtocol" ) || id == QString::fromLatin1( "IRCProtocol" ) || - id == QString::fromLatin1( "ICQProtocol" ) || id == QString::fromLatin1( "JabberProtocol" ) || - id == QString::fromLatin1( "SMSProtocol" ) || id == QString::fromLatin1( "WPProtocol" ) || - id == QString::fromLatin1( "GaduProtocol" ) ) + if( id == TQString::fromLatin1( "MSNProtocol" ) || id == TQString::fromLatin1( "OscarProtocol" ) || + id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) || + id == TQString::fromLatin1( "ICQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) || + id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) || + id == TQString::fromLatin1( "GaduProtocol" ) ) { - QStringList strList = QStringList::split( QString::fromLatin1( "||" ), data ); + TQStringList strList = TQStringList::split( TQString::fromLatin1( "||" ), data ); // Unescape '||' - for( QStringList::iterator it = strList.begin(); it != strList.end(); ++it ) + for( TQStringList::iterator it = strList.begin(); it != strList.end(); ++it ) { - ( *it ).replace( QString::fromLatin1( "\\|;" ), QString::fromLatin1( "|" ) ). - replace( QString::fromLatin1( "\\\\" ), QString::fromLatin1( "\\" ) ); + ( *it ).replace( TQString::fromLatin1( "\\|;" ), TQString::fromLatin1( "|" ) ). + replace( TQString::fromLatin1( "\\\\" ), TQString::fromLatin1( "\\" ) ); } uint idx = 0; while( idx < strList.size() ) { - QDomElement dataField; + TQDomElement dataField; - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "contactId" ) ); - if( id == QString::fromLatin1("ICQProtocol") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "contactId" ) ); + if( id == TQString::fromLatin1("ICQProtocol") ) dataField.appendChild( newList.createTextNode( icqData[ idx ] ) ); - else if( id == QString::fromLatin1("GaduProtocol") ) + else if( id == TQString::fromLatin1("GaduProtocol") ) dataField.appendChild( newList.createTextNode( gaduData[ idx ] ) ); - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) ); else dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "displayName" ) ); - if( convertOldAim || id == QString::fromLatin1("ICQProtocol") || id == QString::fromLatin1("WPProtocol") || id == QString::fromLatin1("GaduProtocol") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "displayName" ) ); + if( convertOldAim || id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); else dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) ); - if( id == QString::fromLatin1("MSNProtocol") ) + if( id == TQString::fromLatin1("MSNProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "groups" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); } - else if( id == QString::fromLatin1("IRCProtocol") ) + else if( id == TQString::fromLatin1("IRCProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "serverName" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serverName" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); } - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "accountId" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "accountId" ) ); dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "groups" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) ); } - else if( id == QString::fromLatin1( "SMSProtocol" ) && - ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != QString::fromLatin1( "." ) ) + else if( id == TQString::fromLatin1( "SMSProtocol" ) && + ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != TQString::fromLatin1( "." ) ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "serviceName" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serviceName" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "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 QString &fileName, uint /* fromVersi // MSN, AIM, IRC, Oscar and SMS didn't store address book fields up // to now, so create one - if( id != QString::fromLatin1("ICQProtocol") && id != QString::fromLatin1("JabberProtocol") && id != QString::fromLatin1("WPProtocol") && id != QString::fromLatin1("GaduProtocol") ) + if( id != TQString::fromLatin1("ICQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") ) { - QDomElement addressBookField = newList.createElement( QString::fromLatin1( "address-book-field" ) ); + TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); newMetaContact.appendChild( addressBookField ); - addressBookField.setAttribute( QString::fromLatin1( "app" ), - QString::fromLatin1( "messaging/" ) + addressBookLabel ); - addressBookField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "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 == QString::fromLatin1("ContactNotesPlugin") || id == QString::fromLatin1("CryptographyPlugin") || id == QString::fromLatin1("TranslatorPlugin") ) + else if( id == TQString::fromLatin1("ContactNotesPlugin") || id == TQString::fromLatin1("CryptographyPlugin") || id == TQString::fromLatin1("TranslatorPlugin") ) { - QDomElement dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + TQDomElement dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - if( id == QString::fromLatin1("ContactNotesPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "notes" ) ); - else if( id == QString::fromLatin1("CryptographyPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "gpgKey" ) ); - else if( id == QString::fromLatin1("TranslatorPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "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,48 +776,48 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi oldContactNode = oldContactNode.nextSibling(); } } - else if( oldElement.tagName() == QString::fromLatin1("kopete-group") ) + else if( oldElement.tagName() == TQString::fromLatin1("kopete-group") ) { - QDomElement newGroup = newList.createElement( QString::fromLatin1( "kopete-group" ) ); + TQDomElement newGroup = newList.createElement( TQString::fromLatin1( "kopete-group" ) ); newRoot.appendChild( newGroup ); - QDomNode oldGroupNode = oldNode.firstChild(); + TQDomNode oldGroupNode = oldNode.firstChild(); while( !oldGroupNode.isNull() ) { - QDomElement oldGroupElement = oldGroupNode.toElement(); + TQDomElement oldGroupElement = oldGroupNode.toElement(); - if( oldGroupElement.tagName() == QString::fromLatin1("display-name") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("display-name") ) { - QDomElement displayName = newList.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( newList.createTextNode( oldGroupElement.text() ) ); newGroup.appendChild( displayName ); } - if( oldGroupElement.tagName() == QString::fromLatin1("type") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("type") ) { - if( oldGroupElement.text() == QString::fromLatin1("Temporary") ) - newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "temporary" ) ); - else if( oldGroupElement.text() == QString::fromLatin1( "TopLevel" ) ) - newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "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( QString::fromLatin1( "type" ), QString::fromLatin1( "standard" ) ); + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) ); } - if( oldGroupElement.tagName() == QString::fromLatin1("view") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("view") ) { - if( oldGroupElement.text() == QString::fromLatin1("collapsed") ) - newGroup.setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( "collapsed" ) ); + if( oldGroupElement.text() == TQString::fromLatin1("collapsed") ) + newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "collapsed" ) ); else - newGroup.setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( "expanded" ) ); + newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) ); } - else if( oldGroupElement.tagName() == QString::fromLatin1("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 - QDomElement groupPluginData = newList.createElement( QString::fromLatin1( "plugin-data" ) ); + TQDomElement groupPluginData = newList.createElement( TQString::fromLatin1( "plugin-data" ) ); newGroup.appendChild( groupPluginData ); - groupPluginData.setAttribute( QString::fromLatin1( "plugin-id" ), - oldGroupElement.attribute( QString::fromLatin1( "plugin-id" ), QString::null ) ); + groupPluginData.setAttribute( TQString::fromLatin1( "plugin-id" ), + oldGroupElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ) ); groupPluginData.appendChild( newList.createTextNode( oldGroupElement.text() ) ); } @@ -836,13 +836,13 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi // Close the file, and save the new file contactListFile.close(); - QDir().rename( fileName, fileName + QString::fromLatin1( ".bak" ) ); + TQDir().rename( fileName, fileName + TQString::fromLatin1( ".bak" ) ); // kdDebug( 14010 ) << k_funcinfo << "XML output:\n" << newList.toString( 2 ) << endl; contactListFile.open( IO_WriteOnly ); - QTextStream stream( &contactListFile ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( &contactListFile ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << newList.toString( 2 ); contactListFile.flush(); @@ -862,12 +862,12 @@ void Kopete::ContactList::saveXML() return; } - QString contactListFileName = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString contactListFileName = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); KSaveFile contactListFile( contactListFileName ); if( contactListFile.status() == 0 ) { - QTextStream *stream = contactListFile.textStream(); - stream->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *stream = contactListFile.textStream(); + stream->setEncoding( TQTextStream::UnicodeUTF8 ); toXML().save( *stream, 4 ); if ( contactListFile.close() ) @@ -891,11 +891,11 @@ void Kopete::ContactList::saveXML() d->saveTimer->start( 60000, true /* single-shot: will get restarted by us next time if it's still failing */ ); } -const QDomDocument ContactList::toXML() +const TQDomDocument ContactList::toXML() { - QDomDocument doc; - doc.appendChild( doc.createElement( QString::fromLatin1("kopete-contact-list") ) ); - doc.documentElement().setAttribute( QString::fromLatin1("version"), QString::fromLatin1("1.0")); + TQDomDocument doc; + 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() ) @@ -909,18 +909,18 @@ const QDomDocument ContactList::toXML() // Save myself metacontact information if( Kopete::Config::enableGlobalIdentity() ) { - QDomElement myselfElement = myself()->toXML(true); // Save minimal information. - myselfElement.setTagName( QString::fromLatin1("myself-meta-contact") ); + TQDomElement myselfElement = myself()->toXML(true); // Save minimal information. + myselfElement.setTagName( TQString::fromLatin1("myself-meta-contact") ); doc.documentElement().appendChild( doc.importNode( myselfElement, true ) ); } return doc; } -QStringList ContactList::contacts() const +TQStringList ContactList::contacts() const { - QStringList contacts; - QPtrListIterator it( d->contacts ); + TQStringList contacts; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { contacts.append( it.current()->displayName() ); @@ -928,22 +928,22 @@ QStringList ContactList::contacts() const return contacts; } -QStringList ContactList::contactStatuses() const +TQStringList ContactList::contactStatuses() const { - QStringList meta_contacts; - QPtrListIterator it( d->contacts ); + TQStringList meta_contacts; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { - meta_contacts.append( QString::fromLatin1( "%1 (%2)" ). + meta_contacts.append( TQString::fromLatin1( "%1 (%2)" ). arg( it.current()->displayName(), it.current()->statusString() )); } return meta_contacts; } -QStringList ContactList::reachableContacts() const +TQStringList ContactList::reachableContacts() const { - QStringList contacts; - QPtrListIterator it( d->contacts ); + TQStringList contacts; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isReachable() ) @@ -952,16 +952,16 @@ QStringList ContactList::reachableContacts() const return contacts; } -QPtrList ContactList::onlineContacts() const +TQPtrList ContactList::onlineContacts() const { - QPtrList result; - QPtrListIterator it( d->contacts ); + TQPtrList result; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() ) { - QPtrList contacts = it.current()->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = it.current()->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { if ( cit.current()->isOnline() ) @@ -972,10 +972,10 @@ QPtrList ContactList::onlineContacts() const return result; } -QPtrList Kopete::ContactList::onlineMetaContacts() const +TQPtrList Kopete::ContactList::onlineMetaContacts() const { - QPtrList result; - QPtrListIterator it( d->contacts ); + TQPtrList result; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() ) @@ -984,17 +984,17 @@ QPtrList Kopete::ContactList::onlineMetaContacts() const return result; } -QPtrList Kopete::ContactList::onlineMetaContacts( const QString &protocolId ) const +TQPtrList Kopete::ContactList::onlineMetaContacts( const TQString &protocolId ) const { - QPtrList result; - QPtrListIterator it( d->contacts ); + TQPtrList result; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { // FIXME: This loop is not very efficient :( if ( it.current()->isOnline() ) { - QPtrList contacts = it.current()->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = it.current()->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId ) @@ -1005,17 +1005,17 @@ QPtrList Kopete::ContactList::onlineMetaContacts( const QSt return result; } -QPtrList Kopete::ContactList::onlineContacts( const QString &protocolId ) const +TQPtrList Kopete::ContactList::onlineContacts( const TQString &protocolId ) const { - QPtrList result; - QPtrListIterator it( d->contacts ); + TQPtrList result; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { // FIXME: This loop is not very efficient :( if ( it.current()->isOnline() ) { - QPtrList contacts = it.current()->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = it.current()->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId ) @@ -1026,10 +1026,10 @@ QPtrList Kopete::ContactList::onlineContacts( const QString &pr return result; } -QStringList Kopete::ContactList::fileTransferContacts() const +TQStringList Kopete::ContactList::fileTransferContacts() const { - QStringList contacts; - QPtrListIterator it( d->contacts ); + TQStringList contacts; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->canAcceptFiles() ) @@ -1038,8 +1038,8 @@ QStringList Kopete::ContactList::fileTransferContacts() const return contacts; } -void Kopete::ContactList::sendFile( const QString &displayName, const KURL &sourceURL, - const QString &altFileName, const long unsigned int fileSize) +void Kopete::ContactList::sendFile( const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName, const long unsigned int fileSize) { // kdDebug(14010) << "Send To Display Name: " << displayName << "\n"; @@ -1048,7 +1048,7 @@ void Kopete::ContactList::sendFile( const QString &displayName, const KURL &sour c->sendFile( sourceURL, altFileName, fileSize ); } -void Kopete::ContactList::messageContact( const QString &contactId, const QString &messageText ) +void Kopete::ContactList::messageContact( const TQString &contactId, const TQString &messageText ) { Kopete::MetaContact *mc = findMetaContactByContactId( contactId ); if (!mc) return; @@ -1062,17 +1062,17 @@ void Kopete::ContactList::messageContact( const QString &contactId, const QStrin } -QStringList Kopete::ContactList::contactFileProtocols(const QString &displayName) +TQStringList Kopete::ContactList::contactFileProtocols(const TQString &displayName) { // kdDebug(14010) << "Get contacts for: " << displayName << "\n"; - QStringList protocols; + TQStringList protocols; Kopete::MetaContact *c = findMetaContactByDisplayName( displayName ); if( c ) { - QPtrList mContacts = c->contacts(); + TQPtrList mContacts = c->contacts(); kdDebug(14010) << mContacts.count() << endl; - QPtrListIterator jt( mContacts ); + TQPtrListIterator jt( mContacts ); for ( ; jt.current(); ++jt ) { kdDebug(14010) << "1" << jt.current()->protocol()->pluginId() << endl; @@ -1083,7 +1083,7 @@ QStringList Kopete::ContactList::contactFileProtocols(const QString &displayName } return protocols; } - return QStringList(); + return TQStringList(); } diff --git a/kopete/libkopete/kopetecontactlist.h b/kopete/libkopete/kopetecontactlist.h index fc6dd5f9..405abb79 100644 --- a/kopete/libkopete/kopetecontactlist.h +++ b/kopete/libkopete/kopetecontactlist.h @@ -19,8 +19,8 @@ #ifndef KOPETECONTACTLIST_H__ #define KOPETECONTACTLIST_H__ -#include -#include +#include +#include #include "kopete_export.h" @@ -62,7 +62,7 @@ public: /** * @brief return a list of all metacontact of the contactlist * Retrieve the list of all available meta contacts. - * The returned QPtrList is not the internally used variable, so changes + * The returned TQPtrList is not the internally used variable, so changes * to it won't propagate into the actual contact list. This can be * useful if you need a subset of the contact list, because you can * simply filter the result set as you wish without worrying about @@ -70,18 +70,18 @@ public: * The contained MetaContacts are obviously _not_ duplicates, so * changing those *will* have the expected result :-) */ - QPtrList metaContacts() const; + TQPtrList metaContacts() const; /** * @return all groups */ - QPtrList groups() const; + TQPtrList groups() const; /** * Return the metacontact referenced by the given id. is none is found, return 0L * @sa MetaContact::metaContactId() */ - MetaContact *metaContact( const QString &metaContactId ) const; + MetaContact *metaContact( const TQString &metaContactId ) const; /** * return the group with the given unique id. if none is found return 0L @@ -97,17 +97,17 @@ public: * @param contactId the @ref Contact::contactId() * @return the contact with the parameters, or 0L if not found. */ - Contact *findContact( const QString &protocolId, const QString &accountId, const QString &contactId ) const; + Contact *findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ) const; /** * Find a contact by display name. Returns the first match. */ - MetaContact *findMetaContactByDisplayName( const QString &displayName ) const; + MetaContact *findMetaContactByDisplayName( const TQString &displayName ) const; /** * Find a meta contact by its contact id. Returns the first match. */ - MetaContact *findMetaContactByContactId( const QString &contactId ) const; + MetaContact *findMetaContactByContactId( const TQString &contactId ) const; /** * @brief find a group with his displayName @@ -117,17 +117,17 @@ public: * @param type is the Group::GroupType to search, the default value is group::Normal * @return always a valid Group */ - Group * findGroup( const QString &displayName, int type = 0/*Group::Normal*/ ); + Group * findGroup( const TQString &displayName, int type = 0/*Group::Normal*/ ); /** * return the list of metacontact actually selected in the contactlist UI */ - QPtrList selectedMetaContacts() const; + TQPtrList selectedMetaContacts() const; /** * return the list of groups actualy selected in the contactlist UI */ - QPtrList selectedGroups() const ; + TQPtrList selectedGroups() const ; /** * return the metacontact that represent the user itself. @@ -171,7 +171,7 @@ public slots: * This method has to be called by the contactlist UI side. * it stores the selected items, and emits signals */ - void setSelectedItems(QPtrList metaContacts , QPtrList groups); + void setSelectedItems(TQPtrList metaContacts , TQPtrList groups); /** * Apply the global identity. @@ -204,7 +204,7 @@ signals: /** * A group has just been renamed */ - void groupRenamed(Kopete::Group *, const QString & oldname); + void groupRenamed(Kopete::Group *, const TQString & oldname); /** * A contact has been added to a group @@ -217,7 +217,7 @@ signals: /** * This signal is emit when the selection has changed, it is emitted after the following slot - * Warning: Do not delete any contacts in slots connected to this signal. (it is the warning in the QListView::selectionChanged() doc) + * Warning: Do not delete any contacts in slots connected to this signal. (it is the warning in the TQListView::selectionChanged() doc) */ void selectionChanged(); /** @@ -231,7 +231,7 @@ signals: * This signal is emitted each time a global identity field change. * HOWTO use: * - * - Connect signal globalIdentityChanged(const QString &key, const QVariant + * - Connect signal globalIdentityChanged(const TQString &key, const TQVariant * &value) to a slot in your derivate Account class (the best * place to put it). * - In the slot: @@ -242,12 +242,12 @@ signals: * * Connect signal in your Account constructor: * @code - * connect(Kopete::ContactList::self(), SIGNAL(globalIdentityChanged(const QString&, const QVariant&)), SLOT(slotglobalIdentityChanged(const QString&, const QVariant&))); + * connect(Kopete::ContactList::self(), TQT_SIGNAL(globalIdentityChanged(const TQString&, const TQVariant&)), TQT_SLOT(slotglobalIdentityChanged(const TQString&, const TQVariant&))); * @endcode * * Example of a typical implemented slot: * @code - * void slotGlobalIdentityChanged(const QString &key, const QVariant &value) + * void slotGlobalIdentityChanged(const TQString &key, const TQVariant &value) * { * if(key == Kopete::Global::Properties::self()->nickName().key()) * { @@ -262,7 +262,7 @@ signals: * } * @endcode */ - void globalIdentityChanged( const QString &key, const QVariant &value ); + void globalIdentityChanged( const TQString &key, const TQVariant &value ); private slots: /** @@ -289,7 +289,7 @@ private: /** * Convert the contact list from an older version */ - void convertContactList( const QString &fileName, uint fromVersion, uint toVersion ); + void convertContactList( const TQString &fileName, uint fromVersion, uint toVersion ); /** @@ -305,41 +305,41 @@ public: //TODO I think all theses method should be moved to the decop interface. /** * Return all meta contacts */ - QStringList contacts() const; + TQStringList contacts() const; /** * Return all meta contacts that are reachable */ - QStringList reachableContacts() const; + TQStringList reachableContacts() const; /** * Return all contacts that are online */ - QPtrList onlineContacts() const; + TQPtrList onlineContacts() const; /** * Overloaded method of @ref onlineContacts() that only returns * the online contacts for a single protocol */ - QPtrList onlineContacts( const QString &protocolId ) const; + TQPtrList onlineContacts( const TQString &protocolId ) const; /** * Return all meta contacts that are online */ - QPtrList onlineMetaContacts() const; + TQPtrList onlineMetaContacts() const; /** * Overloaded method of @ref onlineMetaContacts() that only returns * the online meta contacts for a single protocol */ - QPtrList onlineMetaContacts( const QString &protocolId ) const; + TQPtrList onlineMetaContacts( const TQString &protocolId ) const; /** * Returns all contacts which can accept file transfers */ - QStringList fileTransferContacts() const; + TQStringList fileTransferContacts() const; - QStringList contactFileProtocols( const QString &displayName); + TQStringList contactFileProtocols( const TQString &displayName); /** * Return all meta contacts with their current status @@ -347,7 +347,7 @@ public: //TODO I think all theses method should be moved to the decop interface. * FIXME: Do we *need* this one? Sounds error prone to me, because * nicknames can contain parentheses too. - Martijn */ - QStringList contactStatuses() const; + TQStringList contactStatuses() const; /** @@ -361,13 +361,13 @@ public: //TODO I think all theses method should be moved to the decop interface. * @param altFileName (Optional) An alternate filename for the file we are sending * @param fileSize (Optional) The size of the file */ - void sendFile(const QString &displayName, const KURL &sourceURL, - const QString &altFileName = QString::null, const long unsigned int fileSize = 0L); + void sendFile(const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName = TQString::null, const long unsigned int fileSize = 0L); /** * Open a chat to a contact, and optionally set some initial text */ - void messageContact( const QString &displayName, const QString &messageText = QString::null ); + void messageContact( const TQString &displayName, const TQString &messageText = TQString::null ); public slots: /** @@ -384,7 +384,7 @@ private: /** * Return a XML representation of the contact list */ - const QDomDocument toXML(); + const TQDomDocument toXML(); /** * Load the contact list from XML file diff --git a/kopete/libkopete/kopetecontactlistelement.cpp b/kopete/libkopete/kopetecontactlistelement.cpp index 2474d1af..5a51da80 100644 --- a/kopete/libkopete/kopetecontactlistelement.cpp +++ b/kopete/libkopete/kopetecontactlistelement.cpp @@ -29,19 +29,19 @@ namespace Kopete { class ContactListElement::Private { public: - QMap > pluginData; - QMap icons; + TQMap > pluginData; + TQMap icons; bool useCustomIcon; }; -ContactListElement::ContactListElement( QObject *parent, const char *name ) -: QObject( parent, name ) +ContactListElement::ContactListElement( TQObject *parent, const char *name ) +: TQObject( parent, name ) { d = new Private; d->useCustomIcon = false; #if 0 //TODO - connect( Kopete::Global::onlineStatusIconCache(), SIGNAL( iconsChanged() ), SIGNAL( iconAppearanceChanged() ) ); + connect( Kopete::Global::onlineStatusIconCache(), TQT_SIGNAL( iconsChanged() ), TQT_SIGNAL( iconAppearanceChanged() ) ); #endif } @@ -50,7 +50,7 @@ ContactListElement::~ContactListElement() delete d; } -void ContactListElement::setPluginData( Plugin *plugin, const QMap &pluginData ) +void ContactListElement::setPluginData( Plugin *plugin, const TQMap &pluginData ) { if ( pluginData.isEmpty() ) { @@ -63,48 +63,48 @@ void ContactListElement::setPluginData( Plugin *plugin, const QMappluginData[ p->pluginId() ][ key ] = value; emit pluginDataChanged(); } -QMap ContactListElement::pluginData( Plugin *plugin ) const +TQMap ContactListElement::pluginData( Plugin *plugin ) const { if ( !d->pluginData.contains( plugin->pluginId() ) ) - return QMap(); + return TQMap(); return d->pluginData[ plugin->pluginId() ]; } -QString ContactListElement::pluginData( Plugin *plugin, const QString &key ) const +TQString ContactListElement::pluginData( Plugin *plugin, const TQString &key ) const { if ( !d->pluginData.contains( plugin->pluginId() ) || !d->pluginData[ plugin->pluginId() ].contains( key ) ) - return QString::null; + return TQString::null; return d->pluginData[ plugin->pluginId() ][ key ]; } -const QValueList ContactListElement::toXML() +const TQValueList ContactListElement::toXML() { - QDomDocument pluginData; - QValueList pluginNodes; - pluginData.appendChild( pluginData.createElement( QString::fromLatin1( "plugin-data" ) ) ); + TQDomDocument pluginData; + TQValueList pluginNodes; + pluginData.appendChild( pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ) ); if ( !d->pluginData.isEmpty() ) { - QMap >::ConstIterator pluginIt; + TQMap >::ConstIterator pluginIt; for ( pluginIt = d->pluginData.begin(); pluginIt != d->pluginData.end(); ++pluginIt ) { - QDomElement pluginElement = pluginData.createElement( QString::fromLatin1( "plugin-data" ) ); - pluginElement.setAttribute( QString::fromLatin1( "plugin-id" ), pluginIt.key() ); + TQDomElement pluginElement = pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ); + pluginElement.setAttribute( TQString::fromLatin1( "plugin-id" ), pluginIt.key() ); - QMap::ConstIterator it; + TQMap::ConstIterator it; for ( it = pluginIt.data().begin(); it != pluginIt.data().end(); ++it ) { - QDomElement pluginDataField = pluginData.createElement( QString::fromLatin1( "plugin-data-field" ) ); - pluginDataField.setAttribute( QString::fromLatin1( "key" ), it.key() ); + TQDomElement pluginDataField = pluginData.createElement( TQString::fromLatin1( "plugin-data-field" ) ); + pluginDataField.setAttribute( TQString::fromLatin1( "key" ), it.key() ); pluginDataField.appendChild( pluginData.createTextNode( it.data() ) ); pluginElement.appendChild( pluginDataField ); } @@ -115,39 +115,39 @@ const QValueList ContactListElement::toXML() } if ( !d->icons.isEmpty() ) { - QDomElement iconsElement = pluginData.createElement( QString::fromLatin1( "custom-icons" ) ); - iconsElement.setAttribute( QString::fromLatin1( "use" ), d->useCustomIcon ? QString::fromLatin1( "1" ) : QString::fromLatin1( "0" ) ); + TQDomElement iconsElement = pluginData.createElement( TQString::fromLatin1( "custom-icons" ) ); + iconsElement.setAttribute( TQString::fromLatin1( "use" ), d->useCustomIcon ? TQString::fromLatin1( "1" ) : TQString::fromLatin1( "0" ) ); - for ( QMap::ConstIterator it = d->icons.begin(); it != d->icons.end(); ++it ) + for ( TQMap::ConstIterator it = d->icons.begin(); it != d->icons.end(); ++it ) { - QDomElement iconElement = pluginData.createElement( QString::fromLatin1( "icon" ) ); - QString stateStr; + TQDomElement iconElement = pluginData.createElement( TQString::fromLatin1( "icon" ) ); + TQString stateStr; switch ( it.key() ) { case Open: - stateStr = QString::fromLatin1( "open" ); + stateStr = TQString::fromLatin1( "open" ); break; case Closed: - stateStr = QString::fromLatin1( "closed" ); + stateStr = TQString::fromLatin1( "closed" ); break; case Online: - stateStr = QString::fromLatin1( "online" ); + stateStr = TQString::fromLatin1( "online" ); break; case Away: - stateStr = QString::fromLatin1( "away" ); + stateStr = TQString::fromLatin1( "away" ); break; case Offline: - stateStr = QString::fromLatin1( "offline" ); + stateStr = TQString::fromLatin1( "offline" ); break; case Unknown: - stateStr = QString::fromLatin1( "unknown" ); + stateStr = TQString::fromLatin1( "unknown" ); break; case None: default: - stateStr = QString::fromLatin1( "none" ); + stateStr = TQString::fromLatin1( "none" ); break; } - iconElement.setAttribute( QString::fromLatin1( "state" ), stateStr ); + iconElement.setAttribute( TQString::fromLatin1( "state" ), stateStr ); iconElement.appendChild( pluginData.createTextNode( it.data() ) ); iconsElement.appendChild( iconElement ); } @@ -157,54 +157,54 @@ const QValueList ContactListElement::toXML() return pluginNodes; } -bool ContactListElement::fromXML( const QDomElement& element ) +bool ContactListElement::fromXML( const TQDomElement& element ) { - if ( element.tagName() == QString::fromLatin1( "plugin-data" ) ) + if ( element.tagName() == TQString::fromLatin1( "plugin-data" ) ) { - QMap pluginData; - QString pluginId = element.attribute( QString::fromLatin1( "plugin-id" ), QString::null ); + TQMap pluginData; + TQString pluginId = element.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ); //in kopete 0.6 the AIM protocol was called OSCAR - if ( pluginId == QString::fromLatin1( "OscarProtocol" ) ) - pluginId = QString::fromLatin1( "AIMProtocol" ); + if ( pluginId == TQString::fromLatin1( "OscarProtocol" ) ) + pluginId = TQString::fromLatin1( "AIMProtocol" ); - QDomNode field = element.firstChild(); + TQDomNode field = element.firstChild(); while( !field.isNull() ) { - QDomElement fieldElement = field.toElement(); - if ( fieldElement.tagName() == QString::fromLatin1( "plugin-data-field" ) ) + TQDomElement fieldElement = field.toElement(); + if ( fieldElement.tagName() == TQString::fromLatin1( "plugin-data-field" ) ) { - pluginData.insert( fieldElement.attribute( QString::fromLatin1( "key" ), - QString::fromLatin1( "undefined-key" ) ), fieldElement.text() ); + pluginData.insert( fieldElement.attribute( TQString::fromLatin1( "key" ), + TQString::fromLatin1( "undefined-key" ) ), fieldElement.text() ); } field = field.nextSibling(); } d->pluginData.insert( pluginId, pluginData ); } - else if ( element.tagName() == QString::fromLatin1( "custom-icons" ) ) + else if ( element.tagName() == TQString::fromLatin1( "custom-icons" ) ) { - d->useCustomIcon= element.attribute( QString::fromLatin1( "use" ), QString::fromLatin1( "1" ) ) == QString::fromLatin1( "1" ); - QDomNode ic = element.firstChild(); + d->useCustomIcon= element.attribute( TQString::fromLatin1( "use" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ); + TQDomNode ic = element.firstChild(); while( !ic.isNull() ) { - QDomElement iconElement = ic.toElement(); - if ( iconElement.tagName() == QString::fromLatin1( "icon" ) ) + TQDomElement iconElement = ic.toElement(); + if ( iconElement.tagName() == TQString::fromLatin1( "icon" ) ) { - QString stateStr = iconElement.attribute( QString::fromLatin1( "state" ), QString::null ); - QString icon = iconElement.text(); + TQString stateStr = iconElement.attribute( TQString::fromLatin1( "state" ), TQString::null ); + TQString icon = iconElement.text(); IconState state = None; - if ( stateStr == QString::fromLatin1( "open" ) ) + if ( stateStr == TQString::fromLatin1( "open" ) ) state = Open; - if ( stateStr == QString::fromLatin1( "closed" ) ) + if ( stateStr == TQString::fromLatin1( "closed" ) ) state = Closed; - if ( stateStr == QString::fromLatin1( "online" ) ) + if ( stateStr == TQString::fromLatin1( "online" ) ) state = Online; - if ( stateStr == QString::fromLatin1( "offline" ) ) + if ( stateStr == TQString::fromLatin1( "offline" ) ) state = Offline; - if ( stateStr == QString::fromLatin1( "away" ) ) + if ( stateStr == TQString::fromLatin1( "away" ) ) state = Away; - if ( stateStr == QString::fromLatin1( "unknown" ) ) + if ( stateStr == TQString::fromLatin1( "unknown" ) ) state = Unknown; d->icons[ state ] = icon; @@ -220,7 +220,7 @@ bool ContactListElement::fromXML( const QDomElement& element ) return true; } -QString ContactListElement::icon( ContactListElement::IconState state ) const +TQString ContactListElement::icon( ContactListElement::IconState state ) const { if ( d->icons.contains( state ) ) return d->icons[state]; @@ -228,7 +228,7 @@ QString ContactListElement::icon( ContactListElement::IconState state ) const return d->icons[ None ]; } -void ContactListElement::setIcon( const QString& icon , ContactListElement::IconState state ) +void ContactListElement::setIcon( const TQString& icon , ContactListElement::IconState state ) { if ( icon.isNull() ) d->icons.remove( state ); diff --git a/kopete/libkopete/kopetecontactlistelement.h b/kopete/libkopete/kopetecontactlistelement.h index b0f2eb69..6e9d1816 100644 --- a/kopete/libkopete/kopetecontactlistelement.h +++ b/kopete/libkopete/kopetecontactlistelement.h @@ -19,8 +19,8 @@ #ifndef KOPETEPLUGINDATAOBJECT_H #define KOPETEPLUGINDATAOBJECT_H -#include -#include +#include +#include #include "kopete_export.h" @@ -41,12 +41,12 @@ class Plugin; * * It also allow to store an icon for this element. */ -class KOPETE_EXPORT ContactListElement : public QObject /* public KopeteNotifyDataObject */ +class KOPETE_EXPORT ContactListElement : public TQObject /* public KopeteNotifyDataObject */ { Q_OBJECT protected: - ContactListElement( QObject *parent = 0L, const char *name = 0L ); + ContactListElement( TQObject *parent = 0L, const char *name = 0L ); ~ContactListElement(); @@ -54,7 +54,7 @@ public: /** * Set the plugin-specific data. - * The data in the provided QMap is a set of key/value pairs. + * The data in the provided TQMap is a set of key/value pairs. * Note that protocol plugins usually shouldn't use this method, but * reimplement @ref Contact::serialize() instead. This method * is called by @ref Protocol for those classes. @@ -63,7 +63,7 @@ public: * You may want to consider the @ref setPluginData() overload * that takes a single field as parameter. */ - void setPluginData( Plugin *plugin, const QMap &value ); + void setPluginData( Plugin *plugin, const TQMap &value ); /** * Convenience method to store or change only a single field of the @@ -73,7 +73,7 @@ public: * * Note that you should save the file after adding data or it will get lost. */ - void setPluginData( Plugin *plugin, const QString &key, const QString &value ); + void setPluginData( Plugin *plugin, const TQString &key, const TQString &value ); /** * Get the settings as stored previously by calls to @ref setPluginData() @@ -81,7 +81,7 @@ public: * Note that calling this method for protocol plugins that use the * @ref Contact::serialize() API may yield unexpected results. */ - QMap pluginData( Plugin *plugin ) const; + TQMap pluginData( Plugin *plugin ) const; /** * Convenience method to retrieve only a single field from the plugin @@ -91,7 +91,7 @@ public: * from the XML file. Don't call this method before then (e.g. in * constructors). */ - QString pluginData( Plugin *plugin, const QString &key ) const; + TQString pluginData( Plugin *plugin, const TQString &key ) const; /** * The various icon states. Some state are reserved for Groups, @@ -105,13 +105,13 @@ public: * if there is no icon registered for this state, the None icon is used * if available */ - QString icon( IconState state = None ) const; + TQString icon( IconState state = None ) const; /** * Set the icon in the given state - * To clear an entry, set a QString::null + * To clear an entry, set a TQString::null */ - void setIcon( const QString &icon, IconState = None ); + void setIcon( const TQString &icon, IconState = None ); /** * return if yes or no the user wants to display some custom icon. @@ -134,7 +134,7 @@ signals: /** * The icon to use for some state has changed */ - void iconChanged( Kopete::ContactListElement::IconState, const QString & ); + void iconChanged( Kopete::ContactListElement::IconState, const TQString & ); /** * The visual appearance of some of our icons has changed @@ -150,14 +150,14 @@ protected: /** * Return a XML representation of plugin data */ - const QValueList toXML(); + const TQValueList toXML(); /** * Load plugin data from one Dom Element: * It should be a element or a element. if not, nothing will happen * @return true if something has ben loaded. false if the element was not a fine */ - bool fromXML( const QDomElement &element ); + bool fromXML( const TQDomElement &element ); private: class Private; diff --git a/kopete/libkopete/kopetecontactproperty.cpp b/kopete/libkopete/kopetecontactproperty.cpp index 87e176af..e4478a27 100644 --- a/kopete/libkopete/kopetecontactproperty.cpp +++ b/kopete/libkopete/kopetecontactproperty.cpp @@ -25,9 +25,9 @@ namespace Kopete struct ContactPropertyTmplPrivate { - QString key; - QString label; - QString icon; + TQString key; + TQString label; + TQString icon; bool persistent; bool richText; bool privateProp; @@ -45,8 +45,8 @@ ContactPropertyTmpl::ContactPropertyTmpl() // Don't register empty template } -ContactPropertyTmpl::ContactPropertyTmpl(const QString &key, - const QString &label, const QString &icon, bool persistent, bool richText, bool privateProp) +ContactPropertyTmpl::ContactPropertyTmpl(const TQString &key, + const TQString &label, const TQString &icon, bool persistent, bool richText, bool privateProp) { ContactPropertyTmpl other = Kopete::Global::Properties::self()->tmpl(key); if(other.isNull()) @@ -124,17 +124,17 @@ bool ContactPropertyTmpl::operator!=(const ContactPropertyTmpl &other) const } -const QString &ContactPropertyTmpl::key() const +const TQString &ContactPropertyTmpl::key() const { return d->key; } -const QString &ContactPropertyTmpl::label() const +const TQString &ContactPropertyTmpl::label() const { return d->label; } -const QString &ContactPropertyTmpl::icon() const +const TQString &ContactPropertyTmpl::icon() const { return d->icon; } @@ -170,7 +170,7 @@ ContactProperty::ContactProperty() } ContactProperty::ContactProperty(const ContactPropertyTmpl &tmpl, - const QVariant &val) + const TQVariant &val) { mTemplate = tmpl; mValue = val; @@ -181,7 +181,7 @@ ContactProperty::~ContactProperty() //kdDebug(14000) << k_funcinfo << "this = " << (void *)this << endl; } -const QVariant &ContactProperty::value() const +const TQVariant &ContactProperty::value() const { return mValue; } diff --git a/kopete/libkopete/kopetecontactproperty.h b/kopete/libkopete/kopetecontactproperty.h index b5c8f060..f7213faa 100644 --- a/kopete/libkopete/kopetecontactproperty.h +++ b/kopete/libkopete/kopetecontactproperty.h @@ -19,7 +19,7 @@ #ifndef _KOPETECONTACTPROPERTY_H_ #define _KOPETECONTACTPROPERTY_H_ -#include +#include #include "kopete_export.h" @@ -56,9 +56,9 @@ class KOPETE_EXPORT ContactPropertyTmpl * @param privateProp if true, properties based on this template won't be * visible to the user **/ - ContactPropertyTmpl( const QString &key, - const QString &label, - const QString &icon = QString::null, + ContactPropertyTmpl( const TQString &key, + const TQString &label, + const TQString &icon = TQString::null, bool persistent = false, bool richText = false, bool privateProp = false ); @@ -80,17 +80,17 @@ class KOPETE_EXPORT ContactPropertyTmpl * Getter for the unique key. Properties based on this template will be * stored with this key **/ - const QString &key() const; + const TQString &key() const; /** * Getter for i18ned label **/ - const QString &label() const; + const TQString &label() const; /** * Getter for icon to show aside or instead of @p label() **/ - const QString &icon() const; + const TQString &icon() const; /** * Returns true if properties based on this template should @@ -119,9 +119,9 @@ class KOPETE_EXPORT ContactPropertyTmpl bool isNull() const; /** - * A Map of QString and ContactPropertyTmpl objects, based on QMap + * A Map of TQString and ContactPropertyTmpl objects, based on QMap **/ - typedef QMap Map; + typedef TQMap Map; private: ContactPropertyTmplPrivate *d; @@ -149,7 +149,7 @@ class KOPETE_EXPORT ContactProperty * @param tmpl The contact property template this property is based on * @param value The value this Property holds **/ - ContactProperty(const ContactPropertyTmpl &tmpl, const QVariant &value); + ContactProperty(const ContactPropertyTmpl &tmpl, const TQVariant &value); /** Destructor **/ ~ContactProperty(); @@ -162,7 +162,7 @@ class KOPETE_EXPORT ContactProperty /** * Getter for this properties value **/ - const QVariant &value() const; + const TQVariant &value() const; /** * The null, i.e. empty, ContactProperty @@ -183,10 +183,10 @@ class KOPETE_EXPORT ContactProperty /** * A map of key,ContactProperty items **/ - typedef QMap Map; + typedef TQMap Map; private: - QVariant mValue; + TQVariant mValue; ContactPropertyTmpl mTemplate; }; diff --git a/kopete/libkopete/kopeteeventpresentation.cpp b/kopete/libkopete/kopeteeventpresentation.cpp index f90a19e5..659b1b41 100644 --- a/kopete/libkopete/kopeteeventpresentation.cpp +++ b/kopete/libkopete/kopeteeventpresentation.cpp @@ -23,7 +23,7 @@ Kopete::EventPresentation::EventPresentation( const PresentationType type ) } Kopete::EventPresentation::EventPresentation( const PresentationType type, - const QString &content, const bool singleShot, const bool enabled ) + const TQString &content, const bool singleShot, const bool enabled ) { m_type = type; m_content = content; @@ -40,7 +40,7 @@ Kopete::EventPresentation::PresentationType Kopete::EventPresentation::type() return m_type; } -QString Kopete::EventPresentation::content() +TQString Kopete::EventPresentation::content() { return m_content; } @@ -55,7 +55,7 @@ bool Kopete::EventPresentation::singleShot() return m_singleShot; } -void Kopete::EventPresentation::setContent( const QString &content ) +void Kopete::EventPresentation::setContent( const TQString &content ) { m_content = content; } @@ -70,21 +70,21 @@ void Kopete::EventPresentation::setSingleShot( const bool singleShot ) m_singleShot = singleShot; } -QString Kopete::EventPresentation::toString() +TQString Kopete::EventPresentation::toString() { - QString type; + TQString type; switch ( m_type ) { case Sound: - type= QString::fromLatin1("sound"); + type= TQString::fromLatin1("sound"); break; case Message: - type= QString::fromLatin1("message"); + type= TQString::fromLatin1("message"); break; case Chat: - type= QString::fromLatin1("chat"); + type= TQString::fromLatin1("chat"); break; } - QString stringRep = QString::fromLatin1( "Presentation; type=%1; content=%2; enabled=%3; single shot=%4\n" ).arg(type).arg(m_content).arg(m_enabled).arg(m_singleShot); + TQString stringRep = TQString::fromLatin1( "Presentation; type=%1; content=%2; enabled=%3; single shot=%4\n" ).arg(type).arg(m_content).arg(m_enabled).arg(m_singleShot); return stringRep; } diff --git a/kopete/libkopete/kopeteeventpresentation.h b/kopete/libkopete/kopeteeventpresentation.h index ea30cb5d..0576a9b1 100644 --- a/kopete/libkopete/kopeteeventpresentation.h +++ b/kopete/libkopete/kopeteeventpresentation.h @@ -18,7 +18,7 @@ #ifndef KOPETEEVENTPRESENTATION_H #define KOPETEEVENTPRESENTATION_H -#include +#include #include "kopete_export.h" @@ -31,22 +31,22 @@ public: enum PresentationType { Sound, Message, Chat }; EventPresentation( const PresentationType type ); EventPresentation( const PresentationType type, - const QString &content = QString::null, + const TQString &content = TQString::null, const bool singleShot = false, const bool enabled = false ); ~EventPresentation(); PresentationType type(); - QString content(); + TQString content(); bool enabled(); bool singleShot(); - void setContent( const QString &content ); + void setContent( const TQString &content ); void setEnabled( const bool enabled ); void setSingleShot( const bool singleShot ); - QString toString(); + TQString toString(); private: PresentationType m_type; - QString m_content; + TQString m_content; bool m_enabled; bool m_singleShot; }; diff --git a/kopete/libkopete/kopeteglobal.cpp b/kopete/libkopete/kopeteglobal.cpp index a11dafdd..093be4df 100644 --- a/kopete/libkopete/kopeteglobal.cpp +++ b/kopete/libkopete/kopeteglobal.cpp @@ -67,7 +67,7 @@ Properties::~Properties() delete d; } -const ContactPropertyTmpl &Properties::tmpl(const QString &key) const +const ContactPropertyTmpl &Properties::tmpl(const TQString &key) const { if(d->mTemplates.contains(key)) { @@ -79,7 +79,7 @@ const ContactPropertyTmpl &Properties::tmpl(const QString &key) const return ContactPropertyTmpl::null; } -bool Properties::registerTemplate(const QString &key, +bool Properties::registerTemplate(const TQString &key, const ContactPropertyTmpl &tmpl) { if(d->mTemplates.contains(key)) @@ -95,104 +95,104 @@ bool Properties::registerTemplate(const QString &key, } } -void Properties::unregisterTemplate(const QString &key) +void Properties::unregisterTemplate(const TQString &key) { kdDebug(14000) << k_funcinfo << "called for key: '" << key << "'" << endl; d->mTemplates.remove(key); } -bool Properties::isRegistered(const QString &key) +bool Properties::isRegistered(const TQString &key) { return d->mTemplates.contains(key); } const ContactPropertyTmpl &Properties::fullName() const { - return createProp(QString::fromLatin1("FormattedName"), + return createProp(TQString::fromLatin1("FormattedName"), i18n("Full Name")); } const ContactPropertyTmpl &Properties::idleTime() const { - return createProp(QString::fromLatin1("idleTime"), + return createProp(TQString::fromLatin1("idleTime"), i18n("Idle Time")); } const ContactPropertyTmpl &Properties::onlineSince() const { - return createProp(QString::fromLatin1("onlineSince"), + return createProp(TQString::fromLatin1("onlineSince"), i18n("Online Since")); } const ContactPropertyTmpl &Properties::lastSeen() const { - return createProp(QString::fromLatin1("lastSeen"), - i18n("Last Seen"), QString::null, true); + return createProp(TQString::fromLatin1("lastSeen"), + i18n("Last Seen"), TQString::null, true); } const ContactPropertyTmpl &Properties::awayMessage() const { - return createProp(QString::fromLatin1("awayMessage"), + return createProp(TQString::fromLatin1("awayMessage"), i18n("Away Message")); } const ContactPropertyTmpl &Properties::firstName() const { - return createProp(QString::fromLatin1("firstName"), - i18n("First Name"), QString::null, true); + return createProp(TQString::fromLatin1("firstName"), + i18n("First Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::lastName() const { - return createProp(QString::fromLatin1("lastName"), - i18n("Last Name"), QString::null, true); + return createProp(TQString::fromLatin1("lastName"), + i18n("Last Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::privatePhone() const { - return createProp(QString::fromLatin1("privatePhoneNumber"), - i18n("Private Phone"), QString::null, true); + return createProp(TQString::fromLatin1("privatePhoneNumber"), + i18n("Private Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::privateMobilePhone() const { - return createProp(QString::fromLatin1("privateMobilePhoneNumber"), - i18n("Private Mobile Phone"), QString::null, true); + return createProp(TQString::fromLatin1("privateMobilePhoneNumber"), + i18n("Private Mobile Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::workPhone() const { - return createProp(QString::fromLatin1("workPhoneNumber"), - i18n("Work Phone"), QString::null, true); + return createProp(TQString::fromLatin1("workPhoneNumber"), + i18n("Work Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::workMobilePhone() const { - return createProp(QString::fromLatin1("workMobilePhoneNumber"), - i18n("Work Mobile Phone"), QString::null, true); + return createProp(TQString::fromLatin1("workMobilePhoneNumber"), + i18n("Work Mobile Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::emailAddress() const { - return createProp(QString::fromLatin1("emailAddress"), - i18n("Email Address"), QString::fromLatin1("mail_generic"), true); + return createProp(TQString::fromLatin1("emailAddress"), + i18n("Email Address"), TQString::fromLatin1("mail_generic"), true); } const ContactPropertyTmpl &Properties::nickName() const { - return createProp(QString::fromLatin1("nickName"), - i18n("Nick Name"), QString::null, true); + return createProp(TQString::fromLatin1("nickName"), + i18n("Nick Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::photo() const { - return createProp(QString::fromLatin1("photo"), - i18n("Photo"), QString::null, true); + return createProp(TQString::fromLatin1("photo"), + i18n("Photo"), TQString::null, true); } -const ContactPropertyTmpl &Properties::createProp(const QString &key, - const QString &label, const QString &icon, bool persistent) const +const ContactPropertyTmpl &Properties::createProp(const TQString &key, + const TQString &label, const TQString &icon, bool persistent) const { /*kdDebug(14000) << k_funcinfo << "key = " << key << ", label = " << label << endl;*/ @@ -216,15 +216,15 @@ const ContactPropertyTmpl::Map &Properties::templateMap() const // ----------------------------------------------------------------------------- -void installEmoticonTheme(const QString &archiveName) +void installEmoticonTheme(const TQString &archiveName) { - QStringList foundThemes; + TQStringList foundThemes; KArchiveEntry *currentEntry = 0L; KArchiveDirectory* currentDir = 0L; KProgressDialog *progressDlg = 0L; KArchive *archive = 0L; - QString localThemesDir(locateLocal("emoticons", QString::null) ); + TQString localThemesDir(locateLocal("emoticons", TQString::null) ); if(localThemesDir.isEmpty()) { @@ -235,20 +235,20 @@ void installEmoticonTheme(const QString &archiveName) } progressDlg = new KProgressDialog(0 , "emoticonInstProgress", - i18n("Installing Emoticon Themes..."), QString::null, true); + i18n("Installing Emoticon Themes..."), TQString::null, true); progressDlg->progressBar()->setTotalSteps(foundThemes.count()); progressDlg->show(); kapp->processEvents(); - QString currentBundleMimeType = KMimeType::findByPath(archiveName, 0, false)->name(); - if( currentBundleMimeType == QString::fromLatin1("application/x-zip") ) + TQString currentBundleMimeType = KMimeType::findByPath(archiveName, 0, false)->name(); + if( currentBundleMimeType == TQString::fromLatin1("application/x-zip") ) archive = new KZip(archiveName); - else if( currentBundleMimeType == QString::fromLatin1("application/x-tgz") || - currentBundleMimeType == QString::fromLatin1("application/x-tbz") || - currentBundleMimeType == QString::fromLatin1("application/x-gzip") || - currentBundleMimeType == QString::fromLatin1("application/x-bzip2") ) + else if( currentBundleMimeType == TQString::fromLatin1("application/x-tgz") || + currentBundleMimeType == TQString::fromLatin1("application/x-tbz") || + currentBundleMimeType == TQString::fromLatin1("application/x-gzip") || + currentBundleMimeType == TQString::fromLatin1("application/x-bzip2") ) archive = new KTar(archiveName); - else if(archiveName.endsWith(QString::fromLatin1("jisp")) || archiveName.endsWith(QString::fromLatin1("zip")) ) + else if(archiveName.endsWith(TQString::fromLatin1("jisp")) || archiveName.endsWith(TQString::fromLatin1("zip")) ) archive = new KZip(archiveName); else archive = new KTar(archiveName); @@ -266,15 +266,15 @@ void installEmoticonTheme(const QString &archiveName) const KArchiveDirectory* rootDir = archive->directory(); // iterate all the dirs looking for an emoticons.xml file - QStringList entries = rootDir->entries(); - for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) + TQStringList entries = rootDir->entries(); + for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { currentEntry = const_cast(rootDir->entry(*it)); if (currentEntry->isDirectory()) { currentDir = dynamic_cast( currentEntry ); - if (currentDir && ( currentDir->entry(QString::fromLatin1("emoticons.xml")) != NULL || - currentDir->entry(QString::fromLatin1("icondef.xml")) != NULL ) ) + if (currentDir && ( currentDir->entry(TQString::fromLatin1("emoticons.xml")) != NULL || + currentDir->entry(TQString::fromLatin1("icondef.xml")) != NULL ) ) foundThemes.append(currentDir->name()); } } @@ -290,7 +290,7 @@ void installEmoticonTheme(const QString &archiveName) return; } - for (QStringList::ConstIterator it = foundThemes.begin(); it != foundThemes.end(); ++it) + for (TQStringList::ConstIterator it = foundThemes.begin(); it != foundThemes.end(); ++it) { progressDlg->setLabel( i18n("Installing %1 emoticon theme") diff --git a/kopete/libkopete/kopeteglobal.h b/kopete/libkopete/kopeteglobal.h index aa6456f4..395d0eae 100644 --- a/kopete/libkopete/kopeteglobal.h +++ b/kopete/libkopete/kopeteglobal.h @@ -47,7 +47,7 @@ namespace Global * * TODO: If possible, port it to KIO instead of using ugly blocking KTar **/ - KOPETE_EXPORT void installEmoticonTheme(const QString &localPath); + KOPETE_EXPORT void installEmoticonTheme(const TQString &localPath); /** * \brief Global facility to query/store templates that are needed by KopeteContactProperty @@ -72,7 +72,7 @@ namespace Global * Return a template with defined by @p key, if no such template has * been registered ContactPropertyTmpl::null will be returned */ - const ContactPropertyTmpl &tmpl(const QString &key) const; + const ContactPropertyTmpl &tmpl(const TQString &key) const; /** * @return a ready-to-use template for a contact's full name. @@ -135,8 +135,8 @@ namespace Global /** * default template for a contact's photo. * - * It could be either a QString or a QImage. - * If it's a QString, it should points to the path the image is stored. + * It could be either a TQString or a TQImage. + * If it's a TQString, it should points to the path the image is stored. */ const ContactPropertyTmpl &photo() const; @@ -149,18 +149,18 @@ namespace Global * return true if a template with key @p key is already registered, * false otherwise */ - bool isRegistered(const QString &key); + bool isRegistered(const TQString &key); private: Properties(); ~Properties(); - bool registerTemplate(const QString &key, + bool registerTemplate(const TQString &key, const ContactPropertyTmpl &tmpl); - void unregisterTemplate(const QString &key); + void unregisterTemplate(const TQString &key); - const ContactPropertyTmpl &createProp(const QString &key, - const QString &label, const QString &icon=QString::null, + const ContactPropertyTmpl &createProp(const TQString &key, + const TQString &label, const TQString &icon=TQString::null, bool persistent = false) const; private: diff --git a/kopete/libkopete/kopetegroup.cpp b/kopete/libkopete/kopetegroup.cpp index f50eb08b..6206545a 100644 --- a/kopete/libkopete/kopetegroup.cpp +++ b/kopete/libkopete/kopetegroup.cpp @@ -30,7 +30,7 @@ namespace Kopete { class Group::Private { public: - QString displayName; + TQString displayName; Group::GroupType type; bool expanded; uint groupId; @@ -59,7 +59,7 @@ Group * Group::temporary() uint Group::Private::uniqueGroupId = 0; -Group::Group( const QString &_name, GroupType _type ) +Group::Group( const TQString &_name, GroupType _type ) : ContactListElement( ContactList::self() ) { d = new Private; @@ -87,9 +87,9 @@ Group::~Group() delete d; } -QPtrList Group::members() const +TQPtrList Group::members() const { - QPtrList members = ContactList::self()->metaContacts(); + TQPtrList members = ContactList::self()->metaContacts(); // members is a *copy* of the meta contacts, so using first(), next() and remove() is fine. for( members.first(); members.current(); ) { @@ -101,49 +101,49 @@ QPtrList Group::members() const return members; } -const QDomElement Group::toXML() +const TQDomElement Group::toXML() { - QDomDocument group; - group.appendChild( group.createElement( QString::fromLatin1( "kopete-group" ) ) ); - group.documentElement().setAttribute( QString::fromLatin1( "groupId" ), QString::number( groupId() ) ); + TQDomDocument group; + group.appendChild( group.createElement( TQString::fromLatin1( "kopete-group" ) ) ); + group.documentElement().setAttribute( TQString::fromLatin1( "groupId" ), TQString::number( groupId() ) ); - QString type; + TQString type; switch ( d->type ) { case Temporary: - type = QString::fromLatin1( "temporary" ); + type = TQString::fromLatin1( "temporary" ); break; case TopLevel: - type = QString::fromLatin1( "top-level" ); + type = TQString::fromLatin1( "top-level" ); break; default: - type = QString::fromLatin1( "standard" ); // == Normal + type = TQString::fromLatin1( "standard" ); // == Normal break; } - group.documentElement().setAttribute( QString::fromLatin1( "type" ), type ); - group.documentElement().setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) ); + group.documentElement().setAttribute( TQString::fromLatin1( "type" ), type ); + group.documentElement().setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) ); - QDomElement displayName = group.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = group.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( group.createTextNode( d->displayName ) ); group.documentElement().appendChild( displayName ); // Store other plugin data - QValueList pluginData = ContactListElement::toXML(); - for ( QValueList::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) + TQValueList pluginData = ContactListElement::toXML(); + for ( TQValueList::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) group.documentElement().appendChild( group.importNode( *it, true ) ); // Store custom notification data - QDomElement notifyData = Kopete::NotifyDataObject::notifyDataToXML(); + TQDomElement notifyData = Kopete::NotifyDataObject::notifyDataToXML(); if ( notifyData.hasChildNodes() ) group.documentElement().appendChild( group.importNode( notifyData, true ) ); return group.documentElement(); } -bool Group::fromXML( const QDomElement &data ) +bool Group::fromXML( const TQDomElement &data ) { - QString strGroupId = data.attribute( QString::fromLatin1( "groupId" ) ); + TQString strGroupId = data.attribute( TQString::fromLatin1( "groupId" ) ); if ( !strGroupId.isEmpty() ) { d->groupId = strGroupId.toUInt(); @@ -154,8 +154,8 @@ bool Group::fromXML( const QDomElement &data ) // Don't overwrite type for Temporary and TopLevel groups if ( d->type != Temporary && d->type != TopLevel ) { - QString type = data.attribute( QString::fromLatin1( "type" ), QString::fromLatin1( "standard" ) ); - if ( type == QString::fromLatin1( "temporary" ) ) + TQString type = data.attribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) ); + if ( type == TQString::fromLatin1( "temporary" ) ) { if ( d->type != Temporary ) { @@ -163,7 +163,7 @@ bool Group::fromXML( const QDomElement &data ) return false; } } - else if ( type == QString::fromLatin1( "top-level" ) ) + else if ( type == TQString::fromLatin1( "top-level" ) ) { if ( d->type != TopLevel ) { @@ -177,20 +177,20 @@ bool Group::fromXML( const QDomElement &data ) } } - QString view = data.attribute( QString::fromLatin1( "view" ), QString::fromLatin1( "expanded" ) ); - d->expanded = ( view != QString::fromLatin1( "collapsed" ) ); + TQString view = data.attribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) ); + d->expanded = ( view != TQString::fromLatin1( "collapsed" ) ); - QDomNode groupData = data.firstChild(); + TQDomNode groupData = data.firstChild(); while ( !groupData.isNull() ) { - QDomElement groupElement = groupData.toElement(); - if ( groupElement.tagName() == QString::fromLatin1( "display-name" ) ) + TQDomElement groupElement = groupData.toElement(); + if ( groupElement.tagName() == TQString::fromLatin1( "display-name" ) ) { // Don't set display name for temporary or top-level items if ( d->type == Normal ) d->displayName = groupElement.text(); } - else if( groupElement.tagName() == QString::fromLatin1( "custom-notifications" ) ) + else if( groupElement.tagName() == TQString::fromLatin1( "custom-notifications" ) ) { Kopete::NotifyDataObject::notifyDataFromXML( groupElement ); } @@ -208,10 +208,10 @@ bool Group::fromXML( const QDomElement &data ) switch ( d->type ) { case Temporary: - d->displayName = QString::fromLatin1( "Temporary" ); + d->displayName = TQString::fromLatin1( "Temporary" ); break; case TopLevel: - d->displayName = QString::fromLatin1( "Top-Level" ); + d->displayName = TQString::fromLatin1( "Top-Level" ); break; default: d->displayName = i18n( "(Unnamed Group)" ); @@ -223,17 +223,17 @@ bool Group::fromXML( const QDomElement &data ) return ( d->type == Normal ); } -void Group::setDisplayName( const QString &s ) +void Group::setDisplayName( const TQString &s ) { if ( d->displayName != s ) { - QString oldname = d->displayName; + TQString oldname = d->displayName; d->displayName = s; emit displayNameChanged( this, oldname ); } } -QString Group::displayName() const +TQString Group::displayName() const { return d->displayName; } @@ -269,7 +269,7 @@ uint Group::groupId() const void Group::sendMessage() { - QPtrList list = onlineMembers(); + TQPtrList list = onlineMembers(); Kopete::MetaContact *mc = list.first(); Kopete::Contact *c; @@ -279,18 +279,18 @@ void Group::sendMessage() c->sendMessage(); if( c->manager( Contact::CanCreate ) ) { - connect( c->manager(), SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( sendMessage( Kopete::Message& ) )); + connect( c->manager(), TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( sendMessage( Kopete::Message& ) )); } } void Group::sendMessage( Message& msg ) { - QPtrList list = onlineMembers(); + TQPtrList list = onlineMembers(); Kopete::MetaContact *mc = list.first(); ChatSession *cs=msg.manager(); if( cs ) { - disconnect( cs, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( sendMessage( Kopete::Message& ) ) ); + disconnect( cs, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( sendMessage( Kopete::Message& ) ) ); } else return; @@ -314,9 +314,9 @@ void Group::sendMessage( Message& msg ) } } -QPtrList Group::onlineMembers() const +TQPtrList Group::onlineMembers() const { - QPtrList list = members(); + TQPtrList list = members(); for( list.first(); list.current(); ) if( list.current()->isReachable() && list.current()->isOnline() ) diff --git a/kopete/libkopete/kopetegroup.h b/kopete/libkopete/kopetegroup.h index 37b8572d..e832e955 100644 --- a/kopete/libkopete/kopetegroup.h +++ b/kopete/libkopete/kopetegroup.h @@ -24,7 +24,7 @@ #include "kopete_export.h" -#include +#include class QDomElement; @@ -46,7 +46,7 @@ class Message; */ class KOPETE_EXPORT Group : public ContactListElement, public NotifyDataObject { - Q_PROPERTY( QString displayName READ displayName WRITE setDisplayName ) + Q_PROPERTY( TQString displayName READ displayName WRITE setDisplayName ) Q_PROPERTY( uint groupId READ groupId ) Q_PROPERTY( bool expanded READ isExpanded WRITE setExpanded ) @@ -69,7 +69,7 @@ public: * * Overloaded constructor to create a group with a display name of the specified type. */ - Group( const QString &displayName, GroupType type = Normal ); + Group( const TQString &displayName, GroupType type = Normal ); ~Group(); @@ -78,12 +78,12 @@ public: * * \return the display name of the group */ - QString displayName() const; + TQString displayName() const; /** * \brief Rename the group */ - void setDisplayName( const QString &newName ); + void setDisplayName( const TQString &newName ); /** * \return the group type @@ -105,7 +105,7 @@ public: * This function is not very efficient - it searches through all the metacontacts in the contact list * \return the members of this group */ - QPtrList members() const; + TQPtrList members() const; /** * \brief Set if the group is expanded. @@ -137,14 +137,14 @@ public: * @internal * Outputs the group data in XML */ - const QDomElement toXML(); + const TQDomElement toXML(); /** * @internal * Loads the group data from XML */ - bool fromXML( const QDomElement &data ); + bool fromXML( const TQDomElement &data ); @@ -160,7 +160,7 @@ signals: /** * \brief Emitted when the group has been renamed */ - void displayNameChanged( Kopete::Group *group , const QString &oldName ); + void displayNameChanged( Kopete::Group *group , const TQString &oldName ); private slots: @@ -177,7 +177,7 @@ private: /** * @internal used to get reachabe contact to send message to thom. */ - QPtrList onlineMembers() const; + TQPtrList onlineMembers() const; }; } //END namespace Kopete diff --git a/kopete/libkopete/kopetemessage.cpp b/kopete/libkopete/kopetemessage.cpp index 54761799..6f223748 100644 --- a/kopete/libkopete/kopetemessage.cpp +++ b/kopete/libkopete/kopetemessage.cpp @@ -18,18 +18,18 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include +#include #include "kopetemessage.h" #include "kopetemetacontact.h" @@ -46,81 +46,81 @@ class Message::Private : public KShared { public: - Private( const QDateTime &timeStamp, const Contact *from, const ContactPtrList &to, - const QString &subject, MessageDirection direction, - const QString &requestedPlugin, MessageType type ); + Private( const TQDateTime &timeStamp, const Contact *from, const ContactPtrList &to, + const TQString &subject, MessageDirection direction, + const TQString &requestedPlugin, MessageType type ); - QGuardedPtr from; + TQGuardedPtr from; ContactPtrList to; ChatSession *manager; MessageDirection direction; MessageFormat format; MessageType type; - QString requestedPlugin; + TQString requestedPlugin; MessageImportance importance; bool bgOverride; bool fgOverride; bool rtfOverride; bool isRightToLeft; - QDateTime timeStamp; - QFont font; + TQDateTime timeStamp; + TQFont font; - QColor fgColor; - QColor bgColor; - QString body; - QString subject; + TQColor fgColor; + TQColor bgColor; + TQString body; + TQString subject; }; -Message::Private::Private( const QDateTime &timeStamp, const Contact *from, - const ContactPtrList &to, const QString &subject, - MessageDirection direction, const QString &requestedPlugin, MessageType type ) +Message::Private::Private( const TQDateTime &timeStamp, const Contact *from, + const ContactPtrList &to, const TQString &subject, + MessageDirection direction, const TQString &requestedPlugin, MessageType type ) : from( from ), to( to ), manager( 0 ), direction( direction ), format( PlainText ), type( type ), requestedPlugin( requestedPlugin ), importance( (to.count() <= 1) ? Normal : Low ), bgOverride( false ), fgOverride( false ), rtfOverride( false ), isRightToLeft( false ), - timeStamp( timeStamp ), body( QString::null ), subject( subject ) + timeStamp( timeStamp ), body( TQString::null ), subject( subject ) { } Message::Message() -: d( new Private( QDateTime::currentDateTime(), 0L, QPtrList(), QString::null, Internal, - QString::null, TypeNormal ) ) +: d( new Private( TQDateTime::currentDateTime(), 0L, TQPtrList(), TQString::null, Internal, + TQString::null, TypeNormal ) ) { } -Message::Message( const Contact *fromKC, const QPtrList &toKC, const QString &body, - MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) -: d( new Private( QDateTime::currentDateTime(), fromKC, toKC, QString::null, direction, requestedPlugin, type ) ) +Message::Message( const Contact *fromKC, const TQPtrList &toKC, const TQString &body, + MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) +: d( new Private( TQDateTime::currentDateTime(), fromKC, toKC, TQString::null, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const Contact *fromKC, const Contact *toKC, const QString &body, - MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) +Message::Message( const Contact *fromKC, const Contact *toKC, const TQString &body, + MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) { - QPtrList to; + TQPtrList to; to.append(toKC); - d = new Private( QDateTime::currentDateTime(), fromKC, to, QString::null, direction, requestedPlugin, type ); + d = new Private( TQDateTime::currentDateTime(), fromKC, to, TQString::null, direction, requestedPlugin, type ); doSetBody( body, f ); } -Message::Message( const Contact *fromKC, const QPtrList &toKC, const QString &body, - const QString &subject, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) - : d( new Private( QDateTime::currentDateTime(), fromKC, toKC, subject, direction, requestedPlugin, type ) ) +Message::Message( const Contact *fromKC, const TQPtrList &toKC, const TQString &body, + const TQString &subject, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) + : d( new Private( TQDateTime::currentDateTime(), fromKC, toKC, subject, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList &toKC, - const QString &body, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) - : d( new Private( timeStamp, fromKC, toKC, QString::null, direction, requestedPlugin, type ) ) +Message::Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList &toKC, + const TQString &body, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) + : d( new Private( timeStamp, fromKC, toKC, TQString::null, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList &toKC, - const QString &body, const QString &subject, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) +Message::Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList &toKC, + const TQString &body, const TQString &subject, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) : d( new Private( timeStamp, fromKC, toKC, subject, direction, requestedPlugin, type ) ) { doSetBody( body, f ); @@ -172,47 +172,47 @@ void Message::setRtfOverride( bool enabled ) d->rtfOverride = enabled; } -void Message::setFg( const QColor &color ) +void Message::setFg( const TQColor &color ) { detach(); d->fgColor=color; } -void Message::setBg( const QColor &color ) +void Message::setBg( const TQColor &color ) { detach(); d->bgColor=color; } -void Message::setFont( const QFont &font ) +void Message::setFont( const TQFont &font ) { detach(); d->font = font; } -void Message::doSetBody( const QString &_body, Message::MessageFormat f ) +void Message::doSetBody( const TQString &_body, Message::MessageFormat f ) { - QString body = _body; + TQString body = _body; //TODO: move that in ChatTextEditPart::contents if( f == RichText ) { //This is coming from the RichTextEditor component. //Strip off the containing HTML document - body.replace( QRegExp( QString::fromLatin1(".*]*>(.*).*") ), QString::fromLatin1("\\1") ); + body.replace( TQRegExp( TQString::fromLatin1(".*]*>(.*).*") ), TQString::fromLatin1("\\1") ); //Strip

tags - body.replace( QString::fromLatin1("

"), QString::null ); + body.replace( TQString::fromLatin1("

"), TQString::null ); //Replace

with a
- body.replace( QString::fromLatin1("

"), QString::fromLatin1("
") ); + body.replace( TQString::fromLatin1("

"), TQString::fromLatin1("
") ); //Remove trailing
- if ( body.endsWith( QString::fromLatin1("
") ) ) + if ( body.endsWith( TQString::fromLatin1("
") ) ) body.truncate( body.length() - 5 ); - body.remove( QString::fromLatin1("\n") ); - body.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "  " ) ); + body.remove( TQString::fromLatin1("\n") ); + body.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "  " ) ); } /* else if( f == ParsedHTML ) @@ -229,7 +229,7 @@ void Message::doSetBody( const QString &_body, Message::MessageFormat f ) d->isRightToLeft = ( f & RichText ? unescape( d->body ).isRightToLeft() : d->body.isRightToLeft() ); } -void Message::setBody( const QString &body, MessageFormat f ) +void Message::setBody( const TQString &body, MessageFormat f ) { detach(); @@ -247,9 +247,9 @@ void Message::setImportance(Message::MessageImportance i) d->importance = i; } -QString Message::unescape( const QString &xml ) +TQString Message::unescape( const TQString &xml ) { - QString data = xml; + TQString data = xml; // Remove linebreak and multiple spaces. First return nbsp's to normal spaces :) data.simplifyWhiteSpace(); @@ -263,13 +263,13 @@ QString Message::unescape( const QString &xml ) // Take the part between < and >, and extract the element name from that int matchWidth = endPos - pos + 1; - QString match = data.mid( pos + 1, matchWidth - 2 ).simplifyWhiteSpace(); + TQString match = data.mid( pos + 1, matchWidth - 2 ).simplifyWhiteSpace(); int elemEndPos = match.find( ' ' ); - QString elem = ( elemEndPos == -1 ? match.lower() : match.left( elemEndPos ).lower() ); - if ( elem == QString::fromLatin1( "img" ) ) + TQString elem = ( elemEndPos == -1 ? match.lower() : match.left( elemEndPos ).lower() ); + if ( elem == TQString::fromLatin1( "img" ) ) { // Replace smileys with their original text' - const QString attrTitle = QString::fromLatin1( "title=\"" ); + const TQString attrTitle = TQString::fromLatin1( "title=\"" ); int titlePos = match.find( attrTitle, elemEndPos ); int titleEndPos = match.find( '"', titlePos + attrTitle.length() ); if( titlePos == -1 || titleEndPos == -1 ) @@ -280,14 +280,14 @@ QString Message::unescape( const QString &xml ) } else { - QString orig = match.mid( titlePos + attrTitle.length(), + TQString orig = match.mid( titlePos + attrTitle.length(), titleEndPos - titlePos - attrTitle.length() ); data.replace( pos, matchWidth, orig ); pos += orig.length(); } } - else if ( elem == QString::fromLatin1( "/p" ) || elem == QString::fromLatin1( "/div" ) || - elem == QString::fromLatin1( "br" ) ) + else if ( elem == TQString::fromLatin1( "/p" ) || elem == TQString::fromLatin1( "/div" ) || + elem == TQString::fromLatin1( "br" ) ) { // Replace paragraph, div and line breaks with a newline data.replace( pos, matchWidth, '\n' ); @@ -302,36 +302,36 @@ QString Message::unescape( const QString &xml ) } // Replace stuff starting with '&' - data.replace( QString::fromLatin1( ">" ), QString::fromLatin1( ">" ) ); - data.replace( QString::fromLatin1( "<" ), QString::fromLatin1( "<" ) ); - data.replace( QString::fromLatin1( """ ), QString::fromLatin1( "\"" ) ); - data.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); - data.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); - data.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx; + data.replace( TQString::fromLatin1( ">" ), TQString::fromLatin1( ">" ) ); + data.replace( TQString::fromLatin1( "<" ), TQString::fromLatin1( "<" ) ); + data.replace( TQString::fromLatin1( """ ), TQString::fromLatin1( "\"" ) ); + data.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); + data.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); + data.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx; return data; } -QString Message::escape( const QString &text ) +TQString Message::escape( const TQString &text ) { - QString html = QStyleSheet::escape( text ); + TQString html = TQStyleSheet::escape( text ); //Replace carriage returns inside the text - html.replace( QString::fromLatin1( "\n" ), QString::fromLatin1( "
" ) ); + html.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "
" ) ); //Replace a tab with 4 spaces - html.replace( QString::fromLatin1( "\t" ), QString::fromLatin1( "    " ) ); + html.replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "    " ) ); //Replace multiple spaces with   //do not replace every space so we break the linebreak - html.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "  " ) ); + html.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "  " ) ); return html; } -QString Message::plainBody() const +TQString Message::plainBody() const { - QString body=d->body; + TQString body=d->body; if( d->format & RichText ) { body = unescape( body ); @@ -339,9 +339,9 @@ QString Message::plainBody() const return body; } -QString Message::escapedBody() const +TQString Message::escapedBody() const { - QString escapedBody=d->body; + TQString escapedBody=d->body; // kdDebug(14000) << k_funcinfo << escapedBody << " " << d->rtfOverride << endl; if( d->format & PlainText ) @@ -357,7 +357,7 @@ QString Message::escapedBody() const return escapedBody; } -QString Message::parsedBody() const +TQString Message::parsedBody() const { //kdDebug(14000) << k_funcinfo << "messageformat: " << d->format << endl; @@ -371,16 +371,16 @@ QString Message::parsedBody() const } } -static QString makeRegExp( const char *pattern ) +static TQString makeRegExp( const char *pattern ) { - const QString urlChar = QString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); - const QString boundaryStart = QString::fromLatin1( "(^|[^%1])(" ).arg( urlChar ); - const QString boundaryEnd = QString::fromLatin1( ")([^%1]|$)" ).arg( urlChar ); + const TQString urlChar = TQString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const TQString boundaryStart = TQString::fromLatin1( "(^|[^%1])(" ).arg( urlChar ); + const TQString boundaryEnd = TQString::fromLatin1( ")([^%1]|$)" ).arg( urlChar ); - return boundaryStart + QString::fromLatin1(pattern) + boundaryEnd; + return boundaryStart + TQString::fromLatin1(pattern) + boundaryEnd; } -QString Message::parseLinks( const QString &message, MessageFormat format ) +TQString Message::parseLinks( const TQString &message, MessageFormat format ) { if ( format == ParsedHTML ) return message; @@ -388,9 +388,9 @@ QString Message::parseLinks( const QString &message, MessageFormat format ) if ( format & RichText ) { // < in HTML *always* means start-of-tag - QStringList entries = QStringList::split( QChar('<'), message, true ); + TQStringList entries = TQStringList::split( TQChar('<'), message, true ); - QStringList::Iterator it = entries.begin(); + TQStringList::Iterator it = entries.begin(); // first one is different: it doesn't start with an HTML tag. if ( it != entries.end() ) @@ -401,55 +401,55 @@ QString Message::parseLinks( const QString &message, MessageFormat format ) for ( ; it != entries.end(); ++it ) { - QString curr = *it; + TQString curr = *it; // > in HTML means start-of-tag if and only if it's the first one after a < - int tagclose = curr.find( QChar('>') ); + int tagclose = curr.find( TQChar('>') ); // no >: the HTML is broken, but we can cope if ( tagclose == -1 ) continue; - QString tag = curr.left( tagclose + 1 ); - QString body = curr.mid( tagclose + 1 ); + TQString tag = curr.left( tagclose + 1 ); + TQString body = curr.mid( tagclose + 1 ); *it = tag + parseLinks( body, PlainText ); } - return entries.join(QString::fromLatin1("<")); + return entries.join(TQString::fromLatin1("<")); } - QString result = message; + TQString result = message; // common subpatterns - may not contain matching parens! - const QString name = QString::fromLatin1( "[\\w\\+\\-=_\\.]+" ); - const QString userAndPassword = QString::fromLatin1( "(?:%1(?::%1)?\\@)" ).arg( name ); - const QString urlChar = QString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); - const QString urlSection = QString::fromLatin1( "[%1]+" ).arg( urlChar ); - const QString domain = QString::fromLatin1( "[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); + const TQString name = TQString::fromLatin1( "[\\w\\+\\-=_\\.]+" ); + const TQString userAndPassword = TQString::fromLatin1( "(?:%1(?::%1)?\\@)" ).arg( name ); + const TQString urlChar = TQString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const TQString urlSection = TQString::fromLatin1( "[%1]+" ).arg( urlChar ); + const TQString domain = TQString::fromLatin1( "[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); //Replace http/https/ftp links: // Replace (stuff)://[user:password@](linkstuff) with a link result.replace( - QRegExp( makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, urlSection ) ), - QString::fromLatin1("\\1\\2\\3" ) ); + TQRegExp( makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, urlSection ) ), + TQString::fromLatin1("\\1\\2\\3" ) ); // Replace www.X.Y(linkstuff) with a http: link result.replace( - QRegExp( makeRegExp("%1?www\\.%2%3").arg( userAndPassword, domain, urlSection ) ), - QString::fromLatin1("\\1\\2\\3" ) ); + TQRegExp( makeRegExp("%1?www\\.%2%3").arg( userAndPassword, domain, urlSection ) ), + TQString::fromLatin1("\\1\\2\\3" ) ); //Replace Email Links // Replace user@domain with a mailto: link result.replace( - QRegExp( makeRegExp("%1@%2").arg( name, domain ) ), - QString::fromLatin1("\\1\\2\\3") ); + TQRegExp( makeRegExp("%1@%2").arg( name, domain ) ), + TQString::fromLatin1("\\1\\2\\3") ); //Workaround for Bug 85061: Highlighted URLs adds a ' ' after the URL itself // the trailing   is included in the url. - result.replace( QRegExp( QString::fromLatin1("(timeStamp; } @@ -459,7 +459,7 @@ const Contact *Message::from() const return d->from; } -QPtrList Message::to() const +TQPtrList Message::to() const { return d->to; } @@ -469,29 +469,29 @@ Message::MessageType Message::type() const return d->type; } -QString Message::requestedPlugin() const +TQString Message::requestedPlugin() const { return d->requestedPlugin; } -QColor Message::fg() const +TQColor Message::fg() const { return d->fgColor; } -QColor Message::bg() const +TQColor Message::bg() const { return d->bgColor; } -QFont Message::font() const +TQFont Message::font() const { - //QDomElement bodyNode = d->xmlDoc.elementsByTagName( QString::fromLatin1("body") ).item(0).toElement(); - //return QFont( bodyNode.attribute( QString::fromLatin1("font") ), bodyNode.attribute( QString::fromLatin1("fontsize") ).toInt() ); + //TQDomElement bodyNode = d->xmlDoc.elementsByTagName( TQString::fromLatin1("body") ).item(0).toElement(); + //return TQFont( bodyNode.attribute( TQString::fromLatin1("font") ), bodyNode.attribute( TQString::fromLatin1("fontsize") ).toInt() ); return d->font; } -QString Message::subject() const +TQString Message::subject() const { return d->subject; } @@ -522,47 +522,47 @@ void Message::setManager(ChatSession *kmm) d->manager=kmm; } -QString Message::getHtmlStyleAttribute() const +TQString Message::getHtmlStyleAttribute() const { - QString styleAttribute; + TQString styleAttribute; - styleAttribute = QString::fromUtf8("style=\""); + styleAttribute = TQString::fromUtf8("style=\""); // Affect foreground(color) and background color to message. if( !d->fgOverride && d->fgColor.isValid() ) { - styleAttribute += QString::fromUtf8("color: %1; ").arg(d->fgColor.name()); + styleAttribute += TQString::fromUtf8("color: %1; ").arg(d->fgColor.name()); } if( !d->bgOverride && d->bgColor.isValid() ) { - styleAttribute += QString::fromUtf8("background-color: %1; ").arg(d->bgColor.name()); + styleAttribute += TQString::fromUtf8("background-color: %1; ").arg(d->bgColor.name()); } // Affect font parameters. - if( !d->rtfOverride && d->font!=QFont() ) + if( !d->rtfOverride && d->font!=TQFont() ) { - QString fontstr; + TQString fontstr; if(!d->font.family().isNull()) - fontstr+=QString::fromLatin1("font-family: ")+d->font.family()+QString::fromLatin1("; "); + fontstr+=TQString::fromLatin1("font-family: ")+d->font.family()+TQString::fromLatin1("; "); if(d->font.italic()) - fontstr+=QString::fromLatin1("font-style: italic; "); + fontstr+=TQString::fromLatin1("font-style: italic; "); if(d->font.strikeOut()) - fontstr+=QString::fromLatin1("text-decoration: line-through; "); + fontstr+=TQString::fromLatin1("text-decoration: line-through; "); if(d->font.underline()) - fontstr+=QString::fromLatin1("text-decoration: underline; "); + fontstr+=TQString::fromLatin1("text-decoration: underline; "); if(d->font.bold()) - fontstr+=QString::fromLatin1("font-weight: bold;"); + fontstr+=TQString::fromLatin1("font-weight: bold;"); styleAttribute += fontstr; } - styleAttribute += QString::fromUtf8("\""); + styleAttribute += TQString::fromUtf8("\""); return styleAttribute; } // KDE4: Move that to a utils class/namespace -QString Message::decodeString( const QCString &message, const QTextCodec *providedCodec, bool *success ) +TQString Message::decodeString( const TQCString &message, const TQTextCodec *providedCodec, bool *success ) { /* Note to everyone. This function is not the most efficient, that is for sure. @@ -575,7 +575,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid // Avoid heavy codec tests on empty message. if( message.isEmpty() ) - return QString::fromAscii( message ); + return TQString::fromAscii( message ); //Check first 128 chars int charsToCheck = message.length(); @@ -592,11 +592,11 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid if( KStringHandler::isUtf8(message) ) { //We have a UTF string almost for sure. At least we know it will be decoded. - return QString::fromUtf8( message ); + return TQString::fromUtf8( message ); } //Try codecForContent - exact match - QTextCodec *testCodec = QTextCodec::codecForContent(message, charsToCheck); + TQTextCodec *testCodec = TQTextCodec::codecForContent(message, charsToCheck); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -610,7 +610,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid //We don't have any clues here. //Try local codec - testCodec = QTextCodec::codecForLocale(); + testCodec = TQTextCodec::codecForLocale(); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -619,7 +619,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid } //Try latin1 codec - testCodec = QTextCodec::codecForMib(4); + testCodec = TQTextCodec::codecForMib(4); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -629,7 +629,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid kdDebug(14000) << k_funcinfo << "Using latin1 and cleaning string" << endl; //No codec decoded. Just decode latin1, and clean out any junk. - QString result = QString::fromLatin1( message ); + TQString result = TQString::fromLatin1( message ); const uint length = message.length(); for( uint i = 0; i < length; ++i ) { diff --git a/kopete/libkopete/kopetemessage.h b/kopete/libkopete/kopetemessage.h index 0737d2ae..03a09bd9 100644 --- a/kopete/libkopete/kopetemessage.h +++ b/kopete/libkopete/kopetemessage.h @@ -23,13 +23,13 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kopete_export.h" @@ -117,9 +117,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const QPtrList &toKC, const QString &body, + Message( const Contact *fromKC, const TQPtrList &toKC, const TQString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -131,9 +131,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const Contact *toKC, const QString &body, + Message( const Contact *fromKC, const Contact *toKC, const TQString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -146,9 +146,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const QPtrList &toKC, const QString &body, - const QString &subject, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + Message( const Contact *fromKC, const TQPtrList &toKC, const TQString &body, + const TQString &subject, MessageDirection direction, MessageFormat format = PlainText, + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -161,9 +161,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList &toKC, - const QString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList &toKC, + const TQString &body, MessageDirection direction, MessageFormat format = PlainText, + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -177,9 +177,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList &toKC, - const QString &body, const QString &subject, MessageDirection direction, - MessageFormat format = PlainText, const QString &requestedPlugin = QString::null, + Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList &toKC, + const TQString &body, const TQString &subject, MessageDirection direction, + MessageFormat format = PlainText, const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** @@ -198,7 +198,7 @@ public: * Accessor method for the timestamp of the message * @return The message's timestamp */ - QDateTime timestamp() const; + TQDateTime timestamp() const; /** * Accessor method for the Contact that sent this message @@ -210,7 +210,7 @@ public: * Accessor method for the Contacts that this message was sent to * @return Pointer list of the Contacts this message was sent to */ - QPtrList to() const; + TQPtrList to() const; /** * @return the @ref MessageType of this message @@ -221,31 +221,31 @@ public: * @return the view plugin you would prefer to use to read this message. If * null, Kopete will use the user's preferred plugin. */ - QString requestedPlugin() const; + TQString requestedPlugin() const; /** * Accessor method for the foreground color * @return The message's foreground color */ - QColor fg() const; + TQColor fg() const; /** * Accessor method for the background color of the message * @return The message's background color */ - QColor bg() const; + TQColor bg() const; /** * Accessor method for the font of the message * @return The message's font */ - QFont font() const; + TQFont font() const; /** * Accessor method for the subject of the message * @return The message subject */ - QString subject() const; + TQString subject() const; /** * Accessor method for the format of the message @@ -276,19 +276,19 @@ public: * Sets the foreground color for the message * @param color The color */ - void setFg( const QColor &color ); + void setFg( const TQColor &color ); /** * Sets the background color for the message * @param color The color */ - void setBg( const QColor &color ); + void setBg( const TQColor &color ); /** * Sets the font for the message * @param font The font */ - void setFont( const QFont &font ); + void setFont( const TQFont &font ); /** * @brief Sets the body of the message @@ -296,13 +296,13 @@ public: * @param body The body * @param format The format of the message, @see MessageFormat */ - void setBody( const QString &body, MessageFormat format = PlainText ); + void setBody( const TQString &body, MessageFormat format = PlainText ); /** * Get the message body back as plain text * @return The message body as plain text */ - QString plainBody() const; + TQString plainBody() const; /** * Get the message body as escaped (X)HTML format. @@ -310,14 +310,14 @@ public: * and newlines (\\n) are converted to \
* @return The message body as escaped text */ - QString escapedBody() const; + TQString escapedBody() const; /** * Get the message body as parsed HTML with Emoticons, and URL parsed * this should be ready to be shown in the chatwindow. * @return The HTML and Emoticon parsed message body */ - QString parsedBody() const; + TQString parsedBody() const; /** * Get the related message manager. @@ -356,7 +356,7 @@ public: * Return HTML style attribute for this message. * @return A string formatted like this: "style=attr" */ - QString getHtmlStyleAttribute() const; + TQString getHtmlStyleAttribute() const; public: /* static helpers */ @@ -368,7 +368,7 @@ public: /* static helpers */ * * @param xml The string you want to unescape */ - static QString unescape( const QString &xml ); + static TQString unescape( const TQString &xml ); /** * Indicate whether the string is right-to-left (Arabic or Hebrew are bidi locales) @@ -381,7 +381,7 @@ public: /* static helpers */ * @brief Transform a pleintext message to an html. * it escape main entity like > < add some <br /> or &nbsp; */ - static QString escape( const QString & ); + static TQString escape( const TQString & ); /** @@ -394,8 +394,8 @@ public: /* static helpers */ * is defined as a successfull decoding using either UTF8 or the codec you * provided. If a guess has to be taken, success will be false. */ - static QString decodeString( const QCString &message, - const QTextCodec *providedCodec = 0L, bool *success = 0L ); + static TQString decodeString( const TQCString &message, + const TQTextCodec *providedCodec = 0L, bool *success = 0L ); private: /** @@ -408,12 +408,12 @@ private: * Called internally by @ref setBody() and the constructor * Basically @ref setBody() without detach */ - void doSetBody( const QString &body, MessageFormat format = PlainText ); + void doSetBody( const TQString &body, MessageFormat format = PlainText ); class Private; KSharedPtr d; - static QString parseLinks( const QString &message, MessageFormat format ); + static TQString parseLinks( const TQString &message, MessageFormat format ); }; } diff --git a/kopete/libkopete/kopetemessageevent.cpp b/kopete/libkopete/kopetemessageevent.cpp index fb129837..d50c85e9 100644 --- a/kopete/libkopete/kopetemessageevent.cpp +++ b/kopete/libkopete/kopetemessageevent.cpp @@ -37,14 +37,14 @@ public: EventState state; }; -MessageEvent::MessageEvent( const Message& m, QObject *parent, const char *name ) - : QObject(parent,name), d( new Private ) +MessageEvent::MessageEvent( const Message& m, TQObject *parent, const char *name ) + : TQObject(parent,name), d( new Private ) { d->message = m; d->state = Nothing; const Contact *c=m.from(); if(c) - connect(c,SIGNAL(contactDestroyed( Kopete::Contact* )),this,SLOT(discard())); + connect(c,TQT_SIGNAL(contactDestroyed( Kopete::Contact* )),this,TQT_SLOT(discard())); } MessageEvent::~MessageEvent() diff --git a/kopete/libkopete/kopetemessageevent.h b/kopete/libkopete/kopetemessageevent.h index 7beb1aa2..9cfa1ea5 100644 --- a/kopete/libkopete/kopetemessageevent.h +++ b/kopete/libkopete/kopetemessageevent.h @@ -21,7 +21,7 @@ #ifndef KOPETEMESSAGEEVENT_H #define KOPETEMESSAGEEVENT_H -#include +#include #include "kopetemessage.h" @@ -44,7 +44,7 @@ class KOPETE_EXPORT MessageEvent : public QObject Q_OBJECT public: - MessageEvent(const Kopete::Message& , QObject* parent=0L, const char *name=0L); + MessageEvent(const Kopete::Message& , TQObject* parent=0L, const char *name=0L); ~MessageEvent(); /** diff --git a/kopete/libkopete/kopetemessagehandler.cpp b/kopete/libkopete/kopetemessagehandler.cpp index 89628d4f..28ef01bf 100644 --- a/kopete/libkopete/kopetemessagehandler.cpp +++ b/kopete/libkopete/kopetemessagehandler.cpp @@ -30,7 +30,7 @@ public: }; MessageHandler::MessageHandler() - : QObject( 0 ), d( new Private ) + : TQObject( 0 ), d( new Private ) { } @@ -56,7 +56,7 @@ int MessageHandler::capabilities() void MessageHandler::handleMessageInternal( MessageEvent *event ) { - connect( event, SIGNAL( accepted(Kopete::MessageEvent*) ), this, SLOT( messageAccepted(Kopete::MessageEvent*) ) ); + connect( event, TQT_SIGNAL( accepted(Kopete::MessageEvent*) ), this, TQT_SLOT( messageAccepted(Kopete::MessageEvent*) ) ); handleMessage( event ); } @@ -67,7 +67,7 @@ void MessageHandler::handleMessage( MessageEvent *event ) void MessageHandler::messageAccepted( MessageEvent *event ) { - disconnect( event, SIGNAL( accepted(Kopete::MessageEvent*) ), this, SLOT( messageAccepted(Kopete::MessageEvent*) ) ); + disconnect( event, TQT_SIGNAL( accepted(Kopete::MessageEvent*) ), this, TQT_SLOT( messageAccepted(Kopete::MessageEvent*) ) ); d->next->handleMessageInternal( event ); } diff --git a/kopete/libkopete/kopetemessagehandler.h b/kopete/libkopete/kopetemessagehandler.h index ba16184c..fa9c1f31 100644 --- a/kopete/libkopete/kopetemessagehandler.h +++ b/kopete/libkopete/kopetemessagehandler.h @@ -17,7 +17,7 @@ #ifndef KOPETEMESSAGEHANDLER_H #define KOPETEMESSAGEHANDLER_H -#include +#include //#include #include "kopete_export.h" @@ -25,7 +25,7 @@ // to avoid this being included everywhere #include "kopetemessage.h" -#include +#include namespace Kopete { @@ -78,7 +78,7 @@ public: * handler in the chain. * * @note If you store @p event, be aware that it could be deleted at any time, and either - * connect to the its discarded(Kopete::MessageEvent*) signal or store it in a QGuardedPtr. + * connect to the its discarded(Kopete::MessageEvent*) signal or store it in a TQGuardedPtr. */ virtual void handleMessage( MessageEvent *event ); @@ -124,7 +124,7 @@ public: */ virtual ~MessageHandlerFactory(); - typedef QValueList FactoryList; + typedef TQValueList FactoryList; /** * @return the list of registered message handler factories */ diff --git a/kopete/libkopete/kopetemessagehandlerchain.cpp b/kopete/libkopete/kopetemessagehandlerchain.cpp index fe1e96ab..ce119df0 100644 --- a/kopete/libkopete/kopetemessagehandlerchain.cpp +++ b/kopete/libkopete/kopetemessagehandlerchain.cpp @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include namespace Kopete { @@ -62,8 +62,8 @@ MessageHandlerChain::Ptr MessageHandlerChain::create( ChatSession *manager, Mess FactoryList factories = MessageHandlerFactory::messageHandlerFactories(); // create a sorted list of handlers - typedef QValueList HandlerList; - typedef QMap HandlerMap; + typedef TQValueList HandlerList; + typedef TQMap HandlerMap; HandlerMap handlers; uint count = 0; for( FactoryList::Iterator it = factories.begin(); it != factories.end(); ++it ) @@ -107,7 +107,7 @@ MessageHandlerChain::Ptr MessageHandlerChain::create( ChatSession *manager, Mess } MessageHandlerChain::MessageHandlerChain() - : QObject( 0 ), d( new Private ) + : TQObject( 0 ), d( new Private ) { } @@ -151,8 +151,8 @@ public: ProcessMessageTask::ProcessMessageTask( MessageHandlerChain::Ptr chain, MessageEvent *event ) : d( new Private(chain, event) ) { - QTimer::singleShot( 0, this, SLOT( slotStart() ) ); - connect( event, SIGNAL( done( Kopete::MessageEvent* ) ), this, SLOT( slotDone() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) ); + connect( event, TQT_SIGNAL( done( Kopete::MessageEvent* ) ), this, TQT_SLOT( slotDone() ) ); event->message().manager()->ref(); } diff --git a/kopete/libkopete/kopetemessagehandlerchain.h b/kopete/libkopete/kopetemessagehandlerchain.h index 5852c2da..a53e0600 100644 --- a/kopete/libkopete/kopetemessagehandlerchain.h +++ b/kopete/libkopete/kopetemessagehandlerchain.h @@ -17,7 +17,7 @@ #ifndef KOPETEFILTERCHAIN_H #define KOPETEFILTERCHAIN_H -#include +#include #include #include #include "kopetemessage.h" @@ -41,7 +41,7 @@ class ProcessMessageTask; * * @author Richard Smith */ -class MessageHandlerChain : public QObject, private KShared +class MessageHandlerChain : public TQObject, private KShared { Q_OBJECT public: diff --git a/kopete/libkopete/kopetemetacontact.cpp b/kopete/libkopete/kopetemetacontact.cpp index e181f52e..9a908f32 100644 --- a/kopete/libkopete/kopetemetacontact.cpp +++ b/kopete/libkopete/kopetemetacontact.cpp @@ -46,12 +46,12 @@ namespace Kopete { // this is just to save typing -const QString NSCID_ELEM = QString::fromUtf8("nameSourceContactId" ); -const QString NSPID_ELEM = QString::fromUtf8( "nameSourcePluginId" ); -const QString NSAID_ELEM = QString::fromUtf8( "nameSourceAccountId" ); -const QString PSCID_ELEM = QString::fromUtf8( "photoSourceContactId" ); -const QString PSPID_ELEM = QString::fromUtf8( "photoSourcePluginId" ); -const QString PSAID_ELEM = QString::fromUtf8( "photoSourceAccountId" ); +const TQString NSCID_ELEM = TQString::fromUtf8("nameSourceContactId" ); +const TQString NSPID_ELEM = TQString::fromUtf8( "nameSourcePluginId" ); +const TQString NSAID_ELEM = TQString::fromUtf8( "nameSourceAccountId" ); +const TQString PSCID_ELEM = TQString::fromUtf8( "photoSourceContactId" ); +const TQString PSPID_ELEM = TQString::fromUtf8( "photoSourcePluginId" ); +const TQString PSAID_ELEM = TQString::fromUtf8( "photoSourceAccountId" ); class MetaContact::Private { public: @@ -64,7 +64,7 @@ class MetaContact::Private ~Private() {} - QPtrList contacts; + TQPtrList contacts; // property sources PropertySource photoSource; @@ -75,22 +75,22 @@ class MetaContact::Private Contact *photoSourceContact; // used when source is kabc - QString metaContactId; + TQString metaContactId; // used when source is custom - QString displayName; + TQString displayName; KURL photoUrl; - QPtrList groups; - QMap > addressBook; + TQPtrList groups; + TQMap > addressBook; bool temporary; OnlineStatus::StatusType onlineStatus; bool photoSyncedWithKABC; // Used to set contact source at load. - QString nameSourcePID, nameSourceAID, nameSourceCID; - QString photoSourcePID, photoSourceAID, photoSourceCID; + TQString nameSourcePID, nameSourceAID, nameSourceCID; + TQString photoSourcePID, photoSourceAID, photoSourceCID; // The photo cache. Reduce disk access and CPU usage. Picture customPicture, contactPicture, kabcPicture; @@ -101,18 +101,18 @@ MetaContact::MetaContact() { d = new Private; - connect( this, SIGNAL( pluginDataChanged() ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( iconChanged( Kopete::ContactListElement::IconState, const QString & ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( useCustomIconChanged( bool ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( displayNameChanged( const QString &, const QString & ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( contactAdded( Kopete::Contact * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( contactRemoved( Kopete::Contact * ) ), SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( pluginDataChanged() ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( iconChanged( Kopete::ContactListElement::IconState, const TQString & ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( useCustomIconChanged( bool ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( contactAdded( Kopete::Contact * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( contactRemoved( Kopete::Contact * ) ), TQT_SIGNAL( persistentDataChanged() ) ); // Update the KABC picture when the KDE Address book change. - connect(KABCPersistence::self()->addressBook(), SIGNAL(addressBookChanged(AddressBook *)), this, SLOT(slotUpdateAddressBookPicture())); + connect(KABCPersistence::self()->addressBook(), TQT_SIGNAL(addressBookChanged(AddressBook *)), this, TQT_SLOT(slotUpdateAddressBookPicture())); // make sure MetaContact is at least in one group addToGroup( Group::topLevel() ); @@ -135,17 +135,17 @@ void MetaContact::addContact( Contact *c ) { d->contacts.append( c ); - connect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; - connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); - connect( c, SIGNAL( idleStateChanged( Kopete::Contact * ) ), - this, SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( idleStateChanged( Kopete::Contact * ) ), + this, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ) ); emit contactAdded(c); @@ -174,7 +174,7 @@ void MetaContact::updateOnlineStatus() Kopete::OnlineStatus::StatusType newStatus = Kopete::OnlineStatus::Unknown; Kopete::OnlineStatus mostSignificantStatus; - for ( QPtrListIterator it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->contacts ); it.current(); ++it ) { // find most significant status if ( it.current()->onlineStatus() > mostSignificantStatus ) @@ -203,7 +203,7 @@ void MetaContact::removeContact(Contact *c, bool deleted) bool wasTrackingName = ( !displayNameSourceContact() && (displayNameSource() == SourceContact) ); bool wasTrackingPhoto = ( !photoSourceContact() && (photoSource() == SourceContact) ); // save for later use - QString currDisplayName = displayName(); + TQString currDisplayName = displayName(); d->contacts.remove( c ); @@ -258,14 +258,14 @@ void MetaContact::removeContact(Contact *c, bool deleted) if(!deleted) { //If this function is tell by slotContactRemoved, c is maybe just a QObject - disconnect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; - disconnect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); - disconnect( c, SIGNAL( idleStateChanged( Kopete::Contact * ) ), - this, SIGNAL( contactIdleStateChanged( Kopete::Contact *) ) ); + disconnect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; + disconnect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + disconnect( c, TQT_SIGNAL( idleStateChanged( Kopete::Contact * ) ), + this, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact *) ) ); kdDebug( 14010 ) << k_funcinfo << "Contact disconnected" << endl; @@ -280,10 +280,10 @@ void MetaContact::removeContact(Contact *c, bool deleted) updateOnlineStatus(); } -Contact *MetaContact::findContact( const QString &protocolId, const QString &accountId, const QString &contactId ) +Contact *MetaContact::findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ) { //kdDebug( 14010 ) << k_funcinfo << "Num contacts: " << d->contacts.count() << endl; - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { //kdDebug( 14010 ) << k_funcinfo << "Trying " << it.current()->contactId() << ", proto " @@ -307,9 +307,9 @@ Contact *MetaContact::findContact( const QString &protocolId, const QString &acc void MetaContact::setDisplayNameSource(PropertySource source) { - QString oldName = displayName(); + TQString oldName = displayName(); d->displayNameSource = source; - QString newName = displayName(); + TQString newName = displayName(); if ( oldName != newName) emit displayNameChanged( oldName, newName ); } @@ -386,7 +386,7 @@ Contact *MetaContact::preferredContact() Contact *contact = 0; bool hasOpenView=false; //has the selected contact already an open chatwindow - for ( QPtrListIterator it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->contacts ); it.current(); ++it ) { Contact *c=it.current(); @@ -451,7 +451,7 @@ Contact *MetaContact::execute() unsigned long int MetaContact::idleTime() const { unsigned long int time = 0; - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { unsigned long int i = it.current()->idleTime(); @@ -463,7 +463,7 @@ unsigned long int MetaContact::idleTime() const return time; } -QString MetaContact::statusIcon() const +TQString MetaContact::statusIcon() const { switch( status() ) { @@ -471,31 +471,31 @@ QString MetaContact::statusIcon() const if( useCustomIcon() ) return icon( ContactListElement::Online ); else - return QString::fromUtf8( "metacontact_online" ); + return TQString::fromUtf8( "metacontact_online" ); case OnlineStatus::Away: if( useCustomIcon() ) return icon( ContactListElement::Away ); else - return QString::fromUtf8( "metacontact_away" ); + return TQString::fromUtf8( "metacontact_away" ); case OnlineStatus::Unknown: if( useCustomIcon() ) return icon( ContactListElement::Unknown ); if ( d->contacts.isEmpty() ) - return QString::fromUtf8( "metacontact_unknown" ); + return TQString::fromUtf8( "metacontact_unknown" ); else - return QString::fromUtf8( "metacontact_offline" ); + return TQString::fromUtf8( "metacontact_offline" ); case OnlineStatus::Offline: default: if( useCustomIcon() ) return icon( ContactListElement::Offline ); else - return QString::fromUtf8( "metacontact_offline" ); + return TQString::fromUtf8( "metacontact_offline" ); } } -QString MetaContact::statusString() const +TQString MetaContact::statusString() const { switch( status() ) { @@ -518,7 +518,7 @@ OnlineStatus::StatusType MetaContact::status() const bool MetaContact::isOnline() const { - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if( it.current()->isOnline() ) @@ -532,7 +532,7 @@ bool MetaContact::isReachable() const if ( isOnline() ) return true; - for ( QPtrListIterator it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->contacts ); it.current(); ++it ) { if ( it.current()->account()->isConnected() && it.current()->isReachable() ) return true; @@ -546,7 +546,7 @@ bool MetaContact::canAcceptFiles() const if( !isOnline() ) return false; - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if( it.current()->canAcceptFiles() ) @@ -556,7 +556,7 @@ bool MetaContact::canAcceptFiles() const } //Slot for sending files -void MetaContact::sendFile( const KURL &sourceURL, const QString &altFileName, unsigned long fileSize ) +void MetaContact::sendFile( const KURL &sourceURL, const TQString &altFileName, unsigned long fileSize ) { //If we can't send any files then exit if( d->contacts.isEmpty() || !canAcceptFiles() ) @@ -564,7 +564,7 @@ void MetaContact::sendFile( const KURL &sourceURL, const QString &altFileName, u //Find the highest ranked protocol that can accept files Contact *contact = d->contacts.first(); - for( QPtrListIterator it( d->contacts ) ; it.current(); ++it ) + for( TQPtrListIterator it( d->contacts ) ; it.current(); ++it ) { if( ( *it )->onlineStatus() > contact->onlineStatus() && ( *it )->canAcceptFiles() ) contact = *it; @@ -581,7 +581,7 @@ void MetaContact::slotContactStatusChanged( Contact * c, const OnlineStatus &sta emit contactStatusChanged( c, status ); } -void MetaContact::setDisplayName( const QString &name ) +void MetaContact::setDisplayName( const TQString &name ) { /*kdDebug( 14010 ) << k_funcinfo << "Change displayName from " << d->displayName << " to " << name << ", d->trackChildNameChanges=" << d->trackChildNameChanges << endl; @@ -590,22 +590,22 @@ void MetaContact::setDisplayName( const QString &name ) if( name == d->displayName ) return; - const QString old = d->displayName; + const TQString old = d->displayName; d->displayName = name; emit displayNameChanged( old , name ); - for( QPtrListIterator it( d->contacts ) ; it.current(); ++it ) + for( TQPtrListIterator it( d->contacts ) ; it.current(); ++it ) ( *it )->sync(Contact::DisplayNameChanged); } -QString MetaContact::customDisplayName() const +TQString MetaContact::customDisplayName() const { return d->displayName; } -QString MetaContact::displayName() const +TQString MetaContact::displayName() const { PropertySource source = displayNameSource(); if ( source == SourceKABC ) @@ -637,7 +637,7 @@ QString MetaContact::displayName() const return d->displayName; } -QString nameFromKABC( const QString &id ) /*const*/ +TQString nameFromKABC( const TQString &id ) /*const*/ { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); if ( ! id.isEmpty() && !id.contains(':') ) @@ -653,20 +653,20 @@ QString nameFromKABC( const QString &id ) /*const*/ } } // no kabc association, return null image - return QString::null; + return TQString::null; } -QString nameFromContact( Kopete::Contact *c) /*const*/ +TQString nameFromContact( Kopete::Contact *c) /*const*/ { if ( !c ) - return QString::null; + return TQString::null; - QString contactName; + TQString contactName; if ( c->hasProperty( Kopete::Global::Properties::self()->nickName().key() ) ) contactName = c->property( Global::Properties::self()->nickName()).value().toString(); //the replace is there to workaround the Bug 95444 - return contactName.isEmpty() ? c->contactId() : contactName.replace('\n',QString::fromUtf8("")); + return contactName.isEmpty() ? c->contactId() : contactName.replace('\n',TQString::fromUtf8("")); } KURL MetaContact::customPhoto() const @@ -685,12 +685,12 @@ void MetaContact::setPhoto( const KURL &url ) } } -QImage MetaContact::photo() const +TQImage MetaContact::photo() const { if( picture().image().width() > 96 && picture().image().height() > 96 ) { kdDebug( 14010 ) << k_funcinfo << "Resizing image from " << picture().image().width() << " x " << picture().image().height() << endl; - return picture().image().smoothScale(96,96,QImage::ScaleMin); + return picture().image().smoothScale(96,96,TQImage::ScaleMin); } else return picture().image(); @@ -710,33 +710,33 @@ Picture &MetaContact::picture() const return d->customPicture; } -QImage MetaContact::photoFromCustom() const +TQImage MetaContact::photoFromCustom() const { return d->customPicture.image(); } -QImage photoFromContact( Kopete::Contact *contact) /*const*/ +TQImage photoFromContact( Kopete::Contact *contact) /*const*/ { if ( contact == 0L ) - return QImage(); + return TQImage(); - QVariant photoProp; + TQVariant photoProp; if ( contact->hasProperty( Kopete::Global::Properties::self()->photo().key() ) ) photoProp = contact->property( Kopete::Global::Properties::self()->photo().key() ).value(); - QImage img; - if(photoProp.canCast( QVariant::Image )) + TQImage img; + if(photoProp.canCast( TQVariant::Image )) img=photoProp.toImage(); - else if(photoProp.canCast( QVariant::Pixmap )) + else if(photoProp.canCast( TQVariant::Pixmap )) img=photoProp.toPixmap().convertToImage(); else if(!photoProp.asString().isEmpty()) { - img=QPixmap( photoProp.toString() ).convertToImage(); + img=TQPixmap( photoProp.toString() ).convertToImage(); } return img; } -QImage photoFromKABC( const QString &id ) /*const*/ +TQImage photoFromKABC( const TQString &id ) /*const*/ { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); if ( ! id.isEmpty() && !id.contains(':') ) @@ -758,12 +758,12 @@ QImage photoFromKABC( const QString &id ) /*const*/ } else { - return QPixmap( pic.url() ).convertToImage(); + return TQPixmap( pic.url() ).convertToImage(); } } } // no kabc association, return null image - return QImage(); + return TQImage(); } Contact *MetaContact::displayNameSourceContact() const @@ -793,13 +793,13 @@ void MetaContact::setPhotoSourceContact( Contact *contact ) // Create a cache for the contact photo. if(d->photoSourceContact != 0L) { - QVariant photoProp; + TQVariant photoProp; if ( contact->hasProperty( Kopete::Global::Properties::self()->photo().key() ) ) photoProp = contact->property( Kopete::Global::Properties::self()->photo().key() ).value(); - if(photoProp.canCast( QVariant::Image )) + if(photoProp.canCast( TQVariant::Image )) d->contactPicture.setPicture(photoProp.toImage()); - else if(photoProp.canCast( QVariant::Pixmap )) + else if(photoProp.canCast( TQVariant::Pixmap )) d->contactPicture.setPicture(photoProp.toPixmap().convertToImage()); else if(!photoProp.asString().isEmpty()) { @@ -813,8 +813,8 @@ void MetaContact::setPhotoSourceContact( Contact *contact ) } } -void MetaContact::slotPropertyChanged( Contact* subcontact, const QString &key, - const QVariant &oldValue, const QVariant &newValue ) +void MetaContact::slotPropertyChanged( Contact* subcontact, const TQString &key, + const TQVariant &oldValue, const TQVariant &newValue ) { if ( displayNameSource() == SourceContact ) { @@ -932,7 +932,7 @@ void MetaContact::addToGroup( Group *to ) emit addedToGroup( this, to ); } -QPtrList MetaContact::groups() const +TQPtrList MetaContact::groups() const { return d->groups; } @@ -942,36 +942,36 @@ void MetaContact::slotContactDestroyed( Contact *contact ) removeContact(contact,true); } -const QDomElement MetaContact::toXML(bool minimal) +const TQDomElement MetaContact::toXML(bool minimal) { // This causes each Kopete::Protocol subclass to serialise its contacts' data into the metacontact's plugin data and address book data emit aboutToSave(this); - QDomDocument metaContact; - metaContact.appendChild( metaContact.createElement( QString::fromUtf8( "meta-contact" ) ) ); - metaContact.documentElement().setAttribute( QString::fromUtf8( "contactId" ), metaContactId() ); + TQDomDocument metaContact; + metaContact.appendChild( metaContact.createElement( TQString::fromUtf8( "meta-contact" ) ) ); + metaContact.documentElement().setAttribute( TQString::fromUtf8( "contactId" ), metaContactId() ); // the custom display name, used for the custom name source - QDomElement displayName = metaContact.createElement( QString::fromUtf8("display-name" ) ); + TQDomElement displayName = metaContact.createElement( TQString::fromUtf8("display-name" ) ); displayName.appendChild( metaContact.createTextNode( d->displayName ) ); metaContact.documentElement().appendChild( displayName ); - QDomElement photo = metaContact.createElement( QString::fromUtf8("photo" ) ); + TQDomElement photo = metaContact.createElement( TQString::fromUtf8("photo" ) ); KURL photoUrl = d->photoUrl; photo.appendChild( metaContact.createTextNode( photoUrl.url() ) ); metaContact.documentElement().appendChild( photo ); // Property sources - QDomElement propertySources = metaContact.createElement( QString::fromUtf8("property-sources" ) ); - QDomElement _nameSource = metaContact.createElement( QString::fromUtf8("name") ); - QDomElement _photoSource = metaContact.createElement( QString::fromUtf8("photo") ); + TQDomElement propertySources = metaContact.createElement( TQString::fromUtf8("property-sources" ) ); + TQDomElement _nameSource = metaContact.createElement( TQString::fromUtf8("name") ); + TQDomElement _photoSource = metaContact.createElement( TQString::fromUtf8("photo") ); // set the contact source for display name - _nameSource.setAttribute(QString::fromUtf8("source"), sourceToString(displayNameSource())); + _nameSource.setAttribute(TQString::fromUtf8("source"), sourceToString(displayNameSource())); // set contact source metadata if (displayNameSourceContact()) { - QDomElement contactNameSource = metaContact.createElement( QString::fromUtf8("contact-source") ); + TQDomElement contactNameSource = metaContact.createElement( TQString::fromUtf8("contact-source") ); contactNameSource.setAttribute( NSCID_ELEM, displayNameSourceContact()->contactId() ); contactNameSource.setAttribute( NSPID_ELEM, displayNameSourceContact()->protocol()->pluginId() ); contactNameSource.setAttribute( NSAID_ELEM, displayNameSourceContact()->account()->accountId() ); @@ -979,16 +979,16 @@ const QDomElement MetaContact::toXML(bool minimal) } // set the contact source for photo - _photoSource.setAttribute(QString::fromUtf8("source"), sourceToString(photoSource())); + _photoSource.setAttribute(TQString::fromUtf8("source"), sourceToString(photoSource())); if( !d->metaContactId.isEmpty() ) - photo.setAttribute( QString::fromUtf8("syncWithKABC") , QString::fromUtf8( d->photoSyncedWithKABC ? "true" : "false" ) ); + photo.setAttribute( TQString::fromUtf8("syncWithKABC") , TQString::fromUtf8( d->photoSyncedWithKABC ? "true" : "false" ) ); if (photoSourceContact()) { //kdDebug(14010) << k_funcinfo << "serializing photo source " << nameFromContact(photoSourceContact()) << endl; // set contact source metadata for photo - QDomElement contactPhotoSource = metaContact.createElement( QString::fromUtf8("contact-source") ); + TQDomElement contactPhotoSource = metaContact.createElement( TQString::fromUtf8("contact-source") ); contactPhotoSource.setAttribute( NSCID_ELEM, photoSourceContact()->contactId() ); contactPhotoSource.setAttribute( NSPID_ELEM, photoSourceContact()->protocol()->pluginId() ); contactPhotoSource.setAttribute( NSAID_ELEM, photoSourceContact()->account()->accountId() ); @@ -1006,31 +1006,31 @@ const QDomElement MetaContact::toXML(bool minimal) // Store groups if ( !d->groups.isEmpty() ) { - QDomElement groups = metaContact.createElement( QString::fromUtf8("groups") ); + TQDomElement groups = metaContact.createElement( TQString::fromUtf8("groups") ); Group *g; for ( g = d->groups.first(); g; g = d->groups.next() ) { - QDomElement group = metaContact.createElement( QString::fromUtf8("group") ); - group.setAttribute( QString::fromUtf8("id"), g->groupId() ); + TQDomElement group = metaContact.createElement( TQString::fromUtf8("group") ); + group.setAttribute( TQString::fromUtf8("id"), g->groupId() ); groups.appendChild( group ); } metaContact.documentElement().appendChild( groups ); } // Store other plugin data - QValueList pluginData = Kopete::ContactListElement::toXML(); - for( QValueList::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) + TQValueList pluginData = Kopete::ContactListElement::toXML(); + for( TQValueList::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) metaContact.documentElement().appendChild( metaContact.importNode( *it, true ) ); // Store custom notification data - QDomElement notifyData = NotifyDataObject::notifyDataToXML(); + TQDomElement notifyData = NotifyDataObject::notifyDataToXML(); if ( notifyData.hasChildNodes() ) metaContact.documentElement().appendChild( metaContact.importNode( notifyData, true ) ); } return metaContact.documentElement(); } -bool MetaContact::fromXML( const QDomElement& element ) +bool MetaContact::fromXML( const TQDomElement& element ) { if( !element.hasChildNodes() ) return false; @@ -1038,7 +1038,7 @@ bool MetaContact::fromXML( const QDomElement& element ) bool oldPhotoTracking = false; bool oldNameTracking = false; - QString strContactId = element.attribute( QString::fromUtf8("contactId") ); + TQString strContactId = element.attribute( TQString::fromUtf8("contactId") ); if( !strContactId.isEmpty() ) { d->metaContactId = strContactId; @@ -1046,11 +1046,11 @@ bool MetaContact::fromXML( const QDomElement& element ) slotUpdateAddressBookPicture(); } - QDomElement contactElement = element.firstChild().toElement(); + TQDomElement contactElement = element.firstChild().toElement(); while( !contactElement.isNull() ) { - if( contactElement.tagName() == QString::fromUtf8( "display-name" ) ) + if( contactElement.tagName() == TQString::fromUtf8( "display-name" ) ) { // custom display name, used for the custom name source // WTF, why were we not loading the metacontact if nickname was empty. @@ -1058,7 +1058,7 @@ bool MetaContact::fromXML( const QDomElement& element ) // return false; //the replace is there to workaround the Bug 95444 - d->displayName = contactElement.text().replace('\n',QString::fromUtf8("")); + d->displayName = contactElement.text().replace('\n',TQString::fromUtf8("")); if ( contactElement.hasAttribute(NSCID_ELEM) && contactElement.hasAttribute(NSPID_ELEM) && contactElement.hasAttribute(NSAID_ELEM)) { @@ -1073,12 +1073,12 @@ bool MetaContact::fromXML( const QDomElement& element ) // else // kdDebug(14010) << k_funcinfo << "no old name tracking" << endl; } - else if( contactElement.tagName() == QString::fromUtf8( "photo" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "photo" ) ) { // custom photo, used for custom photo source setPhoto( KURL(contactElement.text()) ); - d->photoSyncedWithKABC = (contactElement.attribute(QString::fromUtf8("syncWithKABC")) == QString::fromUtf8("1")) || (contactElement.attribute(QString::fromUtf8("syncWithKABC")) == QString::fromUtf8("true")); + d->photoSyncedWithKABC = (contactElement.attribute(TQString::fromUtf8("syncWithKABC")) == TQString::fromUtf8("1")) || (contactElement.attribute(TQString::fromUtf8("syncWithKABC")) == TQString::fromUtf8("true")); // retrieve deprecated data (now stored in property-sources) // save temporarely, we will find a Contact* with this later @@ -1093,23 +1093,23 @@ bool MetaContact::fromXML( const QDomElement& element ) // else // kdDebug(14010) << k_funcinfo << "no old photo tracking" << endl; } - else if( contactElement.tagName() == QString::fromUtf8( "property-sources" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "property-sources" ) ) { - QDomNode property = contactElement.firstChild(); + TQDomNode property = contactElement.firstChild(); while( !property.isNull() ) { - QDomElement propertyElement = property.toElement(); + TQDomElement propertyElement = property.toElement(); - if( propertyElement.tagName() == QString::fromUtf8( "name" ) ) + if( propertyElement.tagName() == TQString::fromUtf8( "name" ) ) { - QString source = propertyElement.attribute( QString::fromUtf8("source") ); + TQString source = propertyElement.attribute( TQString::fromUtf8("source") ); setDisplayNameSource(stringToSource(source)); // find contact sources now. - QDomNode propertyParam = propertyElement.firstChild(); + TQDomNode propertyParam = propertyElement.firstChild(); while( !propertyParam.isNull() ) { - QDomElement propertyParamElement = propertyParam.toElement(); - if( propertyParamElement.tagName() == QString::fromUtf8( "contact-source" ) ) + TQDomElement propertyParamElement = propertyParam.toElement(); + if( propertyParamElement.tagName() == TQString::fromUtf8( "contact-source" ) ) { d->nameSourceCID = propertyParamElement.attribute( NSCID_ELEM ); d->nameSourcePID = propertyParamElement.attribute( NSPID_ELEM ); @@ -1118,16 +1118,16 @@ bool MetaContact::fromXML( const QDomElement& element ) propertyParam = propertyParam.nextSibling(); } } - if( propertyElement.tagName() == QString::fromUtf8( "photo" ) ) + if( propertyElement.tagName() == TQString::fromUtf8( "photo" ) ) { - QString source = propertyElement.attribute( QString::fromUtf8("source") ); + TQString source = propertyElement.attribute( TQString::fromUtf8("source") ); setPhotoSource(stringToSource(source)); // find contact sources now. - QDomNode propertyParam = propertyElement.firstChild(); + TQDomNode propertyParam = propertyElement.firstChild(); while( !propertyParam.isNull() ) { - QDomElement propertyParamElement = propertyParam.toElement(); - if( propertyParamElement.tagName() == QString::fromUtf8( "contact-source" ) ) + TQDomElement propertyParamElement = propertyParam.toElement(); + if( propertyParamElement.tagName() == TQString::fromUtf8( "contact-source" ) ) { d->photoSourceCID = propertyParamElement.attribute( NSCID_ELEM ); d->photoSourcePID = propertyParamElement.attribute( NSPID_ELEM ); @@ -1139,39 +1139,39 @@ bool MetaContact::fromXML( const QDomElement& element ) property = property.nextSibling(); } } - else if( contactElement.tagName() == QString::fromUtf8( "groups" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "groups" ) ) { - QDomNode group = contactElement.firstChild(); + TQDomNode group = contactElement.firstChild(); while( !group.isNull() ) { - QDomElement groupElement = group.toElement(); + TQDomElement groupElement = group.toElement(); - if( groupElement.tagName() == QString::fromUtf8( "group" ) ) + if( groupElement.tagName() == TQString::fromUtf8( "group" ) ) { - QString strGroupId = groupElement.attribute( QString::fromUtf8("id") ); + TQString strGroupId = groupElement.attribute( TQString::fromUtf8("id") ); if( !strGroupId.isEmpty() ) addToGroup( Kopete::ContactList::self()->group( strGroupId.toUInt() ) ); else //kopete 0.6 contactlist addToGroup( Kopete::ContactList::self()->findGroup( groupElement.text() ) ); } - else if( groupElement.tagName() == QString::fromUtf8( "top-level" ) ) //kopete 0.6 contactlist + else if( groupElement.tagName() == TQString::fromUtf8( "top-level" ) ) //kopete 0.6 contactlist addToGroup( Kopete::Group::topLevel() ); group = group.nextSibling(); } } - else if( contactElement.tagName() == QString::fromUtf8( "address-book-field" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "address-book-field" ) ) { - QString app = contactElement.attribute( QString::fromUtf8( "app" ), QString::null ); - QString key = contactElement.attribute( QString::fromUtf8( "key" ), QString::null ); - QString val = contactElement.text(); + TQString app = contactElement.attribute( TQString::fromUtf8( "app" ), TQString::null ); + TQString key = contactElement.attribute( TQString::fromUtf8( "key" ), TQString::null ); + TQString val = contactElement.text(); d->addressBook[ app ][ key ] = val; } - else if( contactElement.tagName() == QString::fromUtf8( "custom-notifications" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "custom-notifications" ) ) { Kopete::NotifyDataObject::notifyDataFromXML( contactElement ); } - else //if( groupElement.tagName() == QString::fromUtf8( "plugin-data" ) || groupElement.tagName() == QString::fromUtf8("custom-icons" )) + else //if( groupElement.tagName() == TQString::fromUtf8( "plugin-data" ) || groupElement.tagName() == TQString::fromUtf8("custom-icons" )) { Kopete::ContactListElement::fromXML(contactElement); } @@ -1215,16 +1215,16 @@ bool MetaContact::fromXML( const QDomElement& element ) } // If a plugin is loaded, load data cached - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded(Kopete::Plugin*) ), - this, SLOT( slotPluginLoaded(Kopete::Plugin*) ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded(Kopete::Plugin*) ), + this, TQT_SLOT( slotPluginLoaded(Kopete::Plugin*) ) ); // All plugins are already loaded, call manually the contact setting slot. if( Kopete::PluginManager::self()->isAllPluginsLoaded() ) slotAllPluginsLoaded(); else // When all plugins are loaded, set the source contact. - connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ), - this, SLOT( slotAllPluginsLoaded() ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ), + this, TQT_SLOT( slotAllPluginsLoaded() ) ); // track changes only works if ONE Contact is inside the MetaContact // if (d->contacts.count() > 1) // Does NOT work as intended @@ -1234,36 +1234,36 @@ bool MetaContact::fromXML( const QDomElement& element ) return true; } -QString MetaContact::sourceToString(PropertySource source) const +TQString MetaContact::sourceToString(PropertySource source) const { if ( source == SourceCustom ) - return QString::fromUtf8("custom"); + return TQString::fromUtf8("custom"); else if ( source == SourceKABC ) - return QString::fromUtf8("addressbook"); + return TQString::fromUtf8("addressbook"); else if ( source == SourceContact ) - return QString::fromUtf8("contact"); + return TQString::fromUtf8("contact"); else // recovery return sourceToString(SourceCustom); } -MetaContact::PropertySource MetaContact::stringToSource(const QString &name) const +MetaContact::PropertySource MetaContact::stringToSource(const TQString &name) const { - if ( name == QString::fromUtf8("custom") ) + if ( name == TQString::fromUtf8("custom") ) return SourceCustom; - else if ( name == QString::fromUtf8("addressbook") ) + else if ( name == TQString::fromUtf8("addressbook") ) return SourceKABC; - else if ( name == QString::fromUtf8("contact") ) + else if ( name == TQString::fromUtf8("contact") ) return SourceContact; else // recovery return SourceCustom; } -QString MetaContact::addressBookField( Kopete::Plugin * /* p */, const QString &app, const QString & key ) const +TQString MetaContact::addressBookField( Kopete::Plugin * /* p */, const TQString &app, const TQString & key ) const { return d->addressBook[ app ][ key ]; } -void Kopete::MetaContact::setAddressBookField( Kopete::Plugin * /* p */, const QString &app, const QString &key, const QString &value ) +void Kopete::MetaContact::setAddressBookField( Kopete::Plugin * /* p */, const TQString &app, const TQString &key, const TQString &value ) { d->addressBook[ app ][ key ] = value; } @@ -1273,7 +1273,7 @@ void MetaContact::slotPluginLoaded( Plugin *p ) if( !p ) return; - QMap map= pluginData( p ); + TQMap map= pluginData( p ); if(!map.isEmpty()) { p->deserialize(this,map); @@ -1290,7 +1290,7 @@ void MetaContact::slotAllPluginsLoaded() void MetaContact::slotUpdateAddressBookPicture() { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); - QString id = metaContactId(); + TQString id = metaContactId(); if ( !id.isEmpty() && !id.contains(':') ) { KABC::Addressee theAddressee = ab->findByUid(id); @@ -1332,19 +1332,19 @@ void MetaContact::setTemporary( bool isTemporary, Group *group ) moveToGroup(temporaryGroup, group ? group : Group::topLevel()); } -QString MetaContact::metaContactId() const +TQString MetaContact::metaContactId() const { if(d->metaContactId.isEmpty()) { Contact *c=d->contacts.first(); if(!c) - return QString::null; - return c->protocol()->pluginId()+QString::fromUtf8(":")+c->account()->accountId()+QString::fromUtf8(":") + c->contactId() ; + return TQString::null; + return c->protocol()->pluginId()+TQString::fromUtf8(":")+c->account()->accountId()+TQString::fromUtf8(":") + c->contactId() ; } return d->metaContactId; } -void MetaContact::setMetaContactId( const QString& newMetaContactId ) +void MetaContact::setMetaContactId( const TQString& newMetaContactId ) { if(newMetaContactId == d->metaContactId) return; @@ -1374,7 +1374,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) d->photoSyncedWithKABC=b; if(b) { - QVariant newValue; + TQVariant newValue; switch( photoSource() ) { @@ -1402,10 +1402,10 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) if ( !theAddressee.isEmpty() ) { - QImage img; - if(newValue.canCast( QVariant::Image )) + TQImage img; + if(newValue.canCast( TQVariant::Image )) img=newValue.toImage(); - else if(newValue.canCast( QVariant::Pixmap )) + else if(newValue.canCast( TQVariant::Pixmap )) img=newValue.toPixmap().convertToImage(); if(img.isNull()) @@ -1415,7 +1415,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) // to sync with kabc but try first to embed the // photo data in the kabc addressee, because it could // be remote resource and the local url makes no sense - QImage fallBackImage = QImage(newValue.toString()); + TQImage fallBackImage = TQImage(newValue.toString()); if(fallBackImage.isNull()) theAddressee.setPhoto(newValue.toString()); else @@ -1431,7 +1431,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) } } -QPtrList MetaContact::contacts() const +TQPtrList MetaContact::contacts() const { return d->contacts; } diff --git a/kopete/libkopete/kopetemetacontact.h b/kopete/libkopete/kopetemetacontact.h index 3bdaa33a..07be08ef 100644 --- a/kopete/libkopete/kopetemetacontact.h +++ b/kopete/libkopete/kopetemetacontact.h @@ -22,8 +22,8 @@ #define kopetemetacontact_h__ #include "kopetecontactlistelement.h" -#include -#include +#include +#include #include #include "kopete_export.h" @@ -58,15 +58,15 @@ class KOPETE_EXPORT MetaContact : public ContactListElement, public NotifyDataOb { Q_OBJECT - Q_PROPERTY( QString displayName READ displayName WRITE setDisplayName ) - Q_PROPERTY( QString statusString READ statusString ) - Q_PROPERTY( QString statusIcon READ statusIcon ) + Q_PROPERTY( TQString displayName READ displayName WRITE setDisplayName ) + Q_PROPERTY( TQString statusString READ statusString ) + Q_PROPERTY( TQString statusIcon READ statusIcon ) Q_PROPERTY( bool isOnline READ isOnline ) Q_PROPERTY( bool isReachable READ isReachable ) Q_PROPERTY( bool isTemporary READ isTemporary ) Q_PROPERTY( bool canAcceptFiles READ canAcceptFiles ) //Q_PROPERTY( ulong idleTime READ idleTime ) - Q_PROPERTY( QString metaContactId READ metaContactId WRITE setMetaContactId ) + Q_PROPERTY( TQString metaContactId READ metaContactId WRITE setMetaContactId ) Q_PROPERTY( bool photoSyncedWithKABC READ isPhotoSyncedWithKABC WRITE setPhotoSyncedWithKABC ) public: @@ -95,30 +95,30 @@ public: * Every metacontact has a unique id, set by when creating the contact, or reading the contactlist * TODO: make it real */ - QString metaContactId() const; + TQString metaContactId() const; /** * @brief Add or change the link to a KDE addressbook (KABC) Addressee. * FIXME: Use with care. You could create 1 to many relationships with the current implementation */ - void setMetaContactId( const QString& newMetaContactId ); + void setMetaContactId( const TQString& newMetaContactId ); /** * @brief Retrieve the list of contacts that are part of the meta contact */ - QPtrList contacts() const; + TQPtrList contacts() const; /** * @brief The groups the contact is stored in */ - QPtrList groups() const; + TQPtrList groups() const; /** * Find the Contact to a given contact. If contact * is not found, a null pointer is returned. * if @p protocolId or @p accountId are null, it is searched over all protocols/accounts */ - Contact *findContact( const QString &protocolId, const QString &accountId, const QString &contactId ); + Contact *findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ); /** * @brief Set the source of metacontact displayName @@ -174,7 +174,7 @@ public: * * This displayName is obtained from the source set with @ref setDisplayNameSource */ - QString displayName() const; + TQString displayName() const; /** * @brief the photo showed in the contactlist window @@ -185,7 +185,7 @@ public: * * This photo is obtained from the source set with @ref setPhotoSource */ - QImage photo() const; + TQImage photo() const; /** * Return the correct Kopete::Picture object depending of the metacontact photo source. @@ -206,7 +206,7 @@ public: * @see displayName() * @see displayNameSource() */ - void setDisplayName( const QString &name ); + void setDisplayName( const TQString &name ); /** * @brief Returns the custom display name @@ -214,7 +214,7 @@ public: * @see displayName() * @see displayNameSource() */ - QString customDisplayName() const; + TQString customDisplayName() const; /** * @brief Returns the custom display photo @@ -305,7 +305,7 @@ public: * @brief The name of the icon associated with the contact's status * @todo improve with OnlineStatus */ - QString statusIcon() const; + TQString statusIcon() const; /** * @brief The status string of the contact @@ -313,7 +313,7 @@ public: * @see @ref status() * @todo improve with OnlineStatus */ - QString statusString() const; + TQString statusString() const; /** * Returns whether this contact can be reached online for at least one @@ -355,7 +355,7 @@ public: * @param minimal When true, it doesn't save the * plugins, groups and notification data. False by default. */ - const QDomElement toXML(bool minimal = false); + const TQDomElement toXML(bool minimal = false); /** * Creates a metacontact from XML @@ -364,7 +364,7 @@ public: * discarded. * @internal */ - bool fromXML( const QDomElement& cnode ); + bool fromXML( const TQDomElement& cnode ); /** * Get or set a field for the KDE address book backend. Fields not @@ -385,7 +385,7 @@ public: * Probably it requires once more some rewrites to get it working * properly :( - Martijn */ - QString addressBookField( Plugin *p, const QString &app, const QString &key ) const; + TQString addressBookField( Plugin *p, const TQString &app, const TQString &key ) const; /** * @brief set an address book field @@ -396,7 +396,7 @@ public: * @param key The name of the address book field to set * @param value The value of the address book field to set */ - void setAddressBookField( Plugin *p, const QString &app, const QString &key, const QString &value ); + void setAddressBookField( Plugin *p, const TQString &app, const TQString &key, const TQString &value ); public slots: @@ -414,7 +414,7 @@ public slots: * file size (such as over a socket) * */ - void sendFile( const KURL &sourceURL, const QString &altFileName = QString::null, + void sendFile( const KURL &sourceURL, const TQString &altFileName = TQString::null, unsigned long fileSize = 0L ); signals: /** @@ -507,7 +507,7 @@ signals: /** * @brief The meta contact's display name changed */ - void displayNameChanged( const QString &oldName, const QString &newName ); + void displayNameChanged( const TQString &oldName, const TQString &newName ); /** * @brief The meta contact's photo changed @@ -563,7 +563,7 @@ private slots: /** * One of the child contact's property changed */ - void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); /** * A child contact was deleted, remove it from the list, if it's still @@ -587,24 +587,24 @@ private slots: void slotUpdateAddressBookPicture(); protected: - //QImage photoFromContact( Kopete::Contact *c) const; - //QImage photoFromKABC( const QString &id ) const; - QImage photoFromCustom() const; - //QString nameFromContact( Kopete::Contact *c) const; - //QString nameFromKABC( const QString &id ) const; - - QString sourceToString(PropertySource source) const; - PropertySource stringToSource(const QString &name) const; + //TQImage photoFromContact( Kopete::Contact *c) const; + //TQImage photoFromKABC( const TQString &id ) const; + TQImage photoFromCustom() const; + //TQString nameFromContact( Kopete::Contact *c) const; + //TQString nameFromKABC( const TQString &id ) const; + + TQString sourceToString(PropertySource source) const; + PropertySource stringToSource(const TQString &name) const; private: class Private; Private *d; }; // util functions shared with metacontact property dialog -KOPETE_EXPORT QImage photoFromContact( Kopete::Contact *c) /*const*/; -KOPETE_EXPORT QImage photoFromKABC( const QString &id ) /*const*/; -KOPETE_EXPORT QString nameFromContact( Kopete::Contact *c) /*const*/; -KOPETE_EXPORT QString nameFromKABC( const QString &id ) /*const*/; +KOPETE_EXPORT TQImage photoFromContact( Kopete::Contact *c) /*const*/; +KOPETE_EXPORT TQImage photoFromKABC( const TQString &id ) /*const*/; +KOPETE_EXPORT TQString nameFromContact( Kopete::Contact *c) /*const*/; +KOPETE_EXPORT TQString nameFromKABC( const TQString &id ) /*const*/; } //END namespace Kopete diff --git a/kopete/libkopete/kopetemimesourcefactory.cpp b/kopete/libkopete/kopetemimesourcefactory.cpp index a34d8aee..f21d875a 100644 --- a/kopete/libkopete/kopetemimesourcefactory.cpp +++ b/kopete/libkopete/kopetemimesourcefactory.cpp @@ -26,9 +26,9 @@ #include #include -#include -#include -#include +#include +#include +#include namespace Kopete { @@ -38,7 +38,7 @@ class MimeSourceFactory::Private public: Private() : lastMimeSource( 0 ) {} ~Private() { delete lastMimeSource; } - mutable QMimeSource *lastMimeSource; + mutable TQMimeSource *lastMimeSource; }; MimeSourceFactory::MimeSourceFactory() @@ -51,17 +51,17 @@ MimeSourceFactory::~MimeSourceFactory() delete d; } -const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const +const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const { // flag used to signal something went wrong when creating a mimesource bool completed = false; // extract and decode arguments - QStringList parts = QStringList::split( QChar(':'), abs_name ); - for ( QStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) + TQStringList parts = TQStringList::split( TQChar(':'), abs_name ); + for ( TQStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) *it = KURL::decode_string( *it ); - QPixmap img; - if ( parts[0] == QString::fromLatin1("kopete-contact-icon") ) + TQPixmap img; + if ( parts[0] == TQString::fromLatin1("kopete-contact-icon") ) { if ( parts.size() >= 4 ) { @@ -84,7 +84,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-contact-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-account-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-account-icon") ) { if ( parts.size() >= 3 ) { @@ -101,7 +101,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-account-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-metacontact-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-metacontact-icon") ) { if ( parts.size() >= 2 ) { @@ -116,16 +116,16 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-metacontact-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-metacontact-photo") ) + if ( parts[0] == TQString::fromLatin1("kopete-metacontact-photo") ) { if ( parts.size() >= 2 ) { MetaContact *mc = ContactList::self()->metaContact( parts[1] ); if ( mc ) { - QImage photo = mc->photo(); + TQImage photo = mc->photo(); delete d->lastMimeSource; - d->lastMimeSource = new QImageDrag( photo ); + d->lastMimeSource = new TQImageDrag( photo ); return d->lastMimeSource; } } @@ -133,7 +133,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-metacontact-photo: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-onlinestatus-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-onlinestatus-icon") ) { if ( parts.size() >= 2 ) { @@ -164,7 +164,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const delete d->lastMimeSource; if ( completed ) - d->lastMimeSource = new QImageDrag( img.convertToImage() ); + d->lastMimeSource = new TQImageDrag( img.convertToImage() ); else d->lastMimeSource = 0; return d->lastMimeSource; diff --git a/kopete/libkopete/kopetemimesourcefactory.h b/kopete/libkopete/kopetemimesourcefactory.h index 76c2f188..e9df5994 100644 --- a/kopete/libkopete/kopetemimesourcefactory.h +++ b/kopete/libkopete/kopetemimesourcefactory.h @@ -18,7 +18,7 @@ #ifndef KOPETEMIMESOURCEFACTORY_H #define KOPETEMIMESOURCEFACTORY_H -#include +#include #include "kopete_export.h" @@ -42,7 +42,7 @@ public: MimeSourceFactory(); ~MimeSourceFactory(); - const QMimeSource *data( const QString &abs_name ) const; + const TQMimeSource *data( const TQString &abs_name ) const; private: class Private; diff --git a/kopete/libkopete/kopetemimetypehandler.cpp b/kopete/libkopete/kopetemimetypehandler.cpp index 04c4939b..5f336a6b 100644 --- a/kopete/libkopete/kopetemimetypehandler.cpp +++ b/kopete/libkopete/kopetemimetypehandler.cpp @@ -19,7 +19,7 @@ #include "kopeteglobal.h" #include "kopeteuiglobal.h" -#include +#include #include #include @@ -36,8 +36,8 @@ namespace Kopete namespace { - static QDict g_mimeHandlers; - static QDict g_protocolHandlers; + static TQDict g_mimeHandlers; + static TQDict g_protocolHandlers; } class MimeTypeHandler::Private @@ -45,8 +45,8 @@ class MimeTypeHandler::Private public: Private( bool carf ) : canAcceptRemoteFiles( carf ) {} bool canAcceptRemoteFiles; - QStringList mimeTypes; - QStringList protocols; + TQStringList mimeTypes; + TQStringList protocols; }; MimeTypeHandler::MimeTypeHandler( bool canAcceptRemoteFiles ) @@ -56,16 +56,16 @@ MimeTypeHandler::MimeTypeHandler( bool canAcceptRemoteFiles ) MimeTypeHandler::~MimeTypeHandler() { - for( QStringList::iterator it = d->mimeTypes.begin(); it != d->mimeTypes.end(); ++it ) + for( TQStringList::iterator it = d->mimeTypes.begin(); it != d->mimeTypes.end(); ++it ) g_mimeHandlers.remove( *it ); - for( QStringList::iterator it = d->protocols.begin(); it != d->protocols.end(); ++it ) + for( TQStringList::iterator it = d->protocols.begin(); it != d->protocols.end(); ++it ) g_protocolHandlers.remove( *it ); delete d; } -bool MimeTypeHandler::registerAsMimeHandler( const QString &mimeType ) +bool MimeTypeHandler::registerAsMimeHandler( const TQString &mimeType ) { if( g_mimeHandlers[ mimeType ] ) { @@ -80,7 +80,7 @@ bool MimeTypeHandler::registerAsMimeHandler( const QString &mimeType ) return true; } -bool MimeTypeHandler::registerAsProtocolHandler( const QString &protocol ) +bool MimeTypeHandler::registerAsProtocolHandler( const TQString &protocol ) { if( g_protocolHandlers[ protocol ] ) { @@ -95,12 +95,12 @@ bool MimeTypeHandler::registerAsProtocolHandler( const QString &protocol ) return true; } -const QStringList MimeTypeHandler::mimeTypes() const +const TQStringList MimeTypeHandler::mimeTypes() const { return d->mimeTypes; } -const QStringList MimeTypeHandler::protocols() const +const TQStringList MimeTypeHandler::protocols() const { return d->protocols; } @@ -115,7 +115,7 @@ bool MimeTypeHandler::dispatchURL( const KURL &url ) if( url.isEmpty() ) return false; - QString type = KMimeType::findByURL( url )->name(); + TQString type = KMimeType::findByURL( url )->name(); MimeTypeHandler *mimeHandler = g_mimeHandlers[ type ]; @@ -140,14 +140,14 @@ bool MimeTypeHandler::dispatchURL( const KURL &url ) } } -bool MimeTypeHandler::dispatchToHandler( const KURL &url, const QString &mimeType, MimeTypeHandler *handler ) +bool MimeTypeHandler::dispatchToHandler( const KURL &url, const TQString &mimeType, MimeTypeHandler *handler ) { if( !handler->canAcceptRemoteFiles() ) { - QString file; + TQString file; if( !KIO::NetAccess::download( url, file, Kopete::UI::Global::mainWidget() ) ) { - QString sorryText; + TQString sorryText; if ( url.isLocalFile() ) { sorryText = i18n( "Unable to find the file %1." ); @@ -190,7 +190,7 @@ void MimeTypeHandler::handleURL( const KURL &url ) const Q_UNUSED( url ); } -void MimeTypeHandler::handleURL( const QString &mimeType, const KURL &url ) const +void MimeTypeHandler::handleURL( const TQString &mimeType, const KURL &url ) const { Q_UNUSED( mimeType ); Q_UNUSED( url ); @@ -200,12 +200,12 @@ void MimeTypeHandler::handleURL( const QString &mimeType, const KURL &url ) cons EmoticonMimeTypeHandler::EmoticonMimeTypeHandler() : MimeTypeHandler( false ) { - registerAsMimeHandler( QString::fromLatin1("application/x-kopete-emoticons") ); - registerAsMimeHandler( QString::fromLatin1("application/x-tgz") ); - registerAsMimeHandler( QString::fromLatin1("application/x-tbz") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-kopete-emoticons") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-tgz") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-tbz") ); } -void EmoticonMimeTypeHandler::handleURL( const QString &, const KURL &url ) const +void EmoticonMimeTypeHandler::handleURL( const TQString &, const KURL &url ) const { Global::installEmoticonTheme( url.path() ); } diff --git a/kopete/libkopete/kopetemimetypehandler.h b/kopete/libkopete/kopetemimetypehandler.h index 8f3235f0..206bcffa 100644 --- a/kopete/libkopete/kopetemimetypehandler.h +++ b/kopete/libkopete/kopetemimetypehandler.h @@ -51,12 +51,12 @@ public: /** * Returns a list of mime types this object is registered to handle */ - const QStringList mimeTypes() const; + const TQStringList mimeTypes() const; /** * Returns a list of protocols this object is registered to handle */ - const QStringList protocols() const; + const TQStringList protocols() const; /** * Returns true if this handler can accept remote files direcltly; @@ -78,7 +78,7 @@ public: * @param mimeType The mime type of the URL * @param url The url to handle */ - virtual void handleURL( const QString &mimeType, const KURL &url ) const; + virtual void handleURL( const TQString &mimeType, const KURL &url ) const; protected: /** @@ -87,7 +87,7 @@ protected: * @return true if registration succeeded, false if another handler is * already set for this mime type. */ - bool registerAsMimeHandler( const QString &mimeType ); + bool registerAsMimeHandler( const TQString &mimeType ); /** * Register this object as the handler of type @p protocol. @@ -95,7 +95,7 @@ protected: * @return true if registration succeeded, false if another handler is * already set for this protocol. */ - bool registerAsProtocolHandler( const QString &protocol ); + bool registerAsProtocolHandler( const TQString &protocol ); private: /** @@ -108,7 +108,7 @@ private: * * @return true if a handler was able to process the URL, false otherwise */ - static bool dispatchToHandler( const KURL &url, const QString &mimeType, MimeTypeHandler *handler ); + static bool dispatchToHandler( const KURL &url, const TQString &mimeType, MimeTypeHandler *handler ); class Private; Private *d; @@ -122,9 +122,9 @@ class KOPETE_EXPORT EmoticonMimeTypeHandler : public MimeTypeHandler public: EmoticonMimeTypeHandler(); - const QStringList mimeTypes() const; + const TQStringList mimeTypes() const; - void handleURL( const QString &mimeType, const KURL &url ) const; + void handleURL( const TQString &mimeType, const KURL &url ) const; }; } // Kopete diff --git a/kopete/libkopete/kopetenotifydataobject.cpp b/kopete/libkopete/kopetenotifydataobject.cpp index 9a0de544..7ba7ab80 100644 --- a/kopete/libkopete/kopetenotifydataobject.cpp +++ b/kopete/libkopete/kopetenotifydataobject.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include "kopetenotifydataobject.h" #include "kopetenotifyevent.h" @@ -23,7 +23,7 @@ class Kopete::NotifyDataObject::Private { public: - QDict events; + TQDict events; }; Kopete::NotifyDataObject::NotifyDataObject() @@ -37,40 +37,40 @@ Kopete::NotifyDataObject::~NotifyDataObject() delete d; } -Kopete::NotifyEvent * Kopete::NotifyDataObject::notifyEvent( const QString &event ) const +Kopete::NotifyEvent * Kopete::NotifyDataObject::notifyEvent( const TQString &event ) const { Kopete::NotifyEvent *evt = d->events.find( event ); return evt; } -void Kopete::NotifyDataObject::setNotifyEvent( const QString& event, Kopete::NotifyEvent *notifyEvent ) +void Kopete::NotifyDataObject::setNotifyEvent( const TQString& event, Kopete::NotifyEvent *notifyEvent ) { d->events.replace( event, notifyEvent ); } -bool Kopete::NotifyDataObject::removeNotifyEvent( const QString &event ) +bool Kopete::NotifyDataObject::removeNotifyEvent( const TQString &event ) { return d->events.remove( event ); } -QDomElement Kopete::NotifyDataObject::notifyDataToXML() +TQDomElement Kopete::NotifyDataObject::notifyDataToXML() { - QDomDocument notify; - QDomElement notifications; + TQDomDocument notify; + TQDomElement notifications; if ( !d->events.isEmpty() ) { // - notifications = notify.createElement( QString::fromLatin1( "custom-notifications" ) ); - QDictIterator it( d->events ); + notifications = notify.createElement( TQString::fromLatin1( "custom-notifications" ) ); + TQDictIterator it( d->events ); for ( ; it.current(); ++it ) { // - QDomElement event = notify.createElement( QString::fromLatin1( "event" ) ); - event.setAttribute( QString::fromLatin1( "name" ), it.currentKey() ); - event.setAttribute( QString::fromLatin1( "suppress-common" ), QString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) ); - QValueList presentations = it.current()->toXML(); + TQDomElement event = notify.createElement( TQString::fromLatin1( "event" ) ); + event.setAttribute( TQString::fromLatin1( "name" ), it.currentKey() ); + event.setAttribute( TQString::fromLatin1( "suppress-common" ), TQString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) ); + TQValueList presentations = it.current()->toXML(); // - for ( QValueList::Iterator it = presentations.begin(); it != presentations.end(); ++it ) + for ( TQValueList::Iterator it = presentations.begin(); it != presentations.end(); ++it ) event.appendChild( notify.importNode( *it, true ) ); notifications.appendChild( event ); } @@ -78,59 +78,59 @@ QDomElement Kopete::NotifyDataObject::notifyDataToXML() return notifications; } -bool Kopete::NotifyDataObject::notifyDataFromXML( const QDomElement& element ) +bool Kopete::NotifyDataObject::notifyDataFromXML( const TQDomElement& element ) { - if ( element.tagName() == QString::fromLatin1( "custom-notifications" ) ) + if ( element.tagName() == TQString::fromLatin1( "custom-notifications" ) ) { - QDomNode field = element.firstChild(); + TQDomNode field = element.firstChild(); while( !field.isNull() ) { //read an event - QDomElement fieldElement = field.toElement(); - if ( fieldElement.tagName() == QString::fromLatin1( "event" ) ) + TQDomElement fieldElement = field.toElement(); + if ( fieldElement.tagName() == TQString::fromLatin1( "event" ) ) { // get its attributes - QString name = fieldElement.attribute( QString::fromLatin1( "name" ), QString::null ); - QString suppress = fieldElement.attribute( QString::fromLatin1( "suppress-common" ), QString::null ); - Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == QString::fromLatin1( "true" ) ); + TQString name = fieldElement.attribute( TQString::fromLatin1( "name" ), TQString::null ); + TQString suppress = fieldElement.attribute( TQString::fromLatin1( "suppress-common" ), TQString::null ); + Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == TQString::fromLatin1( "true" ) ); // get its children - QDomNode child = fieldElement.firstChild(); + TQDomNode child = fieldElement.firstChild(); while( !child.isNull() ) { - QDomElement childElement = child.toElement(); - if ( childElement.tagName() == QString::fromLatin1( "sound-presentation" ) ) + TQDomElement childElement = child.toElement(); + if ( childElement.tagName() == TQString::fromLatin1( "sound-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: sound" << endl; - QString src = childElement.attribute( QString::fromLatin1( "src" ) ); - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); + TQString src = childElement.attribute( TQString::fromLatin1( "src" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Sound, src, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Sound, pres ); // kdDebug(14010) << k_funcinfo << "after sound: " << evt->toString() << endl; } - if ( childElement.tagName() == QString::fromLatin1( "message-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "message-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: msg" << endl; - QString src = childElement.attribute( QString::fromLatin1( "src" ) ); - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); + TQString src = childElement.attribute( TQString::fromLatin1( "src" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Message, src, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Message, pres ); // kdDebug(14010) << k_funcinfo << "after message: " << evt->toString() << endl; } - if ( childElement.tagName() == QString::fromLatin1( "chat-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "chat-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: chat" << endl; - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); - Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, QString::null, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); + Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, TQString::null, + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Chat, pres ); // kdDebug(14010) << k_funcinfo << "after chat: " << evt->toString() << endl; } diff --git a/kopete/libkopete/kopetenotifydataobject.h b/kopete/libkopete/kopetenotifydataobject.h index db253c60..298d542f 100644 --- a/kopete/libkopete/kopetenotifydataobject.h +++ b/kopete/libkopete/kopetenotifydataobject.h @@ -17,9 +17,9 @@ #ifndef KOPETENOTIFYDATAOBJECT_H #define KOPETENOTIFYDATAOBJECT_H -#include -#include -#include +#include +#include +#include #include "kopete_export.h" @@ -40,14 +40,14 @@ class KOPETE_EXPORT NotifyDataObject NotifyDataObject(); ~NotifyDataObject(); // Notify events - NotifyEvent *notifyEvent( const QString &event ) const; - void setNotifyEvent( const QString &event, + NotifyEvent *notifyEvent( const TQString &event ) const; + void setNotifyEvent( const TQString &event, NotifyEvent *notifyEvent ); - bool removeNotifyEvent( const QString &event ); + bool removeNotifyEvent( const TQString &event ); // Serialization protected: - QDomElement notifyDataToXML(); - bool notifyDataFromXML( const QDomElement& element ); + TQDomElement notifyDataToXML(); + bool notifyDataFromXML( const TQDomElement& element ); private: class Private; NotifyDataObject::Private* d; diff --git a/kopete/libkopete/kopetenotifyevent.cpp b/kopete/libkopete/kopetenotifyevent.cpp index 28c4ab15..4bd9fad7 100644 --- a/kopete/libkopete/kopetenotifyevent.cpp +++ b/kopete/libkopete/kopetenotifyevent.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include "kopetenotifyevent.h" #include "kopeteeventpresentation.h" @@ -138,39 +138,39 @@ void Kopete::NotifyEvent::setSuppressCommon( const bool suppress ) m_suppressCommon = suppress; } -const QValueList Kopete::NotifyEvent::toXML() const +const TQValueList Kopete::NotifyEvent::toXML() const { - QDomDocument eventData; - QValueList eventNodes; + TQDomDocument eventData; + TQValueList eventNodes; if ( m_sound && !m_sound->content().isEmpty() ) { - QDomElement soundElmt = eventData.createElement( QString::fromLatin1( "sound-presentation" ) ); - soundElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( m_sound->enabled() ? "true" : "false" ) ); - soundElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_sound->singleShot() ? "true" : "false" ) ); - soundElmt.setAttribute( QString::fromLatin1( "src" ), m_sound->content() ); + TQDomElement soundElmt = eventData.createElement( TQString::fromLatin1( "sound-presentation" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( m_sound->enabled() ? "true" : "false" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_sound->singleShot() ? "true" : "false" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "src" ), m_sound->content() ); eventNodes.append( soundElmt ); } if ( m_message && !m_message->content().isEmpty() ) { - QDomElement msgElmt = eventData.createElement( QString::fromLatin1( "message-presentation" ) ); - msgElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( m_message->enabled() ? "true" : "false" ) ); - msgElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_message->singleShot() ? "true" : "false" ) ); - msgElmt.setAttribute( QString::fromLatin1( "src" ), m_message->content() ); + TQDomElement msgElmt = eventData.createElement( TQString::fromLatin1( "message-presentation" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( m_message->enabled() ? "true" : "false" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_message->singleShot() ? "true" : "false" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "src" ), m_message->content() ); eventNodes.append( msgElmt ); } if ( m_chat && m_chat->enabled() ) { - QDomElement chatElmt = eventData.createElement( QString::fromLatin1( "chat-presentation" ) ); - chatElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( "true" ) ); - chatElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_chat->singleShot() ? "true" : "false" ) ); + TQDomElement chatElmt = eventData.createElement( TQString::fromLatin1( "chat-presentation" ) ); + chatElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( "true" ) ); + chatElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_chat->singleShot() ? "true" : "false" ) ); eventNodes.append( chatElmt ); } return eventNodes; } -QString Kopete::NotifyEvent::toString() +TQString Kopete::NotifyEvent::toString() { - QString stringRep = QString::fromLatin1("Event; Suppress common=%1").arg( QString::fromLatin1( suppressCommon() ? "true" : "false" ) ); + TQString stringRep = TQString::fromLatin1("Event; Suppress common=%1").arg( TQString::fromLatin1( suppressCommon() ? "true" : "false" ) ); if ( m_sound) stringRep += m_sound->toString(); if ( m_message) diff --git a/kopete/libkopete/kopetenotifyevent.h b/kopete/libkopete/kopetenotifyevent.h index b7acd3c1..85d03c66 100644 --- a/kopete/libkopete/kopetenotifyevent.h +++ b/kopete/libkopete/kopetenotifyevent.h @@ -18,8 +18,8 @@ #ifndef KOPETENOTIFYEVENT_H #define KOPETENOTIFYEVENT_H -#include -#include +#include +#include #include "kopeteeventpresentation.h" #include "kopete_export.h" @@ -45,10 +45,10 @@ public: bool firePresentation( const EventPresentation::PresentationType type ); void setSuppressCommon( bool suppress ); - const QValueList toXML() const; - QString toString(); + const TQValueList toXML() const; + TQString toString(); private: - QString m_event; + TQString m_event; EventPresentation *m_sound; EventPresentation *m_message; EventPresentation *m_chat; diff --git a/kopete/libkopete/kopeteonlinestatus.cpp b/kopete/libkopete/kopeteonlinestatus.cpp index 8872f28b..da9bb5d5 100644 --- a/kopete/libkopete/kopeteonlinestatus.cpp +++ b/kopete/libkopete/kopeteonlinestatus.cpp @@ -43,13 +43,13 @@ public: unsigned weight; Protocol *protocol; unsigned internalStatus; - QStringList overlayIcons; - QString description; + TQStringList overlayIcons; + TQString description; unsigned refCount; - QString protocolIcon() const + TQString protocolIcon() const { - return protocol ? protocol->pluginIcon() : QString::fromLatin1( "unknown" ); + return protocol ? protocol->pluginIcon() : TQString::fromLatin1( "unknown" ); } }; @@ -71,7 +71,7 @@ static struct { OnlineStatus::Away, "Away" } }; OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, - unsigned internalStatus, const QStringList &overlayIcons, const QString &description ) + unsigned internalStatus, const TQStringList &overlayIcons, const TQString &description ) : d( new Private ) { d->status = status; @@ -83,7 +83,7 @@ OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protoc } OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, - const QStringList &overlayIcons, const QString &description, const QString &caption, unsigned int categories , unsigned int options ) + const TQStringList &overlayIcons, const TQString &description, const TQString &caption, unsigned int categories , unsigned int options ) : d( new Private ) { d->status = status; @@ -124,7 +124,7 @@ OnlineStatus::OnlineStatus( StatusType status ) case Unknown: default: d->description = i18n( "Unknown" ); - d->overlayIcons = QString::fromLatin1("status_unknown"); + d->overlayIcons = TQString::fromLatin1("status_unknown"); break; } @@ -137,7 +137,7 @@ OnlineStatus::OnlineStatus() d->internalStatus = 0; d->weight = 0; d->protocol = 0L; - d->overlayIcons = QString::fromLatin1( "status_unknown" ); + d->overlayIcons = TQString::fromLatin1( "status_unknown" ); } OnlineStatus::OnlineStatus( const OnlineStatus &other ) @@ -204,12 +204,12 @@ unsigned OnlineStatus::weight() const return d->weight; } -QStringList OnlineStatus::overlayIcons() const +TQStringList OnlineStatus::overlayIcons() const { return d->overlayIcons; } -QString OnlineStatus::description() const +TQString OnlineStatus::description() const { return d->description; } @@ -226,16 +226,16 @@ bool OnlineStatus::isDefinitelyOnline() const return true; } -QPixmap OnlineStatus::iconFor( const Contact *contact, int size ) const +TQPixmap OnlineStatus::iconFor( const Contact *contact, int size ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSourceFor( contact, size ) ); } -QString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const +TQString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const { // figure out what icon we should use for this contact - QString iconName = contact->icon(); + TQString iconName = contact->icon(); if ( iconName.isNull() ) iconName = contact->account()->customIcon(); if ( iconName.isNull() ) @@ -245,31 +245,31 @@ QString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const return mimeSource( iconName, size, contact->account()->color(),contact->idleTime() >= 10*60 ); } -QPixmap OnlineStatus::iconFor( const Account *account, int size ) const +TQPixmap OnlineStatus::iconFor( const Account *account, int size ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSourceFor( account, size ) ); } -QString OnlineStatus::mimeSourceFor( const Account *account, int size ) const +TQString OnlineStatus::mimeSourceFor( const Account *account, int size ) const { - QString iconName = account->customIcon(); + TQString iconName = account->customIcon(); if ( iconName.isNull() ) iconName = d->protocolIcon(); return mimeSource( iconName, size, account->color(), false ); } -QPixmap OnlineStatus::iconFor( const QString &mimeSource ) const +TQPixmap OnlineStatus::iconFor( const TQString &mimeSource ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSource ); } -QPixmap OnlineStatus::protocolIcon() const +TQPixmap OnlineStatus::protocolIcon() const { - return OnlineStatusManager::self()->cacheLookupByObject( *this, d->protocolIcon() , 16, QColor() ); + return OnlineStatusManager::self()->cacheLookupByObject( *this, d->protocolIcon() , 16, TQColor() ); } -QString OnlineStatus::mimeSource( const QString& icon, int size, QColor color, bool idle) const +TQString OnlineStatus::mimeSource( const TQString& icon, int size, TQColor color, bool idle) const { // make sure the item is in the cache OnlineStatusManager::self()->cacheLookupByObject( *this, icon, size, color, idle ); @@ -277,23 +277,23 @@ QString OnlineStatus::mimeSource( const QString& icon, int size, QColor color, b return OnlineStatusManager::self()->fingerprint( *this, icon, size, color, idle ); } -QString OnlineStatus::statusTypeToString(OnlineStatus::StatusType statusType) +TQString OnlineStatus::statusTypeToString(OnlineStatus::StatusType statusType) { const int size = sizeof(statusNames) / sizeof(statusNames[0]); for (int i=0; i< size; i++) if (statusNames[i].status == statusType) - return QString::fromLatin1(statusNames[i].name); + return TQString::fromLatin1(statusNames[i].name); - return QString::fromLatin1(statusNames[0].name); // Unknown + return TQString::fromLatin1(statusNames[0].name); // Unknown } -OnlineStatus::StatusType OnlineStatus::statusStringToType(QString& string) +OnlineStatus::StatusType OnlineStatus::statusStringToType(TQString& string) { int size = sizeof(statusNames) / sizeof(statusNames[0]); for (int i=0; i< size; i++) - if (QString::fromLatin1(statusNames[i].name) == string) + if (TQString::fromLatin1(statusNames[i].name) == string) return statusNames[i].status; return OnlineStatus::Unknown; diff --git a/kopete/libkopete/kopeteonlinestatus.h b/kopete/libkopete/kopeteonlinestatus.h index 2eed5164..8136b1da 100644 --- a/kopete/libkopete/kopeteonlinestatus.h +++ b/kopete/libkopete/kopeteonlinestatus.h @@ -26,7 +26,7 @@ #include #include -#include +#include class QString; class QPixmap; @@ -169,13 +169,13 @@ public: * by libkopete and should be unique per protocol. * @param overlayIcons is a list of QStrings which are the name of status * icons to be used by the KDE icon loader. (Statuses which don't have icons - * to overlay like Online and Offline should use QString::null as icon + * to overlay like Online and Offline should use TQString::null as icon * name ). NOTE if the string is a movie ( *.mng ) it must be the first string in the list. * TODO: KDE4 sort out movies and overlay icons. * @param description is a description in e.g. tooltips. */ OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, - unsigned internalStatus, const QStringList &overlayIcons, const QString &description ); + unsigned internalStatus, const TQStringList &overlayIcons, const TQString &description ); /** * Constructor. @@ -203,15 +203,15 @@ public: * by libkopete and should be unique per protocol. * @param overlayIcon is a string returning the name of the status icon to be * used by the KDE icon loader. (Status whiwh doesn't have icon to overlay like - * Online and Offline should use QString::null as icon string) + * Online and Offline should use TQString::null as icon string) * @param description is a description in e.g. tooltips. * @param caption is the text of the action in the menu * @param categories the categories this online status is in * @param options the options of this online status * @see Kopete::OnlineStatusManager::registerOnlineStatus for more info about the categories and options parameters */ - OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, const QStringList &overlayIcon, - const QString &description, const QString& caption, unsigned int categories=0x0 , unsigned int options=0x0 ); + OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, const TQStringList &overlayIcon, + const TQString &description, const TQString& caption, unsigned int categories=0x0 , unsigned int options=0x0 ); /** @@ -254,12 +254,12 @@ public: /** * \brief Return the list of overlay icons */ - QStringList overlayIcons() const; + TQStringList overlayIcons() const; /** * \brief Return the description */ - QString description() const; + TQString description() const; /** * \brief Return the protocol this applies to @@ -283,7 +283,7 @@ public: * @param contact is the contact the icon should apply to. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QPixmap iconFor( const Contact *contact, int size = 16 ) const; + TQPixmap iconFor( const Contact *contact, int size = 16 ) const; /** * \brief Return the mime source for a status icon generated for the given Contact @@ -297,7 +297,7 @@ public: * @param contact is the contact the icon should apply to. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QString mimeSourceFor( const Contact *contact, int size = 16 ) const; + TQString mimeSourceFor( const Contact *contact, int size = 16 ) const; /** * \brief Return a status icon generated for the given Account @@ -307,10 +307,10 @@ public: * over the base icon. * A cache is employed to reduce CPU and memory usage. * @param account is the account the icon should apply to. - * The account's color causes tinting, if it's plain QColor(), no tinting takes place. + * The account's color causes tinting, if it's plain TQColor(), no tinting takes place. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QPixmap iconFor( const Account *account, int size = 16 ) const; + TQPixmap iconFor( const Account *account, int size = 16 ) const; /** * \brief Return the mime source for a status icon generated for the given Account @@ -322,10 +322,10 @@ public: * so no assumptions should be made about long-time availability * of the referenced data. * @param account is the account the icon should apply to. - * The account's color causes tinting, if it's plain QColor(), no tinting takes place. + * The account's color causes tinting, if it's plain TQColor(), no tinting takes place. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QString mimeSourceFor( const Account *account, int size = 16 ) const; + TQString mimeSourceFor( const Account *account, int size = 16 ) const; /** * \brief Return a previously rendered status icon for a mime source key @@ -336,14 +336,14 @@ public: * requesting the key (thus rendering the icon) and trying to access the * icon by key, an invalid pixmap will be returned. */ - QPixmap iconFor( const QString &mimeSource ) const; + TQPixmap iconFor( const TQString &mimeSource ) const; /** * \brief Returns the status icon for the protocol. * * A cache is employed to reduce CPU and memory usage. */ - QPixmap protocolIcon() const; + TQPixmap protocolIcon() const; /** * Assignment operator @@ -381,20 +381,20 @@ public: bool operator<( const OnlineStatus &other ) const; /** - * \brief returns a QString from a StatusType + * \brief returns a TQString from a StatusType * * Static method to convert a Kopete::OnlineStatus::StatusType to a string to avoid * many issues when saving StatusType to disk */ - static QString statusTypeToString(OnlineStatus::StatusType status); + static TQString statusTypeToString(OnlineStatus::StatusType status); /** * \brief returns a StatusType from a QString * - * Static method to convert a QString representing a StatusType to a StatusType to avoid + * Static method to convert a TQString representing a StatusType to a StatusType to avoid * many issues when saving StatusType to disk */ - static OnlineStatus::StatusType statusStringToType(QString& string); + static OnlineStatus::StatusType statusStringToType(TQString& string); @@ -403,7 +403,7 @@ private: class Private; KSharedPtr d; - QString mimeSource( const QString& icon, int size, QColor color, bool idle) const; + TQString mimeSource( const TQString& icon, int size, TQColor color, bool idle) const; }; diff --git a/kopete/libkopete/kopeteonlinestatusmanager.cpp b/kopete/libkopete/kopeteonlinestatusmanager.cpp index 61c41b83..67364e6b 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.cpp +++ b/kopete/libkopete/kopeteonlinestatusmanager.cpp @@ -41,16 +41,16 @@ class OnlineStatusManager::Private struct RegisteredStatusStruct { - QString caption; + TQString caption; unsigned int categories; unsigned int options; }; - typedef QMap< OnlineStatus , RegisteredStatusStruct > ProtocolMap ; + typedef TQMap< OnlineStatus , RegisteredStatusStruct > ProtocolMap ; - QPixmap *nullPixmap; - QMap registeredStatus; - QDict< QPixmap > iconCache; + TQPixmap *nullPixmap; + TQMap registeredStatus; + TQDict< TQPixmap > iconCache; }; OnlineStatusManager *OnlineStatusManager::s_self=0L; @@ -68,7 +68,7 @@ OnlineStatusManager::OnlineStatusManager() { d->iconCache.setAutoDelete( true ); d->nullPixmap = new QPixmap; - connect( kapp, SIGNAL( iconChanged(int) ), this, SLOT( slotIconsChanged() ) ); + connect( kapp, TQT_SIGNAL( iconChanged(int) ), this, TQT_SLOT( slotIconsChanged() ) ); } OnlineStatusManager::~OnlineStatusManager() @@ -83,7 +83,7 @@ void OnlineStatusManager::slotIconsChanged() emit iconsChanged(); } -void OnlineStatusManager::registerOnlineStatus( const OnlineStatus &status, const QString & caption, unsigned int categories, unsigned int options) +void OnlineStatusManager::registerOnlineStatus( const OnlineStatus &status, const TQString & caption, unsigned int categories, unsigned int options) { Private::RegisteredStatusStruct s; s.caption=caption; @@ -133,25 +133,25 @@ OnlineStatus OnlineStatusManager::onlineStatus(Protocol * protocol, Categories c return OnlineStatus(); } -QString OnlineStatusManager::fingerprint( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle) +TQString OnlineStatusManager::fingerprint( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle) { // create a 'fingerprint' to use as a hash key // fingerprint consists of description/icon name/color/overlay name/size/idle state - return QString::fromLatin1("%1/%2/%3/%4/%5/%6") + return TQString::fromLatin1("%1/%2/%3/%4/%5/%6") .arg( statusFor.description() ) .arg( icon ) .arg( color.name() ) - .arg( statusFor.overlayIcons().join( QString::fromLatin1( "," ) ) ) + .arg( statusFor.overlayIcons().join( TQString::fromLatin1( "," ) ) ) .arg( size ) .arg( idle ? 'i' : 'a' ); } -QPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle) +TQPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle) { - QString fp = fingerprint( statusFor, icon, size, color, idle ); + TQString fp = fingerprint( statusFor, icon, size, color, idle ); // look it up in the cache - QPixmap *theIcon= d->iconCache.find( fp ); + TQPixmap *theIcon= d->iconCache.find( fp ); if ( !theIcon ) { // cache miss @@ -162,10 +162,10 @@ QPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, return *theIcon; } -QPixmap OnlineStatusManager::cacheLookupByMimeSource( const QString &mimeSource ) +TQPixmap OnlineStatusManager::cacheLookupByMimeSource( const TQString &mimeSource ) { // look it up in the cache - const QPixmap *theIcon= d->iconCache.find( mimeSource ); + const TQPixmap *theIcon= d->iconCache.find( mimeSource ); if ( !theIcon ) { // need to return an invalid pixmap @@ -176,7 +176,7 @@ QPixmap OnlineStatusManager::cacheLookupByMimeSource( const QString &mimeSource // This code was forked from the broken KImageEffect::blendOnLower, but it's // been so heavily fixed and rearranged it's hard to recognise that now. -static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &offset ) +static void blendOnLower( const TQImage &upper_, TQImage &lower, const TQPoint &offset ) { if ( upper_.width() <= 0 || upper_.height() <= 0 ) return; @@ -187,7 +187,7 @@ static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &off if ( offset.y() < 0 || offset.y() >= lower.height() ) return; - QImage upper = upper_; + TQImage upper = upper_; if ( upper.depth() != 32 ) upper = upper.convertDepth( 32 ); if ( lower.depth() != 32 ) @@ -223,12 +223,12 @@ static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &off } // Get bounding box of image via alpha channel -static QRect getBoundingBox( const QImage& image ) +static TQRect getBoundingBox( const TQImage& image ) { const int width = image.width(); const int height = image.height(); if ( width <= 0 || height <= 0 ) - return QRect(); + return TQRect(); // scan image from left to right and top to bottom // to get upper left corner of bounding box @@ -267,39 +267,39 @@ static QRect getBoundingBox( const QImage& image ) } } } - return QRect( x1, y1, std::max( 0, x2-x1+1 ), std::max( 0, y2-y1+1 ) ); + return TQRect( x1, y1, std::max( 0, x2-x1+1 ), std::max( 0, y2-y1+1 ) ); } // Get offset for upperImage to blend it in the i%4-th corner of lowerImage: // bottom right, bottom left, top left, top right -static QPoint getOffsetForCorner( const QImage& upperImage, const QImage& lowerImage, const int i ) +static TQPoint getOffsetForCorner( const TQImage& upperImage, const TQImage& lowerImage, const int i ) { const int dX = lowerImage.width() - upperImage.width(); const int dY = lowerImage.height() - upperImage.height(); const int corner = i % 4; - QPoint offset; + TQPoint offset; switch( corner ) { case 0: // bottom right - offset = QPoint( dX, dY ); + offset = TQPoint( dX, dY ); break; case 1: // bottom left - offset = QPoint( 0, dY ); + offset = TQPoint( 0, dY ); break; case 2: // top left - offset = QPoint( 0, 0 ); + offset = TQPoint( 0, 0 ); break; case 3: // top right - offset = QPoint( dX, 0 ); + offset = TQPoint( dX, 0 ); break; } return offset; } -QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const QString& baseIcon, int size, QColor color, bool idle) const +TQPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const TQString& baseIcon, int size, TQColor color, bool idle) const { // create an icon suiting the status from the base icon // use reasonable defaults if not provided or protocol not set @@ -307,7 +307,7 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q if ( baseIcon == statusFor.overlayIcons().first() ) kdWarning( 14010 ) << "Base and overlay icons are the same - icon effects will not be visible." << endl; - QPixmap* basis = new QPixmap( SmallIcon( baseIcon ) ); + TQPixmap* basis = new TQPixmap( SmallIcon( baseIcon ) ); // Colorize if ( color.isValid() ) @@ -317,19 +317,19 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // that to be colored in this case. if ( statusFor.internalStatus() == Kopete::OnlineStatus::AccountOffline || statusFor.status() == Kopete::OnlineStatus::Offline ) { - *basis = KIconEffect().apply( *basis, KIconEffect::ToGray , 0.85, QColor() , false ); + *basis = KIconEffect().apply( *basis, KIconEffect::ToGray , 0.85, TQColor() , false ); } //composite the iconOverlay for this status and the supplied baseIcon - QStringList overlays = statusFor.overlayIcons(); + TQStringList overlays = statusFor.overlayIcons(); if ( !( overlays.isEmpty() ) ) // otherwise leave the basis as-is { KIconLoader *loader = KGlobal::instance()->iconLoader(); int i = 0; - for( QStringList::iterator it = overlays.begin(), end = overlays.end(); it != end; ++it ) + for( TQStringList::iterator it = overlays.begin(), end = overlays.end(); it != end; ++it ) { - QPixmap overlay = loader->loadIcon(*it, KIcon::Small, 0 , + TQPixmap overlay = loader->loadIcon(*it, KIcon::Small, 0 , KIcon::DefaultState, 0L, /*canReturnNull=*/ true ); if ( !overlay.isNull() ) @@ -337,10 +337,10 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // we want to preserve the alpha channels of both basis and overlay. // there's no way to do this in Qt. In fact, there's no way to do this // in KDE since KImageEffect is so badly broken. - QImage basisImage = basis->convertToImage(); - QImage overlayImage = overlay.convertToImage(); - QPoint offset; - if ( (*it).endsWith( QString::fromLatin1( "_overlay" ) ) ) + TQImage basisImage = basis->convertToImage(); + TQImage overlayImage = overlay.convertToImage(); + TQPoint offset; + if ( (*it).endsWith( TQString::fromLatin1( "_overlay" ) ) ) { // it is possible to have more than one overlay icon // to avoid overlapping we place them in different corners @@ -357,8 +357,8 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // no need to scale if the icon is already of the required size (assuming height == width!) if ( basis->width() != size ) { - QImage scaledImg = basis->convertToImage().smoothScale( size, size ); - *basis = QPixmap( scaledImg ); + TQImage scaledImg = basis->convertToImage().smoothScale( size, size ); + *basis = TQPixmap( scaledImg ); } // if idle, apply effects @@ -379,27 +379,27 @@ void OnlineStatusManager::createAccountStatusActions( Account *account , KAction continue; OnlineStatus status=it.key(); - QString caption=it.data().caption; + TQString caption=it.data().caption; KAction *action; // Any existing actions owned by the account are reused by recovering them // from the parent's child list. // The description of the onlinestatus is used as the qobject name // This is safe as long as OnlineStatus are immutable - QCString actionName = status.description().ascii(); + TQCString actionName = status.description().ascii(); if ( !( action = static_cast( account->child( actionName ) ) ) ) { if(options & OnlineStatusManager::HasAwayMessage) { action = new AwayAction( status, caption, status.iconFor(account), 0, account, - SLOT( setOnlineStatus( const Kopete::OnlineStatus&, const QString& ) ), + TQT_SLOT( setOnlineStatus( const Kopete::OnlineStatus&, const TQString& ) ), account, actionName ); } else { action=new OnlineStatusAction( status, caption, status.iconFor(account) , account, actionName ); - connect(action,SIGNAL(activated(const Kopete::OnlineStatus&)) , - account, SLOT(setOnlineStatus(const Kopete::OnlineStatus&))); + connect(action,TQT_SIGNAL(activated(const Kopete::OnlineStatus&)) , + account, TQT_SLOT(setOnlineStatus(const Kopete::OnlineStatus&))); } } @@ -416,10 +416,10 @@ void OnlineStatusManager::createAccountStatusActions( Account *account , KAction } -OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const QString &text, const QIconSet &pix, QObject *parent, const char *name) +OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, TQObject *parent, const char *name) : KAction( text, pix, KShortcut() , parent, name) , m_status(status) { - connect(this,SIGNAL(activated()),this,SLOT(slotActivated())); + connect(this,TQT_SIGNAL(activated()),this,TQT_SLOT(slotActivated())); } void OnlineStatusAction::slotActivated() diff --git a/kopete/libkopete/kopeteonlinestatusmanager.h b/kopete/libkopete/kopeteonlinestatusmanager.h index d3369403..926ef3fc 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.h +++ b/kopete/libkopete/kopeteonlinestatusmanager.h @@ -18,7 +18,7 @@ #ifndef kopeteonlinestatusmanager_h__ #define kopeteonlinestatusmanager_h__ -#include +#include #include "kopeteonlinestatus.h" #include "kaction.h" @@ -102,11 +102,11 @@ public: * @param categories A bitflag of @ref Categories * @param options is a bitflag of @ref Options */ - void registerOnlineStatus(const OnlineStatus& status, const QString &caption, unsigned int categories=0x00 , unsigned int options=0x0); + void registerOnlineStatus(const OnlineStatus& status, const TQString &caption, unsigned int categories=0x00 , unsigned int options=0x0); /** * insert "setStatus" actions from the given account to the specified actionMenu. - * (actions have that menu as parent QObject) + * (actions have that menu as parent TQObject) * they are connected to the Account::setOnlineStatus signal * * Items are stored by status height. @@ -125,10 +125,10 @@ public: private: friend class OnlineStatus; - QPixmap cacheLookupByObject( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle = false); - QPixmap cacheLookupByMimeSource( const QString &mimeSource ); - QString fingerprint( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle = false); - QPixmap* renderIcon( const OnlineStatus &statusFor, const QString& baseicon, int size, QColor color, bool idle = false) const; + TQPixmap cacheLookupByObject( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle = false); + TQPixmap cacheLookupByMimeSource( const TQString &mimeSource ); + TQString fingerprint( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle = false); + TQPixmap* renderIcon( const OnlineStatus &statusFor, const TQString& baseicon, int size, TQColor color, bool idle = false) const; signals: void iconsChanged(); @@ -152,7 +152,7 @@ class OnlineStatusAction : public KAction { Q_OBJECT public: - OnlineStatusAction ( const OnlineStatus& status, const QString &text, const QIconSet &pix, QObject *parent=0, const char *name=0); + OnlineStatusAction ( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, TQObject *parent=0, const char *name=0); signals: void activated( const Kopete::OnlineStatus& status ); private slots: diff --git a/kopete/libkopete/kopetepassword.cpp b/kopete/libkopete/kopetepassword.cpp index f0b788a9..5edc1b27 100644 --- a/kopete/libkopete/kopetepassword.cpp +++ b/kopete/libkopete/kopetepassword.cpp @@ -21,10 +21,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -40,7 +40,7 @@ class Kopete::Password::Private { public: - Private( const QString &group, uint maxLen, bool blanksAllowed ) + Private( const TQString &group, uint maxLen, bool blanksAllowed ) : refCount( 1 ), configGroup( group ), remembered( false ), maximumLength( maxLen ), isWrong( false ), allowBlankPassword( blanksAllowed ) { @@ -58,11 +58,11 @@ public: /** Reference count */ int refCount; /** Group to use for KConfig and KWallet */ - const QString configGroup; + const TQString configGroup; /** Is the password being remembered? */ bool remembered; - /** The current password in the KConfig file, or QString::null if no password there */ - QString passwordFromKConfig; + /** The current password in the KConfig file, or TQString::null if no password there */ + TQString passwordFromKConfig; /** The maximum length allowed for this password, or -1 if there is no limit */ uint maximumLength; /** Is the current password known to be wrong? */ @@ -70,7 +70,7 @@ public: /** Are we allowed to have blank passwords? */ bool allowBlankPassword; /** The cached password */ - QString cachedValue; + TQString cachedValue; }; /** @@ -81,8 +81,8 @@ public: class KopetePasswordRequest : public KopetePasswordRequestBase { public: - KopetePasswordRequest( QObject *owner, Kopete::Password &pass ) - : QObject( owner ), mPassword( pass ), mWallet( 0 ) + KopetePasswordRequest( TQObject *owner, Kopete::Password &pass ) + : TQObject( owner ), mPassword( pass ), mWallet( 0 ) { } @@ -92,7 +92,7 @@ public: void begin() { kdDebug( 14010 ) << k_funcinfo << endl; - Kopete::WalletManager::self()->openWallet( this, SLOT( walletReceived( KWallet::Wallet* ) ) ); + Kopete::WalletManager::self()->openWallet( this, TQT_SLOT( walletReceived( KWallet::Wallet* ) ) ); } void walletReceived( KWallet::Wallet *wallet ) @@ -123,16 +123,16 @@ protected: class KopetePasswordGetRequest : public KopetePasswordRequest { public: - KopetePasswordGetRequest( QObject *owner, Kopete::Password &pass ) + KopetePasswordGetRequest( TQObject *owner, Kopete::Password &pass ) : KopetePasswordRequest( owner, pass ) { } - QString grabPassword() + TQString grabPassword() { // Before trying to read from the wallet, check if the config file holds a password. // If so, remove it from the config and set it through KWallet instead. - QString pwd; + TQString pwd; if ( mPassword.d->remembered && !mPassword.d->passwordFromKConfig.isNull() ) { pwd = mPassword.d->passwordFromKConfig; @@ -146,10 +146,10 @@ public: if ( mPassword.d->remembered && !mPassword.d->passwordFromKConfig.isNull() ) return mPassword.d->passwordFromKConfig; - return QString::null; + return TQString::null; } - void finished( const QString &result ) + void finished( const TQString &result ) { mPassword.d->cachedValue = result; emit requestFinished( result ); @@ -160,14 +160,14 @@ public: class KopetePasswordGetRequestPrompt : public KopetePasswordGetRequest { public: - KopetePasswordGetRequestPrompt( QObject *owner, Kopete::Password &pass, const QPixmap &image, const QString &prompt, Kopete::Password::PasswordSource source ) + KopetePasswordGetRequestPrompt( TQObject *owner, Kopete::Password &pass, const TQPixmap &image, const TQString &prompt, Kopete::Password::PasswordSource source ) : KopetePasswordGetRequest( owner, pass ), mImage( image ), mPrompt( prompt ), mSource( source ), mView( 0 ) { } void processRequest() { - QString result = grabPassword(); + TQString result = grabPassword(); if ( mSource == Kopete::Password::FromUser || result.isNull() ) doPasswordDialog(); else @@ -198,15 +198,15 @@ public: mView->adjustSize(); passwdDialog->adjustSize(); - connect( passwdDialog, SIGNAL( okClicked() ), SLOT( slotOkPressed() ) ); - connect( passwdDialog, SIGNAL( cancelClicked() ), SLOT( slotCancelPressed() ) ); - connect( this, SIGNAL( destroyed() ), passwdDialog, SLOT( deleteLater() ) ); + connect( passwdDialog, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotOkPressed() ) ); + connect( passwdDialog, TQT_SIGNAL( cancelClicked() ), TQT_SLOT( slotCancelPressed() ) ); + connect( this, TQT_SIGNAL( destroyed() ), passwdDialog, TQT_SLOT( deleteLater() ) ); passwdDialog->show(); } void slotOkPressed() { - QString result = QString::fromLocal8Bit( mView->m_password->password() ); + TQString result = TQString::fromLocal8Bit( mView->m_password->password() ); if ( mView->m_save_passwd->isChecked() ) mPassword.set( result ); @@ -215,12 +215,12 @@ public: void slotCancelPressed() { - finished( QString::null ); + finished( TQString::null ); } private: - QPixmap mImage; - QString mPrompt; + TQPixmap mImage; + TQString mPrompt; Kopete::Password::PasswordSource mSource; unsigned int mMaxLength; KopetePasswordDialog *mView; @@ -229,7 +229,7 @@ private: class KopetePasswordGetRequestNoPrompt : public KopetePasswordGetRequest { public: - KopetePasswordGetRequestNoPrompt( QObject *owner, Kopete::Password &pass ) + KopetePasswordGetRequestNoPrompt( TQObject *owner, Kopete::Password &pass ) : KopetePasswordGetRequest( owner, pass ) { } @@ -248,7 +248,7 @@ public: class KopetePasswordSetRequest : public KopetePasswordRequest { public: - KopetePasswordSetRequest( Kopete::Password &pass, const QString &newPass ) + KopetePasswordSetRequest( Kopete::Password &pass, const TQString &newPass ) : KopetePasswordRequest( 0, pass ), mNewPass( newPass ) { if ( KApplication *app = KApplication::kApplication() ) @@ -276,7 +276,7 @@ public: if ( mWallet && mWallet->writePassword( mPassword.d->configGroup, mNewPass ) == 0 ) { mPassword.d->remembered = true; - mPassword.d->passwordFromKConfig = QString::null; + mPassword.d->passwordFromKConfig = TQString::null; mPassword.writeConfig(); return true; } @@ -288,13 +288,13 @@ public: //NOTE: This will start a nested event loop. However, this is fine; the only code we // call after this point is in Kopete::Password, so as long as we've not been deleted - // everything should work out OK. We have no parent QObject, so we should survive. + // everything should work out OK. We have no parent TQObject, so we should survive. if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n( "Kopete is unable to save your password securely in your wallet;
" "do you want to save the password in the unsafe configuration file instead?
" ), i18n( "Unable to Store Secure Password" ), - KGuiItem( i18n( "Store &Unsafe" ), QString::fromLatin1( "unlock" ) ), - QString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue ) + KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ) ), + TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue ) { return false; } @@ -306,7 +306,7 @@ public: } private: - QString mNewPass; + TQString mNewPass; }; class KopetePasswordClearRequest : public KopetePasswordRequest @@ -329,7 +329,7 @@ public: if ( clearPassword() ) { mPassword.setWrong( true ); - mPassword.d->cachedValue = QString::null; + mPassword.d->cachedValue = TQString::null; } delete this; @@ -339,7 +339,7 @@ public: kdDebug( 14010 ) << k_funcinfo << " clearing password" << endl; mPassword.d->remembered = false; - mPassword.d->passwordFromKConfig = QString::null; + mPassword.d->passwordFromKConfig = TQString::null; mPassword.writeConfig(); if ( mWallet ) mWallet->removeEntry( mPassword.d->configGroup ); @@ -347,21 +347,21 @@ public: } }; -Kopete::Password::Password( const QString &configGroup, uint maximumLength, const char *name ) - : QObject( 0, name ), d( new Private( configGroup, maximumLength, false ) ) +Kopete::Password::Password( const TQString &configGroup, uint maximumLength, const char *name ) + : TQObject( 0, name ), d( new Private( configGroup, maximumLength, false ) ) { readConfig(); } -Kopete::Password::Password( const QString &configGroup, uint maximumLength, +Kopete::Password::Password( const TQString &configGroup, uint maximumLength, bool allowBlankPassword, const char *name ) - : QObject( 0, name ), d( new Private( configGroup, maximumLength, allowBlankPassword ) ) + : TQObject( 0, name ), d( new Private( configGroup, maximumLength, allowBlankPassword ) ) { readConfig(); } Kopete::Password::Password( Password &other, const char *name ) - : QObject( 0, name ), d( other.d->incRef() ) + : TQObject( 0, name ), d( other.d->incRef() ) { } @@ -383,9 +383,9 @@ void Kopete::Password::readConfig() KConfig *config = KGlobal::config(); config->setGroup( d->configGroup ); - QString passwordCrypted = config->readEntry( "Password" ); + TQString passwordCrypted = config->readEntry( "Password" ); if ( passwordCrypted.isNull() ) - d->passwordFromKConfig = QString::null; + d->passwordFromKConfig = TQString::null; else d->passwordFromKConfig = KStringHandler::obscure( passwordCrypted ); @@ -448,30 +448,30 @@ void Kopete::Password::setWrong( bool bWrong ) d->isWrong = bWrong; writeConfig(); - if ( bWrong ) d->cachedValue = QString::null; + if ( bWrong ) d->cachedValue = TQString::null; } -void Kopete::Password::requestWithoutPrompt( QObject *returnObj, const char *slot ) +void Kopete::Password::requestWithoutPrompt( TQObject *returnObj, const char *slot ) { KopetePasswordRequest *request = new KopetePasswordGetRequestNoPrompt( returnObj, *this ); // call connect on returnObj so we can still connect if 'slot' is protected/private - returnObj->connect( request, SIGNAL( requestFinished( const QString & ) ), slot ); + returnObj->connect( request, TQT_SIGNAL( requestFinished( const TQString & ) ), slot ); request->begin(); } -void Kopete::Password::request( QObject *returnObj, const char *slot, const QPixmap &image, const QString &prompt, Kopete::Password::PasswordSource source ) +void Kopete::Password::request( TQObject *returnObj, const char *slot, const TQPixmap &image, const TQString &prompt, Kopete::Password::PasswordSource source ) { KopetePasswordRequest *request = new KopetePasswordGetRequestPrompt( returnObj, *this, image, prompt, source ); - returnObj->connect( request, SIGNAL( requestFinished( const QString & ) ), slot ); + returnObj->connect( request, TQT_SIGNAL( requestFinished( const TQString & ) ), slot ); request->begin(); } -QString Kopete::Password::cachedValue() +TQString Kopete::Password::cachedValue() { return d->cachedValue; } -void Kopete::Password::set( const QString &pass ) +void Kopete::Password::set( const TQString &pass ) { // if we're being told to forget the password, and we aren't remembering one, // don't try to open the wallet. fixes bug #71804. diff --git a/kopete/libkopete/kopetepassword.h b/kopete/libkopete/kopetepassword.h index 149db6f6..de2f96c1 100644 --- a/kopete/libkopete/kopetepassword.h +++ b/kopete/libkopete/kopetepassword.h @@ -17,7 +17,7 @@ #ifndef KOPETEPASSWORD_H #define KOPETEPASSWORD_H -#include +#include #include "kopete_export.h" namespace KWallet { class Wallet; } @@ -57,7 +57,7 @@ public: * * @deprecated Use the constructor that specifies if a blank password is allowed */ - explicit Password( const QString &configGroup, uint maxLength = 0, const char *name = 0 ); + explicit Password( const TQString &configGroup, uint maxLength = 0, const char *name = 0 ); /** * Create a new Kopete::Password object. @@ -67,7 +67,7 @@ public: * @param allowBlankPassword If this password is allowed to be blank * @param name The name for this object */ - explicit Password( const QString &configGroup, uint maxLength = 0, + explicit Password( const TQString &configGroup, uint maxLength = 0, bool allowBlankPassword = false, const char *name = 0 ); /** @@ -126,27 +126,27 @@ public: * * @param receiver The object to notify when the password request finishes * @param slot The slot on receiver to call at the end of the request. The signature - * of this function should be slot( const QString &password ). password will - * be the password if successful, or QString::null if failed. + * of this function should be slot( const TQString &password ). password will + * be the password if successful, or TQString::null if failed. * @param image The icon to display in the dialog when asking for the password * @param prompt The message to display to the user, asking for a * password. Can be any Qt RichText string. * @param source The source the password is taken from if a wrong or * invalid password is entered or the password could not be found in the wallet */ - void request( QObject *receiver, const char *slot, const QPixmap &image, - const QString &prompt, PasswordSource source = FromConfigOrUser ); + void request( TQObject *receiver, const char *slot, const TQPixmap &image, + const TQString &prompt, PasswordSource source = FromConfigOrUser ); /** * @brief Start an asynchronous password request without a prompt * * Starts an asynchronous password request. Does not pop up a password entry dialog * if there is no password. - * @see request(QObject*,const char*,const QPixmap&,const QString&,bool,unsigned int) + * @see request(TQObject*,const char*,const TQPixmap&,const TQString&,bool,unsigned int) * The password given to the provided slot will be NULL if no password could be retrieved for * some reason, such as the user declining to open the wallet, or no password being found. */ - void requestWithoutPrompt( QObject *receiver, const char *slot ); + void requestWithoutPrompt( TQObject *receiver, const char *slot ); /** * @return true if the password is remembered, false otherwise. @@ -163,21 +163,21 @@ public: /** * When a password request succeeds, the password is cached. This function - * returns the cached password, if there is one, or QString::null if there + * returns the cached password, if there is one, or TQString::null if there * is not. */ - QString cachedValue(); + TQString cachedValue(); public slots: /** * Set the password for this account. - * @param pass If set to QString::null, the password is forgotten unless you + * @param pass If set to TQString::null, the password is forgotten unless you * specified to allow blank passwords. Otherwise, sets the password to * this value. * * Note: this function is asynchronous; changes will not be instant. */ - void set( const QString &pass = QString::null ); + void set( const TQString &pass = TQString::null ); /** * Unconditionally clears the stored password @@ -208,7 +208,7 @@ class KopetePasswordRequestBase : public virtual QObject { Q_OBJECT signals: - void requestFinished( const QString &password ); + void requestFinished( const TQString &password ); public slots: virtual void walletReceived( KWallet::Wallet *wallet ) = 0; virtual void slotOkPressed() = 0; diff --git a/kopete/libkopete/kopetepasswordedaccount.cpp b/kopete/libkopete/kopetepasswordedaccount.cpp index 9fea5c66..cf0e2932 100644 --- a/kopete/libkopete/kopetepasswordedaccount.cpp +++ b/kopete/libkopete/kopetepasswordedaccount.cpp @@ -21,24 +21,24 @@ #include -#include +#include struct Kopete::PasswordedAccount::Private { - Private( const QString &group, uint maxLen, bool allowBlankPassword ) : + Private( const TQString &group, uint maxLen, bool allowBlankPassword ) : password( group, maxLen, allowBlankPassword, "mPassword" ) {} Kopete::Password password; Kopete::OnlineStatus initialStatus; }; -Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const QString &acctId, uint maxLen, const char *name ) - : Kopete::Account( parent, acctId, name ), d( new Private( QString::fromLatin1("Account_")+ parent->pluginId() + QString::fromLatin1("_") + acctId , maxLen, false ) ) +Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const TQString &acctId, uint maxLen, const char *name ) + : Kopete::Account( parent, acctId, name ), d( new Private( TQString::fromLatin1("Account_")+ parent->pluginId() + TQString::fromLatin1("_") + acctId , maxLen, false ) ) { } -Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const QString &acctId, uint maxLen, +Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const TQString &acctId, uint maxLen, bool allowBlankPassword, const char *name ) - : Kopete::Account( parent, acctId, name ), d( new Private( QString::fromLatin1("Account_")+ parent->pluginId() + QString::fromLatin1("_") + acctId , maxLen, allowBlankPassword ) ) + : Kopete::Account( parent, acctId, name ), d( new Private( TQString::fromLatin1("Account_")+ parent->pluginId() + TQString::fromLatin1("_") + acctId , maxLen, allowBlankPassword ) ) { } @@ -64,20 +64,20 @@ void Kopete::PasswordedAccount::connect( const Kopete::OnlineStatus& initialStat // warn user somewhere d->initialStatus = initialStatus; - QString cached = password().cachedValue(); + TQString cached = password().cachedValue(); if( !cached.isNull() || d->password.allowBlankPassword() ) { connectWithPassword( cached ); return; } - QString prompt = passwordPrompt(); + TQString prompt = passwordPrompt(); Kopete::Password::PasswordSource src = password().isWrong() ? Kopete::Password::FromUser : Kopete::Password::FromConfigOrUser; - password().request( this, SLOT( connectWithPassword( const QString & ) ), accountIcon( Kopete::Password::preferredImageSize() ), prompt, src ); + password().request( this, TQT_SLOT( connectWithPassword( const TQString & ) ), accountIcon( Kopete::Password::preferredImageSize() ), prompt, src ); } -QString Kopete::PasswordedAccount::passwordPrompt() +TQString Kopete::PasswordedAccount::passwordPrompt() { if ( password().isWrong() ) return i18n( "The password was wrong; please re-enter your password for %1 account %2" ).arg( protocol()->displayName(), accountId() ); @@ -92,7 +92,7 @@ Kopete::OnlineStatus Kopete::PasswordedAccount::initialStatus() bool Kopete::PasswordedAccount::removeAccount() { - password().set(QString::null); + password().set(TQString::null); return Kopete::Account::removeAccount(); } diff --git a/kopete/libkopete/kopetepasswordedaccount.h b/kopete/libkopete/kopetepasswordedaccount.h index 1534025d..d008bae4 100644 --- a/kopete/libkopete/kopetepasswordedaccount.h +++ b/kopete/libkopete/kopetepasswordedaccount.h @@ -49,7 +49,7 @@ public: * * @deprecated Use the constructor that specifies if a blank password is allowed */ - PasswordedAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); + PasswordedAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); /** * KopetePasswordedAccount constructor @@ -60,7 +60,7 @@ public: * * @param name The name for this QObject */ - PasswordedAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, + PasswordedAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, bool allowBlankPassword = false, const char *name = 0 ); virtual ~PasswordedAccount(); @@ -99,10 +99,10 @@ public: public slots: /** * Called when your account should attempt to connect. - * @param password The password to connect with, or QString::null + * @param password The password to connect with, or TQString::null * if the user wished to cancel the connection attempt. */ - virtual void connectWithPassword( const QString &password ) = 0; + virtual void connectWithPassword( const TQString &password ) = 0; protected: /** @@ -110,7 +110,7 @@ protected: * The default implementation should be adequate in most cases; override * if you have a custom message to show the user. */ - virtual QString passwordPrompt(); + virtual TQString passwordPrompt(); protected slots: /** diff --git a/kopete/libkopete/kopetepicture.cpp b/kopete/libkopete/kopetepicture.cpp index 1c586b40..05468c21 100644 --- a/kopete/libkopete/kopetepicture.cpp +++ b/kopete/libkopete/kopetepicture.cpp @@ -16,7 +16,7 @@ */ #include "kopetepicture.h" -#include +#include #include @@ -33,9 +33,9 @@ public: Private() {} - QString pictureBase64; - QImage pictureImage; - QString picturePath; + TQString pictureBase64; + TQImage pictureImage; + TQString picturePath; }; Picture::Picture() @@ -43,13 +43,13 @@ Picture::Picture() { } -Picture::Picture(const QString &path) +Picture::Picture(const TQString &path) : d(new Private) { setPicture(path); } -Picture::Picture(const QImage &image) +Picture::Picture(const TQImage &image) : d(new Private) { setPicture(image); @@ -74,25 +74,25 @@ Picture &Picture::operator=(const Picture &other) return *this; } -QImage Picture::image() +TQImage Picture::image() { // Do the conversion if only needed. // If the image is null, the path is not empty then. if( d->pictureImage.isNull() ) { - d->pictureImage = QImage(d->picturePath); + d->pictureImage = TQImage(d->picturePath); } return d->pictureImage; } -QString Picture::base64() +TQString Picture::base64() { if( d->pictureBase64.isEmpty() ) { // Generate base64 cache for the picture. - QByteArray tempArray; - QBuffer tempBuffer( tempArray ); + TQByteArray tempArray; + TQBuffer tempBuffer( tempArray ); tempBuffer.open( IO_WriteOnly ); // Make sure it create a image cache. if( image().save( &tempBuffer, "PNG" ) ) @@ -104,23 +104,23 @@ QString Picture::base64() return d->pictureBase64; } -QString Picture::path() +TQString Picture::path() { if( d->picturePath.isEmpty() ) { // For a image source, finding a filename is tricky. // I decided to use MD5 Hash as the filename. - QString localPhotoPath; + TQString localPhotoPath; // Generate MD5 Hash for the image. - QByteArray tempArray; - QBuffer tempBuffer(tempArray); + TQByteArray tempArray; + TQBuffer tempBuffer(tempArray); tempBuffer.open( IO_WriteOnly ); image().save(&tempBuffer, "PNG"); KMD5 context(tempArray); // Save the image to a file. localPhotoPath = context.hexDigest() + ".png"; - localPhotoPath = locateLocal( "appdata", QString::fromUtf8("metacontactpicturecache/%1").arg( localPhotoPath) ); + localPhotoPath = locateLocal( "appdata", TQString::fromUtf8("metacontactpicturecache/%1").arg( localPhotoPath) ); if( image().save(localPhotoPath, "PNG") ) { d->picturePath = localPhotoPath; @@ -145,30 +145,30 @@ bool Picture::isNull() void Picture::clear() { detach(); - d->pictureBase64 = QString::null; - d->picturePath = QString::null; - d->pictureImage = QImage(); + d->pictureBase64 = TQString::null; + d->picturePath = TQString::null; + d->pictureImage = TQImage(); } -void Picture::setPicture(const QImage &image) +void Picture::setPicture(const TQImage &image) { detach(); d->pictureImage = image; // Clear the path and base64, it will call the update of then when "getted" - d->picturePath= QString::null; - d->pictureBase64 = QString::null; + d->picturePath= TQString::null; + d->pictureBase64 = TQString::null; } -void Picture::setPicture(const QString &path) +void Picture::setPicture(const TQString &path) { detach(); d->picturePath = path; // Clear the image and base64, it will call the update of then when "getted" - d->pictureImage = QImage(); - d->pictureBase64 = QString::null; + d->pictureImage = TQImage(); + d->pictureBase64 = TQString::null; } void Picture::setPicture(const KABC::Picture &picture) diff --git a/kopete/libkopete/kopetepicture.h b/kopete/libkopete/kopetepicture.h index 5631afc1..46e7a7c2 100644 --- a/kopete/libkopete/kopetepicture.h +++ b/kopete/libkopete/kopetepicture.h @@ -21,7 +21,7 @@ #include #include "kopete_export.h" -#include +#include namespace KABC { @@ -33,12 +33,12 @@ namespace Kopete /** * @brief Represent a picture in Kopete context * - * It kept a cache of a QImage object, a base64 string and + * It kept a cache of a TQImage object, a base64 string and * a path to a image file. It ensure that all source are synced. * Interally, the image is stored in PNG format when possible. * It can happen that the image path do not return a PNG file. * - * You can only use an QImage and a image path to create/update + * You can only use an TQImage and a image path to create/update * the picture. * If the picture doesn't exist as a file, it generate a local * copy into ~/.kde/share/apps/kopete/metacontactpicturecache @@ -48,12 +48,12 @@ namespace Kopete * How to use this class: * @code * Kopete::Picture picture; - * picture.setPicture(QImage()); - * picture.setPicture(QString("/tmp/image.png")); + * picture.setPicture(TQImage()); + * picture.setPicture(TQString("/tmp/image.png")); * - * QString base64 = picture.base64(); - * QString path = picture.path(); - * QImage image = picture.image(); + * TQString base64 = picture.base64(); + * TQString path = picture.path(); + * TQImage image = picture.image(); * @endcode * * @author Michaël Larouche @@ -68,11 +68,11 @@ public: /** * Create a picture from a local path. */ - Picture(const QString &path); + Picture(const TQString &path); /** - * Create a picture from a QImage. + * Create a picture from a TQImage. */ - Picture(const QImage &image); + Picture(const TQImage &image); /** * Create a picture from a KABC::Picture. */ @@ -92,21 +92,21 @@ public: Picture &operator=(const Picture &other); /** - * Return the current picture as QImage. - * QImage can used to draw the image on a context. + * Return the current picture as TQImage. + * TQImage can used to draw the image on a context. * - * @return the QImage cache of current picture. + * @return the TQImage cache of current picture. */ - QImage image(); + TQImage image(); /** * Return the current picture as a base64 string. * The base64 is used to include the picture into a XML/XHTML context. */ - QString base64(); + TQString base64(); /** * Return the local path of the current picture. */ - QString path(); + TQString path(); /** * Check if the picture is null. @@ -119,14 +119,14 @@ public: /** * Set the picture content. - * @param image the picture as a QImage. + * @param image the picture as a TQImage. */ - void setPicture(const QImage &image); + void setPicture(const TQImage &image); /** * Set the picture content. * @param path the path to the picture. */ - void setPicture(const QString &path); + void setPicture(const TQString &path); /** * Set the picture content. * @param picture a KABC Picture. diff --git a/kopete/libkopete/kopeteplugin.cpp b/kopete/libkopete/kopeteplugin.cpp index cec99179..3c31545a 100644 --- a/kopete/libkopete/kopeteplugin.cpp +++ b/kopete/libkopete/kopeteplugin.cpp @@ -28,15 +28,15 @@ namespace Kopete { class Plugin::Private { public: - QStringList addressBookFields; - QString indexField; + TQStringList addressBookFields; + TQString indexField; }; -Plugin::Plugin( KInstance *instance, QObject *parent, const char *name ) -: QObject( parent, name ), KXMLGUIClient(), d(new Private) +Plugin::Plugin( KInstance *instance, TQObject *parent, const char *name ) +: TQObject( parent, name ), KXMLGUIClient(), d(new Private) { setInstance( instance ); - KSettings::Dispatcher::self()->registerInstance( instance, this, SIGNAL( settingsChanged() ) ); + KSettings::Dispatcher::self()->registerInstance( instance, this, TQT_SIGNAL( settingsChanged() ) ); } Plugin::~Plugin() @@ -44,20 +44,20 @@ Plugin::~Plugin() delete d; } -QString Plugin::pluginId() const +TQString Plugin::pluginId() const { - return QString::fromLatin1( className() ); + return TQString::fromLatin1( className() ); } -QString Plugin::displayName() const +TQString Plugin::displayName() const { - return pluginInfo() ? pluginInfo()->name() : QString::null; + return pluginInfo() ? pluginInfo()->name() : TQString::null; } -QString Plugin::pluginIcon() const +TQString Plugin::pluginIcon() const { - return pluginInfo() ? pluginInfo()->icon() : QString::null; + return pluginInfo() ? pluginInfo()->icon() : TQString::null; } @@ -74,26 +74,26 @@ void Plugin::aboutToUnload() void Plugin::deserialize( MetaContact * /* metaContact */, - const QMap & /* stream */ ) + const TQMap & /* stream */ ) { // Do nothing in default implementation } -void Kopete::Plugin::addAddressBookField( const QString &field, AddressBookFieldAddMode mode ) +void Kopete::Plugin::addAddressBookField( const TQString &field, AddressBookFieldAddMode mode ) { d->addressBookFields.append( field ); if( mode == MakeIndexField ) d->indexField = field; } -QStringList Kopete::Plugin::addressBookFields() const +TQStringList Kopete::Plugin::addressBookFields() const { return d->addressBookFields; } -QString Kopete::Plugin::addressBookIndexField() const +TQString Kopete::Plugin::addressBookIndexField() const { return d->indexField; diff --git a/kopete/libkopete/kopeteplugin.h b/kopete/libkopete/kopeteplugin.h index 43a80849..eebad0d2 100644 --- a/kopete/libkopete/kopeteplugin.h +++ b/kopete/libkopete/kopeteplugin.h @@ -21,7 +21,7 @@ #define KOPETEPLUGIN_H #include -#include +#include #include #include "kopete_export.h" @@ -71,7 +71,7 @@ Comment=Plugin that do some nice stuff static const KAboutData aboutdata("kopete_myplugin", I18N_NOOP("MyPlugin") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_myplugin, MyPluginFactory( &aboutdata ) ) - MyPlugin::MyPlugin( QObject *parent, const char *name, const QStringList & args ) + MyPlugin::MyPlugin( TQObject *parent, const char *name, const TQStringList & args ) : Kopete::Plugin( MyPluginFactory::instance(), parent, name ) { //... @@ -87,12 +87,12 @@ Comment=Plugin that do some nice stuff * @author Duncan Mac-Vicar P. * @author Olivier Goffart */ -class KOPETE_EXPORT Plugin : public QObject, public KXMLGUIClient +class KOPETE_EXPORT Plugin : public TQObject, public KXMLGUIClient { Q_OBJECT public: - Plugin( KInstance *instance, QObject *parent, const char *name ); + Plugin( KInstance *instance, TQObject *parent, const char *name ); virtual ~Plugin(); /** @@ -109,35 +109,35 @@ public: * * This is a convenience method that simply calls @ref pluginInfo()->icon(). */ - QString pluginIcon() const; + TQString pluginIcon() const; /** * Returns the display name of this plugin. * * This is a convenience method that simply calls @ref pluginInfo()->name(). */ - QString displayName() const; + TQString displayName() const; /** * @brief Get the plugin id - * @return the plugin's id which is gotten by calling QObject::className(). + * @return the plugin's id which is gotten by calling TQObject::className(). */ - QString pluginId() const; + TQString pluginId() const; /** * Return the list of all keys from the address book in which the plugin * is interested. Those keys are monitored for changes upon load and * during runtime. When the key actually changes, the plugin's - * addressBookKeyChanged( Kopete::MetaContact *mc, const QString &key ) + * addressBookKeyChanged( Kopete::MetaContact *mc, const TQString &key ) * is called. * You can add fields to the list using @ref addAddressBookField() */ - QStringList addressBookFields() const; + TQStringList addressBookFields() const; /** * Return the index field as set by @ref addAddressBookField() */ - QString addressBookIndexField() const; + TQString addressBookIndexField() const; /** * Mode for an address book field as used by @ref addAddressBookField() @@ -155,7 +155,7 @@ public: * Only one field can be index field. Calling this method multiple times * as index field will reset the value of index field! */ - void addAddressBookField( const QString &field, AddressBookFieldAddMode mode = AddOnly ); + void addAddressBookField( const TQString &field, AddressBookFieldAddMode mode = AddOnly ); /** * @brief Prepare for unloading a plugin @@ -199,7 +199,7 @@ public slots: * * @todo we probably should think to another way to save the contacltist. */ - virtual void deserialize( MetaContact *metaContact, const QMap &data ); + virtual void deserialize( MetaContact *metaContact, const TQMap &data ); protected: diff --git a/kopete/libkopete/kopetepluginmanager.cpp b/kopete/libkopete/kopetepluginmanager.cpp index 8f613a86..1aff9e9f 100644 --- a/kopete/libkopete/kopetepluginmanager.cpp +++ b/kopete/libkopete/kopetepluginmanager.cpp @@ -27,11 +27,11 @@ #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -56,11 +56,11 @@ public: Private() : shutdownMode( StartingUp ), isAllPluginsLoaded(false) {} // All available plugins, regardless of category, and loaded or not - QValueList plugins; + TQValueList plugins; // Dict of all currently loaded plugins, mapping the KPluginInfo to // a plugin - typedef QMap InfoToPluginMap; + typedef TQMap InfoToPluginMap; InfoToPluginMap loadedPlugins; // The plugin manager's mode. The mode is StartingUp until loadAllPlugins() @@ -71,7 +71,7 @@ public: ShutdownMode shutdownMode; // Plugins pending for loading - QValueStack pluginsToLoad; + TQValueStack pluginsToLoad; static KStaticDeleter deleter; @@ -89,10 +89,10 @@ PluginManager* PluginManager::self() return s_self; } -PluginManager::PluginManager() : QObject( qApp ), d( new Private ) +PluginManager::PluginManager() : TQObject( qApp ), d( new Private ) { - d->plugins = KPluginInfo::fromServices( KTrader::self()->query( QString::fromLatin1( "Kopete/Plugin" ), - QString::fromLatin1( "[X-Kopete-Version] == 1000900" ) ) ); + d->plugins = KPluginInfo::fromServices( KTrader::self()->query( TQString::fromLatin1( "Kopete/Plugin" ), + TQString::fromLatin1( "[X-Kopete-Version] == 1000900" ) ) ); // We want to add a reference to the application's event loop so we // can remain in control when all windows are removed. @@ -119,13 +119,13 @@ PluginManager::~PluginManager() delete d; } -QValueList PluginManager::availablePlugins( const QString &category ) const +TQValueList PluginManager::availablePlugins( const TQString &category ) const { if ( category.isEmpty() ) return d->plugins; - QValueList result; - QValueList::ConstIterator it; + TQValueList result; + TQValueList::ConstIterator it; for ( it = d->plugins.begin(); it != d->plugins.end(); ++it ) { if ( ( *it )->category() == category ) @@ -135,7 +135,7 @@ QValueList PluginManager::availablePlugins( const QString &catego return result; } -PluginList PluginManager::loadedPlugins( const QString &category ) const +PluginList PluginManager::loadedPlugins( const TQString &category ) const { PluginList result; @@ -205,17 +205,17 @@ void PluginManager::shutdown() kdDebug(14010) << k_funcinfo << "Running under valgrind, disabling plugin unload timeout guard" << endl; else #endif - QTimer::singleShot( 3000, this, SLOT( slotShutdownTimeout() ) ); + TQTimer::singleShot( 3000, this, TQT_SLOT( slotShutdownTimeout() ) ); } void PluginManager::slotPluginReadyForUnload() { - // Using QObject::sender() is on purpose here, because otherwise all + // Using TQObject::sender() is on purpose here, because otherwise all // plugins would have to pass 'this' as parameter, which makes the API // less clean for plugin authors // FIXME: I don't buy the above argument. Add a Kopete::Plugin::emitReadyForUnload(void), // and make readyForUnload be passed a plugin. - Richard - Plugin *plugin = dynamic_cast( const_cast( sender() ) ); + Plugin *plugin = dynamic_cast( const_cast( sender() ) ); kdDebug( 14010 ) << k_funcinfo << plugin->pluginId() << "ready for unload" << endl; if ( !plugin ) { @@ -234,12 +234,12 @@ void PluginManager::slotShutdownTimeout() if ( d->shutdownMode == Private::DoneShutdown ) return; - QStringList remaining; + TQStringList remaining; for ( Private::InfoToPluginMap::ConstIterator it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it ) remaining.append( it.data()->pluginId() ); kdWarning( 14010 ) << k_funcinfo << "Some plugins didn't shutdown in time!" << endl - << "Remaining plugins: " << remaining.join( QString::fromLatin1( ", " ) ) << endl + << "Remaining plugins: " << remaining.join( TQString::fromLatin1( ", " ) ) << endl << "Forcing Kopete shutdown now." << endl; slotShutdownDone(); @@ -259,29 +259,29 @@ void PluginManager::loadAllPlugins() // FIXME: We need session management here - Martijn KConfig *config = KGlobal::config(); - if ( config->hasGroup( QString::fromLatin1( "Plugins" ) ) ) + if ( config->hasGroup( TQString::fromLatin1( "Plugins" ) ) ) { - QMap pluginsMap; + TQMap pluginsMap; - QMap entries = config->entryMap( QString::fromLatin1( "Plugins" ) ); - QMap::Iterator it; + TQMap entries = config->entryMap( TQString::fromLatin1( "Plugins" ) ); + TQMap::Iterator it; for ( it = entries.begin(); it != entries.end(); ++it ) { - QString key = it.key(); - if ( key.endsWith( QString::fromLatin1( "Enabled" ) ) ) - pluginsMap.insert( key.left( key.length() - 7 ), (it.data() == QString::fromLatin1( "true" )) ); + TQString key = it.key(); + if ( key.endsWith( TQString::fromLatin1( "Enabled" ) ) ) + pluginsMap.insert( key.left( key.length() - 7 ), (it.data() == TQString::fromLatin1( "true" )) ); } - QValueList plugins = availablePlugins( QString::null ); - QValueList::ConstIterator it2 = plugins.begin(); - QValueList::ConstIterator end = plugins.end(); + TQValueList plugins = availablePlugins( TQString::null ); + TQValueList::ConstIterator it2 = plugins.begin(); + TQValueList::ConstIterator end = plugins.end(); for ( ; it2 != end; ++it2 ) { // Protocols are loaded automatically so they aren't always in Plugins group. (fixes bug 167113) - if ( (*it2)->category() == QString::fromLatin1( "Protocols" ) ) + if ( (*it2)->category() == TQString::fromLatin1( "Protocols" ) ) continue; - QString pluginName = (*it2)->pluginName(); + TQString pluginName = (*it2)->pluginName(); bool inMap = pluginsMap.contains( pluginName ); if ( (inMap && pluginsMap[pluginName]) || (!inMap && (*it2)->isPluginEnabledByDefault()) ) { @@ -301,9 +301,9 @@ void PluginManager::loadAllPlugins() else { // we had no config, so we load any plugins that should be loaded by default. - QValueList plugins = availablePlugins( QString::null ); - QValueList::ConstIterator it = plugins.begin(); - QValueList::ConstIterator end = plugins.end(); + TQValueList plugins = availablePlugins( TQString::null ); + TQValueList::ConstIterator it = plugins.begin(); + TQValueList::ConstIterator end = plugins.end(); for ( ; it != end; ++it ) { if ( (*it)->isPluginEnabledByDefault() ) @@ -311,7 +311,7 @@ void PluginManager::loadAllPlugins() } } // Schedule the plugins to load - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); } void PluginManager::slotLoadNextPlugin() @@ -327,26 +327,26 @@ void PluginManager::slotLoadNextPlugin() return; } - QString key = d->pluginsToLoad.pop(); + TQString key = d->pluginsToLoad.pop(); loadPluginInternal( key ); // Schedule the next run unconditionally to avoid code duplication on the // allPluginsLoaded() signal's handling. This has the added benefit that // the signal is delayed one event loop, so the accounts are more likely // to be instantiated. - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); } -Plugin * PluginManager::loadPlugin( const QString &_pluginId, PluginLoadMode mode /* = LoadSync */ ) +Plugin * PluginManager::loadPlugin( const TQString &_pluginId, PluginLoadMode mode /* = LoadSync */ ) { - QString pluginId = _pluginId; + TQString pluginId = _pluginId; // Try to find legacy code // FIXME: Find any cases causing this, remove them, and remove this too - Richard - if ( pluginId.endsWith( QString::fromLatin1( ".desktop" ) ) ) + if ( pluginId.endsWith( TQString::fromLatin1( ".desktop" ) ) ) { kdWarning( 14010 ) << "Trying to use old-style API!" << endl << kdBacktrace() << endl; - pluginId = pluginId.remove( QRegExp( QString::fromLatin1( ".desktop$" ) ) ); + pluginId = pluginId.remove( TQRegExp( TQString::fromLatin1( ".desktop$" ) ) ); } if ( mode == LoadSync ) @@ -356,12 +356,12 @@ Plugin * PluginManager::loadPlugin( const QString &_pluginId, PluginLoadMode mod else { d->pluginsToLoad.push( pluginId ); - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); return 0L; } } -Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) +Plugin *PluginManager::loadPluginInternal( const TQString &pluginId ) { //kdDebug( 14010 ) << k_funcinfo << pluginId << endl; @@ -376,16 +376,16 @@ Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) return d->loadedPlugins[ info ]; int error = 0; - Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery( QString::fromLatin1( "Kopete/Plugin" ), - QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, 0, QStringList(), &error ); + Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery( TQString::fromLatin1( "Kopete/Plugin" ), + TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, 0, TQStringList(), &error ); if ( plugin ) { d->loadedPlugins.insert( info, plugin ); info->setPluginEnabled( true ); - connect( plugin, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotPluginDestroyed( QObject * ) ) ); - connect( plugin, SIGNAL( readyForUnload() ), this, SLOT( slotPluginReadyForUnload() ) ); + connect( plugin, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotPluginDestroyed( TQObject * ) ) ); + connect( plugin, TQT_SIGNAL( readyForUnload() ), this, TQT_SLOT( slotPluginReadyForUnload() ) ); kdDebug( 14010 ) << k_funcinfo << "Successfully loaded plugin '" << pluginId << "'" << endl; @@ -424,7 +424,7 @@ Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) return plugin; } -bool PluginManager::unloadPlugin( const QString &spec ) +bool PluginManager::unloadPlugin( const TQString &spec ) { //kdDebug(14010) << k_funcinfo << spec << endl; if( Plugin *thePlugin = plugin( spec ) ) @@ -438,7 +438,7 @@ bool PluginManager::unloadPlugin( const QString &spec ) -void PluginManager::slotPluginDestroyed( QObject *plugin ) +void PluginManager::slotPluginDestroyed( TQObject *plugin ) { for ( Private::InfoToPluginMap::Iterator it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it ) @@ -454,14 +454,14 @@ void PluginManager::slotPluginDestroyed( QObject *plugin ) { // Use a timer to make sure any pending deleteLater() calls have // been handled first - QTimer::singleShot( 0, this, SLOT( slotShutdownDone() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotShutdownDone() ) ); } } -Plugin* PluginManager::plugin( const QString &_pluginId ) const +Plugin* PluginManager::plugin( const TQString &_pluginId ) const { // Hack for compatibility with Plugin::pluginId(), which returns // classname() instead of the internal name. Changing that is not easy @@ -470,9 +470,9 @@ Plugin* PluginManager::plugin( const QString &_pluginId ) const // For now, just transform FooProtocol to kopete_foo. // FIXME: In the future we'll need to change this nevertheless to unify // the handling - Martijn - QString pluginId = _pluginId; - if ( pluginId.endsWith( QString::fromLatin1( "Protocol" ) ) ) - pluginId = QString::fromLatin1( "kopete_" ) + _pluginId.lower().remove( QString::fromLatin1( "protocol" ) ); + TQString pluginId = _pluginId; + if ( pluginId.endsWith( TQString::fromLatin1( "Protocol" ) ) ) + pluginId = TQString::fromLatin1( "kopete_" ) + _pluginId.lower().remove( TQString::fromLatin1( "protocol" ) ); // End hack KPluginInfo *info = infoForPluginId( pluginId ); @@ -485,9 +485,9 @@ Plugin* PluginManager::plugin( const QString &_pluginId ) const return 0L; } -KPluginInfo * PluginManager::infoForPluginId( const QString &pluginId ) const +KPluginInfo * PluginManager::infoForPluginId( const TQString &pluginId ) const { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for ( it = d->plugins.begin(); it != d->plugins.end(); ++it ) { if ( ( *it )->pluginName() == pluginId ) @@ -498,21 +498,21 @@ KPluginInfo * PluginManager::infoForPluginId( const QString &pluginId ) const } -bool PluginManager::setPluginEnabled( const QString &_pluginId, bool enabled /* = true */ ) +bool PluginManager::setPluginEnabled( const TQString &_pluginId, bool enabled /* = true */ ) { - QString pluginId = _pluginId; + TQString pluginId = _pluginId; KConfig *config = KGlobal::config(); config->setGroup( "Plugins" ); // FIXME: What is this for? This sort of thing is kconf_update's job - Richard - if ( !pluginId.startsWith( QString::fromLatin1( "kopete_" ) ) ) - pluginId.prepend( QString::fromLatin1( "kopete_" ) ); + if ( !pluginId.startsWith( TQString::fromLatin1( "kopete_" ) ) ) + pluginId.prepend( TQString::fromLatin1( "kopete_" ) ); if ( !infoForPluginId( pluginId ) ) return false; - config->writeEntry( pluginId + QString::fromLatin1( "Enabled" ), enabled ); + config->writeEntry( pluginId + TQString::fromLatin1( "Enabled" ), enabled ); config->sync(); return true; diff --git a/kopete/libkopete/kopetepluginmanager.h b/kopete/libkopete/kopetepluginmanager.h index 815cf422..a250b091 100644 --- a/kopete/libkopete/kopetepluginmanager.h +++ b/kopete/libkopete/kopetepluginmanager.h @@ -19,11 +19,11 @@ #ifndef KOPETEPLUGINMANAGER_H #define KOPETEPLUGINMANAGER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kopete_export.h" @@ -34,7 +34,7 @@ namespace Kopete class Plugin; -typedef QValueList PluginList; +typedef TQValueList PluginList; /** * @author Duncan Mac-Vicar Prett @@ -63,14 +63,14 @@ public: * You can query all information on the plugins through the KPluginInfo * interface. */ - QValueList availablePlugins( const QString &category = QString::null ) const; + TQValueList availablePlugins( const TQString &category = TQString::null ) const; /** * Returns a list of all plugins that are actually loaded. * If you omit the category you get all, otherwise it's a filtered list. * See also @ref availablePlugins(). */ - PluginList loadedPlugins( const QString &category = QString::null ) const; + PluginList loadedPlugins( const TQString &category = TQString::null ) const; /** * @brief Search by plugin name. This is the key used as X-KDE-PluginInfo-Name in @@ -82,7 +82,7 @@ public: * If you want to also load the plugin you can better use @ref loadPlugin, which returns * the pointer to the plugin if it's already loaded. */ - Plugin *plugin( const QString &pluginName ) const; + Plugin *plugin( const TQString &pluginName ) const; /** * @return the KPluginInfo for the specified plugin @@ -117,7 +117,7 @@ public: * * Returns false when no appropriate plugin can be found. */ - bool setPluginEnabled( const QString &name, bool enabled = true ); + bool setPluginEnabled( const TQString &name, bool enabled = true ); /** * This method check if all the plugins are loaded. @@ -143,12 +143,12 @@ public slots: * * See also @ref plugin(). */ - Plugin *loadPlugin( const QString &pluginId, PluginLoadMode mode = LoadSync ); + Plugin *loadPlugin( const TQString &pluginId, PluginLoadMode mode = LoadSync ); /** * @brief Unload the plugin specified by @p pluginName */ - bool unloadPlugin( const QString &pluginName ); + bool unloadPlugin( const TQString &pluginName ); /** * @brief Loads all the enabled plugins. Also used to reread the @@ -187,7 +187,7 @@ private slots: /** * @brief Cleans up some references if the plugin is destroyed */ - void slotPluginDestroyed( QObject *plugin ); + void slotPluginDestroyed( TQObject *plugin ); /** * shutdown() starts a timer, when it fires we force all plugins @@ -221,7 +221,7 @@ private: * Called by @ref loadPlugin directly or through the queue for async plugin * loading. */ - Plugin * loadPluginInternal( const QString &pluginId ); + Plugin * loadPluginInternal( const TQString &pluginId ); /** * @internal @@ -230,7 +230,7 @@ private: * * Returns a null pointer when no plugin info is found. */ - KPluginInfo * infoForPluginId( const QString &pluginId ) const; + KPluginInfo * infoForPluginId( const TQString &pluginId ) const; PluginManager(); diff --git a/kopete/libkopete/kopeteprefs.cpp b/kopete/libkopete/kopeteprefs.cpp index e1148260..2c974f7f 100644 --- a/kopete/libkopete/kopeteprefs.cpp +++ b/kopete/libkopete/kopeteprefs.cpp @@ -16,9 +16,9 @@ #include "kopeteprefs.h" -#include -#include -#include +#include +#include +#include #include #include @@ -37,7 +37,7 @@ KopetePrefs *KopetePrefs::prefs() return s_prefs; } -KopetePrefs::KopetePrefs() : QObject( kapp, "KopetePrefs" ) +KopetePrefs::KopetePrefs() : TQObject( kapp, "KopetePrefs" ) { config = KGlobal::config(); load(); @@ -82,7 +82,7 @@ void KopetePrefs::load() mChatViewBufferSize = config->readNumEntry("ChatView BufferSize", 250); - QColor tmpColor = KGlobalSettings::highlightColor(); + TQColor tmpColor = KGlobalSettings::highlightColor(); mHighlightBackground = config->readColorEntry("Highlight Background Color", &tmpColor); tmpColor = KGlobalSettings::highlightedTextColor(); mHighlightForeground = config->readColorEntry("Highlight Foreground Color", &tmpColor); @@ -90,7 +90,7 @@ void KopetePrefs::load() mBgOverride = config->readBoolEntry("ChatView Override Background", false); mFgOverride = config->readBoolEntry("ChatView Override Foreground", false); mRtfOverride = config->readBoolEntry("ChatView Override RTF", false); - mInterfacePreference = config->readEntry("View Plugin", QString::fromLatin1("kopete_chatwindow") ); + mInterfacePreference = config->readEntry("View Plugin", TQString::fromLatin1("kopete_chatwindow") ); tmpColor = KGlobalSettings::textColor(); mTextColor = config->readColorEntry("Text Color", &tmpColor ); tmpColor = KGlobalSettings::baseColor(); @@ -112,31 +112,31 @@ void KopetePrefs::load() if(mToolTipContents.empty()) { mToolTipContents - << QString::fromLatin1("FormattedName") - << QString::fromLatin1("userInfo") - << QString::fromLatin1("server") - << QString::fromLatin1("channels") - << QString::fromLatin1("FormattedIdleTime") - << QString::fromLatin1("channelMembers") - << QString::fromLatin1("channelTopic") - << QString::fromLatin1("emailAddress") - << QString::fromLatin1("homePage") - << QString::fromLatin1("onlineSince") - << QString::fromLatin1("lastOnline") - << QString::fromLatin1("awayMessage"); + << TQString::fromLatin1("FormattedName") + << TQString::fromLatin1("userInfo") + << TQString::fromLatin1("server") + << TQString::fromLatin1("channels") + << TQString::fromLatin1("FormattedIdleTime") + << TQString::fromLatin1("channelMembers") + << TQString::fromLatin1("channelTopic") + << TQString::fromLatin1("emailAddress") + << TQString::fromLatin1("homePage") + << TQString::fromLatin1("onlineSince") + << TQString::fromLatin1("lastOnline") + << TQString::fromLatin1("awayMessage"); } config->setGroup("ContactList"); int n = metaObject()->findProperty( "contactListDisplayMode" ); - QString value = config->readEntry("DisplayMode",QString::fromLatin1("Default")); + TQString value = config->readEntry("DisplayMode",TQString::fromLatin1("Default")); mContactListDisplayMode = (ContactDisplayMode)metaObject()->property( n )->keyToValue( value.latin1() ); n = metaObject()->findProperty( "contactListIconMode" ); value = config->readEntry("IconMode", - QString::fromLatin1("IconDefault")); + TQString::fromLatin1("IconDefault")); mContactListIconMode = (IconDisplayMode) metaObject()->property( n )->keyToValue( value.latin1() ); mContactListIndentContacts = config->readBoolEntry("IndentContacts", false); mContactListUseCustomFonts = config->readBoolEntry("UseCustomFonts", false); - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); mContactListNormalFont = config->readFontEntry("NormalFont", &font); if ( font.pixelSize() != -1 ) font.setPixelSize( (font.pixelSize() * 3) / 4 ); @@ -273,7 +273,7 @@ void KopetePrefs::save() mStyleVariantChanged = false; } -void KopetePrefs::setIconTheme(const QString &value) +void KopetePrefs::setIconTheme(const TQString &value) { if( mIconTheme != value ) { @@ -414,51 +414,51 @@ void KopetePrefs::setSoundIfAway(bool value) mSoundIfAway = value; } -void KopetePrefs::setStylePath(const QString &stylePath) +void KopetePrefs::setStylePath(const TQString &stylePath) { if(mStylePath != stylePath) mStylePathChanged = true; _setStylePath(stylePath); } -void KopetePrefs::_setStylePath(const QString &stylePath) +void KopetePrefs::_setStylePath(const TQString &stylePath) { mStylePath = stylePath; // Fallback to default style if the directory doesn't exist // or the value is empty. - if( !QFile::exists(stylePath) || stylePath.isEmpty() ) + if( !TQFile::exists(stylePath) || stylePath.isEmpty() ) { - QString fallback; - fallback = QString(QString::fromLatin1("styles/%1/")).arg(QString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); + TQString fallback; + fallback = TQString(TQString::fromLatin1("styles/%1/")).arg(TQString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); mStylePath = locate("appdata", fallback); } } -void KopetePrefs::setStyleVariant(const QString &variantPath) +void KopetePrefs::setStyleVariant(const TQString &variantPath) { if(mStyleVariant != variantPath) mStyleVariantChanged = true; mStyleVariant = variantPath; } -void KopetePrefs::setFontFace( const QFont &value ) +void KopetePrefs::setFontFace( const TQFont &value ) { if( value != mFontFace ) mWindowAppearanceChanged = true; mFontFace = value; } -void KopetePrefs::setTextColor( const QColor &value ) +void KopetePrefs::setTextColor( const TQColor &value ) { if( value != mTextColor ) mWindowAppearanceChanged = true; mTextColor = value; } -void KopetePrefs::setBgColor( const QColor &value ) +void KopetePrefs::setBgColor( const TQColor &value ) { if( value != mBgColor ) mWindowAppearanceChanged = true; mBgColor = value; } -void KopetePrefs::setLinkColor( const QColor &value ) +void KopetePrefs::setLinkColor( const TQColor &value ) { if( value != mLinkColor ) mWindowAppearanceChanged = true; mLinkColor = value; @@ -479,7 +479,7 @@ void KopetePrefs::setMaxContactNameLength( int value ) mMaxContactNameLength = value; } -void KopetePrefs::setInterfacePreference(const QString &value) +void KopetePrefs::setInterfacePreference(const TQString &value) { mInterfacePreference = value; } @@ -489,13 +489,13 @@ void KopetePrefs::setChatViewBufferSize( int value ) mChatViewBufferSize = value; } -void KopetePrefs::setHighlightBackground(const QColor &value) +void KopetePrefs::setHighlightBackground(const TQColor &value) { if( value != mHighlightBackground ) mWindowAppearanceChanged = true; mHighlightBackground = value; } -void KopetePrefs::setHighlightForeground(const QColor &value) +void KopetePrefs::setHighlightForeground(const TQColor &value) { if( value != mHighlightForeground ) mWindowAppearanceChanged = true; mHighlightForeground = value; @@ -531,20 +531,20 @@ void KopetePrefs::setShowTray(bool value) } -QString KopetePrefs::fileContents(const QString &path) +TQString KopetePrefs::fileContents(const TQString &path) { - QString contents; - QFile file( path ); + TQString contents; + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); contents = stream.read(); file.close(); } return contents; } -void KopetePrefs::setIdleContactColor(const QColor &value) +void KopetePrefs::setIdleContactColor(const TQColor &value) { if( value != mIdleContactColor ) mContactListAppearanceChanged = true; mIdleContactColor = value; @@ -555,7 +555,7 @@ void KopetePrefs::setRichText(bool value) mRichText=value; } -void KopetePrefs::setToolTipContents(const QStringList &value) +void KopetePrefs::setToolTipContents(const TQStringList &value) { mToolTipContents=value; } @@ -584,23 +584,23 @@ void KopetePrefs::setContactListUseCustomFonts( bool v ) mContactListUseCustomFonts = v; } -void KopetePrefs::setContactListCustomNormalFont( const QFont & v ) +void KopetePrefs::setContactListCustomNormalFont( const TQFont & v ) { if( v != mContactListNormalFont ) mContactListAppearanceChanged = true; mContactListNormalFont = v; } -void KopetePrefs::setContactListCustomSmallFont( const QFont & v ) +void KopetePrefs::setContactListCustomSmallFont( const TQFont & v ) { if( v != mContactListSmallFont ) mContactListAppearanceChanged = true; mContactListSmallFont = v; } -QFont KopetePrefs::contactListSmallFont() const +TQFont KopetePrefs::contactListSmallFont() const { if ( mContactListUseCustomFonts ) return contactListCustomSmallFont(); - QFont smallFont = KGlobalSettings::generalFont(); + TQFont smallFont = KGlobalSettings::generalFont(); if ( smallFont.pixelSize() != -1 ) smallFont.setPixelSize( (smallFont.pixelSize() * 3) / 4 ); else @@ -608,7 +608,7 @@ QFont KopetePrefs::contactListSmallFont() const return smallFont; } -void KopetePrefs::setContactListGroupNameColor( const QColor & v ) +void KopetePrefs::setContactListGroupNameColor( const TQColor & v ) { if( v != mContactListGroupNameColor ) mContactListAppearanceChanged = true; mContactListGroupNameColor = v; diff --git a/kopete/libkopete/kopeteprefs.h b/kopete/libkopete/kopeteprefs.h index 4a5162ff..4fb4a9e3 100644 --- a/kopete/libkopete/kopeteprefs.h +++ b/kopete/libkopete/kopeteprefs.h @@ -17,10 +17,10 @@ #ifndef __KOPETEPREFS_H__ #define __KOPETEPREFS_H__ -#include +#include #include -#include -#include +#include +#include #include "kopete_export.h" @@ -53,7 +53,7 @@ public: */ void save(); - QString iconTheme() const { return mIconTheme; } + TQString iconTheme() const { return mIconTheme; } bool useEmoticons() const { return mUseEmoticons; } bool showOffline() const { return mShowOffline; } bool showEmptyGroups() const { return mShowEmptyGroups; } @@ -79,19 +79,19 @@ public: bool soundIfAway() const { return mSoundIfAway; } int chatViewBufferSize() const { return mChatViewBufferSize; } int rememberedMessages() const { return mRememberedMessages; } - const QColor &highlightBackground() const { return mHighlightBackground; } - const QColor &highlightForeground() const { return mHighlightForeground; } - const QColor &textColor() const { return mTextColor; } - const QColor &bgColor() const { return mBgColor; } - const QColor &linkColor() const { return mLinkColor; } - const QFont &fontFace() const { return mFontFace; } - const QColor &idleContactColor() const { return mIdleContactColor; } + const TQColor &highlightBackground() const { return mHighlightBackground; } + const TQColor &highlightForeground() const { return mHighlightForeground; } + const TQColor &textColor() const { return mTextColor; } + const TQColor &bgColor() const { return mBgColor; } + const TQColor &linkColor() const { return mLinkColor; } + const TQFont &fontFace() const { return mFontFace; } + const TQColor &idleContactColor() const { return mIdleContactColor; } bool highlightEnabled() const { return mHighlightEnabled; } bool bgOverride() const { return mBgOverride; } bool fgOverride() const { return mFgOverride; } bool rtfOverride() const { return mRtfOverride; } - QString interfacePreference() const { return mInterfacePreference; } + TQString interfacePreference() const { return mInterfacePreference; } bool showTray() const { return mShowTray; } bool richText() const { return mRichText; } bool chatWShowSend() const { return mChatWShowSend; } @@ -100,12 +100,12 @@ public: int chatWindowPolicy() const { return mChatWindowPolicy; } //Styles - QString defaultTheme() const { return QString::fromLatin1("Default"); } + TQString defaultTheme() const { return TQString::fromLatin1("Default"); } //for Adium (xhtml+css) - QString stylePath() const { return mStylePath; } - QString styleVariant() const { return mStyleVariant; } + TQString stylePath() const { return mStylePath; } + TQString styleVariant() const { return mStyleVariant; } - QStringList toolTipContents() const { return mToolTipContents; } + TQStringList toolTipContents() const { return mToolTipContents; } /// enum ContactDisplayMode { Classic, RightAligned, Detailed, Yagami, Default = Classic }; @@ -115,10 +115,10 @@ public: ContactDisplayMode contactListDisplayMode() const { return mContactListDisplayMode; } IconDisplayMode contactListIconMode() const { return mContactListIconMode; } bool contactListUseCustomFonts() const { return mContactListUseCustomFonts; } - QFont contactListCustomNormalFont() const { return mContactListNormalFont; } - QFont contactListCustomSmallFont() const { return mContactListSmallFont; } - QFont contactListSmallFont() const; - QColor contactListGroupNameColor() const { return mContactListGroupNameColor; } + TQFont contactListCustomNormalFont() const { return mContactListNormalFont; } + TQFont contactListCustomSmallFont() const { return mContactListSmallFont; } + TQFont contactListSmallFont() const; + TQColor contactListGroupNameColor() const { return mContactListGroupNameColor; } bool contactListAnimation() const { return mContactListAnimation; } bool contactListFading() const { return mContactListFading; } bool contactListFolding() const { return mContactListFolding; } @@ -132,7 +132,7 @@ public: bool emoticonsRequireSpaces() const { return mEmoticonsRequireSpaces; } bool groupConsecutiveMessages() const { return mGroupConsecutiveMessages; } - void setIconTheme(const QString &value); + void setIconTheme(const TQString &value); void setUseEmoticons(bool value); void setShowOffline(bool value); void setShowEmptyGroups(bool value); @@ -156,32 +156,32 @@ public: void setSoundIfAway(bool); void setBeepNotify(bool); void setChatWindowPolicy(int); - void setStylePath(const QString &); - void setStyleVariant(const QString &); + void setStylePath(const TQString &); + void setStyleVariant(const TQString &); void setChatViewBufferSize(int); - void setHighlightBackground(const QColor &); - void setHighlightForeground(const QColor &); + void setHighlightBackground(const TQColor &); + void setHighlightForeground(const TQColor &); void setHighlightEnabled(bool); void setBgOverride(bool); void setFgOverride(bool); void setRtfOverride(bool); - void setInterfacePreference(const QString &viewPlugin); - void setTextColor(const QColor &); - void setBgColor(const QColor &); - void setLinkColor(const QColor &); - void setFontFace(const QFont &); - void setIdleContactColor(const QColor &); + void setInterfacePreference(const TQString &viewPlugin); + void setTextColor(const TQColor &); + void setBgColor(const TQColor &); + void setLinkColor(const TQColor &); + void setFontFace(const TQFont &); + void setIdleContactColor(const TQColor &); void setShowTray(bool); void setRichText(bool); void setRememberedMessages(int); - void setToolTipContents(const QStringList &); + void setToolTipContents(const TQStringList &); void setContactListIndentContacts( bool v ); void setContactListDisplayMode( ContactDisplayMode v ); void setContactListIconMode( IconDisplayMode v ); void setContactListUseCustomFonts( bool v ); - void setContactListCustomNormalFont( const QFont & v ); - void setContactListCustomSmallFont( const QFont & v ); - void setContactListGroupNameColor( const QColor & v ); + void setContactListCustomNormalFont( const TQFont & v ); + void setContactListCustomSmallFont( const TQFont & v ); + void setContactListGroupNameColor( const TQColor & v ); void setContactListAnimation( bool ); void setContactListFading( bool ); void setContactListFolding( bool ); @@ -213,12 +213,12 @@ signals: * Emitted when chat Window Style changed. * @param stylePath New stylePath */ - void styleChanged(const QString &stylePath); + void styleChanged(const TQString &stylePath); /** * Emitted when ChatWindowStyle variant changed. * @param variantPath New variant Path. */ - void styleVariantChanged(const QString &variantPath); + void styleVariantChanged(const TQString &variantPath); private: /** @@ -233,7 +233,7 @@ private: KConfig *config; - QString mIconTheme; + TQString mIconTheme; bool mUseEmoticons; bool mShowOffline; bool mShowEmptyGroups; @@ -258,15 +258,15 @@ private: int mBalloonCloseDelay; bool mSoundIfAway; int mRememberedMessages; - QString mInterfacePreference; + TQString mInterfacePreference; int mChatViewBufferSize; - QColor mHighlightBackground; - QColor mHighlightForeground; - QColor mTextColor; - QColor mBgColor; - QColor mLinkColor; - QFont mFontFace; - QColor mIdleContactColor; + TQColor mHighlightBackground; + TQColor mHighlightForeground; + TQColor mTextColor; + TQColor mBgColor; + TQColor mLinkColor; + TQFont mFontFace; + TQColor mIdleContactColor; bool mHighlightEnabled; bool mBgOverride; bool mFgOverride; @@ -287,20 +287,20 @@ private: // xhtml+css //for Adium (xhtml+css) - QString mStylePath; - QString mStyleVariant; + TQString mStylePath; + TQString mStyleVariant; bool mStylePathChanged; bool mStyleVariantChanged; - QStringList mToolTipContents; + TQStringList mToolTipContents; bool mContactListIndentContacts; ContactDisplayMode mContactListDisplayMode; IconDisplayMode mContactListIconMode; bool mContactListUseCustomFonts; - QFont mContactListNormalFont; - QFont mContactListSmallFont; - QColor mContactListGroupNameColor; + TQFont mContactListNormalFont; + TQFont mContactListSmallFont; + TQColor mContactListGroupNameColor; bool mContactListAnimation; bool mContactListFading; bool mContactListFolding; @@ -311,8 +311,8 @@ private: bool mEmoticonsRequireSpaces; bool mGroupConsecutiveMessages; - QString fileContents(const QString &path); - void _setStylePath (const QString &); + TQString fileContents(const TQString &path); + void _setStylePath (const TQString &); }; #endif // vim: set noet ts=4 sts=4 sw=4: diff --git a/kopete/libkopete/kopeteproperties.cpp b/kopete/libkopete/kopeteproperties.cpp index 9009cd07..3ed9d044 100644 --- a/kopete/libkopete/kopeteproperties.cpp +++ b/kopete/libkopete/kopeteproperties.cpp @@ -18,8 +18,8 @@ #include -#include -#include +#include +#include #include namespace Kopete { @@ -34,15 +34,15 @@ void customPropertyDataIncorrectType( const char *name, const std::type_info &fo } template<> -int variantTo(QVariant) { return 0; } +int variantTo(TQVariant) { return 0; } //... -QVariant variantFromXML(const QDomElement&) +TQVariant variantFromXML(const TQDomElement&) { - return QVariant(); + return TQVariant(); } -void variantToXML(QVariant v, QDomElement &) +void variantToXML(TQVariant v, TQDomElement &) { } diff --git a/kopete/libkopete/kopeteproperties.h b/kopete/libkopete/kopeteproperties.h index bfeaedea..24b7536f 100644 --- a/kopete/libkopete/kopeteproperties.h +++ b/kopete/libkopete/kopeteproperties.h @@ -17,7 +17,7 @@ #ifndef KOPETEPROPERTIES_H #define KOPETEPROPERTIES_H -#include +#include #include @@ -77,8 +77,8 @@ public: * * \code * SomeParent *propertyContainer = ... - * Property &myProperty = ... - * QString value = propertyContainer->property(myProperty); + * Property &myProperty = ... + * TQString value = propertyContainer->property(myProperty); * propertyContainer->setProperty(myProperty, "hello"); * \endcode * @@ -121,7 +121,7 @@ struct PropertyData */ class PropertyStorage { - typedef QAsciiDict PropertyDict; + typedef TQAsciiDict PropertyDict; // setCustomPropertyData can be called on a const object, allowing the // guarantee that DataProperty::data() never returns 0. mutable PropertyDict _storage; @@ -197,9 +197,9 @@ public: template struct UserVisible { - virtual QString userText( Parent * ) = 0; - virtual QString label() = 0; - virtual QString icon() = 0; + virtual TQString userText( Parent * ) = 0; + virtual TQString label() = 0; + virtual TQString icon() = 0; }; /** @@ -209,8 +209,8 @@ struct UserVisible template struct XMLSerializable { - virtual void fromXML( Parent *, const QDomElement & ) = 0; - virtual void toXML( const Parent *, QDomElement & ) = 0; + virtual void fromXML( Parent *, const TQDomElement & ) = 0; + virtual void toXML( const Parent *, TQDomElement & ) = 0; }; /** @@ -220,8 +220,8 @@ struct XMLSerializable template struct StringSerializable { - virtual void fromString( Parent *, const QString & ) = 0; - virtual QString toString( const Parent * ) = 0; + virtual void fromString( Parent *, const TQString & ) = 0; + virtual TQString toString( const Parent * ) = 0; }; //END interfaces @@ -297,12 +297,12 @@ public: */ /** - * Explicitly specialised for all types QVariant supports + * Explicitly specialised for all types TQVariant supports */ -template T variantTo(QVariant); +template T variantTo(TQVariant); -QVariant variantFromXML(const QDomElement&); -void variantToXML(QVariant v, QDomElement &); +TQVariant variantFromXML(const TQDomElement&); +void variantToXML(TQVariant v, TQDomElement &); /** * @} @@ -311,7 +311,7 @@ void variantToXML(QVariant v, QDomElement &); /** * @brief Convenience implementation of XMLSerializable in terms of QVariants * - * This class provides XML serialization for data that can be stored in a QVariant. You + * This class provides XML serialization for data that can be stored in a TQVariant. You * will need to multiply-inherit from this class and (usually indirectly) from @ref Property. * * You can combine this class with other convenience classes such as SimpleDataProperty @@ -319,8 +319,8 @@ void variantToXML(QVariant v, QDomElement &); * * \code * class ContactNickNameProperty - * : public SimpleDataProperty - * , XMLProperty + * : public SimpleDataProperty + * , XMLProperty * { * public: * const char *name() const { return "nickName"; } @@ -331,13 +331,13 @@ template class XMLProperty : public XMLSerializable { public: - void fromXML( Parent *t, const QDomElement &e ) + void fromXML( Parent *t, const TQDomElement &e ) { static_cast(this)->set(t, variantTo(variantFromXML(e))); } - void toXML( const Parent *t, QDomElement &e ) + void toXML( const Parent *t, TQDomElement &e ) { - variantToXML(QVariant(static_cast(this)->get(t)),e); + variantToXML(TQVariant(static_cast(this)->get(t)),e); } }; diff --git a/kopete/libkopete/kopeteprotocol.cpp b/kopete/libkopete/kopeteprotocol.cpp index 7854a1a3..e361abf6 100644 --- a/kopete/libkopete/kopeteprotocol.cpp +++ b/kopete/libkopete/kopeteprotocol.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include "kopeteaccountmanager.h" #include "kopeteaccount.h" @@ -50,7 +50,7 @@ public: Kopete::OnlineStatus accountNotConnectedStatus; }; -Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) +Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) : Plugin( instance, parent, name ) { d = new Private; @@ -58,18 +58,18 @@ Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) d->mStickFullName = Global::Properties::self()->fullName(); d->unloading = false; d->capabilities = 0; - d->accountNotConnectedStatus = Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, this, Kopete::OnlineStatus::AccountOffline, QString::fromLatin1( "account_offline_overlay" ), i18n( "Account Offline" ) ); + d->accountNotConnectedStatus = Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, this, Kopete::OnlineStatus::AccountOffline, TQString::fromLatin1( "account_offline_overlay" ), i18n( "Account Offline" ) ); } Protocol::~Protocol() { // Remove all active accounts - QDict accounts = AccountManager::self()->accounts( this ); + TQDict accounts = AccountManager::self()->accounts( this ); if ( !accounts.isEmpty() ) { kdWarning( 14010 ) << k_funcinfo << "Deleting protocol with existing accounts! Did the account unloading go wrong?" << endl; - for( QDictIterator it( accounts ); it.current() ; ++it ) + for( TQDictIterator it( accounts ); it.current() ; ++it ) delete *it; } @@ -99,15 +99,15 @@ void Protocol::slotAccountOnlineStatusChanged( Contact *self ) // some protocols change status several times during shutdown. We should only call deleteLater() once disconnect( self, 0, this, 0 ); - connect( self->account(), SIGNAL(accountDestroyed(const Kopete::Account* )), - this, SLOT( slotAccountDestroyed( ) ) ); + connect( self->account(), TQT_SIGNAL(accountDestroyed(const Kopete::Account* )), + this, TQT_SLOT( slotAccountDestroyed( ) ) ); self->account()->deleteLater(); } void Protocol::slotAccountDestroyed( ) { - QDict dict = AccountManager::self()->accounts( this ); + TQDict dict = AccountManager::self()->accounts( this ); if ( dict.isEmpty() ) { // While at this point we are still in a stack trace from the destroyed @@ -124,20 +124,20 @@ void Protocol::aboutToUnload() d->unloading = true; // Disconnect all accounts - QDict accounts = AccountManager::self()->accounts( this ); + TQDict accounts = AccountManager::self()->accounts( this ); if ( accounts.isEmpty() ) emit readyForUnload(); - else for ( QDictIterator it( accounts ); it.current() ; ++it ) + else for ( TQDictIterator it( accounts ); it.current() ; ++it ) { if ( it.current()->myself() && it.current()->myself()->isOnline() ) { kdDebug( 14010 ) << k_funcinfo << it.current()->accountId() << " is still connected, disconnecting..." << endl; - QObject::connect( it.current()->myself(), - SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotAccountOnlineStatusChanged( Kopete::Contact * ) ) ); + TQObject::connect( it.current()->myself(), + TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotAccountOnlineStatusChanged( Kopete::Contact * ) ) ); it.current()->disconnect(); } else @@ -146,8 +146,8 @@ void Protocol::aboutToUnload() kdDebug( 14010 ) << k_funcinfo << it.current()->accountId() << " is already disconnected, deleting..." << endl; - QObject::connect( it.current(), SIGNAL( accountDestroyed( const Kopete::Account* ) ), - this, SLOT( slotAccountDestroyed( ) ) ); + TQObject::connect( it.current(), TQT_SIGNAL( accountDestroyed( const Kopete::Account* ) ), + this, TQT_SLOT( slotAccountDestroyed( ) ) ); it.current()->deleteLater(); } } @@ -157,13 +157,13 @@ void Protocol::aboutToUnload() void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) { - QMap serializedData, sd; - QMap addressBookData, ad; - QMap::Iterator it; + TQMap serializedData, sd; + TQMap addressBookData, ad; + TQMap::Iterator it; //kdDebug( 14010 ) << "Protocol::metaContactAboutToSave: protocol " << pluginId() << ": serializing " << metaContact->displayName() << endl; - QPtrList contacts=metaContact->contacts(); + TQPtrList contacts=metaContact->contacts(); for (Contact *c=contacts.first() ; c ; c=contacts.next() ) { if( c->protocol()->pluginId() != pluginId() ) @@ -174,14 +174,14 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // Preset the contactId and displayName, if the plugin doesn't want to save // them, or use its own format, it can call clear() on the provided list - sd[ QString::fromLatin1( "contactId" ) ] = c->contactId(); + sd[ TQString::fromLatin1( "contactId" ) ] = c->contactId(); //TODO(nick) remove - sd[ QString::fromLatin1( "displayName" ) ] = c->property(Global::Properties::self()->nickName()).value().toString(); + sd[ TQString::fromLatin1( "displayName" ) ] = c->property(Global::Properties::self()->nickName()).value().toString(); if(c->account()) - sd[ QString::fromLatin1( "accountId" ) ] = c->account()->accountId(); + sd[ TQString::fromLatin1( "accountId" ) ] = c->account()->accountId(); // If there's an index field preset it too - QString index = c->protocol()->addressBookIndexField(); + TQString index = c->protocol()->addressBookIndexField(); if( !index.isEmpty() ) ad[ index ] = c->contactId(); @@ -194,11 +194,11 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // The Unicode chars E000-F800 are non-printable and reserved for // private use in applications. For more details, see also // http://www.unicode.org/charts/PDF/UE000.pdf. - // Inside libkabc the use of QChar( 0xE000 ) has been standardized + // Inside libkabc the use of TQChar( 0xE000 ) has been standardized // as separator for the string lists, use this also for the 'normal' // serialized data. if( serializedData.contains( it.key() ) ) - serializedData[ it.key() ] = serializedData[ it.key() ] + QChar( 0xE000 ) + it.data(); + serializedData[ it.key() ] = serializedData[ it.key() ] + TQChar( 0xE000 ) + it.data(); else serializedData[ it.key() ] = it.data(); } @@ -206,7 +206,7 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) for( it = ad.begin(); it != ad.end(); ++it ) { if( addressBookData.contains( it.key() ) ) - addressBookData[ it.key() ] = addressBookData[ it.key() ] + QChar( 0xE000 ) + it.data(); + addressBookData[ it.key() ] = addressBookData[ it.key() ] + TQChar( 0xE000 ) + it.data(); else addressBookData[ it.key() ] = it.data(); } @@ -226,48 +226,48 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // we can devise a better API, but with the constantly changing // requirements every time I learn more about kabc I'd better no touch // the API yet - Martijn - if( it.key().startsWith( QString::fromLatin1( "messaging/" ) ) ) + if( it.key().startsWith( TQString::fromLatin1( "messaging/" ) ) ) { - metaContact->setAddressBookField( this, it.key(), QString::fromLatin1( "All" ), it.data() ); + metaContact->setAddressBookField( this, it.key(), TQString::fromLatin1( "All" ), it.data() ); // kdDebug(14010) << k_funcinfo << "metaContact->setAddressBookField( " << this << ", " << it.key() << ", \"All\", " << it.data() << " );" << endl; } else - metaContact->setAddressBookField( this, QString::fromLatin1( "kopete" ), it.key(), it.data() ); + metaContact->setAddressBookField( this, TQString::fromLatin1( "kopete" ), it.key(), it.data() ); } } -void Protocol::deserialize( MetaContact *metaContact, const QMap &data ) +void Protocol::deserialize( MetaContact *metaContact, const TQMap &data ) { /*kdDebug( 14010 ) << "Protocol::deserialize: protocol " << pluginId() << ": deserializing " << metaContact->displayName() << endl;*/ - QMap serializedData; - QMap serializedDataIterators; - QMap::ConstIterator it; + TQMap serializedData; + TQMap serializedDataIterators; + TQMap::ConstIterator it; for( it = data.begin(); it != data.end(); ++it ) { - serializedData[ it.key() ] = QStringList::split( QChar( 0xE000 ), it.data(), true ); + serializedData[ it.key() ] = TQStringList::split( TQChar( 0xE000 ), it.data(), true ); serializedDataIterators[ it.key() ] = serializedData[ it.key() ].begin(); } - uint count = serializedData[QString::fromLatin1("contactId")].count(); + uint count = serializedData[TQString::fromLatin1("contactId")].count(); // Prepare the independent entries to pass to the plugin's implementation for( uint i = 0; i < count ; i++ ) { - QMap sd; - QMap::Iterator serializedDataIt; + TQMap sd; + TQMap::Iterator serializedDataIt; for( serializedDataIt = serializedDataIterators.begin(); serializedDataIt != serializedDataIterators.end(); ++serializedDataIt ) { sd[ serializedDataIt.key() ] = *( serializedDataIt.data() ); ++( serializedDataIt.data() ); } - const QString& accountId=sd[ QString::fromLatin1( "accountId" ) ]; + const TQString& accountId=sd[ TQString::fromLatin1( "accountId" ) ]; // myself was allowed in the contactlist in old version of kopete. // But if one keep it on the contactlist now, it may conflict witht he myself metacontact. // So ignore it - if(accountId == sd[ QString::fromLatin1( "contactId" ) ] ) + if(accountId == sd[ TQString::fromLatin1( "contactId" ) ] ) { kdDebug( 14010 ) << k_funcinfo << "Myself contact was on the contactlist.xml for account " << accountId << ". Ignore it" << endl; continue; @@ -282,18 +282,18 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap ad; - QStringList kabcFields = addressBookFields(); - for( QStringList::Iterator fieldIt = kabcFields.begin(); fieldIt != kabcFields.end(); ++fieldIt ) + TQMap ad; + TQStringList kabcFields = addressBookFields(); + for( TQStringList::Iterator fieldIt = kabcFields.begin(); fieldIt != kabcFields.end(); ++fieldIt ) { // FIXME: This hack is even more ugly, and has the same reasons as the similar // hack in the serialize code. // Once this code is actually capable of talking to kabc this hack // should be removed ASAP! - Martijn - if( ( *fieldIt ).startsWith( QString::fromLatin1( "messaging/" ) ) ) - ad[ *fieldIt ] = metaContact->addressBookField( this, *fieldIt, QString::fromLatin1( "All" ) ); + if( ( *fieldIt ).startsWith( TQString::fromLatin1( "messaging/" ) ) ) + ad[ *fieldIt ] = metaContact->addressBookField( this, *fieldIt, TQString::fromLatin1( "All" ) ); else - ad[ *fieldIt ] = metaContact->addressBookField( this, QString::fromLatin1( "kopete" ), *fieldIt ); + ad[ *fieldIt ] = metaContact->addressBookField( this, TQString::fromLatin1( "kopete" ), *fieldIt ); } // Check if we have an account id. If not we're deserializing a Kopete 0.6 contact @@ -302,10 +302,10 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap accounts = AccountManager::self()->accounts( this ); + TQDict accounts = AccountManager::self()->accounts( this ); if ( accounts.count() > 0 ) { - sd[ QString::fromLatin1( "accountId" ) ] = QDictIterator( accounts ).currentKey(); + sd[ TQString::fromLatin1( "accountId" ) ] = TQDictIterator( accounts ).currentKey(); } else { @@ -326,8 +326,8 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap & /* serializedData */, - const QMap & /* addressBookData */ ) + const TQMap & /* serializedData */, + const TQMap & /* addressBookData */ ) { /* Default implementation does nothing */ return 0; diff --git a/kopete/libkopete/kopeteprotocol.h b/kopete/libkopete/kopeteprotocol.h index 805e00c2..546247cf 100644 --- a/kopete/libkopete/kopeteprotocol.h +++ b/kopete/libkopete/kopeteprotocol.h @@ -62,7 +62,7 @@ class KOPETE_EXPORT Protocol : public Plugin public: /** - * @todo Ideally, the destructor should be protected. but we need it public to allow QPtrList + * @todo Ideally, the destructor should be protected. but we need it public to allow TQPtrList */ virtual ~Protocol(); @@ -78,14 +78,14 @@ public: * * @return The new @ref Account object created by this function */ - virtual Account *createNewAccount( const QString &accountId ) = 0; + virtual Account *createNewAccount( const TQString &accountId ) = 0; /** * @brief Create a new AddContactPage widget to be shown in the Add Contact Wizard. * * @return A new AddContactPage to be shown in the Add Contact Wizard */ - virtual AddContactPage *createAddContactWidget( QWidget *parent, Account *account ) = 0; + virtual AddContactPage *createAddContactWidget( TQWidget *parent, Account *account ) = 0; /** * @brief Create a new KopeteEditAccountWidget @@ -95,7 +95,7 @@ public: * @param account is the KopeteAccount to edit. If it's 0L, then we create a new account * @param parent The parent of the 'to be returned' widget */ - virtual KopeteEditAccountWidget * createEditAccountWidget( Account *account, QWidget *parent ) = 0; + virtual KopeteEditAccountWidget * createEditAccountWidget( Account *account, TQWidget *parent ) = 0; /** @@ -163,7 +163,7 @@ protected: * @param parent The protocol's parent object * @param name The protocol's name */ - Protocol( KInstance *instance, QObject *parent, const char *name ); + Protocol( KInstance *instance, TQObject *parent, const char *name ); /** * @brief Sets the capabilities of this protcol. @@ -224,7 +224,7 @@ public: * * @todo we probably should think to another way to save the contacltist. */ - virtual void deserialize( MetaContact *metaContact, const QMap &serializedData ); + virtual void deserialize( MetaContact *metaContact, const TQMap &serializedData ); /** * @brief Deserialize a single contact. @@ -242,8 +242,8 @@ public: * @todo we probably should think to another way to save the contacltist. */ virtual Contact *deserializeContact( MetaContact *metaContact, - const QMap &serializedData, - const QMap &addressBookData ); + const TQMap &serializedData, + const TQMap &addressBookData ); diff --git a/kopete/libkopete/kopetesimplemessagehandler.cpp b/kopete/libkopete/kopetesimplemessagehandler.cpp index 3e44520c..a312c2a8 100644 --- a/kopete/libkopete/kopetesimplemessagehandler.cpp +++ b/kopete/libkopete/kopetesimplemessagehandler.cpp @@ -19,7 +19,7 @@ #include -#include +#include namespace Kopete { @@ -31,12 +31,12 @@ class SimpleMessageHandlerFactory::Private public: Message::MessageDirection direction; int position; - QGuardedPtr target; + TQGuardedPtr target; const char *slot; }; SimpleMessageHandlerFactory::SimpleMessageHandlerFactory( Message::MessageDirection direction, - int position, QObject *target, const char *slot ) + int position, TQObject *target, const char *slot ) : d( new Private ) { d->direction = direction; @@ -55,7 +55,7 @@ MessageHandler *SimpleMessageHandlerFactory::create( ChatSession */*manager*/, M if ( direction != d->direction ) return 0; MessageHandler *handler = new SimpleMessageHandler; - QObject::connect( handler, SIGNAL( handle( Kopete::Message & ) ), d->target, d->slot ); + TQObject::connect( handler, TQT_SIGNAL( handle( Kopete::Message & ) ), d->target, d->slot ); return handler; } diff --git a/kopete/libkopete/kopetesimplemessagehandler.h b/kopete/libkopete/kopetesimplemessagehandler.h index af6de4ab..9a5fd296 100644 --- a/kopete/libkopete/kopetesimplemessagehandler.h +++ b/kopete/libkopete/kopetesimplemessagehandler.h @@ -45,7 +45,7 @@ public: * @see Kopete::MessageHandlerFactory::filterPosition */ SimpleMessageHandlerFactory( Message::MessageDirection direction, int position, - QObject *target, const char *slot ); + TQObject *target, const char *slot ); ~SimpleMessageHandlerFactory(); /** diff --git a/kopete/libkopete/kopetetask.cpp b/kopete/libkopete/kopetetask.cpp index b7484116..fad469c8 100644 --- a/kopete/libkopete/kopetetask.cpp +++ b/kopete/libkopete/kopetetask.cpp @@ -18,7 +18,7 @@ #include -#include +#include namespace Kopete { @@ -33,8 +33,8 @@ public: } Task::Result result; - QString errorMessage; - QPtrList subtasks; + TQString errorMessage; + TQPtrList subtasks; }; Task::Task() @@ -52,7 +52,7 @@ bool Task::succeeded() const return d->result == ResultSucceeded; } -const QString &Task::errorString() const +const TQString &Task::errorString() const { return d->errorMessage; } @@ -72,24 +72,24 @@ void Task::abort( int flags ) void Task::addSubtask( Task *task ) { d->subtasks.append( task ); - connect( task, SIGNAL( result( Kopete::Task* ) ), - this, SLOT( slotResult( Kopete::Task* ) ) ); - connect( task, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ), - this, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ) ); + connect( task, TQT_SIGNAL( result( Kopete::Task* ) ), + this, TQT_SLOT( slotResult( Kopete::Task* ) ) ); + connect( task, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ), + this, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ) ); } void Task::removeSubtask( Task *task, RemoveSubtaskIfLast actionIfLast ) { - disconnect( task, SIGNAL( result( Kopete::Task* ) ), - this, SLOT( slotResult( Kopete::Task* ) ) ); - disconnect( task, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ), - this, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ) ); + disconnect( task, TQT_SIGNAL( result( Kopete::Task* ) ), + this, TQT_SLOT( slotResult( Kopete::Task* ) ) ); + disconnect( task, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ), + this, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ) ); d->subtasks.remove( task ); if ( d->subtasks.isEmpty() && actionIfLast == IfLastEmitResult ) emitResult( task->succeeded() ? ResultSucceeded : ResultFailed, task->errorString() ); } -void Task::emitResult( Result res, const QString &errorMessage ) +void Task::emitResult( Result res, const TQString &errorMessage ) { d->result = res; d->errorMessage = errorMessage; diff --git a/kopete/libkopete/kopetetask.h b/kopete/libkopete/kopetetask.h index 115e1ebe..5457e1ba 100644 --- a/kopete/libkopete/kopetetask.h +++ b/kopete/libkopete/kopetetask.h @@ -17,7 +17,7 @@ #ifndef KOPETETASK_H #define KOPETETASK_H -#include +#include #include namespace Kopete @@ -29,8 +29,8 @@ namespace Kopete * * \code * Kopete::Task *task = someobject->someoperation( some parameters ); - * connect( task, SIGNAL( result( Kopete::Task * ) ), - * this, SLOT( slotResult( Kopete::Task * ) ) ); + * connect( task, TQT_SIGNAL( result( Kopete::Task * ) ), + * this, TQT_SLOT( slotResult( Kopete::Task * ) ) ); * \endcode * (other connects, specific to the job) * @@ -73,7 +73,7 @@ public: * telling the user that the app is broken, so check with * succeeded() whether there is an error. */ - const QString &errorString() const; + const TQString &errorString() const; /** Flags for the abort() function */ enum AbortFlags { AbortNormal = 0, AbortEmitResult = 1 }; @@ -103,7 +103,7 @@ signals: * @param task the task that emitted this signal * @param message the info message */ - void statusMessage( Kopete::Task *task, const QString &message ); + void statusMessage( Kopete::Task *task, const TQString &message ); protected: /** @@ -135,7 +135,7 @@ protected: * Sets the stored result and error message to @p result and @p errorMessage. * You should call this instead of emitting the result() signal yourself. */ - void emitResult( Result result = ResultSucceeded, const QString &errorMessage = QString::null ); + void emitResult( Result result = ResultSucceeded, const TQString &errorMessage = TQString::null ); protected slots: /** diff --git a/kopete/libkopete/kopetetransfermanager.cpp b/kopete/libkopete/kopetetransfermanager.cpp index 1131cd90..67f2d04f 100644 --- a/kopete/libkopete/kopetetransfermanager.cpp +++ b/kopete/libkopete/kopetetransfermanager.cpp @@ -34,7 +34,7 @@ * Kopete::FileTransferInfo * ***************************/ -Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString &recipient, KopeteTransferDirection di, const unsigned int id, QString internalId) +Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient, KopeteTransferDirection di, const unsigned int id, TQString internalId) { mContact = contact; mFile = file; @@ -50,7 +50,7 @@ Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const QSt ***************************/ -Kopete::Transfer::Transfer( const Kopete::FileTransferInfo &kfti, const QString &localFile, bool showProgressInfo) +Kopete::Transfer::Transfer( const Kopete::FileTransferInfo &kfti, const TQString &localFile, bool showProgressInfo) : KIO::Job(showProgressInfo), mInfo(kfti) { KURL targ; targ.setPath( localFile ); @@ -72,7 +72,7 @@ void Kopete::Transfer::init( const KURL &target, bool showProgressInfo ) if( showProgressInfo ) Observer::self()->slotCopying( this, sourceURL(), destinationURL() ); - connect( this, SIGNAL( result( KIO::Job* ) ), SLOT( slotResultEmitted() ) ); + connect( this, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( slotResultEmitted() ) ); setAutoErrorHandlingEnabled( true, 0 ); } @@ -81,14 +81,14 @@ Kopete::Transfer::~Transfer() { } -KURL Kopete::Transfer::displayURL( const Kopete::Contact *contact, const QString &file ) +KURL Kopete::Transfer::displayURL( const Kopete::Contact *contact, const TQString &file ) { KURL url; - url.setProtocol( QString::fromLatin1("kopete") ); + url.setProtocol( TQString::fromLatin1("kopete") ); - QString host; + TQString host; if( !contact ) - host = QString::fromLatin1("unknown origin"); + host = TQString::fromLatin1("unknown origin"); else if( contact->metaContact() ) host = contact->metaContact()->displayName(); else @@ -129,7 +129,7 @@ void Kopete::Transfer::slotComplete() emitResult(); } -void Kopete::Transfer::slotError( int error, const QString &errorText ) +void Kopete::Transfer::slotError( int error, const TQString &errorText ) { m_error = error; m_errorText = errorText; @@ -158,44 +158,44 @@ Kopete::TransferManager* Kopete::TransferManager::transferManager() return s_transferManager; } -Kopete::TransferManager::TransferManager( QObject *parent ) : QObject( parent ) +Kopete::TransferManager::TransferManager( TQObject *parent ) : TQObject( parent ) { nextID = 0; } -Kopete::Transfer* Kopete::TransferManager::addTransfer( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString &recipient , Kopete::FileTransferInfo::KopeteTransferDirection di) +Kopete::Transfer* Kopete::TransferManager::addTransfer( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient , Kopete::FileTransferInfo::KopeteTransferDirection di) { // if (nextID != 0) nextID++; Kopete::FileTransferInfo info(contact, file, size, recipient,di, nextID); Kopete::Transfer *trans = new Kopete::Transfer(info, contact); - connect(trans, SIGNAL(result(KIO::Job *)), this, SLOT(slotComplete(KIO::Job *))); + connect(trans, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotComplete(KIO::Job *))); mTransfersMap.insert(nextID, trans); return trans; } -void Kopete::TransferManager::slotAccepted(const Kopete::FileTransferInfo& info, const QString& filename) +void Kopete::TransferManager::slotAccepted(const Kopete::FileTransferInfo& info, const TQString& filename) { Kopete::Transfer *trans = new Kopete::Transfer(info, filename); - connect(trans, SIGNAL(result(KIO::Job *)), this, SLOT(slotComplete(KIO::Job *))); + connect(trans, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotComplete(KIO::Job *))); mTransfersMap.insert(info.transferId(), trans); emit accepted(trans,filename); } -int Kopete::TransferManager::askIncomingTransfer( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString& description, QString internalId) +int Kopete::TransferManager::askIncomingTransfer( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString& description, TQString internalId) { // if (nextID != 0) nextID++; - QString dn= contact ? (contact->metaContact() ? contact->metaContact()->displayName() : contact->contactId()) : i18n(""); + TQString dn= contact ? (contact->metaContact() ? contact->metaContact()->displayName() : contact->contactId()) : i18n(""); Kopete::FileTransferInfo info(contact, file, size, dn, Kopete::FileTransferInfo::Incoming , nextID , internalId); //FIXME!!! this will not be deleted if it's still open when kopete exits KopeteFileConfirmDialog *diag= new KopeteFileConfirmDialog(info, description , 0 ) ; - connect( diag, SIGNAL( accepted(const Kopete::FileTransferInfo&, const QString&)) , this, SLOT( slotAccepted(const Kopete::FileTransferInfo&, const QString&) ) ); - connect( diag, SIGNAL( refused(const Kopete::FileTransferInfo&)) , this, SIGNAL( refused(const Kopete::FileTransferInfo&) ) ); + connect( diag, TQT_SIGNAL( accepted(const Kopete::FileTransferInfo&, const TQString&)) , this, TQT_SLOT( slotAccepted(const Kopete::FileTransferInfo&, const TQString&) ) ); + connect( diag, TQT_SIGNAL( refused(const Kopete::FileTransferInfo&)) , this, TQT_SIGNAL( refused(const Kopete::FileTransferInfo&) ) ); diag->show(); return nextID; } @@ -214,7 +214,7 @@ void Kopete::TransferManager::slotComplete(KIO::Job *job) emit done(transfer); - for( QMap::Iterator it = mTransfersMap.begin(); + for( TQMap::Iterator it = mTransfersMap.begin(); it != mTransfersMap.end(); ++it ) { if( it.data() == transfer ) @@ -225,16 +225,16 @@ void Kopete::TransferManager::slotComplete(KIO::Job *job) } } -void Kopete::TransferManager::sendFile( const KURL &file, const QString &fname, unsigned long sz, - bool mustBeLocal, QObject *sendTo, const char *slot ) +void Kopete::TransferManager::sendFile( const KURL &file, const TQString &fname, unsigned long sz, + bool mustBeLocal, TQObject *sendTo, const char *slot ) { KURL url(file); - QString filename; + TQString filename; unsigned int size = 0; //If the file location is null, then get it from a file open dialog if( !url.isValid() ) - url = KFileDialog::getOpenURL( QString::null, QString::fromLatin1("*"), 0l, i18n( "Kopete File Transfer" )); + url = KFileDialog::getOpenURL( TQString::null, TQString::fromLatin1("*"), 0l, i18n( "Kopete File Transfer" )); else { filename = fname; @@ -260,9 +260,9 @@ void Kopete::TransferManager::sendFile( const KURL &file, const QString &fname, } else { - connect( this, SIGNAL(sendFile(const KURL&, const QString&, unsigned int)), sendTo, slot ); + connect( this, TQT_SIGNAL(sendFile(const KURL&, const TQString&, unsigned int)), sendTo, slot ); emit sendFile( url, filename, size ); - disconnect( this, SIGNAL(sendFile(const KURL&, const QString&, unsigned int)), sendTo, slot ); + disconnect( this, TQT_SIGNAL(sendFile(const KURL&, const TQString&, unsigned int)), sendTo, slot ); } } } diff --git a/kopete/libkopete/kopetetransfermanager.h b/kopete/libkopete/kopetetransfermanager.h index f4e7416f..53b2711f 100644 --- a/kopete/libkopete/kopetetransfermanager.h +++ b/kopete/libkopete/kopetetransfermanager.h @@ -19,9 +19,9 @@ #ifndef KOPETEFILETRANSFER_H #define KOPETEFILETRANSFER_H -#include -#include -#include +#include +#include +#include #include "kopete_export.h" #include @@ -40,23 +40,23 @@ class KOPETE_EXPORT FileTransferInfo public: enum KopeteTransferDirection { Incoming, Outgoing }; - FileTransferInfo( Contact *, const QString&, const unsigned long size, const QString &, KopeteTransferDirection di, const unsigned int id, QString internalId=QString::null); + FileTransferInfo( Contact *, const TQString&, const unsigned long size, const TQString &, KopeteTransferDirection di, const unsigned int id, TQString internalId=TQString::null); ~FileTransferInfo() {} unsigned int transferId() const { return mId; } const Contact* contact() const { return mContact; } - QString file() const { return mFile; } - QString recipient() const { return mRecipient; } + TQString file() const { return mFile; } + TQString recipient() const { return mRecipient; } unsigned long size() const { return mSize; } - QString internalId() const { return m_intId; } + TQString internalId() const { return m_intId; } KopeteTransferDirection direction() const { return mDirection; } private: unsigned long mSize; - QString mRecipient; + TQString mRecipient; unsigned int mId; Contact *mContact; - QString mFile; - QString m_intId; + TQString mFile; + TQString m_intId; KopeteTransferDirection mDirection; }; @@ -77,8 +77,8 @@ public: /** * @brief Adds a file transfer to the Kopete::TransferManager */ - Transfer *addTransfer( Contact *contact, const QString& file, const unsigned long size, const QString &recipient , FileTransferInfo::KopeteTransferDirection di); - int askIncomingTransfer( Contact *contact, const QString& file, const unsigned long size, const QString& description=QString::null, QString internalId=QString::null); + Transfer *addTransfer( Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient , FileTransferInfo::KopeteTransferDirection di); + int askIncomingTransfer( Contact *contact, const TQString& file, const unsigned long size, const TQString& description=TQString::null, TQString internalId=TQString::null); void removeTransfer( unsigned int id ); /** @@ -96,8 +96,8 @@ public: * @param sendTo The object to send the signal to * @param slot The slot to send the signal to. Signature: sendFile(const KURL &file) */ - void sendFile( const KURL &file, const QString &localFile, unsigned long fileSize, - bool mustBeLocal, QObject *sendTo, const char *slot ); + void sendFile( const KURL &file, const TQString &localFile, unsigned long fileSize, + bool mustBeLocal, TQObject *sendTo, const char *slot ); signals: /** @brief Signals the transfer is done. */ @@ -107,24 +107,24 @@ signals: void canceled( Kopete::Transfer* ); /** @brief Signals the transfer has been accepted */ - void accepted(Kopete::Transfer*, const QString &fileName); + void accepted(Kopete::Transfer*, const TQString &fileName); /** @brief Signals the transfer has been rejected */ void refused(const Kopete::FileTransferInfo& ); /** @brief Send a file */ - void sendFile(const KURL &file, const QString &localFile, unsigned int fileSize); + void sendFile(const KURL &file, const TQString &localFile, unsigned int fileSize); private slots: - void slotAccepted(const Kopete::FileTransferInfo&, const QString&); + void slotAccepted(const Kopete::FileTransferInfo&, const TQString&); void slotComplete(KIO::Job*); private: - TransferManager( QObject *parent ); + TransferManager( TQObject *parent ); static TransferManager *s_transferManager; int nextID; - QMap mTransfersMap; + TQMap mTransfersMap; }; /** @@ -139,7 +139,7 @@ public: /** * Constructor */ - Transfer( const FileTransferInfo &, const QString &localFile, bool showProgressInfo = true); + Transfer( const FileTransferInfo &, const TQString &localFile, bool showProgressInfo = true); /** * Constructor @@ -185,7 +185,7 @@ public slots: * @param error A member of the KIO::Error enumeration indicating what error occurred. * @param errorText A string to aid understanding of the error, often the offending URL. */ - void slotError( int error, const QString &errorText ); + void slotError( int error, const TQString &errorText ); signals: /** @@ -196,7 +196,7 @@ signals: private: void init( const KURL &, bool ); - static KURL displayURL( const Contact *contact, const QString &file ); + static KURL displayURL( const Contact *contact, const TQString &file ); FileTransferInfo mInfo; KURL mTarget; diff --git a/kopete/libkopete/kopeteuiglobal.cpp b/kopete/libkopete/kopeteuiglobal.cpp index 06c0dfa3..5921d467 100644 --- a/kopete/libkopete/kopeteuiglobal.cpp +++ b/kopete/libkopete/kopeteuiglobal.cpp @@ -17,7 +17,7 @@ #include "kopeteuiglobal.h" -#include +#include namespace Kopete @@ -26,16 +26,16 @@ namespace Kopete namespace { - QGuardedPtr g_mainWidget; + TQGuardedPtr g_mainWidget; int g_sysTrayWId; } -void UI::Global::setMainWidget( QWidget *widget ) +void UI::Global::setMainWidget( TQWidget *widget ) { g_mainWidget = widget; } -QWidget *UI::Global::mainWidget() +TQWidget *UI::Global::mainWidget() { return g_mainWidget; } diff --git a/kopete/libkopete/kopeteuiglobal.h b/kopete/libkopete/kopeteuiglobal.h index 4a79eb87..7db34189 100644 --- a/kopete/libkopete/kopeteuiglobal.h +++ b/kopete/libkopete/kopeteuiglobal.h @@ -18,7 +18,7 @@ #ifndef KOPETEUIGLOBAL_H #define KOPETEUIGLOBAL_H -#include +#include #include "kopete_export.h" @@ -36,12 +36,12 @@ namespace Global /** * Set the main widget to widget */ - KOPETE_EXPORT void setMainWidget( QWidget *widget ); + KOPETE_EXPORT void setMainWidget( TQWidget *widget ); /** * Returns the main widget - this is the widget that message boxes * and KNotify stuff should use as a parent. */ - KOPETE_EXPORT QWidget *mainWidget(); + KOPETE_EXPORT TQWidget *mainWidget(); /** * \brief Returns the WId of the system tray. diff --git a/kopete/libkopete/kopeteutils.cpp b/kopete/libkopete/kopeteutils.cpp index d7d8eb0f..6fe46529 100644 --- a/kopete/libkopete/kopeteutils.cpp +++ b/kopete/libkopete/kopeteutils.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -35,22 +35,22 @@ #include "kopeteutils.h" #include "kopeteuiglobal.h" -static const QString notifyConnectionLost_DefaultMessage = i18n("You have been disconnected."); -static const QString notifyConnectionLost_DefaultCaption = i18n("Connection Lost."); -static const QString notifyConnectionLost_DefaultExplanation = i18n("Kopete lost the channel used to talk to the instant messaging system.\nThis can be because either your internet access went down, the service is experiencing problems, or the service disconnected you because you tried to connect with the same account from another location. Try connecting again later."); +static const TQString notifyConnectionLost_DefaultMessage = i18n("You have been disconnected."); +static const TQString notifyConnectionLost_DefaultCaption = i18n("Connection Lost."); +static const TQString notifyConnectionLost_DefaultExplanation = i18n("Kopete lost the channel used to talk to the instant messaging system.\nThis can be because either your internet access went down, the service is experiencing problems, or the service disconnected you because you tried to connect with the same account from another location. Try connecting again later."); -static const QString notifyCannotConnect_DefaultMessage = i18n("Can't connect with the instant messaging server or peers."); -static const QString notifyCannotConnect_DefaultCaption = i18n("Can't connect."); -static const QString notifyCannotConnect_DefaultExplanation = i18n("This means Kopete can't reach the instant messaging server or peers.\nThis can be because either your internet access is down or the server is experiencing problems. Try connecting again later."); +static const TQString notifyCannotConnect_DefaultMessage = i18n("Can't connect with the instant messaging server or peers."); +static const TQString notifyCannotConnect_DefaultCaption = i18n("Can't connect."); +static const TQString notifyCannotConnect_DefaultExplanation = i18n("This means Kopete can't reach the instant messaging server or peers.\nThis can be because either your internet access is down or the server is experiencing problems. Try connecting again later."); namespace Kopete { namespace Utils { -void notify( QPixmap pic, const QString &eventid, const QString &caption, const QString &message, const QString explanation, const QString debugInfo) +void notify( TQPixmap pic, const TQString &eventid, const TQString &caption, const TQString &message, const TQString explanation, const TQString debugInfo) { - QString action; + TQString action; if ( !explanation.isEmpty() ) action = i18n( "More Information..." ); kdDebug( 14010 ) << k_funcinfo << endl; @@ -60,63 +60,63 @@ void notify( QPixmap pic, const QString &eventid, const QString &caption, const info.debugInfo = debugInfo; NotifyHelper::self()->registerNotification(n, info); - QObject::connect( n, SIGNAL(activated(unsigned int )) , NotifyHelper::self() , SLOT( slotEventActivated(unsigned int) ) ); - QObject::connect( n, SIGNAL(closed()) , NotifyHelper::self() , SLOT( slotEventClosed() ) ); + TQObject::connect( n, TQT_SIGNAL(activated(unsigned int )) , NotifyHelper::self() , TQT_SLOT( slotEventActivated(unsigned int) ) ); + TQObject::connect( n, TQT_SIGNAL(closed()) , NotifyHelper::self() , TQT_SLOT( slotEventClosed() ) ); } -void notifyConnectionLost( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyConnectionLost( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; - notify( account->accountIcon(32), QString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); } -bool isHostReachable(const QString &host) +bool isHostReachable(const TQString &host) { const int NetWorkStatusUnknown = 1; const int NetWorkStatusOnline = 8; - QCString replyType; - QByteArray params; - QByteArray reply; + TQCString replyType; + TQByteArray params; + TQByteArray reply; - QDataStream stream(params, IO_WriteOnly); + TQDataStream stream(params, IO_WriteOnly); stream << host; - if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(QString)", params, replyType, reply ) && (replyType == "int") ) + if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(TQString)", params, replyType, reply ) && (replyType == "int") ) { int result; - QDataStream stream2( reply, IO_ReadOnly ); + TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> result; return (result != NetWorkStatusUnknown) && (result != NetWorkStatusOnline); } return false; // On error, assume we are online } -void notifyCannotConnect( const Account *account, const QString &explanation, const QString &debugInfo) +void notifyCannotConnect( const Account *account, const TQString &explanation, const TQString &debugInfo) { if (!account) return; - notify( account->accountIcon(), QString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); + notify( account->accountIcon(), TQString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); } -void notifyConnectionError( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyConnectionError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; // TODO: Display a specific default connection error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), QString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); } -void notifyServerError( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyServerError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; // TODO: Display a specific default server error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), QString::fromLatin1("server_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("server_error"), caption, message, explanation, debugInfo); } } // end ns ErrorNotifier diff --git a/kopete/libkopete/kopeteutils.h b/kopete/libkopete/kopeteutils.h index 1cbcb4c3..c90ba054 100644 --- a/kopete/libkopete/kopeteutils.h +++ b/kopete/libkopete/kopeteutils.h @@ -18,9 +18,9 @@ #ifndef KOPETE_UTILS_H #define KOPETE_UTILS_H -#include "qobject.h" -#include "qstring.h" -#include "qpixmap.h" +#include "tqobject.h" +#include "tqstring.h" +#include "tqpixmap.h" #include "kopete_export.h" class KNotification; @@ -38,7 +38,7 @@ namespace Utils * * @param host The host to be cheked */ -bool isHostReachable( const QString &host ); +bool isHostReachable( const TQString &host ); /** * Notifies the user connection has been lost without coupling plugins with GUI code. @@ -53,10 +53,10 @@ bool isHostReachable( const QString &host ); * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyConnectionLost( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); /** @@ -70,8 +70,8 @@ void KOPETE_EXPORT notifyConnectionLost( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyCannotConnect( const Account *account, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null); + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null); /** * Notifies the user that an error on a connection occcured without coupling plugins with GUI code. @@ -86,10 +86,10 @@ void KOPETE_EXPORT notifyCannotConnect( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyConnectionError( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); /** * Notifies the user that an error on the server occcured without coupling plugins with GUI code. @@ -104,10 +104,10 @@ void KOPETE_EXPORT notifyConnectionError( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyServerError( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); } // end ns Utils } // end ns Kopete diff --git a/kopete/libkopete/kopetewalletmanager.cpp b/kopete/libkopete/kopetewalletmanager.cpp index e1d198fc..f17c73b8 100644 --- a/kopete/libkopete/kopetewalletmanager.cpp +++ b/kopete/libkopete/kopetewalletmanager.cpp @@ -22,13 +22,13 @@ #include #include -#include -#include -#include +#include +#include +#include static WId mainWindowID() { - if ( QWidget *w = Kopete::UI::Global::mainWidget() ) + if ( TQWidget *w = Kopete::UI::Global::mainWidget() ) return w->winId(); return 0; } @@ -72,13 +72,13 @@ Kopete::WalletManager *Kopete::WalletManager::self() return s_self; } -void Kopete::WalletManager::openWallet( QObject *object, const char *slot ) +void Kopete::WalletManager::openWallet( TQObject *object, const char *slot ) { if ( !d->signal ) d->signal = new KopeteWalletSignal; // allow connecting to protected slots by calling object->connect - connect( d->signal, SIGNAL( walletOpened( KWallet::Wallet* ) ), object, slot ); - //object->connect( d->signal, SIGNAL( walletOpened( KWallet::Wallet* ) ), slot ); + connect( d->signal, TQT_SIGNAL( walletOpened( KWallet::Wallet* ) ), object, slot ); + //object->connect( d->signal, TQT_SIGNAL( walletOpened( KWallet::Wallet* ) ), slot ); openWalletInner(); } @@ -92,7 +92,7 @@ void Kopete::WalletManager::openWalletInner() if ( d->wallet->isOpen() ) { kdDebug(14010) << k_funcinfo << " wallet already open" << endl; - QTimer::singleShot( 0, this, SLOT( slotGiveExistingWallet() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotGiveExistingWallet() ) ); } else { @@ -107,7 +107,7 @@ void Kopete::WalletManager::openWalletInner() d->wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), mainWindowID(), KWallet::Wallet::Asynchronous ); - connect( d->wallet, SIGNAL( walletOpened(bool) ), SLOT( slotWalletChangedStatus() ) ); + connect( d->wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( slotWalletChangedStatus() ) ); } void Kopete::WalletManager::slotWalletChangedStatus() @@ -116,13 +116,13 @@ void Kopete::WalletManager::slotWalletChangedStatus() if( d->wallet->isOpen() ) { - if ( !d->wallet->hasFolder( QString::fromLatin1( "Kopete" ) ) ) - d->wallet->createFolder( QString::fromLatin1( "Kopete" ) ); + if ( !d->wallet->hasFolder( TQString::fromLatin1( "Kopete" ) ) ) + d->wallet->createFolder( TQString::fromLatin1( "Kopete" ) ); - if ( d->wallet->setFolder( QString::fromLatin1( "Kopete" ) ) ) + if ( d->wallet->setFolder( TQString::fromLatin1( "Kopete" ) ) ) { // success! - QObject::connect( d->wallet, SIGNAL( walletClosed() ), this, SLOT( closeWallet() ) ); + TQObject::connect( d->wallet, TQT_SIGNAL( walletClosed() ), this, TQT_SLOT( closeWallet() ) ); } else { diff --git a/kopete/libkopete/kopetewalletmanager.h b/kopete/libkopete/kopetewalletmanager.h index fdd3a154..a9ed0971 100644 --- a/kopete/libkopete/kopetewalletmanager.h +++ b/kopete/libkopete/kopetewalletmanager.h @@ -17,7 +17,7 @@ #ifndef KOPETEWALLETMANAGER_H #define KOPETEWALLETMANAGER_H -#include +#include #include @@ -58,7 +58,7 @@ public: * For simplicity of client code, it is guaranteed that your slot * will not be called during a call to this function. */ - void openWallet( QObject *object, const char *slot ); + void openWallet( TQObject *object, const char *slot ); public slots: /** diff --git a/kopete/libkopete/managedconnectionaccount.cpp b/kopete/libkopete/managedconnectionaccount.cpp index 0f1625b2..cf14ed2f 100644 --- a/kopete/libkopete/managedconnectionaccount.cpp +++ b/kopete/libkopete/managedconnectionaccount.cpp @@ -24,17 +24,17 @@ namespace Kopete { -ManagedConnectionAccount::ManagedConnectionAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength, const char *name ) +ManagedConnectionAccount::ManagedConnectionAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength, const char *name ) : PasswordedAccount( parent, acctId, maxPasswordLength, name ), m_waitingForConnection( false ) { - QObject::connect( ConnectionManager::self(), SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus ) ), - SLOT(slotConnectionStatusChanged(const QString&, NetworkStatus::EnumStatus ) ) ); + TQObject::connect( ConnectionManager::self(), TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus ) ), + TQT_SLOT(slotConnectionStatusChanged(const TQString&, NetworkStatus::EnumStatus ) ) ); } -void ManagedConnectionAccount::connectWithPassword( const QString &password ) +void ManagedConnectionAccount::connectWithPassword( const TQString &password ) { m_password = password; - NetworkStatus::EnumStatus status = ConnectionManager::self()->status( QString::null ); + NetworkStatus::EnumStatus status = ConnectionManager::self()->status( TQString::null ); if ( status == NetworkStatus::NoNetworks ) performConnectWithPassword( password ); else @@ -42,7 +42,7 @@ void ManagedConnectionAccount::connectWithPassword( const QString &password ) m_waitingForConnection = true; // need to adapt libkopete so we know the hostname in this class and whether the connection was user initiated // for now, these are the default parameters to always bring up a connection to "the internet". - NetworkStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), QString::null, true ); + NetworkStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), TQString::null, true ); if ( response == NetworkStatus::Connected ) { m_waitingForConnection = false; @@ -53,7 +53,7 @@ void ManagedConnectionAccount::connectWithPassword( const QString &password ) } } -void ManagedConnectionAccount::slotConnectionStatusChanged( const QString & host, NetworkStatus::EnumStatus status ) +void ManagedConnectionAccount::slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ) { Q_UNUSED(host); // as above, we didn't register a hostname, so treat any connection as our own. diff --git a/kopete/libkopete/managedconnectionaccount.h b/kopete/libkopete/managedconnectionaccount.h index ad29feed..7d864dfc 100644 --- a/kopete/libkopete/managedconnectionaccount.h +++ b/kopete/libkopete/managedconnectionaccount.h @@ -44,21 +44,21 @@ class KOPETE_EXPORT ManagedConnectionAccount : public PasswordedAccount * @param maxPasswordLength The maximum length for passwords for this account, or 0 for no limit * @param name The name for this QObject */ - ManagedConnectionAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); + ManagedConnectionAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); public slots: /** * @brief Begin the connection process, by checking if the connection is available with the ConnectionManager. * This method is called by PasswordedAccount::connect() * @param password the password to connect with. */ - void connectWithPassword( const QString &password ); + void connectWithPassword( const TQString &password ); protected: /** * @brief Connect to the server, once the network is available. * This method is called by the ManagedConnectionAccount once the network is available. In this method you should set up your * network connection and connect to the server. */ - virtual void performConnectWithPassword( const QString & password ) = 0; + virtual void performConnectWithPassword( const TQString & password ) = 0; protected slots: /** * @brief Handle a change in the network connection @@ -68,9 +68,9 @@ class KOPETE_EXPORT ManagedConnectionAccount : public PasswordedAccount * @param host For future expansion. * @param status the new status of the network */ - virtual void slotConnectionStatusChanged( const QString & host, NetworkStatus::EnumStatus status ); + virtual void slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ); private: - QString m_password; + TQString m_password; bool m_waitingForConnection; }; diff --git a/kopete/libkopete/networkstatuscommon.cpp b/kopete/libkopete/networkstatuscommon.cpp index 216752bd..87c18a14 100644 --- a/kopete/libkopete/networkstatuscommon.cpp +++ b/kopete/libkopete/networkstatuscommon.cpp @@ -1,7 +1,7 @@ #include "networkstatuscommon.h" #include -QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ) +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ) { kdDebug() << k_funcinfo << "status is: " << (int)p.status << endl; s << (int)p.status; @@ -12,7 +12,7 @@ QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ) return s; } -QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p ) +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ) { int status, onDemandPolicy, internet; s >> status; diff --git a/kopete/libkopete/networkstatuscommon.h b/kopete/libkopete/networkstatuscommon.h index e6906445..a243be43 100644 --- a/kopete/libkopete/networkstatuscommon.h +++ b/kopete/libkopete/networkstatuscommon.h @@ -1,7 +1,7 @@ #ifndef NETWORKSTATUS_COMMON_H #define NETWORKSTATUS_COMMON_H -#include +#include namespace NetworkStatus { @@ -10,24 +10,24 @@ namespace NetworkStatus enum EnumOnDemandPolicy { All, User, None, Permanent }; struct Properties { - QString name; + TQString name; // status of the network EnumStatus status; // policy for on-demand usage as defined by the service EnumOnDemandPolicy onDemandPolicy; // identifier for the service - QCString service; + TQCString service; // indicate that the connection is to 'the internet' - similar to default gateway in routing bool internet; // list of netmasks that the network connects to - overridden by above internet - QStringList netmasks; + TQStringList netmasks; // for future expansion consider // EnumChargingModel - FlatRate, TimeCharge, VolumeCharged // EnumLinkStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT }; } -QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p ); -QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ); +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ); +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ); #endif diff --git a/kopete/libkopete/private/kopetecommand.cpp b/kopete/libkopete/private/kopetecommand.cpp index 52588f2e..1f8969f6 100644 --- a/kopete/libkopete/private/kopetecommand.cpp +++ b/kopete/libkopete/private/kopetecommand.cpp @@ -13,7 +13,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -25,17 +25,17 @@ #include "kopetecommand.h" #include "kopeteuiglobal.h" -Kopete::Command::Command( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help, Kopete::CommandHandler::CommandType type, const QString &formatString, - uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +Kopete::Command::Command( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help, Kopete::CommandHandler::CommandType type, const TQString &formatString, + uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) : KAction( command[0].upper() + command.right( command.length() - 1).lower(), pix, cut, parent, - ( command.lower() + QString::fromLatin1("_command") ).latin1() ) + ( command.lower() + TQString::fromLatin1("_command") ).latin1() ) { init( command, handlerSlot, help, type, formatString, minArgs, maxArgs ); } -void Kopete::Command::init( const QString &command, const char* slot, const QString &help, - Kopete::CommandHandler::CommandType type, const QString &formatString, uint minArgs, int maxArgs ) +void Kopete::Command::init( const TQString &command, const char* slot, const TQString &help, + Kopete::CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs ) { m_command = command; m_help = help; @@ -47,18 +47,18 @@ void Kopete::Command::init( const QString &command, const char* slot, const QStr if( m_type == Kopete::CommandHandler::Normal ) { - QObject::connect( this, SIGNAL( handleCommand( const QString &, Kopete::ChatSession *) ), + TQObject::connect( this, TQT_SIGNAL( handleCommand( const TQString &, Kopete::ChatSession *) ), parent(), slot ); } - QObject::connect( this, SIGNAL( activated() ), this, SLOT( slotAction() ) ); + TQObject::connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotAction() ) ); } void Kopete::Command::slotAction() { Kopete::ChatSession *manager = Kopete::ChatSessionManager::self()->activeView()->msgManager(); - QString args; + TQString args; if( m_minArgs > 0 ) { args = KInputDialog::getText( i18n("Enter Arguments"), i18n("Enter the arguments to %1:").arg(m_command) ); @@ -69,9 +69,9 @@ void Kopete::Command::slotAction() processCommand( args, manager, true ); } -void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession *manager, bool gui ) +void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession *manager, bool gui ) { - QStringList mArgs = Kopete::CommandHandler::parseArguments( args ); + TQStringList mArgs = Kopete::CommandHandler::parseArguments( args ); if( m_processing ) { printError( i18n("Alias \"%1\" expands to itself.").arg( text() ), manager, gui ); @@ -98,12 +98,12 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * if( m_type == Kopete::CommandHandler::UserAlias || m_type == Kopete::CommandHandler::SystemAlias ) { - QString formatString = m_formatString; + TQString formatString = m_formatString; // Translate %s to the whole string and %n to current nickname - formatString.replace( QString::fromLatin1("%n"), manager->myself()->nickName() ); - formatString.replace( QString::fromLatin1("%s"), args ); + formatString.replace( TQString::fromLatin1("%n"), manager->myself()->nickName() ); + formatString.replace( TQString::fromLatin1("%s"), args ); // Translate %1..%N to word1..wordN @@ -115,7 +115,7 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * kdDebug(14010) << "New Command after processing alias: " << formatString << endl; - Kopete::CommandHandler::commandHandler()->processMessage( QString::fromLatin1("/") + formatString, manager ); + Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/") + formatString, manager ); } else { @@ -125,7 +125,7 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * } } -void Kopete::Command::printError( const QString &error, Kopete::ChatSession *manager, bool gui ) const +void Kopete::Command::printError( const TQString &error, Kopete::ChatSession *manager, bool gui ) const { if( gui ) { diff --git a/kopete/libkopete/private/kopetecommand.h b/kopete/libkopete/private/kopetecommand.h index 298872db..6a686f1e 100644 --- a/kopete/libkopete/private/kopetecommand.h +++ b/kopete/libkopete/private/kopetecommand.h @@ -18,7 +18,7 @@ #ifndef __KOPETECOMMAND_H__ #define __KOPETECOMMAND_H__ -#include +#include #include #include "kopetecommandhandler.h" @@ -38,7 +38,7 @@ class Command : public KAction * @param parent The plugin who owns this command * @param command The command we want to handle, not including the '/' * @param handlerSlot The slot used to handle the command. This slot must - * accept two parameters, a QString of arguments, and a Kopete::ChatSession + * accept two parameters, a TQString of arguments, and a Kopete::ChatSession * pointer to the Manager under which the command was sent. * @param help An optional help string to be shown when the user uses * /help command @@ -49,25 +49,25 @@ class Command : public KAction * @param cut The shortcut for the command * @param pix The icon to use for the command */ - Command( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help = QString::null, CommandHandler::CommandType type = CommandHandler::Normal, const QString &formatString = QString::null, + Command( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help = TQString::null, CommandHandler::CommandType type = CommandHandler::Normal, const TQString &formatString = TQString::null, uint minArgs = 0, int maxArgs = -1, const KShortcut &cut = 0, - const QString &pix = QString::null ); + const TQString &pix = TQString::null ); /** * Process this command */ - void processCommand( const QString &args, ChatSession *manager, bool gui = false ); + void processCommand( const TQString &args, ChatSession *manager, bool gui = false ); /** * Returns the command this object handles */ - const QString &command() const { return m_command; }; + const TQString &command() const { return m_command; }; /** * Returns the help string for this command */ - const QString &help() const { return m_help; }; + const TQString &help() const { return m_help; }; /** * Returns the type of the command @@ -80,7 +80,7 @@ class Command : public KAction * has been handled, all processing on it stops by the command handler * (a command cannot be handled twice) */ - void handleCommand( const QString &args, Kopete::ChatSession *manager ); + void handleCommand( const TQString &args, Kopete::ChatSession *manager ); private slots: /** @@ -89,15 +89,15 @@ class Command : public KAction void slotAction(); private: - void init( const QString &command, const char* slot, const QString &help, - CommandHandler::CommandType type, const QString &formatString, + void init( const TQString &command, const char* slot, const TQString &help, + CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs ); - void printError( const QString &error, ChatSession *manager, bool gui = false ) const; + void printError( const TQString &error, ChatSession *manager, bool gui = false ) const; - QString m_command; - QString m_help; - QString m_formatString; + TQString m_command; + TQString m_help; + TQString m_formatString; uint m_minArgs; int m_maxArgs; bool m_processing; diff --git a/kopete/libkopete/private/kopeteemoticons.cpp b/kopete/libkopete/private/kopeteemoticons.cpp index 0b234deb..a2d33341 100644 --- a/kopete/libkopete/private/kopeteemoticons.cpp +++ b/kopete/libkopete/private/kopeteemoticons.cpp @@ -21,11 +21,11 @@ #include "kopeteprefs.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -50,10 +50,10 @@ struct Emoticons::Emoticon Emoticon(){} /* sort by longest to shortest matchText */ bool operator< (const Emoticon &e){ return matchText.length() > e.matchText.length(); } - QString matchText; - QString matchTextEscaped; + TQString matchText; + TQString matchTextEscaped; QString picPath; - QString picHTMLCode; + TQString picHTMLCode; }; /* This is the object we will store each emoticon match in */ @@ -67,13 +67,13 @@ struct Emoticons::EmoticonNode { class Emoticons::Private { public: - QMap > emoticonMap; - QMap emoticonAndPicList; + TQMap > emoticonMap; + TQMap emoticonAndPicList; /** * The current icon theme from KopetePrefs */ - QString theme; + TQString theme; }; @@ -89,19 +89,19 @@ Emoticons *Emoticons::self() } -QString Emoticons::parseEmoticons(const QString& message, ParseMode mode ) //static +TQString Emoticons::parseEmoticons(const TQString& message, ParseMode mode ) //static { return self()->parse( message, mode ); } -QValueList Emoticons::tokenizeEmoticons( const QString& message, ParseMode mode ) // static +TQValueList Emoticons::tokenizeEmoticons( const TQString& message, ParseMode mode ) // static { return self()->tokenize( message, mode ); } -QValueList Emoticons::tokenize( const QString& message, uint mode ) +TQValueList Emoticons::tokenize( const TQString& message, uint mode ) { - QValueList result; + TQValueList result; if ( !KopetePrefs::prefs()->useEmoticons() ) { result.append( Token( Text, message ) ); @@ -115,23 +115,23 @@ QValueList Emoticons::tokenize( const QString& message, uint m } /* previous char, in the firs iteration assume that it is space since we want - * to let emoticons at the beginning, the very first previous QChar must be a space. */ - QChar p = ' '; - QChar c; /* current char */ - QChar n; /* next character after a match candidate, if strict this should be QChar::null or space */ + * to let emoticons at the beginning, the very first previous TQChar must be a space. */ + TQChar p = ' '; + TQChar c; /* current char */ + TQChar n; /* next character after a match candidate, if strict this should be TQChar::null or space */ /* This is the EmoticonNode container, it will represent each matched emoticon */ - QValueList foundEmoticons; - QValueList::const_iterator found; + TQValueList foundEmoticons; + TQValueList::const_iterator found; /* First-pass, store the matched emoticon locations in foundEmoticons */ - QValueList emoticonList; - QValueList::const_iterator it; + TQValueList emoticonList; + TQValueList::const_iterator it; size_t pos; bool inHTMLTag = false; bool inHTMLLink = false; bool inHTMLEntity = false; - QString needle; // search for this + TQString needle; // search for this for ( pos = 0; pos < message.length(); pos++ ) { c = message[ pos ]; @@ -271,14 +271,14 @@ QValueList Emoticons::tokenize( const QString& message, uint m return result; } -Emoticons::Emoticons( const QString &theme ) : QObject( kapp, "KopeteEmoticons" ) +Emoticons::Emoticons( const TQString &theme ) : TQObject( kapp, "KopeteEmoticons" ) { // kdDebug(14010) << "KopeteEmoticons::KopeteEmoticons" << endl; d=new Private; if(theme.isNull()) { initEmoticons(); - connect( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(initEmoticons()) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(initEmoticons()) ); } else { @@ -294,32 +294,32 @@ Emoticons::~Emoticons( ) -void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList &emoticons ) +void Emoticons::addIfPossible( const TQString& filenameNoExt, const TQStringList &emoticons ) { KStandardDirs *dir = KGlobal::dirs(); - QString pic; + TQString pic; //maybe an extension was given, so try to find the exact file - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt ); if( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".mng" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".mng" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".png" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".png" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".gif" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".gif" ) ); if( !pic.isNull() ) // only add if we found one file { - QPixmap p; - QString result; + TQPixmap p; + TQString result; d->emoticonAndPicList.insert( pic, emoticons ); - for ( QStringList::const_iterator it = emoticons.constBegin(), end = emoticons.constEnd(); + for ( TQStringList::const_iterator it = emoticons.constBegin(), end = emoticons.constEnd(); it != end; ++it ) { - QString matchEscaped=QStyleSheet::escape(*it); + TQString matchEscaped=TQStyleSheet::escape(*it); Emoticon e; e.picPath = pic; @@ -328,15 +328,15 @@ void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList & // Unless we do so, ChatMessagePart::slotScrollView does not work properly and causing // HTMLPart not to be scrolled to the very last message. p.load( e.picPath ); - result = QString::fromLatin1( "" ); + TQString::fromLatin1( "\" width=\"" ) + + TQString::number( p.width() ) + + TQString::fromLatin1( "\" height=\"" ) + + TQString::number( p.height() ) + + TQString::fromLatin1( "\" />" ); e.picHTMLCode = result; e.matchTextEscaped = matchEscaped; @@ -347,7 +347,7 @@ void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList & } } -void Emoticons::initEmoticons( const QString &theme ) +void Emoticons::initEmoticons( const TQString &theme ) { if(theme.isNull()) { @@ -365,43 +365,43 @@ void Emoticons::initEmoticons( const QString &theme ) d->emoticonAndPicList.clear(); d->emoticonMap.clear(); - QString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + QString::fromLatin1( "/emoticons.xml" ) ); + TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/emoticons.xml" ) ); if(!filename.isEmpty()) return initEmoticon_emoticonsxml( filename ); - filename= KGlobal::dirs()->findResource( "emoticons", d->theme + QString::fromLatin1( "/icondef.xml" ) ); + filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/icondef.xml" ) ); if(!filename.isEmpty()) return initEmoticon_JEP0038( filename ); kdWarning(14010) << k_funcinfo << "emotiucon XML theme description not found" < keys = d->emoticonMap.keys(); - for ( QValueList::const_iterator it = keys.begin(); it != keys.end(); ++it ) + TQValueList keys = d->emoticonMap.keys(); + for ( TQValueList::const_iterator it = keys.begin(); it != keys.end(); ++it ) { - QChar key = (*it); - QValueList keyValues = d->emoticonMap[key]; + TQChar key = (*it); + TQValueList keyValues = d->emoticonMap[key]; qHeapSort(keyValues.begin(), keyValues.end()); d->emoticonMap[key] = keyValues; } @@ -516,21 +516,21 @@ void Emoticons::sortEmoticons() -QMap Emoticons::emoticonAndPicList() +TQMap Emoticons::emoticonAndPicList() { return d->emoticonAndPicList; } -QString Emoticons::parse( const QString &message, ParseMode mode ) +TQString Emoticons::parse( const TQString &message, ParseMode mode ) { if ( !KopetePrefs::prefs()->useEmoticons() ) return message; - QValueList tokens = tokenize( message, mode ); - QValueList::const_iterator token; - QString result; - QPixmap p; + TQValueList tokens = tokenize( message, mode ); + TQValueList::const_iterator token; + TQString result; + TQPixmap p; for ( token = tokens.begin(); token != tokens.end(); ++token ) { switch ( (*token).type ) diff --git a/kopete/libkopete/private/kopeteemoticons.h b/kopete/libkopete/private/kopeteemoticons.h index 84fd305a..762a02a0 100644 --- a/kopete/libkopete/private/kopeteemoticons.h +++ b/kopete/libkopete/private/kopeteemoticons.h @@ -18,9 +18,9 @@ #ifndef kopeteemoticons_h__ #define kopeteemoticons_h__ -#include -#include -#include +#include +#include +#include #include "kopete_export.h" @@ -35,7 +35,7 @@ public: * chosen by the user. * Instead, use @ref Kopete::Emoticons::self() **/ - Emoticons( const QString &theme = QString::null ); + Emoticons( const TQString &theme = TQString::null ); ~Emoticons( ); @@ -63,10 +63,10 @@ public: * If nicks is provided, they will not be parsed if they * exist in message. */ - static QString parseEmoticons( const QString &message, ParseMode = SkipHTML ) ; + static TQString parseEmoticons( const TQString &message, ParseMode = SkipHTML ) ; - QString parse( const QString &message, ParseMode = SkipHTML ); + TQString parse( const TQString &message, ParseMode = SkipHTML ); /** * TokenType, a token might be an image ( emoticon ) or text. @@ -77,15 +77,15 @@ public: }; /** - * A token consists of a QString text which is either a regular text + * A token consists of a TQString text which is either a regular text * or a path to image depending on the type. * If type is Image the text refers to an image path. * If type is Text the text refers to a regular text. */ struct Token { Token() : type( Undefined ) {} - Token( TokenType t, const QString &m ) : type( t ), text(m) {} - Token( TokenType t, const QString &m, const QString &p, const QString &html ) + Token( TokenType t, const TQString &m ) : type( t ), text(m) {} + Token( TokenType t, const TQString &m, const TQString &p, const TQString &html ) : type( t ), text( m ), picPath( p ), picHTMLCode( html ) {} TokenType type; QString text; @@ -96,9 +96,9 @@ public: /** * Static function which will call tokenize - * @see tokenize( const QString& ) + * @see tokenize( const TQString& ) */ - static QValueList tokenizeEmoticons( const QString &message, ParseMode mode = DefaultParseMode ); + static TQValueList tokenizeEmoticons( const TQString &message, ParseMode mode = DefaultParseMode ); /** * Tokenizes an message. @@ -120,17 +120,17 @@ public: * Note: quotation marks are used to emphasize white spaces. * @param message is the message to tokenize * @param mode is a bitmask of ParseMode enum - * @return a QValueList which consiste of ordered tokens of the text. + * @return a TQValueList which consiste of ordered tokens of the text. * @author Engin AYDOGAN < engin@bzzzt.biz > * @since 23-03-05 */ - QValueList tokenize( const QString &message, uint mode = DefaultParseMode ); + TQValueList tokenize( const TQString &message, uint mode = DefaultParseMode ); /** * Return all emoticons and the corresponding icon. * (only one emoticon per image) */ - QMap emoticonAndPicList(); + TQMap emoticonAndPicList(); public slots: /** @@ -149,19 +149,19 @@ private: * add an emoticon to our mapping if * an animation/pixmap has been found for it **/ - void addIfPossible( const QString& filenameNoExt, const QStringList &emoticons ); + void addIfPossible( const TQString& filenameNoExt, const TQStringList &emoticons ); /** * uses the kopete's emoticons.xml for the theme * @see initEmoticons */ - void initEmoticon_emoticonsxml( const QString & filename); + void initEmoticon_emoticonsxml( const TQString & filename); /** * uses the JEP-0038 xml description for the theme * @see initEmoticons */ - void initEmoticon_JEP0038( const QString & filename); + void initEmoticon_JEP0038( const TQString & filename); /** * sorts emoticons for convenient parsing, which yields greedy matching on @@ -180,7 +180,7 @@ private slots: * Fills the map with paths and emoticons * This needs to be done on every emoticon-theme change **/ - void initEmoticons ( const QString &theme = QString::null ); + void initEmoticons ( const TQString &theme = TQString::null ); }; diff --git a/kopete/libkopete/private/kopeteutils_private.cpp b/kopete/libkopete/private/kopeteutils_private.cpp index 3746bcd3..933a5b11 100644 --- a/kopete/libkopete/private/kopeteutils_private.cpp +++ b/kopete/libkopete/private/kopeteutils_private.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include @@ -49,7 +49,7 @@ NotifyHelper* NotifyHelper::self() void NotifyHelper::slotEventActivated(unsigned int action) { - const KNotification *n = dynamic_cast(QObject::sender()); + const KNotification *n = dynamic_cast(TQObject::sender()); if (n) { ErrorNotificationInfo info = m_events[n]; @@ -64,7 +64,7 @@ void NotifyHelper::slotEventActivated(unsigned int action) void NotifyHelper::slotEventClosed() { - const KNotification *n = dynamic_cast(QObject::sender()); + const KNotification *n = dynamic_cast(TQObject::sender()); if (n) unregisterNotification(n); } diff --git a/kopete/libkopete/private/kopeteutils_private.h b/kopete/libkopete/private/kopeteutils_private.h index a684c965..8c780c2f 100644 --- a/kopete/libkopete/private/kopeteutils_private.h +++ b/kopete/libkopete/private/kopeteutils_private.h @@ -18,9 +18,9 @@ #ifndef KOPETE_UTILS_PRIVATE_H #define KOPETE_UTILS_PRIVATE_H -#include "qobject.h" -#include "qstring.h" -#include "qpixmap.h" +#include "tqobject.h" +#include "tqstring.h" +#include "tqpixmap.h" class KNotification; @@ -32,9 +32,9 @@ namespace Utils typedef struct { - QString caption; - QString explanation; - QString debugInfo; + TQString caption; + TQString explanation; + TQString debugInfo; } ErrorNotificationInfo; class NotifyHelper : public QObject @@ -50,7 +50,7 @@ public slots: private: NotifyHelper(); ~NotifyHelper(); - QMap m_events; + TQMap m_events; static NotifyHelper *s_self; }; diff --git a/kopete/libkopete/private/kopeteviewmanager.cpp b/kopete/libkopete/private/kopeteviewmanager.cpp index c6d295fd..2a6ccb84 100644 --- a/kopete/libkopete/private/kopeteviewmanager.cpp +++ b/kopete/libkopete/private/kopeteviewmanager.cpp @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -39,8 +39,8 @@ #include "kopeteviewmanager.h" -typedef QMap ManagerMap; -typedef QPtrList EventList; +typedef TQMap ManagerMap; +typedef TQPtrList EventList; struct KopeteViewManagerPrivate { @@ -73,13 +73,13 @@ KopeteViewManager::KopeteViewManager() d->activeView = 0L; d->foreignMessage=false; - connect( KopetePrefs::prefs(), SIGNAL( saved() ), this, SLOT( slotPrefsChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( saved() ), this, TQT_SLOT( slotPrefsChanged() ) ); - connect( Kopete::ChatSessionManager::self() , SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ), - this, SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ), + this, TQT_SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) ); - connect( Kopete::ChatSessionManager::self() , SIGNAL( readMessage() ), - this, SLOT ( nextEvent() ) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( readMessage() ), + this, TQT_SLOT ( nextEvent() ) ); slotPrefsChanged(); } @@ -106,7 +106,7 @@ void KopeteViewManager::slotPrefsChanged() d->balloonNotifyIgnoreClosesChatView = KopetePrefs::prefs()->balloonNotifyIgnoreClosesChatView(); } -KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString &requestedPlugin ) +KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const TQString &requestedPlugin ) { // kdDebug(14000) << k_funcinfo << endl; @@ -119,7 +119,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString Kopete::PluginManager *pluginManager = Kopete::PluginManager::self(); Kopete::ViewPlugin *viewPlugin = 0L; - QString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin; + TQString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin; if( !pluginName.isEmpty() ) { viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( pluginName ); @@ -132,7 +132,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString } if( !viewPlugin ) - viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( QString::fromLatin1("kopete_chatwindow") ); + viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::fromLatin1("kopete_chatwindow") ); if( viewPlugin ) { @@ -141,8 +141,8 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString d->foreignMessage = false; d->managerMap.insert( session, newView ); - connect( session, SIGNAL( closing(Kopete::ChatSession *) ), - this, SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) ); + connect( session, TQT_SIGNAL( closing(Kopete::ChatSession *) ), + this, TQT_SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) ); return newView; } @@ -169,8 +169,8 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi bool appendMessageEvent = d->useQueueOrStack; - QWidget *w; - if( d->queueUnreadMessages && ( w = dynamic_cast(view( manager )) ) ) + TQWidget *w; + if( d->queueUnreadMessages && ( w = dynamic_cast(view( manager )) ) ) { // append msg event to queue if chat window is active but not the chat view in it... appendMessageEvent = appendMessageEvent && !(w->isActiveWindow() && manager->view() == d->activeView); @@ -192,7 +192,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi { Kopete::MessageEvent *event=new Kopete::MessageEvent(msg,manager); d->eventList.append( event ); - connect(event, SIGNAL(done(Kopete::MessageEvent *)), this, SLOT(slotEventDeleted(Kopete::MessageEvent *))); + connect(event, TQT_SIGNAL(done(Kopete::MessageEvent *)), this, TQT_SLOT(slotEventDeleted(Kopete::MessageEvent *))); Kopete::ChatSessionManager::self()->postNewEvent(event); } } @@ -204,42 +204,42 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi if ( !outgoingMessage && ( !manager->account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) && msg.direction() != Kopete::Message::Internal ) { - QWidget *w=dynamic_cast(manager->view(false)); + TQWidget *w=dynamic_cast(manager->view(false)); KConfig *config = KGlobal::config(); config->setGroup("General"); if( (!manager->view(false) || !w || manager->view() != d->activeView || config->readBoolEntry("EventIfActive", true) || !w->isActiveWindow()) && msg.from()) { - QString msgFrom = QString::null; + TQString msgFrom = TQString::null; if( msg.from()->metaContact() ) msgFrom = msg.from()->metaContact()->displayName(); else msgFrom = msg.from()->contactId(); - QString msgText = msg.plainBody(); + TQString msgText = msg.plainBody(); if( msgText.length() > 90 ) - msgText = msgText.left(88) + QString::fromLatin1("..."); + msgText = msgText.left(88) + TQString::fromLatin1("..."); - QString event; - QString body =i18n( "Incoming message from %1
\"%2\"
" ); + TQString event; + TQString body =i18n( "Incoming message from %1
\"%2\"
" ); switch( msg.importance() ) { case Kopete::Message::Low: - event = QString::fromLatin1( "kopete_contact_lowpriority" ); + event = TQString::fromLatin1( "kopete_contact_lowpriority" ); break; case Kopete::Message::Highlight: - event = QString::fromLatin1( "kopete_contact_highlight" ); + event = TQString::fromLatin1( "kopete_contact_highlight" ); body = i18n( "A highlighted message arrived from %1
\"%2\"
" ); break; default: - event = QString::fromLatin1( "kopete_contact_incoming" ); + event = TQString::fromLatin1( "kopete_contact_incoming" ); } - KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( QStyleSheet::escape(msgFrom), QStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ + KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( TQStyleSheet::escape(msgFrom), TQStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ w , i18n("View") ); - connect(notify,SIGNAL(activated(unsigned int )), manager , SLOT(raiseView()) ); + connect(notify,TQT_SIGNAL(activated(unsigned int )), manager , TQT_SLOT(raiseView()) ); } } } @@ -256,7 +256,7 @@ void KopeteViewManager::readMessages( Kopete::ChatSession *manager, bool outgoin else if( !thisView->isVisible() ) thisView->makeVisible(); - QPtrListIterator it( d->eventList ); + TQPtrListIterator it( d->eventList ); Kopete::MessageEvent* event; while ( ( event = it.current() ) != 0 ) { @@ -285,7 +285,7 @@ void KopeteViewManager::slotEventDeleted( Kopete::MessageEvent *event ) else if ( event->state() == Kopete::MessageEvent::Ignored && d->balloonNotifyIgnoreClosesChatView ) { bool bAnotherWithThisManager = false; - for( QPtrListIterator it( d->eventList ); it; ++it ) + for( TQPtrListIterator it( d->eventList ); it; ++it ) { Kopete::MessageEvent *event = it.current(); if ( event->message().manager() == kmm ) @@ -314,7 +314,7 @@ void KopeteViewManager::slotViewActivated( KopeteView *view ) // kdDebug( 14000 ) << k_funcinfo << endl; d->activeView = view; - QPtrListIterator it ( d->eventList ); + TQPtrListIterator it ( d->eventList ); Kopete::MessageEvent* event; while ( ( event = it.current() ) != 0 ) { diff --git a/kopete/libkopete/private/kopeteviewmanager.h b/kopete/libkopete/private/kopeteviewmanager.h index b1706906..f6b29e98 100644 --- a/kopete/libkopete/private/kopeteviewmanager.h +++ b/kopete/libkopete/private/kopeteviewmanager.h @@ -54,7 +54,7 @@ class KOPETE_EXPORT KopeteViewManager : public QObject * @param session The Kopete::ChatSession we are viewing. * @param requestedPlugin Specifies the view plugin to use. */ - KopeteView *view( Kopete::ChatSession *session, const QString &requestedPlugin = QString::null ); + KopeteView *view( Kopete::ChatSession *session, const TQString &requestedPlugin = TQString::null ); /** * Provide access to the list of KopeteChatWindow the class maintains. diff --git a/kopete/libkopete/tests/kopetecontactlist_test.cpp b/kopete/libkopete/tests/kopetecontactlist_test.cpp index 001f3f0d..7b21d407 100644 --- a/kopete/libkopete/tests/kopetecontactlist_test.cpp +++ b/kopete/libkopete/tests/kopetecontactlist_test.cpp @@ -15,8 +15,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include #include "kopetecontactlist_test.h" @@ -34,13 +34,13 @@ void KopeteContactList_Test::allTests() void KopeteContactList_Test::testSomething() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); - QString filename = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( ! filename.isEmpty() ) { // previous test run, delete the previous contact list - bool removed = QFile::remove(filename); + bool removed = TQFile::remove(filename); // if we cant remove the file, abort test if (!removed) return; diff --git a/kopete/libkopete/tests/kopeteemoticontest.cpp b/kopete/libkopete/tests/kopeteemoticontest.cpp index e9a81c1d..a64aee99 100644 --- a/kopete/libkopete/tests/kopeteemoticontest.cpp +++ b/kopete/libkopete/tests/kopeteemoticontest.cpp @@ -18,9 +18,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -51,7 +51,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteEmoticonTest ); void KopeteEmoticonTest::allTests() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); //KApplication::disableAutoDcopRegistration(); //KApplication app; @@ -62,19 +62,19 @@ void KopeteEmoticonTest::allTests() void KopeteEmoticonTest::testEmoticonParser() { Kopete::Emoticons emo("Default"); - QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/emoticon-parser-testcases"); - QDir testCasesDir(basePath); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/emoticon-parser-testcases"); + TQDir testCasesDir(basePath); - QStringList inputFileNames = testCasesDir.entryList("*.input"); - for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) + TQStringList inputFileNames = testCasesDir.entryList("*.input"); + for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) { - QString fileName = *it; + TQString fileName = *it; kdDebug() << "testcase: " << fileName << endl; - QString outputFileName = fileName; + TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - QFile inputFile(basePath + QString::fromLatin1("/") + fileName); - QFile expectedFile(basePath + QString::fromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -84,29 +84,29 @@ void KopeteEmoticonTest::testEmoticonParser() } if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly )) { - QTextStream inputStream(&inputFile); - QTextStream expectedStream(&expectedFile); - QString inputData; - QString expectedData; + TQTextStream inputStream(&inputFile); + TQTextStream expectedStream(&expectedFile); + TQString inputData; + TQString expectedData; inputData = inputStream.read(); expectedData = expectedStream.read(); inputFile.close(); expectedFile.close(); - QString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", QString::null ); + TQString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", TQString::null ); Kopete::Emoticons::self(); - QString result = emo.parse( inputData ).replace( path, QString::null ); + TQString result = emo.parse( inputData ).replace( path, TQString::null ); // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + QString::fromLatin1(": ") + result; - expectedData = fileName + QString::fromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == QString::fromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetemessage_test.cpp b/kopete/libkopete/tests/kopetemessage_test.cpp index 1ca57123..3e4a85b3 100644 --- a/kopete/libkopete/tests/kopetemessage_test.cpp +++ b/kopete/libkopete/tests/kopetemessage_test.cpp @@ -19,8 +19,8 @@ #include -#include -#include +#include +#include #include #include #include @@ -50,16 +50,16 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteMessage_Test ); KopeteMessage_Test::KopeteMessage_Test() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); // create fake objects needed to build a reasonable testeable message - m_protocol = new Kopete::Test::Mock::Protocol( new KInstance(QCString("test-kopete-message")), 0L, "test-kopete-message"); + m_protocol = new Kopete::Test::Mock::Protocol( new KInstance(TQCString("test-kopete-message")), 0L, "test-kopete-message"); m_account = new Kopete::Test::Mock::Account(m_protocol, "testaccount"); m_metaContactMyself = new Kopete::Test::Mock::MetaContact(); m_metaContactOther = new Kopete::Test::Mock::MetaContact(); - m_contactFrom = new Kopete::Test::Mock::Contact(m_account, QString::fromLatin1("test-myself"), m_metaContactMyself, QString::null); - m_contactTo = new Kopete::Test::Mock::Contact(m_account, QString::fromLatin1("test-dest"), m_metaContactOther, QString::null); - m_message = new Kopete::Message( m_contactFrom, m_contactTo, QString::null, Kopete::Message::Outbound, Kopete::Message::PlainText); + m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-myself"), m_metaContactMyself, TQString::null); + m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-dest"), m_metaContactOther, TQString::null); + m_message = new Kopete::Message( m_contactFrom, m_contactTo, TQString::null, Kopete::Message::Outbound, Kopete::Message::PlainText); } void KopeteMessage_Test::allTests() @@ -120,7 +120,7 @@ void KopeteMessage_Test::testPrimitives() CHECK(Kopete::Message::RichText, msg.format()); } { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::RichText); msg.setBody(m, Kopete::Message::PlainText); @@ -142,64 +142,64 @@ void KopeteMessage_Test::testPrimitives() *********************************************/ { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::RichText); msg.setBody("NEW", Kopete::Message::PlainText); - CHECK(QString("NEW"), msg.plainBody()); + CHECK(TQString("NEW"), msg.plainBody()); msg.setBody("NEW_NEW", Kopete::Message::RichText); - CHECK(QString("NEW_NEW"), msg.plainBody()); + CHECK(TQString("NEW_NEW"), msg.plainBody()); } { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText); msg.setBody("NEW", Kopete::Message::PlainText); - CHECK(QString("NEW"), msg.plainBody()); + CHECK(TQString("NEW"), msg.plainBody()); msg.setBody("NEW_NEW", Kopete::Message::RichText); - CHECK(QString("NEW_NEW"), msg.plainBody()); + CHECK(TQString("NEW_NEW"), msg.plainBody()); } { - QString m = " HELLO WORLD "; + TQString m = " HELLO WORLD "; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText); CHECK(m, msg.plainBody()); msg.setBody(" SIMPLE", Kopete::Message::PlainText); - CHECK(msg.plainBody(), QString(" SIMPLE") ); - CHECK(msg.escapedBody(), QString("<simple> SIMPLE") ); + CHECK(msg.plainBody(), TQString(" SIMPLE") ); + CHECK(msg.escapedBody(), TQString("<simple> SIMPLE") ); msg.setBody("SIMPLE", Kopete::Message::RichText); - CHECK(msg.plainBody(), QString("SIMPLE") ); - CHECK(msg.escapedBody(), QString("SIMPLE") ); + CHECK(msg.plainBody(), TQString("SIMPLE") ); + CHECK(msg.escapedBody(), TQString("SIMPLE") ); - CHECK(Kopete::Message::unescape( QString( "SIMPLE" ) ), QString("SIMPLE") ); - CHECK(Kopete::Message::unescape( QString( "Foo " ) ), QString("Foo ") ); - CHECK(Kopete::Message::unescape( QString( "Foo " ) ), QString("Foo Bar") ); + CHECK(Kopete::Message::unescape( TQString( "SIMPLE" ) ), TQString("SIMPLE") ); + CHECK(Kopete::Message::unescape( TQString( "Foo " ) ), TQString("Foo ") ); + CHECK(Kopete::Message::unescape( TQString( "Foo " ) ), TQString("Foo Bar") ); msg.setBody(m, Kopete::Message::RichText); // FIXME: Should setBody() also strip extra white space? - //CHECK(msg.plainBody(), QString("HELLO WORLD")); - //CHECK(msg.escapedBody(), QString("HELLO WORLD")); + //CHECK(msg.plainBody(), TQString("HELLO WORLD")); + //CHECK(msg.escapedBody(), TQString("HELLO WORLD")); - CHECK(msg.escapedBody(), QString("   HELLO WORLD   ")); - CHECK(msg.plainBody(), QString(" HELLO WORLD ")); - CHECK(msg.plainBody().stripWhiteSpace(), QString("HELLO WORLD")); - CHECK(msg.escapedBody().stripWhiteSpace(), QString("  HELLO WORLD  ")); + CHECK(msg.escapedBody(), TQString("   HELLO WORLD   ")); + CHECK(msg.plainBody(), TQString(" HELLO WORLD ")); + CHECK(msg.plainBody().stripWhiteSpace(), TQString("HELLO WORLD")); + CHECK(msg.escapedBody().stripWhiteSpace(), TQString("  HELLO WORLD  ")); } { Kopete::Message msg( m_contactFrom, m_contactTo, "foo", Kopete::Message::Inbound, Kopete::Message::PlainText); msg.setBody("

foo", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo")); + CHECK(msg.escapedBody(), TQString("foo")); msg.setBody("

foo

", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo")); + CHECK(msg.escapedBody(), TQString("foo")); msg.setBody("\n

foo

\n
", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo
")); + CHECK(msg.escapedBody(), TQString("foo
")); } /********************************************** @@ -214,8 +214,8 @@ void KopeteMessage_Test::testPrimitives() CHECK(msg1.escapedBody(), msg2.escapedBody()); msg1.setBody("NEW", Kopete::Message::PlainText); - CHECK(msg1.plainBody(), QString("NEW")); - CHECK(msg2.plainBody(), QString("foo")); + CHECK(msg1.plainBody(), TQString("NEW")); + CHECK(msg2.plainBody(), TQString("foo")); } /********************************************** @@ -227,7 +227,7 @@ void KopeteMessage_Test::testPrimitives() { Kopete::Message msg2; - CHECK(msg2.plainBody(), QString::null); + CHECK(msg2.plainBody(), TQString::null); msg2 = msg1; @@ -235,13 +235,13 @@ void KopeteMessage_Test::testPrimitives() CHECK(msg1.escapedBody(), msg2.escapedBody()); msg1.setBody("NEW", Kopete::Message::PlainText); - CHECK(msg1.plainBody(), QString("NEW")); - CHECK(msg2.plainBody(), QString("foo")); + CHECK(msg1.plainBody(), TQString("NEW")); + CHECK(msg2.plainBody(), TQString("foo")); } - CHECK(msg1.plainBody(), QString("NEW")); + CHECK(msg1.plainBody(), TQString("NEW")); msg1 = msg1; - CHECK(msg1.plainBody(), QString("NEW")); + CHECK(msg1.plainBody(), TQString("NEW")); } } @@ -251,18 +251,18 @@ void KopeteMessage_Test::setup() void KopeteMessage_Test::testLinkParser() { - QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/link-parser-testcases"); - QDir testCasesDir(basePath); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/link-parser-testcases"); + TQDir testCasesDir(basePath); - QStringList inputFileNames = testCasesDir.entryList("*.input"); - for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) + TQStringList inputFileNames = testCasesDir.entryList("*.input"); + for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) { - QString fileName = *it; - QString outputFileName = fileName; + TQString fileName = *it; + TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - QFile inputFile(basePath + QString::fromLatin1("/") + fileName); - QFile expectedFile(basePath + QString::fromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -272,10 +272,10 @@ void KopeteMessage_Test::testLinkParser() } if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly )) { - QTextStream inputStream(&inputFile); - QTextStream expectedStream(&expectedFile); - QString inputData; - QString expectedData; + TQTextStream inputStream(&inputFile); + TQTextStream expectedStream(&expectedFile); + TQString inputData; + TQString expectedData; inputData = inputStream.read(); expectedData = expectedStream.read(); @@ -288,21 +288,21 @@ void KopeteMessage_Test::testLinkParser() // set message format for parsing according to textcase filename convention Kopete::Message::MessageFormat format; - if ( fileName.section("-", 1, 1) == QString::fromLatin1("plaintext") ) + if ( fileName.section("-", 1, 1) == TQString::fromLatin1("plaintext") ) format = Kopete::Message::PlainText; else format = Kopete::Message::RichText; - QString result = Kopete::Message::parseLinks( inputData, format ); + TQString result = Kopete::Message::parseLinks( inputData, format ); // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + QString::fromLatin1(": ") + result; - expectedData = fileName + QString::fromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == QString::fromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { //kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetepasswordtest_program.cpp b/kopete/libkopete/tests/kopetepasswordtest_program.cpp index a1f3a50e..51b8908a 100644 --- a/kopete/libkopete/tests/kopetepasswordtest_program.cpp +++ b/kopete/libkopete/tests/kopetepasswordtest_program.cpp @@ -17,9 +17,9 @@ #include "kopetepasswordtest_program.h" #include "kopetepassword.h" -#include -#include -#include +#include +#include +#include #include #include @@ -28,7 +28,7 @@ #include #include -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); static KCmdLineOptions opts[] = { @@ -42,18 +42,18 @@ static KCmdLineOptions opts[] = using namespace Kopete; -QString retrieve( Password &pwd, const QPixmap &image, const QString &prompt ) +TQString retrieve( Password &pwd, const TQPixmap &image, const TQString &prompt ) { PasswordRetriever r; - pwd.request( &r, SLOT( gotPassword( const QString & ) ), image, prompt ); - QTimer tmr; - r.connect( &tmr, SIGNAL( timeout() ), SLOT( timer() ) ); + pwd.request( &r, TQT_SLOT( gotPassword( const TQString & ) ), image, prompt ); + TQTimer tmr; + r.connect( &tmr, TQT_SIGNAL( timeout() ), TQT_SLOT( timer() ) ); tmr.start( 1000 ); qApp->exec(); return r.password; } -void PasswordRetriever::gotPassword( const QString &pass ) +void PasswordRetriever::gotPassword( const TQString &pass ) { password = pass; qApp->quit(); @@ -74,11 +74,11 @@ int main( int argc, char *argv[] ) KApplication app( "kopetepasswordtest" ); bool setPassword = args->isSet("set"); - QString newPwd = args->getOption("set"); - QString passwordId = args->getOption("id"); + TQString newPwd = args->getOption("set"); + TQString passwordId = args->getOption("id"); bool error = args->isSet("error"); - QString prompt = args->getOption("prompt"); - QPixmap image = QString(args->getOption("image")); + TQString prompt = args->getOption("prompt"); + TQPixmap image = TQString(args->getOption("image")); _out << (image.isNull() ? "image is null" : "image is valid") << endl; @@ -87,7 +87,7 @@ int main( int argc, char *argv[] ) _out << "Cached value is null: " << pwd.cachedValue().isNull() << endl; - QString pass = retrieve( pwd, image, prompt ); + TQString pass = retrieve( pwd, image, prompt ); if ( !pass.isNull() ) _out << "Read password: " << pass << endl; @@ -101,7 +101,7 @@ int main( int argc, char *argv[] ) if ( newPwd.isEmpty() ) { _out << "Clearing password" << endl; - newPwd = QString::null; + newPwd = TQString::null; } else { @@ -112,7 +112,7 @@ int main( int argc, char *argv[] ) // without this, setting passwords will fail since they're // set asynchronously. - QTimer::singleShot( 0, &app, SLOT( deref() ) ); + TQTimer::singleShot( 0, &app, TQT_SLOT( deref() ) ); app.exec(); if ( setPassword ) diff --git a/kopete/libkopete/tests/kopetepasswordtest_program.h b/kopete/libkopete/tests/kopetepasswordtest_program.h index 507da2a1..47c17172 100644 --- a/kopete/libkopete/tests/kopetepasswordtest_program.h +++ b/kopete/libkopete/tests/kopetepasswordtest_program.h @@ -1,16 +1,16 @@ #ifndef KOPETEPASSWORDTEST_H #define KOPETEPASSWORDTEST_H -#include +#include class PasswordRetriever : public QObject { Q_OBJECT public: - QString password; + TQString password; public slots: void timer(); - void gotPassword( const QString & ); + void gotPassword( const TQString & ); }; #endif diff --git a/kopete/libkopete/tests/kopetepropertiestest.cpp b/kopete/libkopete/tests/kopetepropertiestest.cpp index 1e60c77c..76b8ae79 100644 --- a/kopete/libkopete/tests/kopetepropertiestest.cpp +++ b/kopete/libkopete/tests/kopetepropertiestest.cpp @@ -20,8 +20,8 @@ #include "kopeteproperties.h" -#include -#include +#include +#include #include #include @@ -37,11 +37,11 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopetePropertiesTest ); using namespace Kopete::Properties; -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); class PropertyHost : public WithProperties {}; -class FooProperty : public SimpleDataProperty +class FooProperty : public SimpleDataProperty { public: const char *name() const { return "foo"; } @@ -51,8 +51,8 @@ void KopetePropertiesTest::allTests() { PropertyHost myPropertyHost; CHECK( myPropertyHost.property(fooProperty).isNull(), true); - myPropertyHost.setProperty( fooProperty, QString::fromLatin1("Foo!") ); - CHECK( myPropertyHost.property(fooProperty), QString::fromLatin1("Foo!") ); + myPropertyHost.setProperty( fooProperty, TQString::fromLatin1("Foo!") ); + CHECK( myPropertyHost.property(fooProperty), TQString::fromLatin1("Foo!") ); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.cpp b/kopete/libkopete/tests/kopetewallettest_program.cpp index 29de1edc..cfc8b6e9 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.cpp +++ b/kopete/libkopete/tests/kopetewallettest_program.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -29,7 +29,7 @@ #include "kopetewalletmanager.h" #include "kopetewallettest_program.h" -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); void closeWallet() { @@ -38,7 +38,7 @@ void closeWallet() void delay() { - QTimer::singleShot( 3000, qApp, SLOT( quit() ) ); + TQTimer::singleShot( 3000, qApp, TQT_SLOT( quit() ) ); qApp->exec(); } @@ -46,7 +46,7 @@ void openWalletAsync() { WalletReciever *r = new WalletReciever; _out << "[ASYNC] About to open wallet, receiver: " << r << endl; - Kopete::WalletManager::self()->openWallet( r, SLOT( gotWallet( KWallet::Wallet* ) ) ); + Kopete::WalletManager::self()->openWallet( r, TQT_SLOT( gotWallet( KWallet::Wallet* ) ) ); } void WalletReciever::gotWallet( KWallet::Wallet *w ) @@ -74,22 +74,22 @@ int main( int argc, char *argv[] ) for( int i = 0; i < args->count(); ++i ) { - QString arg = args->arg( i ); + TQString arg = args->arg( i ); _out << "Processing " << arg << endl; - if( arg == QString::fromLatin1( "open" ) ) openWalletAsync(); - if( arg == QString::fromLatin1( "close" ) ) closeWallet(); - if( arg == QString::fromLatin1( "delay" ) ) delay(); + if( arg == TQString::fromLatin1( "open" ) ) openWalletAsync(); + if( arg == TQString::fromLatin1( "close" ) ) closeWallet(); + if( arg == TQString::fromLatin1( "delay" ) ) delay(); _out << "Done." << endl; } WalletReciever *r = new WalletReciever; - QTimer timer; - r->connect( &timer, SIGNAL( timeout() ), SLOT( timer() ) ); + TQTimer timer; + r->connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( timer() ) ); timer.start( 1000 ); _out << "About to start 30 second event loop" << endl; - QTimer::singleShot( 30000, qApp, SLOT( quit() ) ); + TQTimer::singleShot( 30000, qApp, TQT_SLOT( quit() ) ); return qApp->exec(); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.h b/kopete/libkopete/tests/kopetewallettest_program.h index 58bdbb6e..b2e5d2fb 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.h +++ b/kopete/libkopete/tests/kopetewallettest_program.h @@ -1,7 +1,7 @@ #ifndef KOPETEWALLETTEST_H #define KOPETEWALLETTEST_H -#include +#include namespace KWallet { class Wallet; } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp index 8a8425bc..7d46fc34 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp @@ -26,7 +26,7 @@ namespace Test namespace Mock { -Account::Account(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name) +Account::Account(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { } @@ -36,7 +36,7 @@ Account::~Account() } -bool Account::createContact( const QString &contactId, Kopete::MetaContact *parentContact ) +bool Account::createContact( const TQString &contactId, Kopete::MetaContact *parentContact ) { return true; } @@ -51,7 +51,7 @@ void Account::disconnect() // do nothing } -void Account::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason) +void Account::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason) { // do nothing } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.h b/kopete/libkopete/tests/mock/kopeteaccount_mock.h index 55ba15cc..053977a5 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.h +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.h @@ -36,13 +36,13 @@ namespace Mock class Account : public Kopete::Account { public: - Account(Kopete::Protocol *parent, const QString &accountID, const char *name=0L); + Account(Kopete::Protocol *parent, const TQString &accountID, const char *name=0L); ~Account(); // pure virtual functions implementation - virtual bool createContact( const QString &contactId, MetaContact *parentContact ); + virtual bool createContact( const TQString &contactId, MetaContact *parentContact ); virtual void connect( const Kopete::OnlineStatus& initialStatus = OnlineStatus() ); virtual void disconnect(); - virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null ); + virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null ); }; } // end ns Kopete::Test::Mock diff --git a/kopete/libkopete/tests/mock/kopetecontact_mock.cpp b/kopete/libkopete/tests/mock/kopetecontact_mock.cpp index 19cfa7b0..ea90bee0 100644 --- a/kopete/libkopete/tests/mock/kopetecontact_mock.cpp +++ b/kopete/libkopete/tests/mock/kopetecontact_mock.cpp @@ -24,7 +24,7 @@ namespace Test namespace Mock { -Contact::Contact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent, const QString &icon) : Kopete::Contact( account, id, parent, icon) +Contact::Contact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent, const TQString &icon) : Kopete::Contact( account, id, parent, icon) { } diff --git a/kopete/libkopete/tests/mock/kopetecontact_mock.h b/kopete/libkopete/tests/mock/kopetecontact_mock.h index e445a571..a0b735d5 100644 --- a/kopete/libkopete/tests/mock/kopetecontact_mock.h +++ b/kopete/libkopete/tests/mock/kopetecontact_mock.h @@ -35,7 +35,7 @@ namespace Mock class Contact : public Kopete::Contact { public: - Contact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent, const QString &icon = QString::null ); + Contact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent, const TQString &icon = TQString::null ); ~Contact(); virtual Kopete::ChatSession* manager( CanCreateFlags canCreate = CannotCreate ); }; diff --git a/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp b/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp index d3bbd0e2..d9ae1d3a 100644 --- a/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp @@ -24,22 +24,22 @@ namespace Test namespace Mock { -Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) +Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) { } -Account* Protocol::createNewAccount( const QString &accountId ) +Account* Protocol::createNewAccount( const TQString &accountId ) { return 0L; } -AddContactPage* Protocol::createAddContactWidget( QWidget *parent, Kopete::Account *account ) +AddContactPage* Protocol::createAddContactWidget( TQWidget *parent, Kopete::Account *account ) { return 0L; } -KopeteEditAccountWidget* Protocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget* Protocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { return 0L; } diff --git a/kopete/libkopete/tests/mock/kopeteprotocol_mock.h b/kopete/libkopete/tests/mock/kopeteprotocol_mock.h index 189f7d79..97f0d7ad 100644 --- a/kopete/libkopete/tests/mock/kopeteprotocol_mock.h +++ b/kopete/libkopete/tests/mock/kopeteprotocol_mock.h @@ -37,11 +37,11 @@ namespace Mock class Protocol : public Kopete::Protocol { public: - Protocol( KInstance *instance, QObject *parent, const char *name ); + Protocol( KInstance *instance, TQObject *parent, const char *name ); // pure virtual functions implemented - virtual Account *createNewAccount( const QString &accountId ); - virtual AddContactPage *createAddContactWidget( QWidget *parent, Kopete::Account *account ); - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent ); + virtual Account *createNewAccount( const TQString &accountId ); + virtual AddContactPage *createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); }; } // end ns Kopete::Test::Mock diff --git a/kopete/libkopete/ui/accountselector.cpp b/kopete/libkopete/ui/accountselector.cpp index 2ea8e719..345e9ab4 100644 --- a/kopete/libkopete/ui/accountselector.cpp +++ b/kopete/libkopete/ui/accountselector.cpp @@ -19,9 +19,9 @@ #include "kopeteaccount.h" #include "kopeteaccountmanager.h" -#include -#include -#include +#include +#include +#include #include #include @@ -32,7 +32,7 @@ class AccountListViewItem : public KListViewItem Kopete::Account *mAccount; public: - AccountListViewItem(QListView *parent, Kopete::Account *acc) + AccountListViewItem(TQListView *parent, Kopete::Account *acc) : KListViewItem(parent) { if (acc==0) @@ -62,8 +62,8 @@ class AccountSelectorPrivate }; -AccountSelector::AccountSelector(QWidget *parent, const char *name) - : QWidget(parent, name) +AccountSelector::AccountSelector(TQWidget *parent, const char *name) + : TQWidget(parent, name) { //kdDebug(14010) << k_funcinfo << "for no special protocol" << endl; d = new AccountSelectorPrivate; @@ -72,8 +72,8 @@ AccountSelector::AccountSelector(QWidget *parent, const char *name) } -AccountSelector::AccountSelector(Kopete::Protocol *proto, QWidget *parent, - const char *name) : QWidget(parent, name) +AccountSelector::AccountSelector(Kopete::Protocol *proto, TQWidget *parent, + const char *name) : TQWidget(parent, name) { //kdDebug(14010) << k_funcinfo << " for protocol " << proto->pluginId() << endl; d = new AccountSelectorPrivate; @@ -92,17 +92,17 @@ AccountSelector::~AccountSelector() void AccountSelector::initUI() { kdDebug(14010) << k_funcinfo << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); d->lv = new KListView(this); d->lv->setFullWidth(true); - d->lv->addColumn(QString::fromLatin1("")); + d->lv->addColumn(TQString::fromLatin1("")); d->lv->header()->hide(); if(d->proto != 0) { kdDebug(14010) << k_funcinfo << "creating list for a certain protocol" << endl; - QDict accounts = Kopete::AccountManager::self()->accounts(d->proto); - QDictIterator it(accounts); + TQDict accounts = Kopete::AccountManager::self()->accounts(d->proto); + TQDictIterator it(accounts); for(; Kopete::Account *account = it.current(); ++it) { new AccountListViewItem(d->lv, account); @@ -111,7 +111,7 @@ void AccountSelector::initUI() else { kdDebug(14010) << k_funcinfo << "creating list of all accounts" << endl; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); Kopete::Account *account = 0; for(account = accounts.first(); account; account = accounts.next()) { @@ -119,8 +119,8 @@ void AccountSelector::initUI() } } - connect(d->lv, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotSelectionChanged(QListViewItem *))); + connect(d->lv, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotSelectionChanged(TQListViewItem *))); } @@ -129,7 +129,7 @@ void AccountSelector::setSelected(Kopete::Account *account) if (account==0) return; - QListViewItemIterator it(d->lv); + TQListViewItemIterator it(d->lv); while (it.current()) { if(static_cast(it.current())->account() == account) @@ -146,7 +146,7 @@ bool AccountSelector::isSelected(Kopete::Account *account) if (account==0) return false; - QListViewItemIterator it(d->lv); + TQListViewItemIterator it(d->lv); while (it.current()) { if(static_cast(it.current())->account() == account) @@ -166,7 +166,7 @@ Kopete::Account *AccountSelector::selectedItem() } -void AccountSelector::slotSelectionChanged(QListViewItem *item) +void AccountSelector::slotSelectionChanged(TQListViewItem *item) { //kdDebug(14010) << k_funcinfo << endl; if (item != 0) diff --git a/kopete/libkopete/ui/accountselector.h b/kopete/libkopete/ui/accountselector.h index 4f5d50ac..518ac67f 100644 --- a/kopete/libkopete/ui/accountselector.h +++ b/kopete/libkopete/ui/accountselector.h @@ -18,7 +18,7 @@ #ifndef ACCOUNTSELECTOR_H #define ACCOUNTSELECTOR_H -#include +#include #include #include "kopete_export.h" @@ -39,7 +39,7 @@ Q_OBJECT * The parameters @p parent and @p name are handled by * KListView. */ - AccountSelector(QWidget *parent=0, const char *name=0); + AccountSelector(TQWidget *parent=0, const char *name=0); /** * Constructor for a list of accounts for one protocol only @@ -48,7 +48,7 @@ Q_OBJECT * KListView. @p proto defines the protocol whose accounts are * shown in the list */ - AccountSelector(Kopete::Protocol *proto, QWidget *parent=0, const char *name=0); + AccountSelector(Kopete::Protocol *proto, TQWidget *parent=0, const char *name=0); /** * Destructor. @@ -79,7 +79,7 @@ Q_OBJECT void selectionChanged(Kopete::Account *acc); private slots: - void slotSelectionChanged(QListViewItem *item); + void slotSelectionChanged(TQListViewItem *item); private: void initUI(); diff --git a/kopete/libkopete/ui/addcontactpage.cpp b/kopete/libkopete/ui/addcontactpage.cpp index f308a7d4..846815f2 100644 --- a/kopete/libkopete/ui/addcontactpage.cpp +++ b/kopete/libkopete/ui/addcontactpage.cpp @@ -17,7 +17,7 @@ #include "addcontactpage.h" -AddContactPage::AddContactPage(QWidget *parent, const char *name ) : QWidget(parent,name) +AddContactPage::AddContactPage(TQWidget *parent, const char *name ) : TQWidget(parent,name) { } diff --git a/kopete/libkopete/ui/addcontactpage.h b/kopete/libkopete/ui/addcontactpage.h index 506c5bcc..d72e2fd1 100644 --- a/kopete/libkopete/ui/addcontactpage.h +++ b/kopete/libkopete/ui/addcontactpage.h @@ -18,7 +18,7 @@ #ifndef ADDCONTACTPAGE_H #define ADDCONTACTPAGE_H -#include +#include #include #include "kopete_export.h" @@ -34,7 +34,7 @@ class KOPETE_EXPORT AddContactPage : public QWidget Q_OBJECT public: - AddContactPage(QWidget *parent=0, const char *name=0); + AddContactPage(TQWidget *parent=0, const char *name=0); virtual ~AddContactPage(); //Kopete::Protocol *protocol; diff --git a/kopete/libkopete/ui/addressbooklinkwidget.cpp b/kopete/libkopete/ui/addressbooklinkwidget.cpp index a6aff32b..0d544d27 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.cpp +++ b/kopete/libkopete/ui/addressbooklinkwidget.cpp @@ -21,7 +21,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -38,11 +38,11 @@ namespace Kopete { namespace UI { -AddressBookLinkWidget::AddressBookLinkWidget( QWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) +AddressBookLinkWidget::AddressBookLinkWidget( TQWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) { - btnClear->setIconSet( SmallIconSet( QApplication::reverseLayout() ? QString::fromLatin1( "locationbar_erase" ) : QString::fromLatin1( "clear_left") ) ); - connect( btnClear, SIGNAL( clicked() ), this, SLOT( slotClearAddressee() ) ); - connect( btnSelectAddressee, SIGNAL( clicked() ), SLOT( slotSelectAddressee() ) ); + btnClear->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? TQString::fromLatin1( "locationbar_erase" ) : TQString::fromLatin1( "clear_left") ) ); + connect( btnClear, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearAddressee() ) ); + connect( btnSelectAddressee, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAddressee() ) ); } void AddressBookLinkWidget::setAddressee( const KABC::Addressee& addr ) @@ -56,7 +56,7 @@ void AddressBookLinkWidget::setMetaContact( const Kopete::MetaContact * mc ) mMetaContact = mc; } -QString AddressBookLinkWidget::uid() const +TQString AddressBookLinkWidget::uid() const { return mSelectedUid; } @@ -66,29 +66,29 @@ void AddressBookLinkWidget::slotClearAddressee() edtAddressee->clear(); btnClear->setEnabled( false ); KABC::Addressee mrEmpty; - mSelectedUid = QString::null; + mSelectedUid = TQString::null; emit addresseeChanged( mrEmpty ); } void AddressBookLinkWidget::slotSelectAddressee() { - QString message; + TQString message; if ( mMetaContact ) message = i18n("Choose the corresponding entry for '%1'" ).arg( mMetaContact->displayName() ); else message = i18n("Choose the corresponding entry in the address book" ); - Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : QString::null ), this ); + Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : TQString::null ), this ); int result = dialog.exec(); KABC::Addressee addr; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { addr = dialog.addressBookSelectorWidget()->addressee(); edtAddressee->setText( addr.realName() ); btnClear->setEnabled( !addr.isEmpty() ); - mSelectedUid = ( addr.isEmpty() ? QString::null : addr.uid() ); + mSelectedUid = ( addr.isEmpty() ? TQString::null : addr.uid() ); emit addresseeChanged( addr ); } } diff --git a/kopete/libkopete/ui/addressbooklinkwidget.h b/kopete/libkopete/ui/addressbooklinkwidget.h index dff23c58..fa44d530 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.h +++ b/kopete/libkopete/ui/addressbooklinkwidget.h @@ -44,7 +44,7 @@ class AddressBookLinkWidget : public AddressBookLinkWidgetBase { Q_OBJECT public: - AddressBookLinkWidget( QWidget * parent, const char * name ); + AddressBookLinkWidget( TQWidget * parent, const char * name ); ~AddressBookLinkWidget() {} /** * Set the currently selected addressee @@ -57,7 +57,7 @@ public: /** * Return the selected addressbook UID. */ - QString uid() const; + TQString uid() const; signals: /** * Emitted when the selected addressee changed. addr is the KABC::Addressee that was selected. If addr.isEmpty() is empty, the clear button was clicked. @@ -66,7 +66,7 @@ signals: /** * Provided so you can perform your own actions instead of opening the AddressBookSelectorWidget. - * To do so, QObject::disconnect() btnSelectAddressee and connect your own slot to this signal + * To do so, TQObject::disconnect() btnSelectAddressee and connect your own slot to this signal */ void selectAddresseeClicked(); protected slots: @@ -74,7 +74,7 @@ protected slots: void slotSelectAddressee(); private: const Kopete::MetaContact * mMetaContact; - QString mSelectedUid; + TQString mSelectedUid; }; } // end namespace UI } // end namespace Kopete diff --git a/kopete/libkopete/ui/addressbookselectordialog.cpp b/kopete/libkopete/ui/addressbookselectordialog.cpp index 7d2e17ff..44f42e2a 100644 --- a/kopete/libkopete/ui/addressbookselectordialog.cpp +++ b/kopete/libkopete/ui/addressbookselectordialog.cpp @@ -19,9 +19,9 @@ #include "addressbookselectordialog.h" #include "addressbookselectorwidget.h" #include -#include -#include -#include +#include +#include +#include #include #include @@ -30,9 +30,9 @@ namespace Kopete namespace UI { -AddressBookSelectorDialog::AddressBookSelectorDialog(const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, title, Help|Ok|Cancel, Ok, true ) +AddressBookSelectorDialog::AddressBookSelectorDialog(const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, title, Help|Ok|Cancel, Ok, true ) { - QVBox *vbox=new QVBox(this); + TQVBox *vbox=new TQVBox(this); m_addressBookSelectorWidget= new AddressBookSelectorWidget(vbox); m_addressBookSelectorWidget->setLabelMessage(message); @@ -42,7 +42,7 @@ AddressBookSelectorDialog::AddressBookSelectorDialog(const QString &title, const enableButtonOK(false); //setHelp("linkaddressbook"); - connect(m_addressBookSelectorWidget, SIGNAL(addresseeListClicked( QListViewItem * )), SLOT(slotWidgetAddresseeListClicked( QListViewItem * ))); + connect(m_addressBookSelectorWidget, TQT_SIGNAL(addresseeListClicked( TQListViewItem * )), TQT_SLOT(slotWidgetAddresseeListClicked( TQListViewItem * ))); if ( !preSelectUid.isEmpty() ) m_addressBookSelectorWidget->selectAddressee(preSelectUid); @@ -52,19 +52,19 @@ AddressBookSelectorDialog::~AddressBookSelectorDialog() { } -KABC::Addressee AddressBookSelectorDialog::getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent) +KABC::Addressee AddressBookSelectorDialog::getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent) { AddressBookSelectorDialog dialog(title, message, preSelectUid, parent); int result = dialog.exec(); KABC::Addressee adr; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) adr = dialog.addressBookSelectorWidget()->addressee(); return adr; } -void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( QListViewItem *addressee ) +void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( TQListViewItem *addressee ) { // enable ok if a valid addressee is selected enableButtonOK( addressee ? addressee->isSelected() : false); @@ -72,12 +72,12 @@ void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( QListViewItem *a void AddressBookSelectorDialog::accept() { - QDialog::accept(); + TQDialog::accept(); } void AddressBookSelectorDialog::reject() { - QDialog::reject(); + TQDialog::reject(); } } // namespace UI diff --git a/kopete/libkopete/ui/addressbookselectordialog.h b/kopete/libkopete/ui/addressbookselectordialog.h index f391aa3a..470f3407 100644 --- a/kopete/libkopete/ui/addressbookselectordialog.h +++ b/kopete/libkopete/ui/addressbookselectordialog.h @@ -51,7 +51,7 @@ public: /** * The constructor of an empty AddressBookSelectorWidget */ - AddressBookSelectorDialog( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent=0L, const char *name=0L, bool modal = false ); + AddressBookSelectorDialog( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent=0L, const char *name=0L, bool modal = false ); /** * The destructor of the dialog */ @@ -71,12 +71,12 @@ public: * @returns the selected contact, or a null addressee if the user * pressed the Cancel button. Optionally */ - static KABC::Addressee getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent = 0L ); + static KABC::Addressee getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent = 0L ); protected slots: virtual void accept(); virtual void reject(); - void slotWidgetAddresseeListClicked( QListViewItem *addressee ); + void slotWidgetAddresseeListClicked( TQListViewItem *addressee ); protected: AddressBookSelectorWidget *m_addressBookSelectorWidget; }; diff --git a/kopete/libkopete/ui/addressbookselectorwidget.cpp b/kopete/libkopete/ui/addressbookselectorwidget.cpp index 50c4a885..4b106315 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.cpp +++ b/kopete/libkopete/ui/addressbookselectorwidget.cpp @@ -25,7 +25,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -39,9 +39,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "addressbookselectorwidget.h" #include @@ -54,39 +54,39 @@ namespace Kopete namespace UI { -AddressBookSelectorWidget::AddressBookSelectorWidget( QWidget *parent, const char *name ) +AddressBookSelectorWidget::AddressBookSelectorWidget( TQWidget *parent, const char *name ) : AddressBookSelectorWidget_Base( parent, name ) { m_addressBook = Kopete::KABCPersistence::self()->addressBook(); // Addressee validation connections - connect( addAddresseeButton, SIGNAL( clicked() ), SLOT( slotAddAddresseeClicked() ) ); - connect( addAddresseeButton, SIGNAL( clicked() ), SIGNAL( addAddresseeClicked() ) ); - - connect( addresseeListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); - connect( addresseeListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); - connect( addresseeListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); + connect( addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddAddresseeClicked() ) ); + connect( addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SIGNAL( addAddresseeClicked() ) ); + + connect( addresseeListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); + connect( addresseeListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); + connect( addresseeListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); - connect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) ); + connect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) ); //We should add a clear KAction here. But we can't really do that with a designer file :\ this sucks - addresseeListView->setColumnText(2, SmallIconSet(QString::fromLatin1("email")), i18n("Email")); + addresseeListView->setColumnText(2, SmallIconSet(TQString::fromLatin1("email")), i18n("Email")); kListViewSearchLine->setListView(addresseeListView); slotLoadAddressees(); - addresseeListView->setColumnWidthMode(0, QListView::Manual); + addresseeListView->setColumnWidthMode(0, TQListView::Manual); addresseeListView->setColumnWidth(0, 63); //Photo is 60, and it's nice to have a small gap, imho } AddressBookSelectorWidget::~AddressBookSelectorWidget() { - disconnect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) ); + disconnect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) ); } @@ -101,10 +101,10 @@ KABC::Addressee AddressBookSelectorWidget::addressee() return m_addressee; } -void AddressBookSelectorWidget::selectAddressee( const QString &uid ) +void AddressBookSelectorWidget::selectAddressee( const TQString &uid ) { // iterate trough list view - QListViewItemIterator it( addresseeListView ); + TQListViewItemIterator it( addresseeListView ); while( it.current() ) { AddresseeItem *addrItem = (AddresseeItem *) it.current(); @@ -136,7 +136,7 @@ void AddressBookSelectorWidget::slotLoadAddressees() } -void AddressBookSelectorWidget::setLabelMessage( const QString &msg ) +void AddressBookSelectorWidget::setLabelMessage( const TQString &msg ) { lblHeader->setText(msg); } @@ -144,7 +144,7 @@ void AddressBookSelectorWidget::setLabelMessage( const QString &msg ) void AddressBookSelectorWidget::slotAddAddresseeClicked() { // Pop up add addressee dialog - QString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), QString::null, 0, this ); + TQString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), TQString::null, 0, this ); if ( !addresseeName.isEmpty() ) { @@ -154,7 +154,7 @@ void AddressBookSelectorWidget::slotAddAddresseeClicked() Kopete::KABCPersistence::self()->writeAddressBook( 0 ); slotLoadAddressees(); // select the addressee we just added - QListViewItem * added = addresseeListView->findItem( addresseeName, 1 ); + TQListViewItem * added = addresseeListView->findItem( addresseeName, 1 ); kListViewSearchLine->clear(); kListViewSearchLine->updateSearch(); addresseeListView->setSelected( added, true ); diff --git a/kopete/libkopete/ui/addressbookselectorwidget.h b/kopete/libkopete/ui/addressbookselectorwidget.h index 3141f726..3b26cece 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.h +++ b/kopete/libkopete/ui/addressbookselectorwidget.h @@ -49,7 +49,7 @@ class KOPETE_EXPORT AddressBookSelectorWidget : public AddressBookSelectorWidget { Q_OBJECT public: - AddressBookSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + AddressBookSelectorWidget( TQWidget *parent = 0, const char *name = 0 ); ~AddressBookSelectorWidget(); KABC::Addressee addressee(); /** @@ -57,11 +57,11 @@ public: * example: Please select a contact * or, Choose a contact to delete */ - void setLabelMessage( const QString &msg ); + void setLabelMessage( const TQString &msg ); /** * pre-selects a contact */ - void selectAddressee( const QString &uid ); + void selectAddressee( const TQString &uid ); /** * @return true if there is a contact selected */ @@ -78,7 +78,7 @@ protected slots: */ void slotLoadAddressees(); signals: - void addresseeListClicked( QListViewItem *addressee ); + void addresseeListClicked( TQListViewItem *addressee ); void addAddresseeClicked(); }; diff --git a/kopete/libkopete/ui/addresseeitem.cpp b/kopete/libkopete/ui/addresseeitem.cpp index 405d00d7..9fa9f023 100644 --- a/kopete/libkopete/ui/addresseeitem.cpp +++ b/kopete/libkopete/ui/addresseeitem.cpp @@ -17,17 +17,17 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include "addresseeitem.h" -AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addressee) : +AddresseeItem::AddresseeItem( TQListView *parent, const KABC::Addressee &addressee) : KListViewItem( parent ), mAddressee( addressee ) { @@ -37,7 +37,7 @@ AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addresse pic = mAddressee.logo(); if(pic.isIntern()) { - QPixmap qpixmap( pic.data().scaleWidth(60) ); //60 pixels seems okay.. kmail uses 60 btw + TQPixmap qpixmap( pic.data().scaleWidth(60) ); //60 pixels seems okay.. kmail uses 60 btw setPixmap( Photo,qpixmap ); } @@ -45,11 +45,11 @@ AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addresse setText( Email, addressee.preferredEmail() ); } -QString AddresseeItem::key( int column, bool ) const +TQString AddresseeItem::key( int column, bool ) const { if (column == Email) { - QString value = text(Email); - QRegExp emailRe(QString::fromLatin1("<\\S*>")); + TQString value = text(Email); + TQRegExp emailRe(TQString::fromLatin1("<\\S*>")); int match = emailRe.search(value); if (match > -1) value = value.mid(match + 1, emailRe.matchedLength() - 2); diff --git a/kopete/libkopete/ui/addresseeitem.h b/kopete/libkopete/ui/addresseeitem.h index c501d0a9..36d1d284 100644 --- a/kopete/libkopete/ui/addresseeitem.h +++ b/kopete/libkopete/ui/addresseeitem.h @@ -21,7 +21,7 @@ #ifndef KABC_ADDRESSEEDIALOG_H #define KABC_ADDRESSEEDIALOG_H -#include +#include #include #include @@ -49,7 +49,7 @@ class AddresseeItem : public KListViewItem @param parent The parent listview. @param addressee The associated addressee. */ - AddresseeItem( QListView *parent, const KABC::Addressee &addressee ); + AddresseeItem( TQListView *parent, const KABC::Addressee &addressee ); /** Returns the addressee. @@ -57,9 +57,9 @@ class AddresseeItem : public KListViewItem KABC::Addressee addressee() const { return mAddressee; } /** - Method used by QListView to sort the items. + Method used by TQListView to sort the items. */ - virtual QString key( int column, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; private: KABC::Addressee mAddressee; diff --git a/kopete/libkopete/ui/contactaddednotifydialog.cpp b/kopete/libkopete/ui/contactaddednotifydialog.cpp index abcd4c7e..9084bd39 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.cpp +++ b/kopete/libkopete/ui/contactaddednotifydialog.cpp @@ -16,12 +16,12 @@ #include "contactaddednotifydialog.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -51,13 +51,13 @@ struct ContactAddedNotifyDialog::Private { ContactAddedNotifyWidget *widget; Account *account; - QString contactId; - QString addressbookId; + TQString contactId; + TQString addressbookId; }; -ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, - const QString& contactNick, Kopete::Account *account, uint hide) +ContactAddedNotifyDialog::ContactAddedNotifyDialog(const TQString& contactId, + const TQString& contactNick, Kopete::Account *account, uint hide) : KDialogBase( Global::mainWidget(), "ContactAddedNotify", /*modal=*/false, i18n("Someone Has Added You"), Ok|Cancel ) { @@ -71,9 +71,9 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, d->account=account; d->contactId=contactId; d->widget->m_label->setText(i18n(" The contact %2 has added you to his/her contactlist. (Account %3)") - .arg( KURL::encode_string( account->protocol()->pluginId() ) + QString::fromLatin1(":") + .arg( KURL::encode_string( account->protocol()->pluginId() ) + TQString::fromLatin1(":") + KURL::encode_string( account->accountId() ) , - contactNick.isEmpty() ? contactId : contactNick + QString::fromLatin1(" < ") + contactId + QString::fromLatin1(" >") , + contactNick.isEmpty() ? contactId : contactNick + TQString::fromLatin1(" < ") + contactId + TQString::fromLatin1(" >") , account->accountLabel() ) ); if( hide & InfoButton) d->widget->m_infoButton->hide() ; @@ -94,18 +94,18 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, Kopete::GroupList groups=Kopete::ContactList::self()->groups(); for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QString groupname = it->displayName(); + TQString groupname = it->displayName(); if ( it->type() == Group::Normal && !groupname.isEmpty() ) { d->widget->m_groupList->insertItem(groupname); } } - d->widget->m_groupList->setCurrentText(QString::null); //default to top-level + d->widget->m_groupList->setCurrentText(TQString::null); //default to top-level - connect( d->widget->widAddresseeLink, SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) ); - connect( d->widget->m_infoButton, SIGNAL( clicked() ), this, SLOT( slotInfoClicked() ) ); + connect( d->widget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, TQT_SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) ); + connect( d->widget->m_infoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotInfoClicked() ) ); - connect( this, SIGNAL(okClicked()) , this , SLOT(slotFinished())); + connect( this, TQT_SIGNAL(okClicked()) , this , TQT_SLOT(slotFinished())); } @@ -125,14 +125,14 @@ bool ContactAddedNotifyDialog::authorized() const return d->widget->m_authorizeCb->isChecked(); } -QString ContactAddedNotifyDialog::displayName() const +TQString ContactAddedNotifyDialog::displayName() const { return d->widget->m_displayNameEdit->text(); } Group *ContactAddedNotifyDialog::group() const { - QString grpName=d->widget->m_groupList->currentText(); + TQString grpName=d->widget->m_groupList->currentText(); if(grpName.isEmpty()) return Group::topLevel(); diff --git a/kopete/libkopete/ui/contactaddednotifydialog.h b/kopete/libkopete/ui/contactaddednotifydialog.h index 96f8844c..be5349a4 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.h +++ b/kopete/libkopete/ui/contactaddednotifydialog.h @@ -43,9 +43,9 @@ namespace UI { * @code Kopete::UI::ContactAddedNotifyDialog *dialog = - new ContactAddedNotifyDialog(contactId, QString::null,account); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)),this,SLOT(contactAddedDialogApplied())); - QObject::connect(dialog,SIGNAL(infoClicked(const QString&)),this,SLOT(contactAddedDialogInfo())); + new ContactAddedNotifyDialog(contactId, TQString::null,account); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)),this,TQT_SLOT(contactAddedDialogApplied())); + TQObject::connect(dialog,TQT_SIGNAL(infoClicked(const TQString&)),this,TQT_SLOT(contactAddedDialogInfo())); dialog->show(); * @endcode @@ -93,7 +93,7 @@ public: * @param hide a bitmask of HideWidget used to hide some widget. By default, everything is shown. * */ - ContactAddedNotifyDialog(const QString& contactId, const QString& contactNick=QString::null, + ContactAddedNotifyDialog(const TQString& contactId, const TQString& contactNick=TQString::null, Kopete::Account *account=0L, uint hide=0x00); /** @@ -116,7 +116,7 @@ public: /** * @brief return the display name the user has entered */ - QString displayName() const; + TQString displayName() const; /** * @brief return the group the user has selected @@ -144,7 +144,7 @@ signals: * @brief the dialog has been applied * @param contactId is the id of the contact passed in the constructor. */ - void applyClicked(const QString &contactId); + void applyClicked(const TQString &contactId); /** * @brief the button "info" has been pressed @@ -155,7 +155,7 @@ signals: * hint: you can use sender() as parent of the new dialog * @param contactId is the id of the contact passed in the constructor. */ - void infoClicked(const QString &contactId); + void infoClicked(const TQString &contactId); private slots: diff --git a/kopete/libkopete/ui/editaccountwidget.h b/kopete/libkopete/ui/editaccountwidget.h index 533c90ff..a4345bae 100644 --- a/kopete/libkopete/ui/editaccountwidget.h +++ b/kopete/libkopete/ui/editaccountwidget.h @@ -36,7 +36,7 @@ class KopeteEditAccountWidgetPrivate; * in @ref apply(). * * Each protocol has to subclass this class, and the protocol's edit account page MUST inherits from - * QWidget too. + * TQWidget too. * * We suggest to put at least these fields in the page: * diff --git a/kopete/libkopete/ui/kopetecontactaction.cpp b/kopete/libkopete/ui/kopetecontactaction.cpp index d02c2ff2..cc6754d2 100644 --- a/kopete/libkopete/ui/kopetecontactaction.cpp +++ b/kopete/libkopete/ui/kopetecontactaction.cpp @@ -21,15 +21,15 @@ #include "kopetecontact.h" #include "kopeteonlinestatus.h" -KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const QObject *receiver, +KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const TQObject *receiver, const char *slot, KAction *parent ) -: KAction( contact->metaContact()->displayName(), QIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), +: KAction( contact->metaContact()->displayName(), TQIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), parent, contact->contactId().latin1() ) { m_contact = contact; - connect( this, SIGNAL( activated() ), SLOT( slotContactActionActivated() ) ); - connect( this, SIGNAL( activated( Kopete::Contact * ) ), receiver, slot ); + connect( this, TQT_SIGNAL( activated() ), TQT_SLOT( slotContactActionActivated() ) ); + connect( this, TQT_SIGNAL( activated( Kopete::Contact * ) ), receiver, slot ); } KopeteContactAction::~KopeteContactAction() diff --git a/kopete/libkopete/ui/kopetecontactaction.h b/kopete/libkopete/ui/kopetecontactaction.h index bb9d9f76..ba170ebb 100644 --- a/kopete/libkopete/ui/kopetecontactaction.h +++ b/kopete/libkopete/ui/kopetecontactaction.h @@ -37,7 +37,7 @@ public: /** * Create a new KopeteContactAction */ - KopeteContactAction( Kopete::Contact *contact, const QObject* receiver, const char* slot, KAction* parent ); + KopeteContactAction( Kopete::Contact *contact, const TQObject* receiver, const char* slot, KAction* parent ); ~KopeteContactAction(); Kopete::Contact * contact() const; diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp index 01036a05..fffeec66 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -31,7 +31,7 @@ #include "kopetemetacontact.h" #include "kopetecontact.h" -KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const QString& description,QWidget *parent, const char *name ) +KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const TQString& description,TQWidget *parent, const char *name ) : KDialogBase( parent, name, false, i18n( "A User Would Like to Send You a File" ), KDialogBase::User1 | KDialogBase::User2, KDialogBase::User1, true, i18n( "&Refuse" ), i18n( "&Accept" ) ), m_info( info ) @@ -40,19 +40,19 @@ KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo m_emited=false; m_view=new FileConfirmBase(this, "FileConfirmView"); - m_view->m_from->setText( info.contact()->metaContact()->displayName() + QString::fromLatin1( " <" ) + - info.contact()->contactId() + QString::fromLatin1( "> " ) ); + m_view->m_from->setText( info.contact()->metaContact()->displayName() + TQString::fromLatin1( " <" ) + + info.contact()->contactId() + TQString::fromLatin1( "> " ) ); m_view->m_size->setText( KGlobal::locale()->formatNumber( long( info.size() ), 0 ) ); m_view->m_description->setText( description ); m_view->m_filename->setText( info.file() ); KGlobal::config()->setGroup("File Transfer"); - const QString defaultPath=KGlobal::config()->readEntry("defaultPath" , QDir::homeDirPath() ); - m_view->m_saveto->setText(defaultPath + QString::fromLatin1( "/" ) + info.file() ); + const TQString defaultPath=KGlobal::config()->readEntry("defaultPath" , TQDir::homeDirPath() ); + m_view->m_saveto->setText(defaultPath + TQString::fromLatin1( "/" ) + info.file() ); setMainWidget(m_view); - connect(m_view->cmdBrowse, SIGNAL(clicked()), this, SLOT(slotBrowsePressed())); + connect(m_view->cmdBrowse, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBrowsePressed())); } KopeteFileConfirmDialog::~KopeteFileConfirmDialog() @@ -61,7 +61,7 @@ KopeteFileConfirmDialog::~KopeteFileConfirmDialog() void KopeteFileConfirmDialog::slotBrowsePressed() { - QString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), QString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); + TQString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), TQString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); if ( !saveFileName.isNull()) { m_view->m_saveto->setText(saveFileName); @@ -74,14 +74,14 @@ void KopeteFileConfirmDialog::slotUser2() KURL url(m_view->m_saveto->text()); if(url.isValid() && url.isLocalFile() ) { - const QString directory=url.directory(); + const TQString directory=url.directory(); if(!directory.isEmpty()) { KGlobal::config()->setGroup("File Transfer"); KGlobal::config()->writeEntry("defaultPath" , directory ); } - if(QFile(m_view->m_saveto->text()).exists()) + if(TQFile(m_view->m_saveto->text()).exists()) { int ret=KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists.\nDo you want to overwrite it ?").arg(m_view->m_saveto->text()) , i18n("Overwrite File") , KStdGuiItem::save()); @@ -103,7 +103,7 @@ void KopeteFileConfirmDialog::slotUser1() close(); } -void KopeteFileConfirmDialog::closeEvent( QCloseEvent *e) +void KopeteFileConfirmDialog::closeEvent( TQCloseEvent *e) { if(!m_emited) { diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.h b/kopete/libkopete/ui/kopetefileconfirmdialog.h index 20d58d51..ac5d19a4 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.h +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.h @@ -18,7 +18,7 @@ #ifndef KOPETEFILECONFIRMDIALOG_H #define KOPETEFILECONFIRMDIALOG_H -#include +#include #include #include "kopetetransfermanager.h" @@ -33,7 +33,7 @@ class KopeteFileConfirmDialog : public KDialogBase Q_OBJECT public: - KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const QString& description=QString::null, QWidget *parent=0, const char* name=0); + KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const TQString& description=TQString::null, TQWidget *parent=0, const char* name=0); ~KopeteFileConfirmDialog(); private: @@ -47,10 +47,10 @@ public slots: protected slots: virtual void slotUser2(); virtual void slotUser1(); - virtual void closeEvent( QCloseEvent *e); + virtual void closeEvent( TQCloseEvent *e); signals: - void accepted(const Kopete::FileTransferInfo &info, const QString &filename); + void accepted(const Kopete::FileTransferInfo &info, const TQString &filename); void refused(const Kopete::FileTransferInfo &info); }; diff --git a/kopete/libkopete/ui/kopetelistview.cpp b/kopete/libkopete/ui/kopetelistview.cpp index 594f0920..9630592c 100644 --- a/kopete/libkopete/ui/kopetelistview.cpp +++ b/kopete/libkopete/ui/kopetelistview.cpp @@ -22,14 +22,14 @@ #include "kopeteglobal.h" #include "kopeteprefs.h" -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -39,25 +39,25 @@ namespace UI { namespace ListView { /* - Custom QToolTip for the list view. + Custom TQToolTip for the list view. The decision whether or not to show tooltips is taken in - maybeTip(). See also the QListView sources from Qt itself. + maybeTip(). See also the TQListView sources from Qt itself. Delegates to the list view items. */ class ToolTip : public QToolTip { public: - ToolTip( QWidget *parent, ListView *lv ); + ToolTip( TQWidget *parent, ListView *lv ); virtual ~ToolTip(); - void maybeTip( const QPoint &pos ); + void maybeTip( const TQPoint &pos ); private: ListView *m_listView; }; -ToolTip::ToolTip( QWidget *parent, ListView *lv ) - : QToolTip( parent ) +ToolTip::ToolTip( TQWidget *parent, ListView *lv ) + : TQToolTip( parent ) { m_listView = lv; } @@ -66,14 +66,14 @@ ToolTip::~ToolTip() { } -void ToolTip::maybeTip( const QPoint &pos ) +void ToolTip::maybeTip( const TQPoint &pos ) { if( !parentWidget() || !m_listView ) return; if( Item *item = dynamic_cast( m_listView->itemAt( pos ) ) ) { - QRect itemRect = m_listView->itemRect( item ); + TQRect itemRect = m_listView->itemRect( item ); uint leftMargin = m_listView->treeStepSize() * ( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) + @@ -81,9 +81,9 @@ void ToolTip::maybeTip( const QPoint &pos ) uint xAdjust = itemRect.left() + leftMargin; uint yAdjust = itemRect.top(); - QPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); + TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); - std::pair toolTip = item->toolTip( relativePos ); + std::pair toolTip = item->toolTip( relativePos ); if ( toolTip.first.isEmpty() ) return; @@ -96,34 +96,34 @@ void ToolTip::maybeTip( const QPoint &pos ) struct ListView::Private { - QTimer sortTimer; + TQTimer sortTimer; std::auto_ptr toolTip; //! C-tor Private() {} }; -ListView::ListView( QWidget *parent, const char *name ) +ListView::ListView( TQWidget *parent, const char *name ) : KListView( parent, name ), d( new Private ) { - connect( &d->sortTimer, SIGNAL( timeout() ), this, SLOT( slotSort() ) ); + connect( &d->sortTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotSort() ) ); - // We have our own tooltips, don't use the default QListView ones + // We have our own tooltips, don't use the default TQListView ones setShowToolTips( false ); d->toolTip.reset( new ToolTip( viewport(), this ) ); - connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), - SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); - connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), - SLOT( slotDoubleClicked( QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), + TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) ); // set up flags for nicer painting clearWFlags( WStaticContents ); setWFlags( WNoAutoErase ); // clear the appropriate flags from the viewport - qt docs say we have to mask - // these flags out of the QListView to make weirdly painted list items work, but + // these flags out of the TQListView to make weirdly painted list items work, but // that doesn't do the job. masking them out of the viewport does. -// class MyWidget : public QWidget { public: using QWidget::clearWFlags; }; +// class MyWidget : public TQWidget { public: using TQWidget::clearWFlags; }; // static_cast( viewport() )->clearWFlags( WStaticContents ); // static_cast( viewport() )->setWFlags( WNoAutoErase ); @@ -139,7 +139,7 @@ ListView::~ListView() delete d; } -void ListView::slotDoubleClicked( QListViewItem *item ) +void ListView::slotDoubleClicked( TQListViewItem *item ) { kdDebug( 14000 ) << k_funcinfo << endl; @@ -148,7 +148,7 @@ void ListView::slotDoubleClicked( QListViewItem *item ) } void ListView::slotContextMenu( KListView * /*listview*/, - QListViewItem *item, const QPoint &/*point*/ ) + TQListViewItem *item, const TQPoint &/*point*/ ) { if ( item && !item->isSelected() ) { @@ -179,21 +179,21 @@ void ListView::setShowTreeLines( bool bShowAsTree ) /* This is a small hack ensuring that only F2 triggers inline * renaming. Won't win a beauty award, but whoever wrote it thinks - * relying on the fact that QListView intercepts and processes the + * relying on the fact that TQListView intercepts and processes the * F2 event through this event filter is sorta safe. * * Also use enter to execute the item since executed is not usually * called when enter is pressed. */ -void ListView::keyPressEvent( QKeyEvent *e ) +void ListView::keyPressEvent( TQKeyEvent *e ) { - QListViewItem *item = currentItem(); + TQListViewItem *item = currentItem(); if ( (e->key() == Qt::Key_F2) && item && item->isVisible() ) rename( item, 0 ); else if ( (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) && item && item->isVisible() ) { // must provide a point within the item; emitExecute checks for this - QPoint p = viewport()->mapToGlobal(itemRect(item).center()); + TQPoint p = viewport()->mapToGlobal(itemRect(item).center()); emitExecute( currentItem(), p, 0 ); } else diff --git a/kopete/libkopete/ui/kopetelistview.h b/kopete/libkopete/ui/kopetelistview.h index 8b2c579b..2e065212 100644 --- a/kopete/libkopete/ui/kopetelistview.h +++ b/kopete/libkopete/ui/kopetelistview.h @@ -34,7 +34,7 @@ class ListView : public KListView Q_OBJECT public: - ListView( QWidget *parent = 0, const char *name = 0 ); + ListView( TQWidget *parent = 0, const char *name = 0 ); ~ListView(); /** @@ -52,14 +52,14 @@ public: public slots: /** - * Calls QListView::sort() + * Calls TQListView::sort() */ void slotSort() { sort(); } protected: - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); private slots: - void slotContextMenu(KListView*,QListViewItem *item, const QPoint &point ); - void slotDoubleClicked( QListViewItem *item ); + void slotContextMenu(KListView*,TQListViewItem *item, const TQPoint &point ); + void slotDoubleClicked( TQListViewItem *item ); private: struct Private; Private *d; diff --git a/kopete/libkopete/ui/kopetelistviewitem.cpp b/kopete/libkopete/ui/kopetelistviewitem.cpp index fda2ff4c..888f9d5b 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.cpp +++ b/kopete/libkopete/ui/kopetelistviewitem.cpp @@ -29,14 +29,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_XRENDER # include @@ -54,7 +54,7 @@ namespace ListView { class ComponentBase::Private { public: - QPtrList components; + TQPtrList components; }; ComponentBase::ComponentBase() @@ -71,7 +71,7 @@ ComponentBase::~ComponentBase() uint ComponentBase::components() { return d->components.count(); } Component *ComponentBase::component( uint n ) { return d->components.at( n ); } -Component *ComponentBase::componentAt( const QPoint &pt ) +Component *ComponentBase::componentAt( const TQPoint &pt ) { for ( uint n = 0; n < components(); ++n ) { @@ -113,13 +113,13 @@ void ComponentBase::componentResized( Component * ) { } -std::pair ComponentBase::toolTip( const QPoint &relativePos ) +std::pair ComponentBase::toolTip( const TQPoint &relativePos ) { for ( uint n = 0; n < components(); ++n ) if ( component( n )->rect().contains( relativePos ) ) return component( n )->toolTip( relativePos ); - return std::make_pair( QString::null, QRect() ); + return std::make_pair( TQString::null, TQRect() ); } void ComponentBase::updateAnimationPosition( int p, int s ) @@ -127,9 +127,9 @@ void ComponentBase::updateAnimationPosition( int p, int s ) for ( uint n = 0; n < components(); ++n ) { Component *comp = component( n ); - QRect start = comp->startRect(); - QRect target = comp->targetRect(); - QRect rc( start.left() + ((target.left() - start.left()) * p) / s, + TQRect start = comp->startRect(); + TQRect target = comp->targetRect(); + TQRect rc( start.left() + ((target.left() - start.left()) * p) / s, start.top() + ((target.top() - start.top()) * p) / s, start.width() + ((target.width() - start.width()) * p) / s, start.height() + ((target.height() - start.height()) * p) / s ); @@ -150,8 +150,8 @@ public: { } ComponentBase *parent; - QRect rect; - QRect startRect, targetRect; + TQRect rect; + TQRect startRect, targetRect; int minWidth, minHeight; bool growHoriz, growVert; bool show; /** @since 23-03-2005 */ @@ -199,19 +199,19 @@ void Component::setToolTipSource( ToolTipSource *source ) d->tipSource = source; } -std::pair Component::toolTip( const QPoint &relativePos ) +std::pair Component::toolTip( const TQPoint &relativePos ) { if ( !d->tipSource ) return ComponentBase::toolTip( relativePos ); - QRect rc = rect(); - QString result = (*d->tipSource)( this, relativePos, rc ); + TQRect rc = rect(); + TQString result = (*d->tipSource)( this, relativePos, rc ); return std::make_pair(result, rc); } -QRect Component::rect() { return d->rect; } -QRect Component::startRect() { return d->startRect; } -QRect Component::targetRect() { return d->targetRect; } +TQRect Component::rect() { return d->rect; } +TQRect Component::startRect() { return d->startRect; } +TQRect Component::targetRect() { return d->targetRect; } int Component::minWidth() { return d->minWidth; } int Component::minHeight() { return d->minHeight; } @@ -235,22 +235,22 @@ bool Component::setMinHeight( int height ) return true; } -void Component::layout( const QRect &newRect ) +void Component::layout( const TQRect &newRect ) { if ( rect().isNull() ) - d->startRect = QRect( newRect.topLeft(), newRect.topLeft() ); + d->startRect = TQRect( newRect.topLeft(), newRect.topLeft() ); else d->startRect = rect(); d->targetRect = newRect; //kdDebug(14000) << k_funcinfo << "At " << rect << endl; } -void Component::setRect( const QRect &rect ) +void Component::setRect( const TQRect &rect ) { d->rect = rect; } -void Component::paint( QPainter *painter, const QColorGroup &cg ) +void Component::paint( TQPainter *painter, const TQColorGroup &cg ) { /*painter->setPen( Qt::red ); painter->drawRect( rect() );*/ @@ -378,7 +378,7 @@ void BoxComponent::calcMinSize() relayout(); } -void BoxComponent::layout( const QRect &rect ) +void BoxComponent::layout( const TQRect &rect ) { Component::layout( rect ); @@ -413,7 +413,7 @@ void BoxComponent::layout( const QRect &rect ) { Component *comp = component( n ); - QRect rc; + TQRect rc; if ( horiz ) { rc.setLeft( rect.left() + pos ); @@ -464,7 +464,7 @@ void BoxComponent::componentResized( Component *component ) class ImageComponent::Private { public: - QPixmap image; + TQPixmap image; }; ImageComponent::ImageComponent( ComponentBase *parent ) @@ -487,12 +487,12 @@ ImageComponent::~ImageComponent() delete d; } -QPixmap ImageComponent::pixmap() +TQPixmap ImageComponent::pixmap() { return d->image; } -void ImageComponent::setPixmap( const QPixmap &img, bool adjustSize) +void ImageComponent::setPixmap( const TQPixmap &img, bool adjustSize) { d->image = img; if ( adjustSize ) @@ -503,30 +503,30 @@ void ImageComponent::setPixmap( const QPixmap &img, bool adjustSize) repaint(); } -static QPoint operator+( const QPoint &pt, const QSize &sz ) +static TQPoint operator+( const TQPoint &pt, const TQSize &sz ) { - return QPoint( pt.x() + sz.width(), pt.y() + sz.height() ); + return TQPoint( pt.x() + sz.width(), pt.y() + sz.height() ); } -/*static QPoint operator+( const QSize &sz, const QPoint &pt ) +/*static TQPoint operator+( const TQSize &sz, const TQPoint &pt ) { return pt + sz; }*/ -void ImageComponent::paint( QPainter *painter, const QColorGroup & ) +void ImageComponent::paint( TQPainter *painter, const TQColorGroup & ) { - QRect ourRc = rect(); - QRect rc = d->image.rect(); + TQRect ourRc = rect(); + TQRect rc = d->image.rect(); // center rc within our rect rc.moveTopLeft( ourRc.topLeft() + (ourRc.size() - rc.size()) / 2 ); // paint, shrunk to be within our rect painter->drawPixmap( rc & ourRc, d->image ); } -void ImageComponent::scale( int w, int h, QImage::ScaleMode mode ) +void ImageComponent::scale( int w, int h, TQImage::ScaleMode mode ) { - QImage im = d->image.convertToImage(); - setPixmap( QPixmap( im.smoothScale( w, h, mode ) ) ); + TQImage im = d->image.convertToImage(); + setPixmap( TQPixmap( im.smoothScale( w, h, mode ) ) ); } // TextComponent @@ -534,13 +534,13 @@ class TextComponent::Private { public: Private() : customColor( false ) {} - QString text; + TQString text; bool customColor; - QColor color; - QFont font; + TQColor color; + TQFont font; }; -TextComponent::TextComponent( ComponentBase *parent, const QFont &font, const QString &text ) +TextComponent::TextComponent( ComponentBase *parent, const TQFont &font, const TQString &text ) : Component( parent ), d( new Private ) { setFont( font ); @@ -554,12 +554,12 @@ TextComponent::~TextComponent() delete d; } -QString TextComponent::text() +TQString TextComponent::text() { return d->text; } -void TextComponent::setText( const QString &text ) +void TextComponent::setText( const TQString &text ) { if ( text == d->text ) return; d->text = text; @@ -567,12 +567,12 @@ void TextComponent::setText( const QString &text ) calcMinSize(); } -QFont TextComponent::font() +TQFont TextComponent::font() { return d->font; } -void TextComponent::setFont( const QFont &font ) +void TextComponent::setFont( const TQFont &font ) { if ( font == d->font ) return; d->font = font; @@ -584,7 +584,7 @@ void TextComponent::calcMinSize() setMinWidth( 0 ); if ( !d->text.isEmpty() ) - setMinHeight( QFontMetrics( font() ).height() ); + setMinHeight( TQFontMetrics( font() ).height() ); else setMinHeight( 0 ); @@ -597,15 +597,15 @@ int TextComponent::widthForHeight( int ) // allegedly if this is not done the protocol icons overlap the text. // i however have never seen this problem (which would almost certainly // be a bug somewhere else). - return QFontMetrics( font() ).width( d->text ) + 2; + return TQFontMetrics( font() ).width( d->text ) + 2; } -QColor TextComponent::color() +TQColor TextComponent::color() { - return d->customColor ? d->color : QColor(); + return d->customColor ? d->color : TQColor(); } -void TextComponent::setColor( const QColor &color ) +void TextComponent::setColor( const TQColor &color ) { d->color = color; d->customColor = true; @@ -618,13 +618,13 @@ void TextComponent::setDefaultColor() repaint(); } -void TextComponent::paint( QPainter *painter, const QColorGroup &cg ) +void TextComponent::paint( TQPainter *painter, const TQColorGroup &cg ) { if ( d->customColor ) painter->setPen( d->color ); else painter->setPen( cg.text() ); - QString dispStr = KStringHandler::rPixelSqueeze( d->text, QFontMetrics( font() ), rect().width() ); + TQString dispStr = KStringHandler::rPixelSqueeze( d->text, TQFontMetrics( font() ), rect().width() ); painter->setFont( font() ); painter->drawText( rect(), Qt::SingleLine, dispStr ); } @@ -634,8 +634,8 @@ void TextComponent::paint( QPainter *painter, const QColorGroup &cg ) class DisplayNameComponent::Private { public: - QString text; - QFont font; + TQString text; + TQFont font; }; DisplayNameComponent::DisplayNameComponent( ComponentBase *parent ) @@ -650,12 +650,12 @@ DisplayNameComponent::~DisplayNameComponent() delete d; } -void DisplayNameComponent::layout( const QRect &rect ) +void DisplayNameComponent::layout( const TQRect &rect ) { Component::layout( rect ); // finally, lay everything out - QRect rc; + TQRect rc; int totalWidth = rect.width(); int usedWidth = 0; bool exceeded = false; @@ -671,7 +671,7 @@ void DisplayNameComponent::layout( const QRect &rect ) if ( comp->rtti() == Rtti_TextComponent ) { comp->show(); - comp->layout( QRect( usedWidth+ rect.left(), rect.top(), + comp->layout( TQRect( usedWidth+ rect.left(), rect.top(), totalWidth - usedWidth, comp->heightForWidth( totalWidth - usedWidth ) ) ); } else { @@ -681,7 +681,7 @@ void DisplayNameComponent::layout( const QRect &rect ) else { comp->show(); - comp->layout( QRect( usedWidth+ rect.left(), rect.top(), + comp->layout( TQRect( usedWidth+ rect.left(), rect.top(), comp->widthForHeight( rect.height() ), comp->heightForWidth( rect.width() ) ) ); } @@ -695,7 +695,7 @@ void DisplayNameComponent::layout( const QRect &rect ) } } -void DisplayNameComponent::setText( const QString& text ) +void DisplayNameComponent::setText( const TQString& text ) { if ( d->text == text ) return; @@ -706,15 +706,15 @@ void DisplayNameComponent::setText( const QString& text ) void DisplayNameComponent::redraw() { - QColor color; + TQColor color; for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) { ((TextComponent*)component(n))->color(); } - QValueList tokens; - QValueList::const_iterator token; + TQValueList tokens; + TQValueList::const_iterator token; clear(); // clear childs @@ -722,7 +722,7 @@ void DisplayNameComponent::redraw() ImageComponent *ic; TextComponent *t; - QFontMetrics fontMetrics( d->font ); + TQFontMetrics fontMetrics( d->font ); int fontHeight = fontMetrics.height(); for ( token = tokens.begin(); token != tokens.end(); ++token ) { @@ -733,8 +733,8 @@ void DisplayNameComponent::redraw() break; case Kopete::Emoticons::Image: ic = new ImageComponent( this ); - ic->setPixmap( QPixmap( (*token).picPath ) ); - ic->scale( INT_MAX, fontHeight, QImage::ScaleMin ); + ic->setPixmap( TQPixmap( (*token).picPath ) ); + ic->scale( INT_MAX, fontHeight, TQImage::ScaleMin ); break; default: kdDebug( 14010 ) << k_funcinfo << "This should have not happened!" << endl; @@ -745,7 +745,7 @@ void DisplayNameComponent::redraw() setColor( color ); } -void DisplayNameComponent::setFont( const QFont& font ) +void DisplayNameComponent::setFont( const TQFont& font ) { for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) @@ -753,7 +753,7 @@ void DisplayNameComponent::setFont( const QFont& font ) d->font = font; } -void DisplayNameComponent::setColor( const QColor& color ) +void DisplayNameComponent::setColor( const TQColor& color ) { for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) @@ -767,7 +767,7 @@ void DisplayNameComponent::setDefaultColor() ((TextComponent*)component(n))->setDefaultColor(); } -QString DisplayNameComponent::text() +TQString DisplayNameComponent::text() { return d->text; } @@ -835,7 +835,7 @@ Kopete::Contact *ContactComponent::contact() } // we don't need to use a tooltip source here - this way is simpler -std::pair ContactComponent::toolTip( const QPoint &/*relativePos*/ ) +std::pair ContactComponent::toolTip( const TQPoint &/*relativePos*/ ) { return std::make_pair(d->contact->toolTip(),rect()); } @@ -860,16 +860,16 @@ class SharedTimer : private QTimer int users; public: SharedTimer( int period ) : period(period), users(0) {} - void attach( QObject *target, const char *slot ) + void attach( TQObject *target, const char *slot ) { - connect( this, SIGNAL(timeout()), target, slot ); + connect( this, TQT_SIGNAL(timeout()), target, slot ); if( users++ == 0 ) start( period ); //kdDebug(14000) << "SharedTimer::attach: users is now " << users << "\n"; } - void detach( QObject *target, const char *slot ) + void detach( TQObject *target, const char *slot ) { - disconnect( this, SIGNAL(timeout()), target, slot ); + disconnect( this, TQT_SIGNAL(timeout()), target, slot ); if( --users == 0 ) stop(); //kdDebug(14000) << "SharedTimer::detach: users is now " << users << "\n"; @@ -879,11 +879,11 @@ public: class SharedTimerRef { SharedTimer &timer; - QObject * const object; + TQObject * const object; const char * const slot; bool attached; public: - SharedTimerRef( SharedTimer &timer, QObject *obj, const char *slot ) + SharedTimerRef( SharedTimer &timer, TQObject *obj, const char *slot ) : timer(timer), object(obj), slot(slot), attached(false) { } @@ -909,16 +909,16 @@ class Item::Private { public: Private( Item *item ) - : layoutAnimateTimer( theLayoutAnimateTimer(), item, SLOT( slotLayoutAnimateItems() ) ) + : layoutAnimateTimer( theLayoutAnimateTimer(), item, TQT_SLOT( slotLayoutAnimateItems() ) ) , animateLayout( true ), opacity( 1.0 ) - , visibilityTimer( theVisibilityTimer(), item, SLOT( slotUpdateVisibility() ) ) + , visibilityTimer( theVisibilityTimer(), item, TQT_SLOT( slotUpdateVisibility() ) ) , visibilityLevel( 0 ), visibilityTarget( false ), searchMatch( true ) { } - QTimer layoutTimer; + TQTimer layoutTimer; - //QTimer layoutAnimateTimer; + //TQTimer layoutAnimateTimer; SharedTimerRef layoutAnimateTimer; SharedTimer &theLayoutAnimateTimer() { @@ -932,7 +932,7 @@ public: float opacity; - //QTimer visibilityTimer; + //TQTimer visibilityTimer; SharedTimerRef visibilityTimer; SharedTimer &theVisibilityTimer() { @@ -961,14 +961,14 @@ bool Item::Private::animateChanges = true; bool Item::Private::fadeVisibility = true; bool Item::Private::foldVisibility = true; -Item::Item( QListViewItem *parent, QObject *owner, const char *name ) - : QObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) +Item::Item( TQListViewItem *parent, TQObject *owner, const char *name ) + : TQObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) { initLVI(); } -Item::Item( QListView *parent, QObject *owner, const char *name ) - : QObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) +Item::Item( TQListView *parent, TQObject *owner, const char *name ) + : TQObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) { initLVI(); } @@ -987,10 +987,10 @@ void Item::setEffects( bool animation, bool fading, bool folding ) void Item::initLVI() { - connect( listView()->header(), SIGNAL( sizeChange( int, int, int ) ), SLOT( slotColumnResized() ) ); - connect( &d->layoutTimer, SIGNAL( timeout() ), SLOT( slotLayoutItems() ) ); - //connect( &d->layoutAnimateTimer, SIGNAL( timeout() ), SLOT( slotLayoutAnimateItems() ) ); - //connect( &d->visibilityTimer, SIGNAL( timeout() ), SLOT( slotUpdateVisibility() ) ); + connect( listView()->header(), TQT_SIGNAL( sizeChange( int, int, int ) ), TQT_SLOT( slotColumnResized() ) ); + connect( &d->layoutTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayoutItems() ) ); + //connect( &d->layoutAnimateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayoutAnimateItems() ) ); + //connect( &d->visibilityTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotUpdateVisibility() ) ); setVisible( false ); setTargetVisibility( true ); } @@ -1023,7 +1023,7 @@ void Item::slotLayoutItems() } int height = component( n )->heightForWidth( width ); - component( n )->layout( QRect( 0, 0, width, height ) ); + component( n )->layout( TQRect( 0, 0, width, height ) ); //kdDebug(14000) << k_funcinfo << "Component " << n << " is " << width << " x " << height << endl; } @@ -1169,62 +1169,62 @@ void Item::setHeight( int ) KListViewItem::setHeight( minHeight ); } -int Item::width( const QFontMetrics &, const QListView *lv, int c ) const +int Item::width( const TQFontMetrics &, const TQListView *lv, int c ) const { // Qt computes the itemRect from this. we want the whole item to be // clickable, so we return the widest we could possibly be. return lv->header()->sectionSize( c ); } -void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +void Item::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { - QPixmap back( width, height() ); - QPainter paint( &back ); + TQPixmap back( width, height() ); + TQPainter paint( &back ); //KListViewItem::paintCell( &paint, cg, column, width, align ); // PASTED FROM KLISTVIEWITEM: // set the alternate cell background colour if necessary - QColorGroup _cg = cg; + TQColorGroup _cg = cg; if (isAlternate()) if (listView()->viewport()->backgroundMode()==Qt::FixedColor) - _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); else - _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); // PASTED FROM QLISTVIEWITEM { - QPainter *p = &paint; + TQPainter *p = &paint; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; - QFontMetrics fm( p->fontMetrics() ); + TQFontMetrics fm( p->fontMetrics() ); // any text we render is done by the Components, not by this class, so make sure we've nothing to write - QString t; + TQString t; // removed text truncating code from Qt - we do that differently, further on int marg = lv->itemMargin(); int r = marg; - // const QPixmap * icon = pixmap( column ); + // const TQPixmap * icon = pixmap( column ); const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode ); + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); if ( _cg.brush( crole ) != lv->colorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), _cg.brush( crole ) ); else { - // all copied from QListView::paintEmptyArea + // all copied from TQListView::paintEmptyArea - //lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) ); - QStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in QListView and QHeader - QStyle::SFlags how = QStyle::Style_Default; + //lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); + TQStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in TQListView and QHeader + TQStyle::SFlags how = TQStyle::Style_Default; if ( lv->isEnabled() ) - how |= QStyle::Style_Enabled; + how |= TQStyle::Style_Enabled; - lv->style().drawComplexControl( QStyle::CC_ListView, - p, lv, QRect( 0, 0, width, height() ), lv->colorGroup(), - how, QStyle::SC_ListView, QStyle::SC_None, + lv->style().drawComplexControl( TQStyle::CC_ListView, + p, lv, TQRect( 0, 0, width, height() ), lv->colorGroup(), + how, TQStyle::SC_ListView, TQStyle::SC_None, opt ); } @@ -1233,7 +1233,7 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, if ( isSelected() && (column == 0 || lv->allColumnsShowFocus()) ) { p->fillRect( r - marg, 0, width - r + marg, height(), - _cg.brush( QColorGroup::Highlight ) ); + _cg.brush( TQColorGroup::Highlight ) ); // removed text pen setting code from Qt } @@ -1242,16 +1242,16 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, // draw the tree gubbins if ( multiLinesEnabled() && column == 0 && isOpen() && childCount() ) { int textheight = fm.size( align, t ).height() + 2 * lv->itemMargin(); - textheight = QMAX( textheight, QApplication::globalStrut().height() ); + textheight = QMAX( textheight, TQApplication::globalStrut().height() ); if ( textheight % 2 > 0 ) textheight++; if ( textheight < height() ) { int w = lv->treeStepSize() / 2; - lv->style().drawComplexControl( QStyle::CC_ListView, p, lv, - QRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, - lv->isEnabled() ? QStyle::Style_Enabled : QStyle::Style_Default, - QStyle::SC_ListViewExpand, - (uint)QStyle::SC_All, QStyleOption( this ) ); + lv->style().drawComplexControl( TQStyle::CC_ListView, p, lv, + TQRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, + lv->isEnabled() ? TQStyle::Style_Enabled : TQStyle::Style_Default, + TQStyle::SC_ListViewExpand, + (uint)TQStyle::SC_All, TQStyleOption( this ) ); } } } @@ -1260,14 +1260,14 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, //do you see a better way to tell the TextComponent we are selected ? - Olivier 2004-09-02 if ( isSelected() ) - _cg.setColor(QColorGroup::Text , _cg.highlightedText() ); + _cg.setColor(TQColorGroup::Text , _cg.highlightedText() ); if ( Component *comp = component( column ) ) comp->paint( &paint, _cg ); paint.end(); #ifdef HAVE_XRENDER - QColor rgb = cg.base();//backgroundColor(); + TQColor rgb = cg.base();//backgroundColor(); float opac = 1.0; if ( d->visibilityTimer.isActive() && Private::fadeVisibility ) { diff --git a/kopete/libkopete/ui/kopetelistviewitem.h b/kopete/libkopete/ui/kopetelistviewitem.h index 5952c569..e57482d0 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.h +++ b/kopete/libkopete/ui/kopetelistviewitem.h @@ -23,7 +23,7 @@ #include #include -#include +#include class QPixmap; @@ -41,7 +41,7 @@ public: uint components(); Component *component( uint n ); - Component *componentAt( const QPoint &pt ); + Component *componentAt( const TQPoint &pt ); /** Repaint this item */ virtual void repaint() = 0; @@ -55,7 +55,7 @@ public: * @return a pair where the first element is the tooltip, and the second is * the rectangle within the item for which the tip should be displayed. */ - virtual std::pair toolTip( const QPoint &relativePos ); + virtual std::pair toolTip( const TQPoint &relativePos ); protected: /** A child item has been added to this item */ @@ -91,7 +91,7 @@ public: * @param rect The tip will be removed when the mouse leaves this rect. * Will initially be set to \p component's rect(). */ - virtual QString operator() ( ComponentBase *component, const QPoint &pt, QRect &rect ) = 0; + virtual TQString operator() ( ComponentBase *component, const TQPoint &pt, TQRect &rect ) = 0; }; /** @@ -112,13 +112,13 @@ public: * @param rect the new rectangle this component will paint in, relative to the painter * passed to the paint() function by the parent item. */ - virtual void layout( const QRect &rect ); + virtual void layout( const TQRect &rect ); /** * Paint this item, inside the rectangle returned by rect(). * The default implementation calls paint on all children. */ - virtual void paint( QPainter *painter, const QColorGroup &cg ); + virtual void paint( TQPainter *painter, const TQColorGroup &cg ); void repaint(); void relayout(); @@ -126,7 +126,7 @@ public: /** * @return the rect this component was allocated last time it was laid out */ - QRect rect(); + TQRect rect(); /** * Prevents this component to be drawn */ @@ -177,7 +177,7 @@ public: * @return a pair where the first element is the tooltip, and the second is * the rectangle within the item for which the tip should be displayed. */ - std::pair toolTip( const QPoint &relativePos ); + std::pair toolTip( const TQPoint &relativePos ); /** * RTTI: Runtime Type Information @@ -221,9 +221,9 @@ private: friend void ComponentBase::updateAnimationPosition( int p, int s ); // used for animation - void setRect( const QRect &rect ); - QRect startRect(); - QRect targetRect(); + void setRect( const TQRect &rect ); + TQRect startRect(); + TQRect targetRect(); class Private; Private *d; @@ -236,7 +236,7 @@ public: BoxComponent( ComponentBase *parent, Direction dir = Horizontal ); ~BoxComponent(); - void layout( const QRect &rect ); + void layout( const TQRect &rect ); virtual int widthForHeight( int height ); virtual int heightForWidth( int width ); @@ -259,22 +259,22 @@ private: class TextComponent : public Component { public: - TextComponent( ComponentBase *parent, const QFont &font = QFont(), const QString &text = QString::null ); + TextComponent( ComponentBase *parent, const TQFont &font = TQFont(), const TQString &text = TQString::null ); ~TextComponent(); - QString text(); - void setText( const QString &text ); + TQString text(); + void setText( const TQString &text ); - QFont font(); - void setFont( const QFont &font ); + TQFont font(); + void setFont( const TQFont &font ); - QColor color(); - void setColor( const QColor &color ); + TQColor color(); + void setColor( const TQColor &color ); void setDefaultColor(); int widthForHeight( int ); - void paint( QPainter *painter, const QColorGroup &cg ); + void paint( TQPainter *painter, const TQColorGroup &cg ); static int RTTI; virtual int rtti() const { return RTTI; } @@ -293,12 +293,12 @@ public: ImageComponent( ComponentBase *parent, int minW, int minH ); ~ImageComponent(); - void setPixmap( const QPixmap &img, bool adjustSize = true); - QPixmap pixmap( void ); + void setPixmap( const TQPixmap &img, bool adjustSize = true); + TQPixmap pixmap( void ); - void paint( QPainter *painter, const QColorGroup &cg ); + void paint( TQPainter *painter, const TQColorGroup &cg ); - void scale( int w, int h, QImage::ScaleMode ); + void scale( int w, int h, TQImage::ScaleMode ); static int RTTI; virtual int rtti() const { return RTTI; } private: @@ -316,7 +316,7 @@ public: ~ContactComponent(); void updatePixmap(); Kopete::Contact *contact(); - std::pair toolTip( const QPoint &relativePos ); + std::pair toolTip( const TQPoint &relativePos ); protected: class Private; Private *d; @@ -347,12 +347,12 @@ public: * Dtor */ ~DisplayNameComponent(); - void layout( const QRect& rect ); + void layout( const TQRect& rect ); - QString text(); - void setText( const QString& text ); - void setFont( const QFont& font ); - void setColor( const QColor& color ); + TQString text(); + void setText( const TQString& text ); + void setFont( const TQFont& font ); + void setColor( const TQColor& color ); void setDefaultColor(); static int RTTI; virtual int rtti() const { return RTTI; } @@ -392,19 +392,19 @@ public: * * @author Richard Smith */ -class Item : public QObject, public KListViewItem, public ComponentBase +class Item : public TQObject, public KListViewItem, public ComponentBase { Q_OBJECT public: - Item( QListView *parent, QObject *owner = 0, const char *name = 0 ); - Item( QListViewItem *parent, QObject *owner = 0, const char *name = 0 ); + Item( TQListView *parent, TQObject *owner = 0, const char *name = 0 ); + Item( TQListViewItem *parent, TQObject *owner = 0, const char *name = 0 ); ~Item(); void repaint(); void relayout(); void setup(); - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); //TODO: startRename(...) float opacity(); @@ -421,7 +421,7 @@ public: */ static void setEffects( bool animation, bool fading, bool folding ); - int width( const QFontMetrics & fm, const QListView * lv, int c ) const; + int width( const TQFontMetrics & fm, const TQListView * lv, int c ) const; /** * Show or hide this item in a clean way depending on whether it matches diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.cpp b/kopete/libkopete/ui/kopetelistviewsearchline.cpp index a71d86c0..edb63ffc 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.cpp +++ b/kopete/libkopete/ui/kopetelistviewsearchline.cpp @@ -24,12 +24,12 @@ namespace Kopete { namespace UI { namespace ListView { -SearchLine::SearchLine( QWidget *parent, ListView *listView, const char *name ) +SearchLine::SearchLine( TQWidget *parent, ListView *listView, const char *name ) : KListViewSearchLine( parent, listView, name ) { } -SearchLine::SearchLine(QWidget *parent, const char *name) +SearchLine::SearchLine(TQWidget *parent, const char *name) : KListViewSearchLine( parent, 0, name ) { } @@ -39,7 +39,7 @@ SearchLine::~SearchLine() } -void SearchLine::updateSearch( const QString &s ) +void SearchLine::updateSearch( const TQString &s ) { // we copy a huge chunk of code here simply in order to override // the way items are shown/hidden. KSearchLine rudely @@ -54,7 +54,7 @@ void SearchLine::updateSearch( const QString &s ) // If there's a selected item that is visible, make sure that it's visible // when the search changes too (assuming that it still matches). - QListViewItem *currentItem = 0; + TQListViewItem *currentItem = 0; switch( listView()->selectionMode() ) { @@ -64,7 +64,7 @@ void SearchLine::updateSearch( const QString &s ) currentItem = listView()->selectedItem(); break; default: - for( QListViewItemIterator it(listView(), QListViewItemIterator::Selected | QListViewItemIterator::Visible); + for( TQListViewItemIterator it(listView(), TQListViewItemIterator::Selected | TQListViewItemIterator::Visible); it.current() && !currentItem; ++it ) { if( listView()->itemRect( it.current() ).isValid() ) @@ -85,10 +85,10 @@ void SearchLine::updateSearch( const QString &s ) void SearchLine::checkItemParentsNotVisible() { //BEGIN code from KSearchLine::checkItemParentsNotVisible - QListViewItemIterator it( listView() ); + TQListViewItemIterator it( listView() ); for( ; it.current(); ++it ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); if( itemMatches( item, search ) ) setItemVisible( item, true ); else @@ -97,7 +97,7 @@ void SearchLine::checkItemParentsNotVisible() //END code from KSearchLine::checkItemParentsNotVisible } -bool SearchLine::checkItemParentsVisible( QListViewItem *item ) +bool SearchLine::checkItemParentsVisible( TQListViewItem *item ) { //BEGIN code from KSearchLine::checkItemParentsVisible bool visible = false; @@ -123,7 +123,7 @@ bool SearchLine::checkItemParentsVisible( QListViewItem *item ) //END code from KSearchLine::checkItemParentsVisible } -void SearchLine::setItemVisible( QListViewItem *it, bool b ) +void SearchLine::setItemVisible( TQListViewItem *it, bool b ) { if( Item *item = dynamic_cast( it ) ) item->setSearchMatch( b ); diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.h b/kopete/libkopete/ui/kopetelistviewsearchline.h index a453b844..be7fc317 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.h +++ b/kopete/libkopete/ui/kopetelistviewsearchline.h @@ -37,26 +37,26 @@ public: * If \a listView is null then the widget will be disabled until a listview * is set with setListView(). */ - SearchLine( QWidget *parent, ListView *listView = 0, const char *name = 0 ); + SearchLine( TQWidget *parent, ListView *listView = 0, const char *name = 0 ); /** * Constructs a SearchLine without any ListView to filter. The * KListView object has to be set later with setListView(). */ - SearchLine(QWidget *parent, const char *name); + SearchLine(TQWidget *parent, const char *name); /** * Destroys the SearchLine. */ ~SearchLine(); - void updateSearch( const QString &s ); + void updateSearch( const TQString &s ); protected: virtual void checkItemParentsNotVisible(); - virtual bool checkItemParentsVisible( QListViewItem *it ); - virtual void setItemVisible( QListViewItem *it, bool visible ); + virtual bool checkItemParentsVisible( TQListViewItem *it ); + virtual void setItemVisible( TQListViewItem *it, bool visible ); private: - QString search; + TQString search; }; } // end namespace ListView diff --git a/kopete/libkopete/ui/kopetepasswordwidget.cpp b/kopete/libkopete/ui/kopetepasswordwidget.cpp index 2345f103..52921b16 100644 --- a/kopete/libkopete/ui/kopetepasswordwidget.cpp +++ b/kopete/libkopete/ui/kopetepasswordwidget.cpp @@ -20,7 +20,7 @@ #include -#include +#include class Kopete::UI::PasswordWidget::Private { @@ -28,7 +28,7 @@ public: uint maxLength; }; -Kopete::UI::PasswordWidget::PasswordWidget( QWidget *parent, const char *name, Kopete::Password *from ) +Kopete::UI::PasswordWidget::PasswordWidget( TQWidget *parent, const char *name, Kopete::Password *from ) : KopetePasswordWidgetBase( parent, name ), d( new Private ) { load( from ); @@ -41,15 +41,15 @@ Kopete::UI::PasswordWidget::~PasswordWidget() void Kopete::UI::PasswordWidget::load( Kopete::Password *source ) { - disconnect( mRemembered, SIGNAL( stateChanged( int ) ), this, SLOT( slotRememberChanged() ) ); - disconnect( mPassword, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) ); - disconnect( mRemembered, SIGNAL( stateChanged( int ) ), this, SIGNAL( changed() ) ); + disconnect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotRememberChanged() ) ); + disconnect( mPassword, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); + disconnect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SIGNAL( changed() ) ); if ( source && source->remembered() ) { mRemembered->setTristate(); mRemembered->setNoChange(); - source->requestWithoutPrompt( this, SLOT( receivePassword( const QString & ) ) ); + source->requestWithoutPrompt( this, TQT_SLOT( receivePassword( const TQString & ) ) ); } else { @@ -64,9 +64,9 @@ void Kopete::UI::PasswordWidget::load( Kopete::Password *source ) mPassword->setEnabled( false ); - connect( mRemembered, SIGNAL( stateChanged( int ) ), this, SLOT( slotRememberChanged() ) ); - connect( mPassword, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) ); - connect( mRemembered, SIGNAL( stateChanged( int ) ), this, SIGNAL( changed() ) ); + connect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotRememberChanged() ) ); + connect( mPassword, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); + connect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SIGNAL( changed() ) ); emit changed(); } @@ -77,11 +77,11 @@ void Kopete::UI::PasswordWidget::slotRememberChanged() mPassword->setEnabled( mRemembered->isChecked() ); } -void Kopete::UI::PasswordWidget::receivePassword( const QString &pwd ) +void Kopete::UI::PasswordWidget::receivePassword( const TQString &pwd ) { // pwd == null could mean user declined to open wallet // don't uncheck the remembered field in this case. - if ( !pwd.isNull() && mRemembered->state() == QButton::NoChange ) + if ( !pwd.isNull() && mRemembered->state() == TQButton::NoChange ) { mRemembered->setChecked( true ); setPassword( pwd ); @@ -90,7 +90,7 @@ void Kopete::UI::PasswordWidget::receivePassword( const QString &pwd ) void Kopete::UI::PasswordWidget::save( Kopete::Password *target ) { - if ( !target || mRemembered->state() == QButton::NoChange ) + if ( !target || mRemembered->state() == TQButton::NoChange ) return; if ( mRemembered->isChecked() ) @@ -106,17 +106,17 @@ bool Kopete::UI::PasswordWidget::validate() return password().length() <= d->maxLength; } -QString Kopete::UI::PasswordWidget::password() const +TQString Kopete::UI::PasswordWidget::password() const { - return QString::fromLocal8Bit( mPassword->password() ); + return TQString::fromLocal8Bit( mPassword->password() ); } bool Kopete::UI::PasswordWidget::remember() const { - return mRemembered->state() == QButton::On; + return mRemembered->state() == TQButton::On; } -void Kopete::UI::PasswordWidget::setPassword( const QString &pass ) +void Kopete::UI::PasswordWidget::setPassword( const TQString &pass ) { // switch out of 'waiting for wallet' mode if we're in it mRemembered->setTristate( false ); diff --git a/kopete/libkopete/ui/kopetepasswordwidget.h b/kopete/libkopete/ui/kopetepasswordwidget.h index b1c51a39..72834bff 100644 --- a/kopete/libkopete/ui/kopetepasswordwidget.h +++ b/kopete/libkopete/ui/kopetepasswordwidget.h @@ -45,7 +45,7 @@ public: * @param name The name of this QObject * @param from The password to load the data for this widget from, or 0 if none */ - PasswordWidget( QWidget *parent, const char *name = 0, Kopete::Password *from = 0 ); + PasswordWidget( TQWidget *parent, const char *name = 0, Kopete::Password *from = 0 ); ~PasswordWidget(); /** @@ -67,7 +67,7 @@ public: /** * Returns the string currently in the input box in the widget */ - QString password() const; + TQString password() const; /** * Returns a boolean indicating whether the Remember Password checkbox is checked. * Result is undefined if the Remember Password field is in the 'no change' state @@ -79,7 +79,7 @@ public: * Set the password stored in the widget. * @param pass The text to place in the password field. */ - void setPassword( const QString &pass ); + void setPassword( const TQString &pass ); signals: /** @@ -89,7 +89,7 @@ signals: public slots: /** @internal */ - void receivePassword( const QString & ); + void receivePassword( const TQString & ); private slots: void slotRememberChanged(); diff --git a/kopete/libkopete/ui/kopetestdaction.cpp b/kopete/libkopete/ui/kopetestdaction.cpp index e6731485..f1595f4e 100644 --- a/kopete/libkopete/ui/kopetestdaction.cpp +++ b/kopete/libkopete/ui/kopetestdaction.cpp @@ -18,7 +18,7 @@ #include "kopetestdaction.h" -#include +#include #include #include @@ -41,10 +41,10 @@ KopetePreferencesAction::KopetePreferencesAction( KActionCollection *parent, con : KAction( KStdGuiItem::configure(), 0, 0, 0, parent, name ) #else : KAction( KGuiItem( i18n( "&Configure Kopete..." ), - QString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) + TQString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) #endif { - connect( this, SIGNAL( activated() ), this, SLOT( slotShowPreferences() ) ); + connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotShowPreferences() ) ); } KopetePreferencesAction::~KopetePreferencesAction() @@ -68,59 +68,59 @@ KAction * KopeteStdAction::preferences( KActionCollection *parent, const char *n return new KopetePreferencesAction( parent, name ); } -KAction * KopeteStdAction::chat( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::chat( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Start &Chat..." ), QString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Start &Chat..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::sendMessage( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::sendMessage( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Send Single Message..." ), QString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Send Single Message..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::contactInfo( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::contactInfo( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "User &Info" ), QString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "User &Info" ), TQString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::sendFile( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::sendFile( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Send &File..." ), QString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Send &File..." ), TQString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::viewHistory( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::viewHistory( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "View &History..." ), QString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "View &History..." ), TQString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::addGroup( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::addGroup( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Create Group..." ), QString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Create Group..." ), TQString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::changeMetaContact( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::changeMetaContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Cha&nge Meta Contact..." ), QString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Cha&nge Meta Contact..." ), TQString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::deleteContact( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::deleteContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Delete Contact" ), QString::fromLatin1( "delete_user" ), Qt::Key_Delete, recvr, slot, parent, name ); + return new KAction( i18n( "&Delete Contact" ), TQString::fromLatin1( "delete_user" ), Qt::Key_Delete, recvr, slot, parent, name ); } -KAction * KopeteStdAction::changeAlias( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::changeAlias( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Change A&lias..." ), QString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Change A&lias..." ), TQString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::blockContact( const QObject *recvr, const char *slot, QObject* parent, const char *name ) +KAction * KopeteStdAction::blockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "&Block Contact" ), QString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Block Contact" ), TQString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::unblockContact( const QObject *recvr, const char *slot, QObject* parent, const char *name ) +KAction * KopeteStdAction::unblockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "Un&block Contact" ), QString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Un&block Contact" ), TQString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); } #include "kopetestdaction.moc" diff --git a/kopete/libkopete/ui/kopetestdaction.h b/kopete/libkopete/ui/kopetestdaction.h index 8f06d296..bd323943 100644 --- a/kopete/libkopete/ui/kopetestdaction.h +++ b/kopete/libkopete/ui/kopetestdaction.h @@ -21,7 +21,7 @@ #undef KDE_NO_COMPAT #include -#include +#include #include "kopete_export.h" @@ -34,58 +34,58 @@ public: /** * Standard action to start a chat */ - static KAction *chat( const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0 ); + static KAction *chat( const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0 ); /** * Standard action to send a single message */ - static KAction *sendMessage(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *sendMessage(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to open a user info dialog */ - static KAction *contactInfo(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *contactInfo(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to open a history dialog or something similar */ - static KAction *viewHistory(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *viewHistory(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to initiate sending a file to a contact */ - static KAction *sendFile(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *sendFile(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to change a contacts @ref Kopete::MetaContact */ - static KAction *changeMetaContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *changeMetaContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to add a group */ - static KAction *addGroup(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *addGroup(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to delete a contact */ - static KAction *deleteContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *deleteContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to change a contact alias/nickname in your contactlist */ - static KAction *changeAlias(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *changeAlias(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to block a contact */ - static KAction *blockContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *blockContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to unblock a contact */ - static KAction *unblockContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *unblockContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Return an action to change the Kopete preferences. diff --git a/kopete/libkopete/ui/kopeteview.cpp b/kopete/libkopete/ui/kopeteview.cpp index 91f1fa9c..111f1405 100644 --- a/kopete/libkopete/ui/kopeteview.cpp +++ b/kopete/libkopete/ui/kopeteview.cpp @@ -32,9 +32,9 @@ void KopeteView::clear() //Do nothing } -void KopeteView::appendMessages(QValueList msgs) +void KopeteView::appendMessages(TQValueList msgs) { - QValueList::iterator it; + TQValueList::iterator it; for ( it = msgs.begin(); it != msgs.end(); ++it ) { appendMessage(*it); diff --git a/kopete/libkopete/ui/kopeteview.h b/kopete/libkopete/ui/kopeteview.h index 47320546..c54b1dba 100644 --- a/kopete/libkopete/ui/kopeteview.h +++ b/kopete/libkopete/ui/kopeteview.h @@ -20,7 +20,7 @@ #define KOPETEVIEW_H #include "kopetemessage.h" -#include +#include #include "kopete_export.h" namespace Kopete @@ -79,7 +79,7 @@ class KOPETE_EXPORT KopeteView * * The default implementation just call @ref appendMessage() X times */ - virtual void appendMessages( QValueList ); + virtual void appendMessages( TQValueList ); /** * @brief Raises the view above other windows @@ -115,12 +115,12 @@ class KOPETE_EXPORT KopeteView * * Can be reimplemented to return this if derived object is a widget */ - virtual QWidget *mainWidget() = 0; + virtual TQWidget *mainWidget() = 0; /** * @brief Inform the view the message was sent successfully * - * This should be reimplemented as a SLOT in any derived objects + * This should be reimplemented as a TQT_SLOT in any derived objects */ virtual void messageSentSuccessfully() = 0; @@ -135,10 +135,10 @@ class KOPETE_EXPORT KopeteView * A view does not need to implement this method unless they have context * menus that can be extended * - * @param target A target QObject for the contextMenuEvent signal of the view - * @param slot A slot that matches the signature ( QString&, KPopupMenu *) + * @param target A target TQObject for the contextMenuEvent signal of the view + * @param slot A slot that matches the signature ( TQString&, KPopupMenu *) */ - virtual void registerContextMenuHandler( QObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; + virtual void registerContextMenuHandler( TQObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; /** * @brief Register a handler for the tooltip @@ -151,10 +151,10 @@ class KOPETE_EXPORT KopeteView * A view does not need to impliment this method unless it has the ability * to show tooltips * - * @param target A target QObject for the contextMenuEvent signal of the view - * @param slot A slot that matches the signature ( QString&, KPopupMenu *) + * @param target A target TQObject for the contextMenuEvent signal of the view + * @param slot A slot that matches the signature ( TQString&, KPopupMenu *) */ - virtual void registerTooltipHandler( QObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; + virtual void registerTooltipHandler( TQObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; /** * @brief Returns the Kopete::ViewPlugin responsible for this view diff --git a/kopete/libkopete/ui/kopeteviewplugin.cpp b/kopete/libkopete/ui/kopeteviewplugin.cpp index b358e547..843fe939 100644 --- a/kopete/libkopete/ui/kopeteviewplugin.cpp +++ b/kopete/libkopete/ui/kopeteviewplugin.cpp @@ -16,7 +16,7 @@ #include "kopeteviewplugin.h" -Kopete::ViewPlugin::ViewPlugin( KInstance *instance, QObject *parent, const char *name ) : +Kopete::ViewPlugin::ViewPlugin( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Plugin( instance, parent, name ) { diff --git a/kopete/libkopete/ui/kopeteviewplugin.h b/kopete/libkopete/ui/kopeteviewplugin.h index e7797d56..25ce704b 100644 --- a/kopete/libkopete/ui/kopeteviewplugin.h +++ b/kopete/libkopete/ui/kopeteviewplugin.h @@ -41,7 +41,7 @@ class KOPETE_EXPORT ViewPlugin : public Plugin /** * @brief Create and initialize the plugin */ - ViewPlugin( KInstance *instance, QObject *parent = 0L, const char *name = 0L ); + ViewPlugin( KInstance *instance, TQObject *parent = 0L, const char *name = 0L ); /** * @brief Creates a view to be associated with the passed in session diff --git a/kopete/libkopete/ui/kopetewidgets.cpp b/kopete/libkopete/ui/kopetewidgets.cpp index 093ee48e..916b0faf 100644 --- a/kopete/libkopete/ui/kopetewidgets.cpp +++ b/kopete/libkopete/ui/kopetewidgets.cpp @@ -3,7 +3,7 @@ * The generated code in this file is licensed under the same license that the * input file. */ -#include +#include #include #include @@ -20,92 +20,92 @@ public: virtual ~KopeteWidgets(); - virtual QStringList keys() const + virtual TQStringList keys() const { - QStringList result; + TQStringList result; for (WidgetInfos::ConstIterator it = m_widgets.begin(); it != m_widgets.end(); ++it) result << it.key(); return result; } - virtual QWidget *create(const QString &key, QWidget *parent = 0, const char *name = 0); + virtual TQWidget *create(const TQString &key, TQWidget *parent = 0, const char *name = 0); - virtual QIconSet iconSet(const QString &key) const + virtual TQIconSet iconSet(const TQString &key) const { #ifdef EMBED_IMAGES - QPixmap pix(m_widgets[key].iconSet); + TQPixmap pix(m_widgets[key].iconSet); #else - QPixmap pix(locate( "data", - QString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); + TQPixmap pix(locate( "data", + TQString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); #endif - return QIconSet(pix); + return TQIconSet(pix); } - virtual bool isContainer(const QString &key) const { return m_widgets[key].isContainer; } + virtual bool isContainer(const TQString &key) const { return m_widgets[key].isContainer; } - virtual QString group(const QString &key) const { return m_widgets[key].group; } + virtual TQString group(const TQString &key) const { return m_widgets[key].group; } - virtual QString includeFile(const QString &key) const { return m_widgets[key].includeFile; } + virtual TQString includeFile(const TQString &key) const { return m_widgets[key].includeFile; } - virtual QString toolTip(const QString &key) const { return m_widgets[key].toolTip; } + virtual TQString toolTip(const TQString &key) const { return m_widgets[key].toolTip; } - virtual QString whatsThis(const QString &key) const { return m_widgets[key].whatsThis; } + virtual TQString whatsThis(const TQString &key) const { return m_widgets[key].whatsThis; } private: struct WidgetInfo { - QString group; + TQString group; #ifdef EMBED_IMAGES - QPixmap iconSet; + TQPixmap iconSet; #else - QString iconSet; + TQString iconSet; #endif - QString includeFile; - QString toolTip; - QString whatsThis; + TQString includeFile; + TQString toolTip; + TQString whatsThis; bool isContainer; }; - typedef QMap WidgetInfos; + typedef TQMap WidgetInfos; WidgetInfos m_widgets; }; KopeteWidgets::KopeteWidgets() { WidgetInfo widget; - widget.group = QString::fromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__addressbooklinkwidget_xpm); + widget.iconSet = TQPixmap(kopete__ui__addressbooklinkwidget_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); #endif - widget.includeFile = QString::fromLatin1("addressbooklinkwidget.h"); - widget.toolTip = QString::fromLatin1("Address Book Link Widget (Kopete)"); - widget.whatsThis = QString::fromLatin1("KABC::Addressee display/selector"); + widget.includeFile = TQString::fromLatin1("addressbooklinkwidget.h"); + widget.toolTip = TQString::fromLatin1("Address Book Link Widget (Kopete)"); + widget.whatsThis = TQString::fromLatin1("KABC::Addressee display/selector"); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); - widget.group = QString::fromLatin1("Views (Kopete)"); + widget.group = TQString::fromLatin1("Views (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__listview__listview_xpm); + widget.iconSet = TQPixmap(kopete__ui__listview__listview_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__listview__listview.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__listview.png"); #endif - widget.includeFile = QString::fromLatin1("kopetelistview.h"); - widget.toolTip = QString::fromLatin1("List View (Kopete)"); - widget.whatsThis = QString::fromLatin1("A component capable list view widget."); + widget.includeFile = TQString::fromLatin1("kopetelistview.h"); + widget.toolTip = TQString::fromLatin1("List View (Kopete)"); + widget.whatsThis = TQString::fromLatin1("A component capable list view widget."); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::ListView::ListView"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::ListView"), widget); - widget.group = QString::fromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__listview__searchline_xpm); + widget.iconSet = TQPixmap(kopete__ui__listview__searchline_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__listview__searchline.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__searchline.png"); #endif - widget.includeFile = QString::fromLatin1("kopetelistviewsearchline.h"); - widget.toolTip = QString::fromLatin1("List View Search Line (Kopete)"); - widget.whatsThis = QString::fromLatin1("Search line able to use Kopete custom list View."); + widget.includeFile = TQString::fromLatin1("kopetelistviewsearchline.h"); + widget.toolTip = TQString::fromLatin1("List View Search Line (Kopete)"); + widget.whatsThis = TQString::fromLatin1("Search line able to use Kopete custom list View."); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); new KInstance("kopetewidgets"); } @@ -113,16 +113,16 @@ KopeteWidgets::~KopeteWidgets() { } -QWidget *KopeteWidgets::create(const QString &key, QWidget *parent, const char *name) +TQWidget *KopeteWidgets::create(const TQString &key, TQWidget *parent, const char *name) { - if (key == QString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) + if (key == TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) return new Kopete::UI::AddressBookLinkWidget(parent, name); - if (key == QString::fromLatin1("Kopete::UI::ListView::ListView")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::ListView")) return new Kopete::UI::ListView::ListView(parent, name); - if (key == QString::fromLatin1("Kopete::UI::ListView::SearchLine")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::SearchLine")) return new Kopete::UI::ListView::SearchLine(parent, 0, name); return 0; diff --git a/kopete/libkopete/ui/metacontactselectorwidget.cpp b/kopete/libkopete/ui/metacontactselectorwidget.cpp index d9c75308..1ab6646c 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.cpp +++ b/kopete/libkopete/ui/metacontactselectorwidget.cpp @@ -15,16 +15,16 @@ ************************************************************************* */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,15 +68,15 @@ public: }; -MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) +MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) { d->metaContact = mc; d->photoSize = 60; - connect( d->metaContact, SIGNAL( photoChanged() ), - SLOT( slotPhotoChanged() ) ); - connect( d->metaContact, SIGNAL( displayNameChanged(const QString&, const QString&) ), - SLOT( slotDisplayNameChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( photoChanged() ), + TQT_SLOT( slotPhotoChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + TQT_SLOT( slotDisplayNameChanged() ) ); buildVisualComponents(); } @@ -99,24 +99,24 @@ void MetaContactSelectorWidgetLVI::slotDisplayNameChanged() } } -QString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const +TQString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const { return d->metaContact->displayName(); } void MetaContactSelectorWidgetLVI::slotPhotoChanged() { - QPixmap photoPixmap; - QImage photoImg = d->metaContact->photo(); + TQPixmap photoPixmap; + TQImage photoImg = d->metaContact->photo(); if ( !photoImg.isNull() && (photoImg.width() > 0) && (photoImg.height() > 0) ) { int photoSize = d->photoSize; - photoImg = photoImg.smoothScale( photoSize, photoSize, QImage::ScaleMin ) ; + photoImg = photoImg.smoothScale( photoSize, photoSize, TQImage::ScaleMin ) ; // draw a 1 pixel black border photoPixmap = photoImg; - QPainter p(&photoPixmap); + TQPainter p(&photoPixmap); p.setPen(Qt::black); p.drawLine(0, 0, photoPixmap.width()-1, 0); p.drawLine(0, photoPixmap.height()-1, photoPixmap.width()-1, photoPixmap.height()-1); @@ -166,7 +166,7 @@ void MetaContactSelectorWidgetLVI::buildVisualComponents() void MetaContactSelectorWidgetLVI::slotUpdateContactBox() { - QPtrList contacts = d->metaContact->contacts(); + TQPtrList contacts = d->metaContact->contacts(); for(Kopete::Contact *c = contacts.first(); c; c = contacts.next()) { new ContactComponent(d->contactIconBox, c, IconSize( KIcon::Small )); @@ -177,37 +177,37 @@ class MetaContactSelectorWidget::Private { public: MetaContactSelectorWidget_Base *widget; - QValueList excludedMetaContacts; + TQValueList excludedMetaContacts; }; -MetaContactSelectorWidget::MetaContactSelectorWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ), d( new Private() ) +MetaContactSelectorWidget::MetaContactSelectorWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), d( new Private() ) { - QBoxLayout *l = new QVBoxLayout(this); + TQBoxLayout *l = new TQVBoxLayout(this); d->widget = new MetaContactSelectorWidget_Base(this); l->addWidget(d->widget); - connect( d->widget->metaContactListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); - connect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); d->widget->kListViewSearchLine->setListView(d->widget->metaContactListView); d->widget->metaContactListView->setFullWidth( true ); d->widget->metaContactListView->header()->hide(); - d->widget->metaContactListView->setColumnWidthMode(0, QListView::Maximum); + d->widget->metaContactListView->setColumnWidthMode(0, TQListView::Maximum); slotLoadMetaContacts(); } MetaContactSelectorWidget::~MetaContactSelectorWidget() { - disconnect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + disconnect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); } @@ -225,7 +225,7 @@ Kopete::MetaContact* MetaContactSelectorWidget::metaContact() void MetaContactSelectorWidget::selectMetaContact( Kopete::MetaContact *mc ) { // iterate trough list view - QListViewItemIterator it( d->widget->metaContactListView ); + TQListViewItemIterator it( d->widget->metaContactListView ); while( it.current() ) { MetaContactSelectorWidgetLVI *item = (MetaContactSelectorWidgetLVI *) it.current(); @@ -261,7 +261,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() { d->widget->metaContactListView->clear(); - QPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); + TQPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); for( Kopete::MetaContact *mc = metaContacts.first(); mc ; mc = metaContacts.next() ) { if( !mc->isTemporary() && (d->excludedMetaContacts.findIndex(mc) == -1) ) @@ -273,7 +273,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() d->widget->metaContactListView->sort(); } -void MetaContactSelectorWidget::setLabelMessage( const QString &msg ) +void MetaContactSelectorWidget::setLabelMessage( const TQString &msg ) { d->widget->lblHeader->setText(msg); } diff --git a/kopete/libkopete/ui/metacontactselectorwidget.h b/kopete/libkopete/ui/metacontactselectorwidget.h index 1c0a21ff..a265f665 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.h +++ b/kopete/libkopete/ui/metacontactselectorwidget.h @@ -19,7 +19,7 @@ #define MetaContactSelectorWidget_H #include -#include +#include #include "kopetelistviewitem.h" #include "kopete_export.h" @@ -39,7 +39,7 @@ class KOPETE_EXPORT MetaContactSelectorWidget : public QWidget { Q_OBJECT public: - MetaContactSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + MetaContactSelectorWidget( TQWidget *parent = 0, const char *name = 0 ); ~MetaContactSelectorWidget(); Kopete::MetaContact* metaContact(); /** @@ -47,7 +47,7 @@ public: * example: Please select a contact * or, Choose a contact to delete */ - void setLabelMessage( const QString &msg ); + void setLabelMessage( const TQString &msg ); /** * pre-selects a contact */ @@ -67,7 +67,7 @@ protected slots: */ void slotLoadMetaContacts(); signals: - void metaContactListClicked( QListViewItem *mc ); + void metaContactListClicked( TQListViewItem *mc ); private: class Private; Private *d; @@ -81,9 +81,9 @@ class MetaContactSelectorWidgetLVI : public Kopete::UI::ListView::Item { Q_OBJECT public: - MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner = 0, const char *name = 0 ); + MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner = 0, const char *name = 0 ); Kopete::MetaContact* metaContact(); - virtual QString text ( int column ) const; + virtual TQString text ( int column ) const; protected slots: void slotPhotoChanged(); void slotDisplayNameChanged(); diff --git a/kopete/libkopete/ui/userinfodialog.cpp b/kopete/libkopete/ui/userinfodialog.cpp index a25454a9..0ad7d9c2 100644 --- a/kopete/libkopete/ui/userinfodialog.cpp +++ b/kopete/libkopete/ui/userinfodialog.cpp @@ -25,25 +25,25 @@ #include #include -#include -#include -#include +#include +#include +#include namespace Kopete { struct UserInfoDialog::UserInfoDialogPrivate { - QString name; - QString id; - QString awayMessage; - QString status; - QString warningLevel; - QString onlineSince; - QString info; - QString address; - QString phone; - QMap customFields; - QVBoxLayout *topLayout; - QWidget *page; + TQString name; + TQString id; + TQString awayMessage; + TQString status; + TQString warningLevel; + TQString onlineSince; + TQString info; + TQString address; + TQString phone; + TQMap customFields; + TQVBoxLayout *topLayout; + TQWidget *page; DialogStyle style; KHTMLPart *htmlPart; @@ -58,13 +58,13 @@ struct UserInfoDialog::UserInfoDialogPrivate { KTextBrowser *infoBrowser; }; -UserInfoDialog::UserInfoDialog( const QString& descr ) +UserInfoDialog::UserInfoDialog( const TQString& descr ) : KDialogBase( Kopete::UI::Global::mainWidget(), "userinfodialog", true, i18n( "User Info for %1" ).arg( descr ), KDialogBase::Ok ) { d = new UserInfoDialogPrivate; - d->page = new QWidget( this ); + d->page = new TQWidget( this ); setMainWidget( d->page ); - d->topLayout = new QVBoxLayout( d->page, 0, spacingHint() ); + d->topLayout = new TQVBoxLayout( d->page, 0, spacingHint() ); d->style = Widget; } @@ -78,65 +78,65 @@ void UserInfoDialog::setStyle( DialogStyle style ) d->style = style; } -void UserInfoDialog::setName( const QString& name ) +void UserInfoDialog::setName( const TQString& name ) { d->name = name; } -void UserInfoDialog::setId( const QString& id ) +void UserInfoDialog::setId( const TQString& id ) { d->id = id; } -void UserInfoDialog::setAwayMessage( const QString& msg ) +void UserInfoDialog::setAwayMessage( const TQString& msg ) { d->awayMessage = msg; } -void UserInfoDialog::setStatus( const QString& status ) +void UserInfoDialog::setStatus( const TQString& status ) { d->status = status; } -void UserInfoDialog::setWarningLevel(const QString& level ) +void UserInfoDialog::setWarningLevel(const TQString& level ) { d->warningLevel = level; } -void UserInfoDialog::setOnlineSince( const QString& since ) +void UserInfoDialog::setOnlineSince( const TQString& since ) { d->onlineSince = since; } -void UserInfoDialog::setInfo( const QString& info ) +void UserInfoDialog::setInfo( const TQString& info ) { d->info = info; } -void UserInfoDialog::setAddress( const QString& addr ) +void UserInfoDialog::setAddress( const TQString& addr ) { d->address = addr; } -void UserInfoDialog::setPhone( const QString& phone ) +void UserInfoDialog::setPhone( const TQString& phone ) { d->phone = phone; } -void UserInfoDialog::addCustomField( const QString& /*name*/, const QString& /*txt*/ ) +void UserInfoDialog::addCustomField( const TQString& /*name*/, const TQString& /*txt*/ ) { } -void UserInfoDialog::addHTMLText( const QString& /*str*/ ) +void UserInfoDialog::addHTMLText( const TQString& /*str*/ ) { } -QHBox* UserInfoDialog::addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit ) +TQHBox* UserInfoDialog::addLabelEdit( const TQString& label, const TQString& text, KLineEdit*& edit ) { - QHBox *box = new QHBox( d->page ); - new QLabel( label, box ); + TQHBox *box = new TQHBox( d->page ); + new TQLabel( label, box ); edit = new KLineEdit( box ); edit->setAlignment( Qt::AlignHCenter ); edit->setText( text ); @@ -148,12 +148,12 @@ void UserInfoDialog::fillHTML() { d->htmlPart = new KHTMLPart( this ); - QString text; + TQString text; /* if ( d->name.isEmpty() ) { - text.append( QString("
") + i18n("Name : ") + - QString("") ); - text.append( d->name + QString("

") ); + text.append( TQString("
") + i18n("Name : ") + + TQString("") ); + text.append( d->name + TQString("

") ); } if ( d->id.isEmpty() ) { @@ -234,23 +234,23 @@ void UserInfoDialog::fillWidgets() } if ( !d->awayMessage.isEmpty() ) { - QVBox *awayBox = new QVBox( d->page ); - new QLabel( i18n("Away message:"), awayBox ); + TQVBox *awayBox = new TQVBox( d->page ); + new TQLabel( i18n("Away message:"), awayBox ); d->awayBrowser = new KTextBrowser( awayBox ); d->awayBrowser->setText( d->awayMessage ); d->topLayout->addWidget( awayBox ); } if ( !d->info.isEmpty() ) { - QVBox *infoBox = new QVBox( d->page ); - new QLabel( i18n("User info:"), infoBox ); + TQVBox *infoBox = new TQVBox( d->page ); + new TQLabel( i18n("User info:"), infoBox ); d->infoBrowser = new KTextBrowser( infoBox ); d->infoBrowser->setText( d->info ); d->topLayout->addWidget( infoBox ); } } -void UserInfoDialog::setStyleSheet( const QString& /*css*/ ) +void UserInfoDialog::setStyleSheet( const TQString& /*css*/ ) { } diff --git a/kopete/libkopete/ui/userinfodialog.h b/kopete/libkopete/ui/userinfodialog.h index 7df19f4f..246d15ec 100644 --- a/kopete/libkopete/ui/userinfodialog.h +++ b/kopete/libkopete/ui/userinfodialog.h @@ -19,7 +19,7 @@ #define USERINFODIALOG_H #include -#include +#include #include "kopete_export.h" @@ -31,7 +31,7 @@ namespace Kopete { { Q_OBJECT public: - UserInfoDialog( const QString& descr ); + UserInfoDialog( const TQString& descr ); virtual ~UserInfoDialog(); @@ -46,18 +46,18 @@ namespace Kopete { // The functions below set elements as specified in the name. // If an element is not set it won't be displayed. - void setName( const QString& name ); - void setId( const QString& id ); - void setAwayMessage( const QString& msg ); - void setStatus( const QString& status ); - void setWarningLevel(const QString& level ); - void setOnlineSince( const QString& since ); - void setInfo( const QString& info ); - void setAddress( const QString& addr ); - void setPhone( const QString& phone ); - - void addCustomField( const QString& name, const QString& txt ); - void addHTMLText( const QString& str ); + void setName( const TQString& name ); + void setId( const TQString& id ); + void setAwayMessage( const TQString& msg ); + void setStatus( const TQString& status ); + void setWarningLevel(const TQString& level ); + void setOnlineSince( const TQString& since ); + void setInfo( const TQString& info ); + void setAddress( const TQString& addr ); + void setPhone( const TQString& phone ); + + void addCustomField( const TQString& name, const TQString& txt ); + void addHTMLText( const TQString& str ); ///Shows the dialog virtual void show(); @@ -78,9 +78,9 @@ namespace Kopete { * customized include : "name", "id", "warningLevel", "onlineSince", * "address", "phone", "status", "awayMessage" and "info". */ - void setStyleSheet( const QString& css ); + void setStyleSheet( const TQString& css ); - QHBox* addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit ); + TQHBox* addLabelEdit( const TQString& label, const TQString& text, KLineEdit*& edit ); private: struct UserInfoDialogPrivate; diff --git a/kopete/libkopete/webcamwidget.cpp b/kopete/libkopete/webcamwidget.cpp index ae617ad5..ad701b8e 100644 --- a/kopete/libkopete/webcamwidget.cpp +++ b/kopete/libkopete/webcamwidget.cpp @@ -16,15 +16,15 @@ #include "webcamwidget.h" -#include -#include +#include +#include #include namespace Kopete { -WebcamWidget::WebcamWidget( QWidget* parent, const char* name ) -: QWidget( parent, name ) +WebcamWidget::WebcamWidget( TQWidget* parent, const char* name ) +: TQWidget( parent, name ) { clear(); } @@ -34,12 +34,12 @@ WebcamWidget::~WebcamWidget() // don't do anything either } -void WebcamWidget::updatePixmap(const QPixmap& pixmap) +void WebcamWidget::updatePixmap(const TQPixmap& pixmap) { mPixmap = pixmap; mText = ""; - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } @@ -50,24 +50,24 @@ void WebcamWidget::clear() if (!mPixmap.isNull()) mPixmap.resize(0,0); - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } -void WebcamWidget::setText(const QString& text) +void WebcamWidget::setText(const TQString& text) { mText = text; // for now redraw everything - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } -void WebcamWidget::paintEvent( QPaintEvent* event ) +void WebcamWidget::paintEvent( TQPaintEvent* event ) { - QMemArray rects = event->region().rects(); + TQMemArray rects = event->region().rects(); if (!mPixmap.isNull()) { @@ -80,23 +80,23 @@ void WebcamWidget::paintEvent( QPaintEvent* event ) { for (unsigned int i = 0; i < rects.count(); ++i) { - QColor bgColor = paletteBackgroundColor(); - QPainter p(this); + TQColor bgColor = paletteBackgroundColor(); + TQPainter p(this); p.fillRect(rects[i], bgColor); } } // TODO: draw the text - QPainter p(this); - QRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText ); + TQPainter p(this); + TQRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText ); if ( !mText.isEmpty() && event->rect().intersects(r)) { p.setPen(Qt::black); - QRect rec = rect(); - rec.moveTopLeft(QPoint(1,1)); + TQRect rec = rect(); + rec.moveTopLeft(TQPoint(1,1)); p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText, -1); - rec.moveTopLeft(QPoint(-1,-1)); + rec.moveTopLeft(TQPoint(-1,-1)); p.setPen(Qt::white); p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText, -1); } diff --git a/kopete/libkopete/webcamwidget.h b/kopete/libkopete/webcamwidget.h index 6458f60a..fdc60a6e 100644 --- a/kopete/libkopete/webcamwidget.h +++ b/kopete/libkopete/webcamwidget.h @@ -17,9 +17,9 @@ #ifndef WEBCAMWIDGET_H #define WEBCAMWIDGET_H -#include -#include -#include +#include +#include +#include #include "kopete_export.h" @@ -37,14 +37,14 @@ public: * @param parent The parent widget of this widget * @param name The name for this QObject */ - WebcamWidget( QWidget* parent = 0, const char* name = 0 ); + WebcamWidget( TQWidget* parent = 0, const char* name = 0 ); ~WebcamWidget(); /** * @brief Updates the frame being displayed in the widget * @param pixmap The frame to be displayed */ - void updatePixmap(const QPixmap& pixmap); + void updatePixmap(const TQPixmap& pixmap); /** * @brief Clear the widget @@ -55,11 +55,11 @@ public: * @brief Set a text to be displayed in the widget * @param text The text to be displayed */ - void setText(const QString& text); + void setText(const TQString& text); protected slots: - void paintEvent( QPaintEvent* event ); - QPixmap mPixmap; - QString mText; + void paintEvent( TQPaintEvent* event ); + TQPixmap mPixmap; + TQString mText; }; } // end namespace Kopete diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp index fae164f1..113ec95e 100644 --- a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp +++ b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp @@ -12,9 +12,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "addbookmarksplugin.moc" #include "addbookmarksplugin.h" @@ -39,11 +39,11 @@ static bool isURLInGroup(const KURL& url, const KBookmarkGroup& group) return false; } -BookmarksPlugin::BookmarksPlugin(QObject *parent, const char *name, const QStringList &/*args*/) +BookmarksPlugin::BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &/*args*/) : Kopete::Plugin(BookmarksPluginFactory::instance(), parent, name) { //kdDebug(14501) << "plugin loading" << endl; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, TQT_SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) ); } /*! @@ -75,16 +75,16 @@ void BookmarksPlugin::slotBookmarkURLsInMessage(Kopete::Message & msg) delete URLsList; } -void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArray &data ) +void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const TQByteArray &data ) { - QTextCodec *codec = getPageEncoding( data ); - QString htmlpage = codec->toUnicode( data ); - QRegExp rx("([^<]*){1,96}"); + TQTextCodec *codec = getPageEncoding( data ); + TQString htmlpage = codec->toUnicode( data ); + TQRegExp rx("([^<]*){1,96}"); rx.setCaseSensitive(false); int pos = rx.search( htmlpage ); KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager(); KBookmarkGroup group = getKopeteFolder(); - QString sender = m_map[(KIO::TransferJob*)transfer].sender; + TQString sender = m_map[(KIO::TransferJob*)transfer].sender; if ( m_settings.useSubfolderForContact( sender ) ) group = getFolder( group, sender ); @@ -102,10 +102,10 @@ void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArra transfer->kill(); } -KURL::List* BookmarksPlugin::extractURLsFromString( const QString& text ) +KURL::List* BookmarksPlugin::extractURLsFromString( const TQString& text ) { KURL::List *list = new KURL::List; - QRegExp rx("
setInteractive(false); - connect ( transfer, SIGNAL ( data( KIO::Job *, const QByteArray & ) ), - this, SLOT ( slotAddKopeteBookmark( KIO::Job *, const QByteArray & ) ) ); + connect ( transfer, TQT_SIGNAL ( data( KIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT ( slotAddKopeteBookmark( KIO::Job *, const TQByteArray & ) ) ); m_map[transfer].url = url; m_map[transfer].sender = sender; } @@ -144,10 +144,10 @@ KBookmarkGroup BookmarksPlugin::getKopeteFolder() { KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager(); - return getFolder( mgr->root(), QString::fromLatin1("kopete") ); + return getFolder( mgr->root(), TQString::fromLatin1("kopete") ); } -KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const QString& folder ) +KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const TQString& folder ) { KBookmark bookmark; @@ -163,16 +163,16 @@ KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const QString& return group; } -QTextCodec* BookmarksPlugin::getPageEncoding( const QByteArray& data ) +TQTextCodec* BookmarksPlugin::getPageEncoding( const TQByteArray& data ) { - QString temp = QString::fromLatin1(data); - QRegExp rx("]*(charset|CHARSET)\\s*=\\s*[^>]*>"); + TQString temp = TQString::fromLatin1(data); + TQRegExp rx("]*(charset|CHARSET)\\s*=\\s*[^>]*>"); int pos = rx.search( temp ); - QTextCodec *codec; + TQTextCodec *codec; if( pos == -1 ){ kdDebug( 14501 ) << "charset not found in first data chunk" << endl; - return QTextCodec::codecForName("iso8859-1"); + return TQTextCodec::codecForName("iso8859-1"); } //kdDebug(14501) << temp.mid(pos, rx.matchedLength()) << endl; temp = temp.mid(pos, rx.matchedLength()-1); @@ -181,9 +181,9 @@ QTextCodec* BookmarksPlugin::getPageEncoding( const QByteArray& data ) for( pos = 0 ; temp[pos].isLetterOrNumber() || temp[pos] == '-' ; pos++ ); temp = temp.left( pos ); //kdDebug(14501) << "encoding: " << temp << endl; - codec = QTextCodec::codecForName( temp.latin1() ); + codec = TQTextCodec::codecForName( temp.latin1() ); if( !codec ){ - return QTextCodec::codecForName("iso8859-1"); + return TQTextCodec::codecForName("iso8859-1"); } return codec; } diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.h b/kopete/plugins/addbookmarks/addbookmarksplugin.h index 4c425b9f..459c1b8b 100644 --- a/kopete/plugins/addbookmarks/addbookmarksplugin.h +++ b/kopete/plugins/addbookmarks/addbookmarksplugin.h @@ -17,8 +17,8 @@ #include #include #include -#include -#include +#include +#include /** @author Roie Kerstein @@ -28,27 +28,27 @@ class BookmarksPlugin : public Kopete::Plugin { Q_OBJECT public: - BookmarksPlugin(QObject *parent, const char *name, const QStringList &args); + BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &args); private: typedef struct S_URLANDNAME{ KURL url; - QString sender; + TQString sender; } URLandName; - typedef QMap JobsToURLsMap; + typedef TQMap JobsToURLsMap; JobsToURLsMap m_map; BookmarksPrefsSettings m_settings; - void addKopeteBookmark( const KURL& url, const QString& sender ); - KURL::List* extractURLsFromString( const QString& text ); + void addKopeteBookmark( const KURL& url, const TQString& sender ); + KURL::List* extractURLsFromString( const TQString& text ); KBookmarkGroup getKopeteFolder(); - KBookmarkGroup getFolder( KBookmarkGroup group, const QString& folder ); - QTextCodec* getPageEncoding( const QByteArray& data ); + KBookmarkGroup getFolder( KBookmarkGroup group, const TQString& folder ); + TQTextCodec* getPageEncoding( const TQByteArray& data ); public slots: void slotBookmarkURLsInMessage(Kopete::Message & msg); void slotReloadSettings(); private slots: - void slotAddKopeteBookmark( KIO::Job *transfer, const QByteArray &data ); + void slotAddKopeteBookmark( KIO::Job *transfer, const TQByteArray &data ); }; typedef KGenericFactory BookmarksPluginFactory; diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp index 12ebd877..69b7fc1b 100644 --- a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp +++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp @@ -15,32 +15,32 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include typedef KGenericFactory BookmarksPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_addbookmarks, BookmarksPreferencesFactory("kcm_kopete_addbookmarks") ) -BookmarksPreferences::BookmarksPreferences(QWidget *parent, const char *name, const QStringList &args) +BookmarksPreferences::BookmarksPreferences(TQWidget *parent, const char *name, const TQStringList &args) : KCModule(BookmarksPreferencesFactory::instance(), parent, args) { Q_UNUSED( name ); - ( new QVBoxLayout (this) )->setAutoAdd( true ); + ( new TQVBoxLayout (this) )->setAutoAdd( true ); p_dialog = new BookmarksPrefsUI( this ); load(); - connect( p_dialog->yesButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() )); - connect( p_dialog->noButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() )); - connect( p_dialog->onlySelectedButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() )); - connect( p_dialog->onlyNotSelectedButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() )); - connect( p_dialog->contactList, SIGNAL( selectionChanged() ), this, SLOT( slotSetStatusChanged() )); + connect( p_dialog->yesButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() )); + connect( p_dialog->noButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() )); + connect( p_dialog->onlySelectedButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() )); + connect( p_dialog->onlyNotSelectedButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() )); + connect( p_dialog->contactList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotSetStatusChanged() )); if(Kopete::PluginManager::self()->plugin("kopete_addbookmarks") ) - connect( this, SIGNAL(PreferencesChanged()), Kopete::PluginManager::self()->plugin("kopete_addbookmarks") , SLOT(slotReloadSettings())); - connect( p_dialog->m_addUntrusted, SIGNAL( toggled(bool) ), this, SLOT( slotAddUntrustedChanged() ) ); + connect( this, TQT_SIGNAL(PreferencesChanged()), Kopete::PluginManager::self()->plugin("kopete_addbookmarks") , TQT_SLOT(slotReloadSettings())); + connect( p_dialog->m_addUntrusted, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotAddUntrustedChanged() ) ); } @@ -50,8 +50,8 @@ BookmarksPreferences::~BookmarksPreferences() void BookmarksPreferences::save() { - QStringList list; - QStringList::iterator it; + TQStringList list; + TQStringList::iterator it; m_settings.setFolderForEachContact( (BookmarksPrefsSettings::UseSubfolders)p_dialog->buttonGroup1->selectedId() ); @@ -87,15 +87,15 @@ void BookmarksPreferences::slotAddUntrustedChanged() void BookmarksPreferences::load() { - QStringList list; - QStringList::iterator it; - QListBoxItem* item; + TQStringList list; + TQStringList::iterator it; + TQListBoxItem* item; m_settings.load(); p_dialog->buttonGroup1->setButton(m_settings.isFolderForEachContact()); p_dialog->m_addUntrusted->setChecked( m_settings.addBookmarksFromUnknownContacts() ); if( p_dialog->contactList->count() == 0 ){ - QStringList contacts = Kopete::ContactList::self()->contacts(); + TQStringList contacts = Kopete::ContactList::self()->contacts(); contacts.sort(); p_dialog->contactList->insertStringList( contacts ); } diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.h b/kopete/plugins/addbookmarks/addbookmarkspreferences.h index 7a9d5bff..30c94b70 100644 --- a/kopete/plugins/addbookmarks/addbookmarkspreferences.h +++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.h @@ -23,7 +23,7 @@ class BookmarksPreferences : public KCModule { Q_OBJECT public: - BookmarksPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList()); + BookmarksPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); ~BookmarksPreferences(); diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp index 045ce801..34d921c3 100644 --- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp +++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp @@ -15,8 +15,8 @@ #include "addbookmarksprefssettings.h" -BookmarksPrefsSettings::BookmarksPrefsSettings(QObject *parent, const char *name) - : QObject(parent, name) +BookmarksPrefsSettings::BookmarksPrefsSettings(TQObject *parent, const char *name) + : TQObject(parent, name) { load(); } @@ -61,7 +61,7 @@ void BookmarksPrefsSettings::save() configfile->sync(); } -bool BookmarksPrefsSettings::useSubfolderForContact( QString nickname ) +bool BookmarksPrefsSettings::useSubfolderForContact( TQString nickname ) { if ( !nickname.isEmpty() ) { diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h index 2d82e7c4..659f3c69 100644 --- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h +++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h @@ -12,8 +12,8 @@ #ifndef ADDBOOKMARKSPREFSSETTINGS_H #define ADDBOOKMARKSPREFSSETTINGS_H -#include -#include +#include +#include /** @author Roie Kerstein @@ -24,7 +24,7 @@ Q_OBJECT public: enum UseSubfolders { Always=0, Never=1, SelectedContacts=2, UnselectedContacts=3 }; - BookmarksPrefsSettings(QObject *parent = 0, const char *name = 0); + BookmarksPrefsSettings(TQObject *parent = 0, const char *name = 0); ~BookmarksPrefsSettings(); @@ -32,9 +32,9 @@ public: void save(); UseSubfolders isFolderForEachContact() {return m_isfolderforeachcontact;} void setFolderForEachContact(UseSubfolders val) {m_isfolderforeachcontact = val;} - bool useSubfolderForContact( QString nickname ); - QStringList getContactsList() {return m_contactslist;} - void setContactsList(QStringList list) {m_contactslist = list;} + bool useSubfolderForContact( TQString nickname ); + TQStringList getContactsList() {return m_contactslist;} + void setContactsList(TQStringList list) {m_contactslist = list;} bool addBookmarksFromUnknownContacts() { return m_addbookmarksfromunknowns; }; void setAddBookmarksFromUnknownContacts( bool ); @@ -42,7 +42,7 @@ private: bool m_folderPerContact; bool m_addbookmarksfromunknowns; UseSubfolders m_isfolderforeachcontact; - QStringList m_contactslist; + TQStringList m_contactslist; }; diff --git a/kopete/plugins/alias/aliasplugin.cpp b/kopete/plugins/alias/aliasplugin.cpp index 1594a836..52a8511b 100644 --- a/kopete/plugins/alias/aliasplugin.cpp +++ b/kopete/plugins/alias/aliasplugin.cpp @@ -17,7 +17,7 @@ typedef KGenericFactory AliasPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_alias, AliasPluginFactory( "kopete_alias" ) ) AliasPlugin * AliasPlugin::pluginStatic_ = 0L; -AliasPlugin::AliasPlugin( QObject *parent, const char * name, const QStringList & ) +AliasPlugin::AliasPlugin( TQObject *parent, const char * name, const TQStringList & ) : Kopete::Plugin( AliasPluginFactory::instance(), parent, name ) { if( !pluginStatic_ ) diff --git a/kopete/plugins/alias/aliasplugin.h b/kopete/plugins/alias/aliasplugin.h index 8e55dc20..cf53c791 100644 --- a/kopete/plugins/alias/aliasplugin.h +++ b/kopete/plugins/alias/aliasplugin.h @@ -19,7 +19,7 @@ class AliasPlugin : public Kopete::Plugin public: static AliasPlugin *plugin(); - AliasPlugin( QObject *parent, const char *name, const QStringList &args ); + AliasPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~AliasPlugin(); private: diff --git a/kopete/plugins/alias/aliaspreferences.cpp b/kopete/plugins/alias/aliaspreferences.cpp index 65342ddf..a331a592 100644 --- a/kopete/plugins/alias/aliaspreferences.cpp +++ b/kopete/plugins/alias/aliaspreferences.cpp @@ -15,11 +15,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include "kopetecommandhandler.h" #include "kopetepluginmanager.h" @@ -35,11 +35,11 @@ typedef KGenericFactory AliasPreferencesFactory; class AliasItem : public QListViewItem { public: - AliasItem( QListView *parent, + AliasItem( TQListView *parent, uint number, - const QString &alias, - const QString &command, const ProtocolList &p ) : - QListViewItem( parent, alias, command ) + const TQString &alias, + const TQString &command, const ProtocolList &p ) : + TQListViewItem( parent, alias, command ) { protocolList = p; id = number; @@ -49,7 +49,7 @@ class AliasItem : public QListViewItem uint id; protected: - void paintCell( QPainter *p, const QColorGroup &cg, + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { if ( column == 2 ) @@ -58,18 +58,18 @@ class AliasItem : public QListViewItem if ( cellWidth < 0 ) cellWidth = 0; - QListViewItem::paintCell( p, cg, column, cellWidth, align ); + TQListViewItem::paintCell( p, cg, column, cellWidth, align ); // Draw the rest of the background - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; int marg = lv->itemMargin(); int r = marg; const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = - QPalette::backgroundRoleFromMode( bgmode ); + const TQColorGroup::ColorRole crole = + TQPalette::backgroundRoleFromMode( bgmode ); p->fillRect( cellWidth, 0, width - cellWidth, height(), cg.brush( crole ) ); @@ -77,7 +77,7 @@ class AliasItem : public QListViewItem { p->fillRect( QMAX( cellWidth, r - marg ), 0, width - cellWidth - r + marg, height(), - cg.brush( QColorGroup::Highlight ) ); + cg.brush( TQColorGroup::Highlight ) ); if ( isEnabled() || !lv ) p->setPen( cg.highlightedText() ); else if ( !isEnabled() && lv ) @@ -90,7 +90,7 @@ class AliasItem : public QListViewItem for ( ProtocolList::Iterator it = protocolList.begin(); it != protocolList.end(); ++it ) { - QPixmap icon = SmallIcon( (*it)->pluginIcon() ); + TQPixmap icon = SmallIcon( (*it)->pluginIcon() ); p->drawPixmap( mc_x + 4, height() - 16, icon ); mc_x += 16; @@ -99,7 +99,7 @@ class AliasItem : public QListViewItem else { // Use Qt's own drawing - QListViewItem::paintCell( p, cg, column, width, align ); + TQListViewItem::paintCell( p, cg, column, width, align ); } } }; @@ -107,39 +107,39 @@ class AliasItem : public QListViewItem class ProtocolItem : public QListViewItem { public: - ProtocolItem( QListView *parent, KPluginInfo *p ) : - QListViewItem( parent, p->name() ) + ProtocolItem( TQListView *parent, KPluginInfo *p ) : + TQListViewItem( parent, p->name() ) { this->setPixmap( 0, SmallIcon( p->icon() ) ); id = p->pluginName(); } - QString id; + TQString id; }; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_alias, AliasPreferencesFactory( "kcm_kopete_alias" ) ) -AliasPreferences::AliasPreferences( QWidget *parent, const char *, const QStringList &args ) +AliasPreferences::AliasPreferences( TQWidget *parent, const char *, const TQStringList &args ) : KCModule( AliasPreferencesFactory::instance(), parent, args ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new AliasDialogBase( this ); - connect( preferencesDialog->addButton, SIGNAL(clicked()), this, SLOT( slotAddAlias() ) ); - connect( preferencesDialog->editButton, SIGNAL(clicked()), this, SLOT( slotEditAlias() ) ); - connect( preferencesDialog->deleteButton, SIGNAL(clicked()), this, SLOT( slotDeleteAliases() ) ); - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ), - this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); + connect( preferencesDialog->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotAddAlias() ) ); + connect( preferencesDialog->editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotEditAlias() ) ); + connect( preferencesDialog->deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotDeleteAliases() ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ), + this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); - connect( preferencesDialog->aliasList, SIGNAL(selectionChanged()), - this, SLOT( slotCheckAliasSelected() ) ); + connect( preferencesDialog->aliasList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT( slotCheckAliasSelected() ) ); load(); } AliasPreferences::~AliasPreferences() { - QListViewItem *myChild = preferencesDialog->aliasList->firstChild(); + TQListViewItem *myChild = preferencesDialog->aliasList->firstChild(); while( myChild ) { ProtocolList protocols = static_cast( myChild )->protocolList; @@ -162,15 +162,15 @@ void AliasPreferences::load() if( config->hasGroup( "AliasPlugin" ) ) { config->setGroup("AliasPlugin"); - QStringList aliases = config->readListEntry("AliasNames"); - for( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) + TQStringList aliases = config->readListEntry("AliasNames"); + for( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) { uint aliasNumber = config->readUnsignedNumEntry( (*it) + "_id" ); - QString aliasCommand = config->readEntry( (*it) + "_command" ); - QStringList protocols = config->readListEntry( (*it) + "_protocols" ); + TQString aliasCommand = config->readEntry( (*it) + "_command" ); + TQStringList protocols = config->readListEntry( (*it) + "_protocols" ); ProtocolList protocolList; - for( QStringList::Iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 ) + for( TQStringList::Iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 ) { Kopete::Plugin *p = Kopete::PluginManager::self()->plugin( *it2 ); protocolList.append( (Kopete::Protocol*)p ); @@ -193,25 +193,25 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) if( config->hasGroup( "AliasPlugin" ) ) { config->setGroup("AliasPlugin"); - QStringList aliases = config->readListEntry("AliasNames"); - for( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) + TQStringList aliases = config->readListEntry("AliasNames"); + for( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) { uint aliasNumber = config->readUnsignedNumEntry( (*it) + "_id" ); - QString aliasCommand = config->readEntry( (*it) + "_command" ); - QStringList protocols = config->readListEntry( (*it) + "_protocols" ); + TQString aliasCommand = config->readEntry( (*it) + "_command" ); + TQStringList protocols = config->readListEntry( (*it) + "_protocols" ); - for( QStringList::iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 ) + for( TQStringList::iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 ) { if( *it2 == protocol->pluginId() ) { - QPair pr( protocol, *it ); + QPair pr( protocol, *it ); if( protocolMap.find( pr ) == protocolMap.end() ) { Kopete::CommandHandler::commandHandler()->registerAlias( protocol, *it, aliasCommand, - QString::fromLatin1("Custom alias for %1").arg(aliasCommand), + TQString::fromLatin1("Custom alias for %1").arg(aliasCommand), Kopete::CommandHandler::UserAlias ); @@ -241,14 +241,14 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) void AliasPreferences::save() { KConfig *config = KGlobal::config(); - config->deleteGroup( QString::fromLatin1("AliasPlugin") ); - config->setGroup( QString::fromLatin1("AliasPlugin") ); + config->deleteGroup( TQString::fromLatin1("AliasPlugin") ); + config->setGroup( TQString::fromLatin1("AliasPlugin") ); - QStringList aliases; + TQStringList aliases; AliasItem *item = (AliasItem*)preferencesDialog->aliasList->firstChild(); while( item ) { - QStringList protocols; + TQStringList protocols; for( ProtocolList::Iterator it = item->protocolList.begin(); it != item->protocolList.end(); ++it ) { @@ -269,13 +269,13 @@ void AliasPreferences::save() emit KCModule::changed(false); } -void AliasPreferences::addAlias( QString &alias, QString &command, const ProtocolList &p, uint id ) +void AliasPreferences::addAlias( TQString &alias, TQString &command, const ProtocolList &p, uint id ) { - QRegExp spaces( QString::fromLatin1("\\s+") ); + TQRegExp spaces( TQString::fromLatin1("\\s+") ); - if( alias.startsWith( QString::fromLatin1("/") ) ) + if( alias.startsWith( TQString::fromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( command.startsWith( QString::fromLatin1("/") ) ) + if( command.startsWith( TQString::fromLatin1("/") ) ) command = command.section( '/', 1 ); if( id == 0 ) @@ -286,13 +286,13 @@ void AliasPreferences::addAlias( QString &alias, QString &command, const Protoco id = 1; } - QString newAlias = command.section( spaces, 0, 0 ); + TQString newAlias = command.section( spaces, 0, 0 ); aliasMap.insert( alias, new AliasItem( preferencesDialog->aliasList, id, alias, command, p ) ); // count the number of arguments present in 'command' - QRegExp rx( "(%\\d+)" ); - QStringList list; + TQRegExp rx( "(%\\d+)" ); + TQStringList list; int pos = 0; while ( pos >= 0 ) { pos = rx.search( command, pos ); @@ -309,13 +309,13 @@ void AliasPreferences::addAlias( QString &alias, QString &command, const Protoco *it, alias, command, - QString::fromLatin1("Custom alias for %1").arg(command), + TQString::fromLatin1("Custom alias for %1").arg(command), Kopete::CommandHandler::UserAlias, 0, argc ); - protocolMap.insert( QPair( *it, alias ), true ); + protocolMap.insert( QPair( *it, alias ), true ); } } @@ -325,13 +325,13 @@ void AliasPreferences::slotAddAlias() loadProtocols( &addDialog ); addDialog.addButton->setText( i18n("&Add") ); - if( addDialog.exec() == QDialog::Accepted ) + if( addDialog.exec() == TQDialog::Accepted ) { - QString alias = addDialog.alias->text(); - if( alias.startsWith( QString::fromLatin1("/") ) ) + TQString alias = addDialog.alias->text(); + if( alias.startsWith( TQString::fromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( alias.contains( QRegExp("[_=]") ) ) + if( alias.contains( TQRegExp("[_=]") ) ) { KMessageBox::error( this, i18n("Could not add alias %1. An" " alias name cannot contain the characters \"_\" or \"=\"." @@ -339,7 +339,7 @@ void AliasPreferences::slotAddAlias() } else { - QString command = addDialog.command->text(); + TQString command = addDialog.command->text(); ProtocolList protocols = selectedProtocols( &addDialog ); // Loop through selected protocols @@ -367,7 +367,7 @@ void AliasPreferences::slotAddAlias() const ProtocolList AliasPreferences::selectedProtocols( EditAliasDialog *dialog ) { ProtocolList protocolList; - QListViewItem *item = dialog->protocolList->firstChild(); + TQListViewItem *item = dialog->protocolList->firstChild(); while( item ) { @@ -390,8 +390,8 @@ const ProtocolList AliasPreferences::selectedProtocols( EditAliasDialog *dialog void AliasPreferences::loadProtocols( EditAliasDialog *dialog ) { - QValueList plugins = Kopete::PluginManager::self()->availablePlugins("Protocols"); - for( QValueList::Iterator it = plugins.begin(); it != plugins.end(); ++it ) + TQValueList plugins = Kopete::PluginManager::self()->availablePlugins("Protocols"); + for( TQValueList::Iterator it = plugins.begin(); it != plugins.end(); ++it ) { ProtocolItem *item = new ProtocolItem( dialog->protocolList, *it ); itemMap[ (Kopete::Protocol*)Kopete::PluginManager::self()->plugin( (*it)->pluginName() ) ] = item; @@ -403,10 +403,10 @@ void AliasPreferences::slotEditAlias() EditAliasDialog editDialog; loadProtocols( &editDialog ); - QListViewItem *item = preferencesDialog->aliasList->selectedItems().first(); + TQListViewItem *item = preferencesDialog->aliasList->selectedItems().first(); if( item ) { - QString oldAlias = item->text(0); + TQString oldAlias = item->text(0); editDialog.alias->setText( oldAlias ); editDialog.command->setText( item->text(1) ); ProtocolList protocols = static_cast( item )->protocolList; @@ -415,12 +415,12 @@ void AliasPreferences::slotEditAlias() itemMap[ *it ]->setSelected( true ); } - if( editDialog.exec() == QDialog::Accepted ) + if( editDialog.exec() == TQDialog::Accepted ) { - QString alias = editDialog.alias->text(); - if( alias.startsWith( QString::fromLatin1("/") ) ) + TQString alias = editDialog.alias->text(); + if( alias.startsWith( TQString::fromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( alias.contains( QRegExp("[_=]") ) ) + if( alias.contains( TQRegExp("[_=]") ) ) { KMessageBox::error( this, i18n("Could not add alias %1. An" " alias name cannot contain the characters \"_\" or \"=\"." @@ -428,7 +428,7 @@ void AliasPreferences::slotEditAlias() } else { - QString command = editDialog.command->text(); + TQString command = editDialog.command->text(); if( alias == oldAlias ) { @@ -468,8 +468,8 @@ void AliasPreferences::slotDeleteAliases() { if( KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete the selected aliases?"), i18n("Delete Aliases"), KGuiItem(i18n("Delete"), "editdelete") ) == KMessageBox::Continue ) { - QPtrList< QListViewItem > items = preferencesDialog->aliasList->selectedItems(); - for( QListViewItem *i = items.first(); i; i = items.next() ) + TQPtrList< TQListViewItem > items = preferencesDialog->aliasList->selectedItems(); + for( TQListViewItem *i = items.first(); i; i = items.next() ) { ProtocolList protocols = static_cast( i )->protocolList; for( ProtocolList::Iterator it = protocols.begin(); it != protocols.end(); ++it ) @@ -479,7 +479,7 @@ void AliasPreferences::slotDeleteAliases() i->text(0) ); - protocolMap.erase( QPair( *it, i->text(0) ) ); + protocolMap.erase( QPair( *it, i->text(0) ) ); } aliasMap.erase( i->text(0) ); diff --git a/kopete/plugins/alias/aliaspreferences.h b/kopete/plugins/alias/aliaspreferences.h index 330553a3..9ad25f38 100644 --- a/kopete/plugins/alias/aliaspreferences.h +++ b/kopete/plugins/alias/aliaspreferences.h @@ -12,7 +12,7 @@ #include "kcmodule.h" -typedef QValueList ProtocolList; +typedef TQValueList ProtocolList; class AliasDialogBase; namespace Kopete { class Protocol; } @@ -26,8 +26,8 @@ class AliasPreferences : public KCModule Q_OBJECT public: - AliasPreferences( QWidget *parent = 0, const char *name = 0, - const QStringList &args = QStringList() ); + AliasPreferences( TQWidget *parent = 0, const char *name = 0, + const TQStringList &args = TQStringList() ); ~AliasPreferences(); virtual void save(); @@ -42,12 +42,12 @@ class AliasPreferences : public KCModule private: AliasDialogBase * preferencesDialog; - void addAlias( QString &alias, QString &command, const ProtocolList &p, uint id = 0 ); + void addAlias( TQString &alias, TQString &command, const ProtocolList &p, uint id = 0 ); void loadProtocols( EditAliasDialog *dialog ); const ProtocolList selectedProtocols( EditAliasDialog *dialog ); - QMap itemMap; - QMap, bool> protocolMap; - QMap aliasMap; + TQMap itemMap; + TQMap, bool> protocolMap; + TQMap aliasMap; }; #endif diff --git a/kopete/plugins/alias/editaliasdialog.cpp b/kopete/plugins/alias/editaliasdialog.cpp index 42eb2f4b..6acdf153 100644 --- a/kopete/plugins/alias/editaliasdialog.cpp +++ b/kopete/plugins/alias/editaliasdialog.cpp @@ -16,20 +16,20 @@ */ #include "editaliasdialog.h" -#include +#include #include -#include -#include +#include +#include #include #include -EditAliasDialog::EditAliasDialog( QWidget* parent, const char* name ) +EditAliasDialog::EditAliasDialog( TQWidget* parent, const char* name ) : AliasDialog( parent, name ) { - QObject::connect( alias, SIGNAL( textChanged( const QString& ) ), this, SLOT( checkButtonsEnabled() ) ); - QObject::connect( command, SIGNAL( textChanged( const QString& ) ), this, SLOT( checkButtonsEnabled() ) ); - QObject::connect( protocolList, SIGNAL( selectionChanged() ), this, SLOT( checkButtonsEnabled() ) ); + TQObject::connect( alias, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( checkButtonsEnabled() ) ); + TQObject::connect( command, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( checkButtonsEnabled() ) ); + TQObject::connect( protocolList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( checkButtonsEnabled() ) ); checkButtonsEnabled(); } diff --git a/kopete/plugins/alias/editaliasdialog.h b/kopete/plugins/alias/editaliasdialog.h index 869e8903..da3caf4b 100644 --- a/kopete/plugins/alias/editaliasdialog.h +++ b/kopete/plugins/alias/editaliasdialog.h @@ -26,7 +26,7 @@ class EditAliasDialog : public AliasDialog { Q_OBJECT public: - EditAliasDialog( QWidget* parent = 0, const char* name = 0 ); + EditAliasDialog( TQWidget* parent = 0, const char* name = 0 ); virtual ~EditAliasDialog(); public slots: diff --git a/kopete/plugins/autoreplace/autoreplaceconfig.cpp b/kopete/plugins/autoreplace/autoreplaceconfig.cpp index 0407990a..2537f44a 100644 --- a/kopete/plugins/autoreplace/autoreplaceconfig.cpp +++ b/kopete/plugins/autoreplace/autoreplaceconfig.cpp @@ -33,7 +33,7 @@ void AutoReplaceConfig::load() KConfig *config = KGlobal::config(); config->setGroup( "AutoReplace Plugin" ); - QStringList wordsList = config->readListEntry( "WordsToReplace" ); + TQStringList wordsList = config->readListEntry( "WordsToReplace" ); if( wordsList.isEmpty() ) { // basic list, key/value @@ -44,8 +44,8 @@ void AutoReplaceConfig::load() // we may be reloading after removing an entry from the list m_map.clear(); - QString k, v; - for ( QStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it ) + TQString k, v; + for ( TQStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it ) { k = *it; ++it; @@ -61,18 +61,18 @@ void AutoReplaceConfig::load() m_upper = config->readBoolEntry( "CapitalizeBeginningSentence" , false ); } -QStringList AutoReplaceConfig::defaultAutoReplaceList() +TQStringList AutoReplaceConfig::defaultAutoReplaceList() { - return QStringList::split( ",", i18n( "list_of_words_to_replace", + return TQStringList::split( ",", i18n( "list_of_words_to_replace", "ur,your,r,are,u,you,theres,there is,arent,are not,dont,do not" ) ); } void AutoReplaceConfig::loadDefaultAutoReplaceList() { - QStringList wordsList = defaultAutoReplaceList(); + TQStringList wordsList = defaultAutoReplaceList(); m_map.clear(); - QString k, v; - for ( QStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it ) + TQString k, v; + for ( TQStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it ) { k = *it; v = *( ++it ); @@ -116,7 +116,7 @@ void AutoReplaceConfig::save() KConfig * config = KGlobal::config(); config->setGroup( "AutoReplace Plugin" ); - QStringList newWords; + TQStringList newWords; WordsToReplace::Iterator it; for ( it = m_map.begin(); it != m_map.end(); ++it ) { diff --git a/kopete/plugins/autoreplace/autoreplaceconfig.h b/kopete/plugins/autoreplace/autoreplaceconfig.h index 62b11fbf..b819098e 100644 --- a/kopete/plugins/autoreplace/autoreplaceconfig.h +++ b/kopete/plugins/autoreplace/autoreplaceconfig.h @@ -16,9 +16,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #ifndef AutoReplaceConfig_H #define AutoReplaceConfig_H @@ -31,7 +31,7 @@ public: void save(); void load(); - typedef QMap WordsToReplace; + typedef TQMap WordsToReplace; WordsToReplace map() const; bool autoReplaceIncoming() const; @@ -40,7 +40,7 @@ public: bool capitalizeBeginningSentence() const; void setMap( const WordsToReplace &w ); - QStringList defaultAutoReplaceList(); + TQStringList defaultAutoReplaceList(); void loadDefaultAutoReplaceList(); private: diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.cpp b/kopete/plugins/autoreplace/autoreplaceplugin.cpp index c06bc0bd..f3610a7f 100644 --- a/kopete/plugins/autoreplace/autoreplaceplugin.cpp +++ b/kopete/plugins/autoreplace/autoreplaceplugin.cpp @@ -29,7 +29,7 @@ typedef KGenericFactory AutoReplacePluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_autoreplace, AutoReplacePluginFactory( "kopete_autoreplace" ) ) AutoReplacePlugin * AutoReplacePlugin::pluginStatic_ = 0L; -AutoReplacePlugin::AutoReplacePlugin( QObject *parent, const char * name, const QStringList & ) +AutoReplacePlugin::AutoReplacePlugin( TQObject *parent, const char * name, const TQStringList & ) : Kopete::Plugin( AutoReplacePluginFactory::instance(), parent, name ) { if( !pluginStatic_ ) @@ -37,16 +37,16 @@ AutoReplacePlugin::AutoReplacePlugin( QObject *parent, const char * name, const m_prefs = new AutoReplaceConfig; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ), - this, SLOT( slotAboutToSend( Kopete::Message & ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend( Kopete::Message & ) ), + this, TQT_SLOT( slotAboutToSend( Kopete::Message & ) ) ); // nb this connection causes the slot to be called on in- and outbound // messages which suggests something is broken in the message handler // system! m_inboundHandler = new Kopete::SimpleMessageHandlerFactory( Kopete::Message::Inbound, - Kopete::MessageHandlerFactory::InStageToSent, this, SLOT( slotAboutToSend( Kopete::Message& ) ) ); + Kopete::MessageHandlerFactory::InStageToSent, this, TQT_SLOT( slotAboutToSend( Kopete::Message& ) ) ); - connect( this, SIGNAL( settingsChanged() ), this, SLOT( slotSettingsChanged() ) ); + connect( this, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotSettingsChanged() ) ); } AutoReplacePlugin::~AutoReplacePlugin() @@ -71,21 +71,21 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) if ( ( msg.direction() == Kopete::Message::Outbound && m_prefs->autoReplaceOutgoing() ) || ( msg.direction() == Kopete::Message::Inbound && m_prefs->autoReplaceIncoming() ) ) { - QString replaced_message = msg.plainBody(); + TQString replaced_message = msg.plainBody(); AutoReplaceConfig::WordsToReplace map = m_prefs->map(); // replaces all matched words --> try to find a more 'economic' way // "\\b(%1)\\b" doesn't work when substituting /me. - QString match = "(^|\\s|\\.|\\;|\\,|\\:)(%1)(\\b)"; + TQString match = "(^|\\s|\\.|\\;|\\,|\\:)(%1)(\\b)"; AutoReplaceConfig::WordsToReplace::Iterator it; bool isReplaced=false; for ( it = map.begin(); it != map.end(); ++it ) { - QRegExp re( match.arg( QRegExp::escape( it.key() ) ) ); + TQRegExp re( match.arg( TQRegExp::escape( it.key() ) ) ); if( re.search( replaced_message ) != -1 ) { - QString before = re.cap(1); - QString after = re.cap(3); + TQString before = re.cap(1); + TQString after = re.cap(3); replaced_message.replace( re, before + map.find( it.key() ).data() + after ); isReplaced=true; } @@ -99,10 +99,10 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) { if ( m_prefs->dotEndSentence() ) { - QString replaced_message = msg.plainBody(); + TQString replaced_message = msg.plainBody(); // eventually add . at the end of the lines, sent lines only - replaced_message.replace( QRegExp( "([a-z])$" ), "\\1." ); - // replaced_message.replace(QRegExp( "([\\w])$" ), "\\1." ); + replaced_message.replace( TQRegExp( "([a-z])$" ), "\\1." ); + // replaced_message.replace(TQRegExp( "([\\w])$" ), "\\1." ); // the message is now the one with replaced words msg.setBody( replaced_message, Kopete::Message::PlainText ); @@ -110,7 +110,7 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) if( m_prefs->capitalizeBeginningSentence() ) { - QString replaced_message = msg.plainBody(); + TQString replaced_message = msg.plainBody(); // eventually start each sent line with capital letter // TODO ". " "? " "! " replaced_message[ 0 ] = replaced_message.at( 0 ).upper(); diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.h b/kopete/plugins/autoreplace/autoreplaceplugin.h index 750f0614..7d9bcedf 100644 --- a/kopete/plugins/autoreplace/autoreplaceplugin.h +++ b/kopete/plugins/autoreplace/autoreplaceplugin.h @@ -18,10 +18,10 @@ #ifndef AutoReplacePLUGIN_H #define AutoReplacePLUGIN_H -#include -#include -#include -#include +#include +#include +#include +#include #include "kopetemessage.h" #include "kopeteplugin.h" @@ -42,7 +42,7 @@ class AutoReplacePlugin : public Kopete::Plugin public: static AutoReplacePlugin *plugin(); - AutoReplacePlugin( QObject *parent, const char *name, const QStringList &args ); + AutoReplacePlugin( TQObject *parent, const char *name, const TQStringList &args ); ~AutoReplacePlugin(); private slots: diff --git a/kopete/plugins/autoreplace/autoreplacepreferences.cpp b/kopete/plugins/autoreplace/autoreplacepreferences.cpp index 0a2a6b0f..4f852610 100644 --- a/kopete/plugins/autoreplace/autoreplacepreferences.cpp +++ b/kopete/plugins/autoreplace/autoreplacepreferences.cpp @@ -15,12 +15,12 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,10 +36,10 @@ typedef KGenericFactory AutoReplacePreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_autoreplace, AutoReplacePreferencesFactory( "kcm_kopete_autoreplace" ) ) -AutoReplacePreferences::AutoReplacePreferences( QWidget *parent, const char * /* name */, const QStringList &args ) +AutoReplacePreferences::AutoReplacePreferences( TQWidget *parent, const char * /* name */, const TQStringList &args ) : KCAutoConfigModule( AutoReplacePreferencesFactory::instance(), parent, args ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new AutoReplacePrefsUI( this ); // creates table columns (avoids new columns every time) @@ -48,16 +48,16 @@ AutoReplacePreferences::AutoReplacePreferences( QWidget *parent, const char * /* preferencesDialog->m_list->header()->setStretchEnabled( true , 1 ); // connect SIGNALS/SLOTS - connect( preferencesDialog->m_add, SIGNAL(pressed()), - SLOT( slotAddCouple()) ); - connect( preferencesDialog->m_edit, SIGNAL(pressed()), - SLOT( slotEditCouple()) ); - connect( preferencesDialog->m_remove, SIGNAL(pressed()), - SLOT(slotRemoveCouple()) ); - connect( preferencesDialog->m_list, SIGNAL(selectionChanged()), - SLOT(slotSelectionChanged()) ); - connect( preferencesDialog->m_key, SIGNAL(textChanged ( const QString & )), - SLOT( slotEnableAddEdit( const QString & )) ); + connect( preferencesDialog->m_add, TQT_SIGNAL(pressed()), + TQT_SLOT( slotAddCouple()) ); + connect( preferencesDialog->m_edit, TQT_SIGNAL(pressed()), + TQT_SLOT( slotEditCouple()) ); + connect( preferencesDialog->m_remove, TQT_SIGNAL(pressed()), + TQT_SLOT(slotRemoveCouple()) ); + connect( preferencesDialog->m_list, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(slotSelectionChanged()) ); + connect( preferencesDialog->m_key, TQT_SIGNAL(textChanged ( const TQString & )), + TQT_SLOT( slotEnableAddEdit( const TQString & )) ); m_wordListChanged = false; @@ -90,7 +90,7 @@ void AutoReplacePreferences::load() for ( it = map.begin(); it != map.end(); ++it ) { // notice: insertItem is called automatically by the constructor - new QListViewItem( preferencesDialog->m_list, it.key(), it.data() ); + new TQListViewItem( preferencesDialog->m_list, it.key(), it.data() ); } m_wordListChanged = false; @@ -102,7 +102,7 @@ void AutoReplacePreferences::save() { // make a list reading all values from gui AutoReplaceConfig::WordsToReplace newWords; - for ( QListViewItem * i = preferencesDialog->m_list->firstChild(); i != 0; i = i->nextSibling() ) + for ( TQListViewItem * i = preferencesDialog->m_list->firstChild(); i != 0; i = i->nextSibling() ) newWords[ i->text( 0 ) ] = i->text( 1 ); // save the words list @@ -116,16 +116,16 @@ void AutoReplacePreferences::save() // read m_key m_value, create a QListViewItem void AutoReplacePreferences::slotAddCouple() { - QString k = preferencesDialog->m_key->text(); - QString v = preferencesDialog->m_value->text(); + TQString k = preferencesDialog->m_key->text(); + TQString v = preferencesDialog->m_value->text(); if ( !k.isEmpty() && !k.isNull() && !v.isEmpty() && !v.isNull() ) { - QListViewItem * lvi; - QListViewItem * oldLvi = 0; + TQListViewItem * lvi; + TQListViewItem * oldLvi = 0; // see if we are replacing an existing entry if ( ( oldLvi = preferencesDialog->m_list->findItem( k, 0 ) ) ) delete oldLvi; - lvi = new QListViewItem( preferencesDialog->m_list, k, v ); + lvi = new TQListViewItem( preferencesDialog->m_list, k, v ); // Triggers a size, geometry and content update // during the next iteration of the event loop preferencesDialog->m_list->triggerUpdate(); @@ -140,9 +140,9 @@ void AutoReplacePreferences::slotAddCouple() // edit the selected item void AutoReplacePreferences::slotEditCouple() { - QString k = preferencesDialog->m_key->text(); - QString v = preferencesDialog->m_value->text(); - QListViewItem * lvi; + TQString k = preferencesDialog->m_key->text(); + TQString v = preferencesDialog->m_value->text(); + TQListViewItem * lvi; if ( ( lvi = preferencesDialog->m_list->selectedItem() ) && !k.isEmpty() && !k.isNull() && !v.isEmpty() && !v.isNull() ) { lvi->setText( 0, k ); @@ -163,7 +163,7 @@ void AutoReplacePreferences::slotRemoveCouple() slotWidgetModified(); } -void AutoReplacePreferences::slotEnableAddEdit( const QString & keyText ) +void AutoReplacePreferences::slotEnableAddEdit( const TQString & keyText ) { preferencesDialog->m_add->setEnabled( !keyText.isEmpty() ); preferencesDialog->m_edit->setEnabled( !keyText.isEmpty() && preferencesDialog->m_list->selectedItem() ); @@ -171,7 +171,7 @@ void AutoReplacePreferences::slotEnableAddEdit( const QString & keyText ) void AutoReplacePreferences::slotSelectionChanged() { - QListViewItem *selection = 0; + TQListViewItem *selection = 0; if ( ( selection = preferencesDialog->m_list->selectedItem() ) ) { // enable the remove button @@ -203,7 +203,7 @@ void AutoReplacePreferences::defaults() for ( it = map.begin(); it != map.end(); ++it ) { // notice: insertItem is called automatically by the constructor - new QListViewItem( preferencesDialog->m_list, it.key(), it.data() ); + new TQListViewItem( preferencesDialog->m_list, it.key(), it.data() ); } m_wordListChanged = true; slotWidgetModified(); diff --git a/kopete/plugins/autoreplace/autoreplacepreferences.h b/kopete/plugins/autoreplace/autoreplacepreferences.h index a08b2ba2..00638bfa 100644 --- a/kopete/plugins/autoreplace/autoreplacepreferences.h +++ b/kopete/plugins/autoreplace/autoreplacepreferences.h @@ -25,7 +25,7 @@ class AutoReplaceConfig; // TODO // add button enabled only when k and v are present - // remove button enabled only when a QListViewItem is selected + // remove button enabled only when a TQListViewItem is selected // signal/slot when map changes (needed?) // capital letter not just at the beginning but always after ". ", "! "... @@ -34,7 +34,7 @@ class AutoReplacePreferences : public KCAutoConfigModule Q_OBJECT public: - AutoReplacePreferences( QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList() ); + AutoReplacePreferences( TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList() ); ~AutoReplacePreferences(); virtual void save(); @@ -46,7 +46,7 @@ private slots: void slotAddCouple(); void slotEditCouple(); void slotRemoveCouple(); - void slotEnableAddEdit( const QString & ); + void slotEnableAddEdit( const TQString & ); void slotSelectionChanged(); protected slots: diff --git a/kopete/plugins/connectionstatus/connectionstatusplugin.cpp b/kopete/plugins/connectionstatus/connectionstatusplugin.cpp index 8840c893..33f4e3dd 100644 --- a/kopete/plugins/connectionstatus/connectionstatusplugin.cpp +++ b/kopete/plugins/connectionstatus/connectionstatusplugin.cpp @@ -17,7 +17,7 @@ #include "connectionstatusplugin.h" -#include +#include #include #include @@ -28,15 +28,15 @@ typedef KGenericFactory ConnectionStatusPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_connectionstatus, ConnectionStatusPluginFactory( "kopete_connectionstatus" ) ) -ConnectionStatusPlugin::ConnectionStatusPlugin( QObject *parent, const char *name, const QStringList& /* args */ ) +ConnectionStatusPlugin::ConnectionStatusPlugin( TQObject *parent, const char *name, const TQStringList& /* args */ ) : Kopete::Plugin( ConnectionStatusPluginFactory::instance(), parent, name ) { kdDebug( 14301 ) << k_funcinfo << endl; m_process = 0L; - m_timer = new QTimer(); - connect( m_timer, SIGNAL( timeout() ), this, SLOT( slotCheckStatus() ) ); + m_timer = new TQTimer(); + connect( m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotCheckStatus() ) ); m_timer->start( 60000 ); m_pluginConnected = false; @@ -61,7 +61,7 @@ void ConnectionStatusPlugin::slotCheckStatus() return; } - m_buffer = QString::null; + m_buffer = TQString::null; // Use KProcess to run netstat -rn. We'll then parse the output of // netstat -rn in slotProcessStdout() to see if it mentions the @@ -69,8 +69,8 @@ void ConnectionStatusPlugin::slotCheckStatus() m_process = new KProcess; *m_process << "netstat" << "-r"; - connect( m_process, SIGNAL( receivedStdout( KProcess *, char *, int ) ), this, SLOT( slotProcessStdout( KProcess *, char *, int ) ) ); - connect( m_process, SIGNAL( processExited( KProcess * ) ), this, SLOT( slotProcessExited( KProcess * ) ) ); + connect( m_process, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), this, TQT_SLOT( slotProcessStdout( KProcess *, char *, int ) ) ); + connect( m_process, TQT_SIGNAL( processExited( KProcess * ) ), this, TQT_SLOT( slotProcessExited( KProcess * ) ) ); if ( !m_process->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) { @@ -88,7 +88,7 @@ void ConnectionStatusPlugin::slotProcessExited( KProcess *process ) if ( process == m_process ) { setConnectedStatus( m_buffer.contains( "default" ) ); - m_buffer = QString::null; + m_buffer = TQString::null; delete m_process; m_process = 0L; } @@ -98,7 +98,7 @@ void ConnectionStatusPlugin::slotProcessStdout( KProcess *, char *buffer, int bu { // Look for a default gateway //kdDebug( 14301 ) << k_funcinfo << endl; - m_buffer += QString::fromLatin1( buffer, buflen ); + m_buffer += TQString::fromLatin1( buffer, buflen ); //kdDebug( 14301 ) << qsBuffer << endl; } diff --git a/kopete/plugins/connectionstatus/connectionstatusplugin.h b/kopete/plugins/connectionstatus/connectionstatusplugin.h index 5f0a53bf..726176cb 100644 --- a/kopete/plugins/connectionstatus/connectionstatusplugin.h +++ b/kopete/plugins/connectionstatus/connectionstatusplugin.h @@ -31,7 +31,7 @@ class ConnectionStatusPlugin : public Kopete::Plugin Q_OBJECT public: - ConnectionStatusPlugin( QObject *parent, const char *name, const QStringList &args ); + ConnectionStatusPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~ConnectionStatusPlugin(); private slots: @@ -48,8 +48,8 @@ private: bool m_pluginConnected; KProcess *m_process; - QTimer *m_timer; - QString m_buffer; + TQTimer *m_timer; + TQString m_buffer; }; #endif diff --git a/kopete/plugins/contactnotes/contactnotesedit.cpp b/kopete/plugins/contactnotes/contactnotesedit.cpp index f7333c7b..782476b9 100644 --- a/kopete/plugins/contactnotes/contactnotesedit.cpp +++ b/kopete/plugins/contactnotes/contactnotesedit.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include @@ -31,10 +31,10 @@ ContactNotesEdit::ContactNotesEdit(Kopete::MetaContact *m,ContactNotesPlugin *p, m_plugin=p; m_metaContact=m; - QVBox *w=new QVBox(this); + TQVBox *w=new TQVBox(this); w->setSpacing(KDialog::spacingHint()); - m_label = new QLabel(i18n("Notes about %1:").arg(m->displayName()) , w , "m_label"); - m_linesEdit= new QTextEdit ( w , "m_linesEdit"); + m_label = new TQLabel(i18n("Notes about %1:").arg(m->displayName()) , w , "m_label"); + m_linesEdit= new TQTextEdit ( w , "m_linesEdit"); m_linesEdit->setText(p->notes(m)); diff --git a/kopete/plugins/contactnotes/contactnotesedit.h b/kopete/plugins/contactnotes/contactnotesedit.h index 20fe7d10..6af9178d 100644 --- a/kopete/plugins/contactnotes/contactnotesedit.h +++ b/kopete/plugins/contactnotes/contactnotesedit.h @@ -18,8 +18,8 @@ #ifndef CONTACTNOTESEDIT_H #define CONTACTNOTESEDIT_H -#include -#include +#include +#include #include class QLabel; @@ -41,13 +41,13 @@ private: ContactNotesPlugin *m_plugin; Kopete::MetaContact *m_metaContact; - QLabel *m_label; - QTextEdit *m_linesEdit; + TQLabel *m_label; + TQTextEdit *m_linesEdit; protected slots: // Protected slots virtual void slotOk(); signals: // Signals - void notesChanged(const QString, Kopete::MetaContact*); + void notesChanged(const TQString, Kopete::MetaContact*); }; #endif diff --git a/kopete/plugins/contactnotes/contactnotesplugin.cpp b/kopete/plugins/contactnotes/contactnotesplugin.cpp index 5982200f..ce67e663 100644 --- a/kopete/plugins/contactnotes/contactnotesplugin.cpp +++ b/kopete/plugins/contactnotes/contactnotesplugin.cpp @@ -29,7 +29,7 @@ typedef KGenericFactory ContactNotesPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_contactnotes, ContactNotesPluginFactory( "kopete_contactnotes" ) ) -ContactNotesPlugin::ContactNotesPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +ContactNotesPlugin::ContactNotesPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( ContactNotesPluginFactory::instance(), parent, name ) { if ( pluginStatic_ ) @@ -37,8 +37,8 @@ ContactNotesPlugin::ContactNotesPlugin( QObject *parent, const char *name, const else pluginStatic_ = this; - KAction *m_actionEdit=new KAction( i18n("&Notes"), "identity", 0, this, SLOT (slotEditInfo()), actionCollection() , "editContactNotes"); - connect ( Kopete::ContactList::self() , SIGNAL( metaContactSelected(bool)) , m_actionEdit , SLOT(setEnabled(bool))); + KAction *m_actionEdit=new KAction( i18n("&Notes"), "identity", 0, this, TQT_SLOT (slotEditInfo()), actionCollection() , "editContactNotes"); + connect ( Kopete::ContactList::self() , TQT_SIGNAL( metaContactSelected(bool)) , m_actionEdit , TQT_SLOT(setEnabled(bool))); m_actionEdit->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count()==1 ); setXMLFile("contactnotesui.rc"); @@ -63,18 +63,18 @@ void ContactNotesPlugin::slotEditInfo() if(!m) return; ContactNotesEdit *e=new ContactNotesEdit(m,this); - connect( e, SIGNAL( notesChanged( const QString, Kopete::MetaContact*) ),this, - SLOT( setNotes( const QString, Kopete::MetaContact * ) ) ); + connect( e, TQT_SIGNAL( notesChanged( const TQString, Kopete::MetaContact*) ),this, + TQT_SLOT( setNotes( const TQString, Kopete::MetaContact * ) ) ); e->show(); } -QString ContactNotesPlugin::notes(Kopete::MetaContact *m) +TQString ContactNotesPlugin::notes(Kopete::MetaContact *m) { return m->pluginData( this, "notes" ); } -void ContactNotesPlugin::setNotes( const QString n, Kopete::MetaContact *m ) +void ContactNotesPlugin::setNotes( const TQString n, Kopete::MetaContact *m ) { m->setPluginData( this, "notes", n ); } diff --git a/kopete/plugins/contactnotes/contactnotesplugin.h b/kopete/plugins/contactnotes/contactnotesplugin.h index c4fb8224..f526070d 100644 --- a/kopete/plugins/contactnotes/contactnotesplugin.h +++ b/kopete/plugins/contactnotes/contactnotesplugin.h @@ -18,9 +18,9 @@ #ifndef BABELFISHPLUGIN_H #define BABELFISHPLUGIN_H -#include -#include -#include +#include +#include +#include #include "kopeteplugin.h" @@ -44,14 +44,14 @@ class ContactNotesPlugin : public Kopete::Plugin public: static ContactNotesPlugin *plugin(); - ContactNotesPlugin( QObject *parent, const char *name, const QStringList &args ); + ContactNotesPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~ContactNotesPlugin(); - QString notes(Kopete::MetaContact *m); + TQString notes(Kopete::MetaContact *m); public slots: - void setNotes(const QString n, Kopete::MetaContact *m); + void setNotes(const TQString n, Kopete::MetaContact *m); private: static ContactNotesPlugin* pluginStatic_; diff --git a/kopete/plugins/cryptography/cryptographyguiclient.cpp b/kopete/plugins/cryptography/cryptographyguiclient.cpp index 0c53eee0..898e7f1a 100644 --- a/kopete/plugins/cryptography/cryptographyguiclient.cpp +++ b/kopete/plugins/cryptography/cryptographyguiclient.cpp @@ -28,7 +28,7 @@ class CryptographyPlugin; CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) - : QObject(parent) , KXMLGUIClient(parent) + : TQObject(parent) , KXMLGUIClient(parent) { if(!parent || parent->members().isEmpty()) { @@ -36,7 +36,7 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) return; } - QPtrList mb=parent->members(); + TQPtrList mb=parent->members(); Kopete::MetaContact *first=mb.first()->metaContact(); if(!first) @@ -48,8 +48,8 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) setInstance( KGenericFactory::instance() ); - m_action=new KToggleAction( i18n("Encrypt Messages" ), QString::fromLatin1( "encrypted" ), 0, this, SLOT(slotToggled()), actionCollection() , "cryptographyToggle" ); - m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != QString::fromLatin1("off") ) ; + m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::fromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" ); + m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::fromLatin1("off") ) ; setXMLFile("cryptographychatui.rc"); } @@ -60,7 +60,7 @@ CryptographyGUIClient::~CryptographyGUIClient() void CryptographyGUIClient::slotToggled() { - QPtrList mb=static_cast(parent())->members(); + TQPtrList mb=static_cast(parent())->members(); Kopete::MetaContact *first=mb.first()->metaContact(); if(!first) diff --git a/kopete/plugins/cryptography/cryptographyguiclient.h b/kopete/plugins/cryptography/cryptographyguiclient.h index 5a1aee2c..7f3d8c4f 100644 --- a/kopete/plugins/cryptography/cryptographyguiclient.h +++ b/kopete/plugins/cryptography/cryptographyguiclient.h @@ -15,7 +15,7 @@ #ifndef CRYPTOGUICLIENT_H #define CRYPTOGUICLIENT_H -#include +#include #include namespace Kopete { class ChatSession; } @@ -24,7 +24,7 @@ class KToggleAction; /** *@author Olivier Goffart */ -class CryptographyGUIClient : public QObject, public KXMLGUIClient +class CryptographyGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT public: diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp index 701ad8bd..4e2e9686 100644 --- a/kopete/plugins/cryptography/cryptographyplugin.cpp +++ b/kopete/plugins/cryptography/cryptographyplugin.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -45,13 +45,13 @@ //In Jabber, the JEP says it's not. so we don't use richtext in our message, but some client did. //We limit the html to some basis tag to limit security problem (bad links) // - Olivier -const QRegExp CryptographyPlugin::isHTML( QString::fromLatin1( "^[^<>]*(|[\\s/][^><]*>)[^><]*)+$" ) , false ); +const TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(|[\\s/][^><]*>)[^><]*)+$" ) , false ); typedef KGenericFactory CryptographyPluginFactory; static const KAboutData aboutdata("kopete_cryptography", I18N_NOOP("Cryptography") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_cryptography, CryptographyPluginFactory( &aboutdata ) ) -CryptographyPlugin::CryptographyPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +CryptographyPlugin::CryptographyPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( CryptographyPluginFactory::instance(), parent, name ), m_cachedPass() { @@ -59,27 +59,27 @@ CryptographyPlugin::CryptographyPlugin( QObject *parent, const char *name, const pluginStatic_=this; m_inboundHandler = new Kopete::SimpleMessageHandlerFactory( Kopete::Message::Inbound, - Kopete::MessageHandlerFactory::InStageToSent, this, SLOT( slotIncomingMessage( Kopete::Message& ) ) ); + Kopete::MessageHandlerFactory::InStageToSent, this, TQT_SLOT( slotIncomingMessage( Kopete::Message& ) ) ); connect( Kopete::ChatSessionManager::self(), - SIGNAL( aboutToSend( Kopete::Message & ) ), - SLOT( slotOutgoingMessage( Kopete::Message & ) ) ); + TQT_SIGNAL( aboutToSend( Kopete::Message & ) ), + TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) ); - m_cachedPass_timer = new QTimer(this, "m_cachedPass_timer" ); - QObject::connect(m_cachedPass_timer, SIGNAL(timeout()), this, SLOT(slotForgetCachedPass() )); + m_cachedPass_timer = new TQTimer(this, "m_cachedPass_timer" ); + TQObject::connect(m_cachedPass_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotForgetCachedPass() )); - KAction *action=new KAction( i18n("&Select Cryptography Public Key..."), "encrypted", 0, this, SLOT (slotSelectContactKey()), actionCollection() , "contactSelectKey"); - connect ( Kopete::ContactList::self() , SIGNAL( metaContactSelected(bool)) , action , SLOT(setEnabled(bool))); + KAction *action=new KAction( i18n("&Select Cryptography Public Key..."), "encrypted", 0, this, TQT_SLOT (slotSelectContactKey()), actionCollection() , "contactSelectKey"); + connect ( Kopete::ContactList::self() , TQT_SIGNAL( metaContactSelected(bool)) , action , TQT_SLOT(setEnabled(bool))); action->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count()==1 ); setXMLFile("cryptographyui.rc"); loadSettings(); - connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) ); + connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining) - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) { slotNewKMM(*it); } @@ -117,12 +117,12 @@ CryptographyPlugin* CryptographyPlugin::plugin() CryptographyPlugin* CryptographyPlugin::pluginStatic_ = 0L; -QCString CryptographyPlugin::cachedPass() +TQCString CryptographyPlugin::cachedPass() { return pluginStatic_->m_cachedPass; } -void CryptographyPlugin::setCachedPass(const QCString& p) +void CryptographyPlugin::setCachedPass(const TQCString& p) { if(pluginStatic_->mCacheMode==Never) return; @@ -144,7 +144,7 @@ bool CryptographyPlugin::passphraseHandling() m_actionCollection = new KActionCollection(this); KAction *actionTranslate = new KAction( i18n ("Translate"), 0, - this, SLOT( slotTranslateChat() ), m_actionCollection, "actionTranslate" ); + this, TQT_SLOT( slotTranslateChat() ), m_actionCollection, "actionTranslate" ); m_actionCollection->insert( actionTranslate ); m_currentChatSession=KMM; @@ -153,14 +153,14 @@ bool CryptographyPlugin::passphraseHandling() void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) { - QString body = msg.plainBody(); - if( !body.startsWith( QString::fromLatin1("-----BEGIN PGP MESSAGE----") ) - || !body.contains( QString::fromLatin1("-----END PGP MESSAGE----") ) ) + TQString body = msg.plainBody(); + if( !body.startsWith( TQString::fromLatin1("-----BEGIN PGP MESSAGE----") ) + || !body.contains( TQString::fromLatin1("-----END PGP MESSAGE----") ) ) return; if( msg.direction() != Kopete::Message::Inbound ) { - QString plainBody; + TQString plainBody; if ( m_cachedMessages.contains( body ) ) { plainBody = m_cachedMessages[ body ]; @@ -176,19 +176,19 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) //Check if this is a RTF message before escaping it if( !isHTML.exactMatch( plainBody ) ) { - plainBody = QStyleSheet::escape( plainBody ); + plainBody = TQStyleSheet::escape( plainBody ); //this is the same algoritm as in Kopete::Message::escapedBody(); - plainBody.replace( QString::fromLatin1( "\n" ), QString::fromLatin1( "
" ) ) - .replace( QString::fromLatin1( "\t" ), QString::fromLatin1( "    " ) ) - .replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "  " ) ); + plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "
" ) ) + .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "    " ) ) + .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "  " ) ); } - msg.setBody( QString::fromLatin1("
") + msg.setBody( TQString::fromLatin1("
") + i18n("Outgoing Encrypted Message: ") - + QString::fromLatin1("
") + + TQString::fromLatin1("
") + plainBody - + QString::fromLatin1("
") + + TQString::fromLatin1("
") , Kopete::Message::RichText ); } @@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) body = Kopete::Message::escape( body ); } - msg.setBody( QString::fromLatin1("
") + msg.setBody( TQString::fromLatin1("
") + i18n("Incoming Encrypted Message: ") - + QString::fromLatin1("
") + + TQString::fromLatin1("
") + body - + QString::fromLatin1("
") + + TQString::fromLatin1("
") , Kopete::Message::RichText ); } @@ -230,11 +230,11 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg ) if(msg.direction() != Kopete::Message::Outbound) return; - QStringList keys; - QPtrList contactlist = msg.to(); + TQStringList keys; + TQPtrList contactlist = msg.to(); for( Kopete::Contact *c = contactlist.first(); c; c = contactlist.next() ) { - QString tmpKey; + TQString tmpKey; if( c->metaContact() ) { if(c->metaContact()->pluginData( this, "encrypt_messages" ) == "off" ) @@ -251,7 +251,7 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg ) if(mAlsoMyKey) //encrypt also with the self key keys.append( mPrivateKeyID ); - QString key = keys.join( " " ); + TQString key = keys.join( " " ); if(key.isEmpty()) { @@ -259,12 +259,12 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg ) return; } - QString original=msg.plainBody(); + TQString original=msg.plainBody(); /* Code From KGPG */ ////////////////// encode from editor - QString encryptOptions=""; + TQString encryptOptions=""; //if (utrust==true) encryptOptions+=" --always-trust "; @@ -279,7 +279,7 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg ) // if (selec==NULL) {KMessageBox::sorry(Kopete::UI::Global::mainWidget(),i18n("You have not chosen an encryption key..."));return;} - QString resultat=KgpgInterface::KgpgEncryptText(original,key,encryptOptions); + TQString resultat=KgpgInterface::KgpgEncryptText(original,key,encryptOptions); if (!resultat.isEmpty()) { msg.setBody(resultat,Kopete::Message::PlainText); @@ -295,7 +295,7 @@ void CryptographyPlugin::slotSelectContactKey() Kopete::MetaContact *m=Kopete::ContactList::self()->selectedMetaContacts().first(); if(!m) return; - QString key = m->pluginData( this, "gpgKey" ); + TQString key = m->pluginData( this, "gpgKey" ); CryptographySelectUserKey *opts = new CryptographySelectUserKey( key, m ); opts->exec(); if( opts->result() ) @@ -308,14 +308,14 @@ void CryptographyPlugin::slotSelectContactKey() void CryptographyPlugin::slotForgetCachedPass() { - m_cachedPass=QCString(); + m_cachedPass=TQCString(); m_cachedPass_timer->stop(); } void CryptographyPlugin::slotNewKMM(Kopete::ChatSession *KMM) { - connect(this , SIGNAL( destroyed(QObject*)) , - new CryptographyGUIClient(KMM) , SLOT(deleteLater())); + connect(this , TQT_SIGNAL( destroyed(TQObject*)) , + new CryptographyGUIClient(KMM) , TQT_SLOT(deleteLater())); } diff --git a/kopete/plugins/cryptography/cryptographyplugin.h b/kopete/plugins/cryptography/cryptographyplugin.h index 506617cc..f34bd175 100644 --- a/kopete/plugins/cryptography/cryptographyplugin.h +++ b/kopete/plugins/cryptography/cryptographyplugin.h @@ -50,12 +50,12 @@ public: }; static CryptographyPlugin *plugin(); - static QCString cachedPass(); - static void setCachedPass(const QCString &pass); + static TQCString cachedPass(); + static void setCachedPass(const TQCString &pass); static bool passphraseHandling(); - static const QRegExp isHTML; + static const TQRegExp isHTML; - CryptographyPlugin( QObject *parent, const char *name, const QStringList &args ); + CryptographyPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~CryptographyPlugin(); public slots: @@ -74,14 +74,14 @@ private slots: private: static CryptographyPlugin* pluginStatic_; Kopete::SimpleMessageHandlerFactory *m_inboundHandler; - QCString m_cachedPass; - QTimer *m_cachedPass_timer; + TQCString m_cachedPass; + TQTimer *m_cachedPass_timer; //cache messages for showing - QMap m_cachedMessages; + TQMap m_cachedMessages; //Settings - QString mPrivateKeyID; + TQString mPrivateKeyID; int mCacheMode; unsigned int mCacheTime; bool mAlsoMyKey; diff --git a/kopete/plugins/cryptography/cryptographypreferences.cpp b/kopete/plugins/cryptography/cryptographypreferences.cpp index 1039aac8..8e1b96ee 100644 --- a/kopete/plugins/cryptography/cryptographypreferences.cpp +++ b/kopete/plugins/cryptography/cryptographypreferences.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include +#include #include #include @@ -27,12 +27,12 @@ typedef KGenericFactory CryptographyPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_cryptography, CryptographyPreferencesFactory("kcm_kopete_cryptography")) -CryptographyPreferences::CryptographyPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +CryptographyPreferences::CryptographyPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCAutoConfigModule(CryptographyPreferencesFactory::instance(), parent, args) { // Add actuall widget generated from ui file. preferencesDialog = new CryptographyPrefsUI(this); - connect (preferencesDialog->m_selectOwnKey , SIGNAL(pressed()) , this , SLOT(slotSelectPressed())); + connect (preferencesDialog->m_selectOwnKey , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotSelectPressed())); setMainWidget( preferencesDialog ,"Cryptography Plugin"); } @@ -40,7 +40,7 @@ void CryptographyPreferences::slotSelectPressed() { KgpgSelKey opts(this,0,false); opts.exec(); - if (opts.result()==QDialog::Accepted) + if (opts.result()==TQDialog::Accepted) preferencesDialog->PGP_private_key->setText(opts.getkeyID()); } diff --git a/kopete/plugins/cryptography/cryptographypreferences.h b/kopete/plugins/cryptography/cryptographypreferences.h index 057eacf1..6053e96b 100644 --- a/kopete/plugins/cryptography/cryptographypreferences.h +++ b/kopete/plugins/cryptography/cryptographypreferences.h @@ -30,7 +30,7 @@ class KAutoConfig; class CryptographyPreferences : public KCAutoConfigModule { Q_OBJECT public: - CryptographyPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList()); + CryptographyPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); private: CryptographyPrefsUI *preferencesDialog; private slots: // Public slots diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp index 4f1cc35e..ae92647b 100644 --- a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp +++ b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp @@ -17,8 +17,8 @@ #include #include -#include -#include +#include +#include #include "cryptographyuserkey_ui.h" #include "kopetemetacontact.h" @@ -26,14 +26,14 @@ #include "cryptographyselectuserkey.h" -CryptographySelectUserKey::CryptographySelectUserKey(const QString& key ,Kopete::MetaContact *mc) : KDialogBase( 0l, "CryptographySelectUserKey", /*modal = */true, i18n("Select Contact's Public Key") , KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok ) +CryptographySelectUserKey::CryptographySelectUserKey(const TQString& key ,Kopete::MetaContact *mc) : KDialogBase( 0l, "CryptographySelectUserKey", /*modal = */true, i18n("Select Contact's Public Key") , KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok ) { m_metaContact=mc; view = new CryptographyUserKey_ui(this,"CryptographyUserKey_ui"); setMainWidget(view); - connect (view->m_selectKey , SIGNAL(clicked()) , this , SLOT(slotSelectPressed())); - connect (view->m_removeButton , SIGNAL(clicked()) , this , SLOT(slotRemovePressed())); + connect (view->m_selectKey , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotSelectPressed())); + connect (view->m_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotRemovePressed())); view->m_titleLabel->setText(i18n("Select public key for %1").arg(mc->displayName())); view->m_editKey->setText(key); @@ -45,12 +45,12 @@ CryptographySelectUserKey::~CryptographySelectUserKey() void CryptographySelectUserKey::slotSelectPressed() { popupPublic *dialog=new popupPublic(this, "public_keys", 0,false); - connect(dialog,SIGNAL(selectedKey(QString &,QString,bool,bool)),this,SLOT(keySelected(QString &))); + connect(dialog,TQT_SIGNAL(selectedKey(TQString &,TQString,bool,bool)),this,TQT_SLOT(keySelected(TQString &))); dialog->show(); } -void CryptographySelectUserKey::keySelected(QString &key) +void CryptographySelectUserKey::keySelected(TQString &key) { view->m_editKey->setText(key); } @@ -60,7 +60,7 @@ void CryptographySelectUserKey::slotRemovePressed() view->m_editKey->setText(""); } -QString CryptographySelectUserKey::publicKey() const +TQString CryptographySelectUserKey::publicKey() const { return view->m_editKey->text(); } diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.h b/kopete/plugins/cryptography/cryptographyselectuserkey.h index 1a8828cf..7ca5ec8e 100644 --- a/kopete/plugins/cryptography/cryptographyselectuserkey.h +++ b/kopete/plugins/cryptography/cryptographyselectuserkey.h @@ -30,14 +30,14 @@ class CryptographyUserKey_ui; class CryptographySelectUserKey : public KDialogBase { Q_OBJECT public: - CryptographySelectUserKey(const QString &key, Kopete::MetaContact *mc); + CryptographySelectUserKey(const TQString &key, Kopete::MetaContact *mc); ~CryptographySelectUserKey(); - QString publicKey() const; + TQString publicKey() const; private slots: - void keySelected(QString &); + void keySelected(TQString &); void slotSelectPressed(); /** No descriptions */ void slotRemovePressed(); diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp index 51b35a63..e41e246d 100644 --- a/kopete/plugins/cryptography/kgpginterface.cpp +++ b/kopete/plugins/cryptography/kgpginterface.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include @@ -40,10 +40,10 @@ KgpgInterface::KgpgInterface() KgpgInterface::~KgpgInterface() {} -QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Options) +TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString Options) { FILE *fp; - QString dests,encResult; + TQString dests,encResult; char buffer[200]; userIDs=userIDs.stripWhiteSpace(); @@ -59,7 +59,7 @@ QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Opt } dests+=" --recipient "+userIDs; - QCString gpgcmd = "echo -n "; + TQCString gpgcmd = "echo -n "; gpgcmd += KShellProcess::quote( text ).utf8(); gpgcmd += " | gpg --no-secmem-warning --no-tty "; gpgcmd += Options.local8Bit(); @@ -75,17 +75,17 @@ QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Opt if( !encResult.isEmpty() ) return encResult; else - return QString::null; + return TQString::null; } -QString KgpgInterface::KgpgDecryptText(QString text,QString userID) +TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID) { FILE *fp,*pass; - QString encResult; + TQString encResult; char buffer[200]; int counter=0,ppass[2]; - QCString password = CryptographyPlugin::cachedPass(); + TQCString password = CryptographyPlugin::cachedPass(); bool passphraseHandling=CryptographyPlugin::passphraseHandling(); while ((counter<3) && (encResult.isEmpty())) @@ -94,16 +94,16 @@ QString KgpgInterface::KgpgDecryptText(QString text,QString userID) if(passphraseHandling && password.isNull()) { /// pipe for passphrase - //userID=QString::fromUtf8(userID); + //userID=TQString::fromUtf8(userID); userID.replace('<',"<"); - QString passdlg=i18n("Enter passphrase for %1:").arg(userID); + TQString passdlg=i18n("Enter passphrase for %1:").arg(userID); if (counter>1) - passdlg.prepend(i18n("Bad passphrase
You have %1 tries left.
").arg(QString::number(4-counter))); + passdlg.prepend(i18n("Bad passphrase
You have %1 tries left.
").arg(TQString::number(4-counter))); /// pipe for passphrase int code=KPasswordDialog::getPassword(password,passdlg); - if (code!=QDialog::Accepted) - return QString::null; + if (code!=TQDialog::Accepted) + return TQString::null; CryptographyPlugin::setCachedPass(password); } @@ -116,29 +116,29 @@ QString KgpgInterface::KgpgDecryptText(QString text,QString userID) fclose(pass); } - QCString gpgcmd="echo "; + TQCString gpgcmd="echo "; gpgcmd += KShellProcess::quote(text).utf8(); gpgcmd += " | gpg --no-secmem-warning --no-tty "; if(passphraseHandling) - gpgcmd += "--passphrase-fd " + QString::number(ppass[0]).local8Bit(); + gpgcmd += "--passphrase-fd " + TQString::number(ppass[0]).local8Bit(); gpgcmd += " -d "; ////////// encode with untrusted keys or armor if checked by user fp = popen(gpgcmd, "r"); while ( fgets( buffer, sizeof(buffer), fp)) - encResult += QString::fromUtf8(buffer); + encResult += TQString::fromUtf8(buffer); pclose(fp); - password = QCString(); + password = TQCString(); } if( !encResult.isEmpty() ) return encResult; else - return QString::null; + return TQString::null; } -QString KgpgInterface::checkForUtf8(QString txt) +TQString KgpgInterface::checkForUtf8(TQString txt) { // code borrowed from gpa @@ -147,7 +147,7 @@ QString KgpgInterface::checkForUtf8(QString txt) /* Make sure the encoding is UTF-8. * Test structure suggested by Werner Koch */ if (txt.isEmpty()) - return QString::null; + return TQString::null; for (s = txt.ascii(); *s && !(*s & 0x80); s++) ; @@ -157,17 +157,17 @@ QString KgpgInterface::checkForUtf8(QString txt) /* The string is not in UTF-8 */ //if (strchr (txt.ascii(), 0xc3)) return (txt+" +++"); if (txt.find("\\x")==-1) - return QString::fromUtf8(txt.ascii()); + return TQString::fromUtf8(txt.ascii()); // if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) { for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) { char str[2] = "x"; - str[0] = (char) QString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 ); + str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 ); txt.replace( idx, 4, str ); } if (!strchr (txt.ascii(), 0xc3)) - return QString::fromUtf8(txt.ascii()); + return TQString::fromUtf8(txt.ascii()); else - return QString::fromUtf8(QString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly + return TQString::fromUtf8(TQString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly } diff --git a/kopete/plugins/cryptography/kgpginterface.h b/kopete/plugins/cryptography/kgpginterface.h index b70bc68a..f324359e 100644 --- a/kopete/plugins/cryptography/kgpginterface.h +++ b/kopete/plugins/cryptography/kgpginterface.h @@ -26,8 +26,8 @@ /** * Encrypt a file using gpg. */ -//class KgpgEncryptFile : public QObject { -class KgpgInterface : public QObject { +//class KgpgEncryptFile : public TQObject { +class KgpgInterface : public TQObject { Q_OBJECT @@ -39,26 +39,26 @@ class KgpgInterface : public QObject { /**Encrypt text function - * @param text QString text to be encrypted. + * @param text TQString text to be encrypted. * @param userIDs the recipients key id's. * @param Options String with the wanted gpg options. ex: "--armor" * returns the encrypted text or empty string if encyption failed */ - static QString KgpgEncryptText(QString text,QString userIDs, QString Options=""); + static TQString KgpgEncryptText(TQString text,TQString userIDs, TQString Options=""); /**Decrypt text function - * @param text QString text to be decrypted. - * @param userID QString the name of the decryption key (only used to prompt user for passphrase) + * @param text TQString text to be decrypted. + * @param userID TQString the name of the decryption key (only used to prompt user for passphrase) */ - static QString KgpgDecryptText(QString text,QString userID); -// static QString KgpgDecryptFileToText(KURL srcUrl,QString userID); + static TQString KgpgDecryptText(TQString text,TQString userID); +// static TQString KgpgDecryptFileToText(KURL srcUrl,TQString userID); /* * Destructor for the class. */ ~KgpgInterface(); - static QString checkForUtf8(QString txt); + static TQString checkForUtf8(TQString txt); private slots: @@ -69,12 +69,12 @@ signals: /** * @internal structure for communication */ - QString message,tempKeyFile,userIDs,txtprocess,output; - QCString passphrase; + TQString message,tempKeyFile,userIDs,txtprocess,output; + TQCString passphrase; bool deleteSuccess,konsLocal,anonymous,txtsent,decfinished,decok,badmdc; int signSuccess; int step,signb,sigsearch; - QString konsSignKey, konsKeyID; + TQString konsSignKey, konsKeyID; /** diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp index 70f76598..88078ece 100644 --- a/kopete/plugins/cryptography/kgpgselkey.cpp +++ b/kopete/plugins/cryptography/kgpgselkey.cpp @@ -23,12 +23,12 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include @@ -38,11 +38,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////// Secret key selection dialog, used when user wants to sign a key -KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) +KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) { - QString keyname; - QWidget *page = new QWidget(this); - QLabel *labeltxt; + TQString keyname; + TQWidget *page = new TQWidget(this); + TQLabel *labeltxt; KIconLoader *loader = KGlobal::iconLoader(); keyPair=loader->loadIcon("kgpg_key2",KIcon::Small,20); @@ -54,22 +54,22 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog keysListpr->setShowSortIndicator(true); keysListpr->setFullWidth(true); - labeltxt=new QLabel(i18n("Choose secret key:"),page); - QVBoxLayout *vbox=new QVBoxLayout(page,3); + labeltxt=new TQLabel(i18n("Choose secret key:"),page); + TQVBoxLayout *vbox=new TQVBoxLayout(page,3); vbox->addWidget(labeltxt); vbox->addWidget(keysListpr); if (showlocal==true) { - local = new QCheckBox(i18n("Local signature (cannot be exported)"),page); + local = new TQCheckBox(i18n("Local signature (cannot be exported)"),page); vbox->addWidget(local); } FILE *fp,*fp2; - QString tst,tst2; + TQString tst,tst2; char line[130]; - // FIXME: Why use popen instead of KProcess, QProcess or KProcIO?!? + // FIXME: Why use popen instead of KProcess, TQProcess or KProcIO?!? // Are we interested in having buffer overflows now? - Martijn fp = popen( "gpg --no-tty --with-colon --list-secret-keys", "r" ); while ( fgets( line, sizeof(line), fp)) @@ -77,12 +77,12 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog tst=line; if (tst.startsWith("sec")) { - const QString trust=tst.section(':',1,1); - QString val=tst.section(':',6,6); - QString id=QString("0x"+tst.section(':',4,4).right(8)); + const TQString trust=tst.section(':',1,1); + TQString val=tst.section(':',6,6); + TQString id=TQString("0x"+tst.section(':',4,4).right(8)); if (val.isEmpty()) val=i18n("Unlimited"); - QString tr; + TQString tr; switch( trust[0] ) { case 'o': @@ -122,14 +122,14 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog tst=tst.section(":",9,9); // FIXME: Same here: don't use popen! - Martijn - fp2 = popen( QString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" ); + fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" ); bool dead=true; while ( fgets( line, sizeof(line), fp2)) { tst2=line; if (tst2.startsWith("pub")) { - const QString trust2=tst2.section(':',1,1); + const TQString trust2=tst2.section(':',1,1); switch( trust2[0] ) { case 'f': @@ -156,8 +156,8 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog pclose(fp); - QObject::connect(keysListpr,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotpreOk())); - QObject::connect(keysListpr,SIGNAL(clicked(QListViewItem *)),this,SLOT(slotSelect(QListViewItem *))); + TQObject::connect(keysListpr,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotpreOk())); + TQObject::connect(keysListpr,TQT_SIGNAL(clicked(TQListViewItem *)),this,TQT_SLOT(slotSelect(TQListViewItem *))); keysListpr->setSelected(keysListpr->firstChild(),true); @@ -167,17 +167,17 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog setMainWidget(page); } -QString KgpgSelKey::extractKeyName(QString fullName) +TQString KgpgSelKey::extractKeyName(TQString fullName) { - QString kMail; + TQString kMail; if (fullName.find("<")!=-1) { kMail=fullName.section('<',-1,-1); kMail.truncate(kMail.length()-1); } - QString kName=fullName.section('<',0,0); + TQString kName=fullName.section('<',0,0); if (kName.find("(")!=-1) kName=kName.section('(',0,0); - return QString(kMail+" ("+kName+")").stripWhiteSpace(); + return TQString(kMail+" ("+kName+")").stripWhiteSpace(); } void KgpgSelKey::slotpreOk() @@ -196,7 +196,7 @@ void KgpgSelKey::slotOk() accept(); } -void KgpgSelKey::slotSelect(QListViewItem *item) +void KgpgSelKey::slotSelect(TQListViewItem *item) { if (item==NULL) return; if (item->depth()!=0) @@ -207,9 +207,9 @@ void KgpgSelKey::slotSelect(QListViewItem *item) } -QString KgpgSelKey::getkeyID() +TQString KgpgSelKey::getkeyID() { - QString userid; + TQString userid; ///// emit selected key if (keysListpr->currentItem()==NULL) return(""); else @@ -222,9 +222,9 @@ QString KgpgSelKey::getkeyID() } } -QString KgpgSelKey::getkeyMail() +TQString KgpgSelKey::getkeyMail() { - QString username; + TQString username; ///// emit selected key if (keysListpr->currentItem()==NULL) return(""); else diff --git a/kopete/plugins/cryptography/kgpgselkey.h b/kopete/plugins/cryptography/kgpgselkey.h index 11bcc498..f511f999 100644 --- a/kopete/plugins/cryptography/kgpgselkey.h +++ b/kopete/plugins/cryptography/kgpgselkey.h @@ -27,15 +27,15 @@ class KListView; class QCheckBox; typedef struct gpgKey{ - QString gpgkeymail; - QString gpgkeyname; - QString gpgkeyid; - QString gpgkeytrust; - QString gpgkeyvalidity; - QString gpgkeysize; - QString gpgkeycreation; - QString gpgkeyexpiration; - QString gpgkeyalgo; + TQString gpgkeymail; + TQString gpgkeyname; + TQString gpgkeyid; + TQString gpgkeytrust; + TQString gpgkeyvalidity; + TQString gpgkeysize; + TQString gpgkeycreation; + TQString gpgkeyexpiration; + TQString gpgkeyalgo; }; class KgpgSelKey : public KDialogBase @@ -43,19 +43,19 @@ class KgpgSelKey : public KDialogBase Q_OBJECT public: - KgpgSelKey( QWidget *parent = 0, const char *name = 0,bool showlocal=true); + KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool showlocal=true); KListView *keysListpr; -QPixmap keyPair; -QCheckBox *local; +TQPixmap keyPair; +TQCheckBox *local; private slots: void slotOk(); void slotpreOk(); -void slotSelect(QListViewItem *item); -QString extractKeyName(QString fullName); +void slotSelect(TQListViewItem *item); +TQString extractKeyName(TQString fullName); public: - QString getkeyID(); - QString getkeyMail(); + TQString getkeyID(); + TQString getkeyMail(); bool getlocal(); }; diff --git a/kopete/plugins/cryptography/popuppublic.cpp b/kopete/plugins/cryptography/popuppublic.cpp index 36008bcf..9c1561f1 100644 --- a/kopete/plugins/cryptography/popuppublic.cpp +++ b/kopete/plugins/cryptography/popuppublic.cpp @@ -18,18 +18,18 @@ ***************************************************************************/ //////////////////////////////////////////////////////// code for choosing a public key from a list for encryption -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -57,13 +57,13 @@ class UpdateViewItem2 : public KListViewItem { public: - UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault); - virtual void paintCell(QPainter *p, const QColorGroup &cg,int col, int width, int align); - virtual QString key(int c,bool ) const; + UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align); + virtual TQString key(int c,bool ) const; bool def; }; -UpdateViewItem2::UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault) +UpdateViewItem2::UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault) : KListViewItem(parent) { def=isDefault; @@ -73,28 +73,28 @@ def=isDefault; } -void UpdateViewItem2::paintCell(QPainter *p, const QColorGroup &cg,int column, int width, int alignment) +void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment) { if ((def) && (column<2)) { - QFont font(p->font()); + TQFont font(p->font()); font.setBold(true); p->setFont(font); } KListViewItem::paintCell(p, cg, column, width, alignment); } -QString UpdateViewItem2 :: key(int c,bool ) const +TQString UpdateViewItem2 :: key(int c,bool ) const { return text(c).lower(); } /////////////// main view -popupPublic::popupPublic(QWidget *parent, const char *name,QString sfile,bool filemode,KShortcut goDefaultKey): +popupPublic::popupPublic(TQWidget *parent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey): KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent, name,true) { - QWidget *page = plainPage(); - QVBoxLayout *vbox=new QVBoxLayout(page,0,spacingHint()); + TQWidget *page = plainPage(); + TQVBoxLayout *vbox=new TQVBoxLayout(page,0,spacingHint()); vbox->setAutoAdd(true); setButtonText(KDialogBase::Details,i18n("Options")); @@ -111,17 +111,17 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile)); fmode=filemode; - QHButtonGroup *hBar=new QHButtonGroup(page); - //hBar->setFrameStyle(QFrame::NoFrame); + TQHButtonGroup *hBar=new TQHButtonGroup(page); + //hBar->setFrameStyle(TQFrame::NoFrame); hBar->setMargin(0); - QToolButton *clearSearch = new QToolButton(hBar); + TQToolButton *clearSearch = new TQToolButton(hBar); clearSearch->setTextLabel(i18n("Clear Search"), true); - clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" + clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); - (void) new QLabel(i18n("Search: "),hBar); + (void) new TQLabel(i18n("Search: "),hBar); KListViewSearchLine* listViewSearch = new KListViewSearchLine(hBar); - connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear())); + connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); keysList = new KListView( page ); keysList->addColumn(i18n("Name")); @@ -136,54 +136,54 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent keysList->setFullWidth(true); keysList->setAllColumnsShowFocus(true); keysList->setSelectionModeExt(KListView::Extended); - keysList->setColumnWidthMode(0,QListView::Manual); - keysList->setColumnWidthMode(1,QListView::Manual); + keysList->setColumnWidthMode(0,TQListView::Manual); + keysList->setColumnWidthMode(1,TQListView::Manual); keysList->setColumnWidth(0,210); keysList->setColumnWidth(1,210); - boutonboxoptions=new QButtonGroup(5,Qt::Vertical ,page,0); + boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0); KActionCollection *actcol=new KActionCollection(this); - (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); + (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); - CBarmor=new QCheckBox(i18n("ASCII armored encryption"),boutonboxoptions); - CBuntrusted=new QCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions); - CBhideid=new QCheckBox(i18n("Hide user id"),boutonboxoptions); + CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions); + CBuntrusted=new TQCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions); + CBhideid=new TQCheckBox(i18n("Hide user id"),boutonboxoptions); setDetailsWidget(boutonboxoptions); - QWhatsThis::add + TQWhatsThis::add (keysList,i18n("Public keys list: select the key that will be used for encryption.")); - QWhatsThis::add + TQWhatsThis::add (CBarmor,i18n("ASCII encryption: makes it possible to open the encrypted file/message in a text editor")); - QWhatsThis::add + TQWhatsThis::add (CBhideid,i18n("Hide user ID: Do not put the keyid into encrypted packets. This option hides the receiver " "of the message and is a countermeasure against traffic analysis. It may slow down the decryption process because " "all available secret keys are tried.")); - QWhatsThis::add + TQWhatsThis::add (CBuntrusted,i18n("Allow encryption with untrusted keys: when you import a public key, it is usually " "marked as untrusted and you cannot use it unless you sign it in order to make it 'trusted'. Checking this " "box enables you to use any key, even if it has not be signed.")); if (filemode) { - QWidget *parentBox=new QWidget(boutonboxoptions); - QHBoxLayout *shredBox=new QHBoxLayout(parentBox,0); - //shredBox->setFrameStyle(QFrame::NoFrame); + TQWidget *parentBox=new TQWidget(boutonboxoptions); + TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0); + //shredBox->setFrameStyle(TQFrame::NoFrame); //shredBox->setMargin(0); - CBshred=new QCheckBox(i18n("Shred source file"),parentBox); - QWhatsThis::add + CBshred=new TQCheckBox(i18n("Shred source file"),parentBox); + TQWhatsThis::add (CBshred,i18n("Shred source file: permanently remove source file. No recovery will be possible")); - QString shredWhatsThis = i18n( "Shred source file:

Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.

But you must be aware that this is not secure on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).

"); + TQString shredWhatsThis = i18n( "Shred source file:

Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.

But you must be aware that this is not secure on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).

"); KActiveLabel *warn= new KActiveLabel( i18n("
Read this before using shredding").arg(shredWhatsThis),parentBox ); shredBox->addWidget(CBshred); shredBox->addWidget(warn); } - CBsymmetric=new QCheckBox(i18n("Symmetrical encryption"),boutonboxoptions); - QWhatsThis::add + CBsymmetric=new TQCheckBox(i18n("Symmetrical encryption"),boutonboxoptions); + TQWhatsThis::add (CBsymmetric,i18n("Symmetrical encryption: encryption does not use keys. You just need to give a password " "to encrypt/decrypt the file")); - QObject::connect(CBsymmetric,SIGNAL(toggled(bool)),this,SLOT(isSymetric(bool))); + TQObject::connect(CBsymmetric,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(isSymetric(bool))); //BEGIN modified for Kopete @@ -206,27 +206,27 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent //END modified for Kopete /*if (KGpgSettings::allowCustomEncryptionOptions()) { - QHButtonGroup *bGroup = new QHButtonGroup(page); - //bGroup->setFrameStyle(QFrame::NoFrame); - (void) new QLabel(i18n("Custom option:"),bGroup); + TQHButtonGroup *bGroup = new TQHButtonGroup(page); + //bGroup->setFrameStyle(TQFrame::NoFrame); + (void) new TQLabel(i18n("Custom option:"),bGroup); KLineEdit *optiontxt=new KLineEdit(bGroup); optiontxt->setText(customOptions); - QWhatsThis::add + TQWhatsThis::add (optiontxt,i18n("Custom option: for experienced users only, allows you to enter a gpg command line option, like: '--armor'")); - QObject::connect(optiontxt,SIGNAL(textChanged ( const QString & )),this,SLOT(customOpts(const QString & ))); + TQObject::connect(optiontxt,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(customOpts(const TQString & ))); }*/ - QObject::connect(keysList,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotOk())); -// QObject::connect(this,SIGNAL(okClicked()),this,SLOT(crypte())); - QObject::connect(CBuntrusted,SIGNAL(toggled(bool)),this,SLOT(refresh(bool))); + TQObject::connect(keysList,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotOk())); +// TQObject::connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(crypte())); + TQObject::connect(CBuntrusted,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(refresh(bool))); char line[200]="\0"; FILE *fp2; - seclist=QString::null; + seclist=TQString::null; fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r"); while ( fgets( line, sizeof(line), fp2)) { - QString readLine=line; + TQString readLine=line; if (readLine.startsWith("sec")) seclist+=", 0x"+readLine.section(":",4,4).right(8); } pclose(fp2); @@ -251,7 +251,7 @@ accept(); void popupPublic::enable() { - QListViewItem *current = keysList->firstChild(); + TQListViewItem *current = keysList->firstChild(); if (current==NULL) return; current->setVisible(true); @@ -265,7 +265,7 @@ void popupPublic::enable() void popupPublic::sort() { bool reselect=false; - QListViewItem *current = keysList->firstChild(); + TQListViewItem *current = keysList->firstChild(); if (current==NULL) return; @@ -289,7 +289,7 @@ void popupPublic::sort() } if (reselect) { - QListViewItem *firstvisible; + TQListViewItem *firstvisible; firstvisible=keysList->firstChild(); while (firstvisible->isVisible()!=true) { firstvisible=firstvisible->nextSibling(); @@ -310,14 +310,14 @@ void popupPublic::isSymetric(bool state) } -void popupPublic::customOpts(const QString &str) +void popupPublic::customOpts(const TQString &str) { customOptions=str; } void popupPublic::slotGotoDefaultKey() { - /*QListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2); + /*TQListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2); keysList->clearSelection(); keysList->setCurrentItem(myDefaulKey); keysList->setSelected(myDefaulKey,true); @@ -335,14 +335,14 @@ void popupPublic::refresh(bool state) void popupPublic::refreshkeys() { keysList->clear(); - /*QStringList groups= QStringList::split(",", KGpgSettings::groups()); + /*TQStringList groups= TQStringList::split(",", KGpgSettings::groups()); if (!groups.isEmpty()) { - for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) + for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) { - if (!QString(*it).isEmpty()) + if (!TQString(*it).isEmpty()) { - UpdateViewItem2 *item=new UpdateViewItem2(keysList,QString(*it),QString::null,QString::null,false); + UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false); item->setPixmap(0,keyGroup); } } @@ -350,14 +350,14 @@ void popupPublic::refreshkeys() KProcIO *encid=new KProcIO(); *encid << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys"; ///////// when process ends, update dialog infos - QObject::connect(encid, SIGNAL(processExited(KProcess *)),this, SLOT(slotpreselect())); - QObject::connect(encid, SIGNAL(readReady(KProcIO *)),this, SLOT(slotprocread(KProcIO *))); + TQObject::connect(encid, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotpreselect())); + TQObject::connect(encid, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotprocread(KProcIO *))); encid->start(KProcess::NotifyOnExit,true); } void popupPublic::slotpreselect() { -QListViewItem *it; +TQListViewItem *it; //if (fmode) it=keysList->findItem(KGpgSettings::defaultKey(),2); //else { it=keysList->firstChild(); @@ -386,20 +386,20 @@ void popupPublic::slotprocread(KProcIO *p) { ///////////////////////////////////////////////////////////////// extract encryption keys bool dead; - QString tst,keyname,keymail; + TQString tst,keyname,keymail; - QString defaultKey ;// = KGpgSettings::defaultKey().right(8); + TQString defaultKey ;// = KGpgSettings::defaultKey().right(8); while (p->readln(tst)!=-1) { if (tst.startsWith("pub")) { - QStringList keyString=QStringList::split(":",tst,true); + TQStringList keyString=TQStringList::split(":",tst,true); dead=false; - const QString trust=keyString[1]; - QString val=keyString[6]; - QString id=QString("0x"+keyString[4].right(8)); + const TQString trust=keyString[1]; + TQString val=keyString[6]; + TQString id=TQString("0x"+keyString[4].right(8)); if (val.isEmpty()) val=i18n("Unlimited"); - QString tr; + TQString tr; switch( trust[0] ) { case 'o': untrustedList< list=keysList->selectedItems(); + TQStringList selectedKeys; + TQString userid; + TQPtrList list=keysList->selectedItems(); for ( uint i = 0; i < list.count(); ++i ) if ( list.at(i) ) { @@ -492,7 +492,7 @@ kdDebug(2100)<<"Ok pressed"<isChecked()) return; kdDebug(2100)<<"Selected Key:"<isChecked()) returnOptions<<"--always-trust"; if (CBarmor->isChecked()) @@ -500,14 +500,14 @@ kdDebug(2100)<<"Selected Key:"<isChecked()) returnOptions<<"--throw-keyid"; /*if ((KGpgSettings::allowCustomEncryptionOptions()) && (!customOptions.stripWhiteSpace().isEmpty())) - returnOptions.operator+ (QStringList::split(QString(" "),customOptions.simplifyWhiteSpace()));*/ + returnOptions.operator+ (TQStringList::split(TQString(" "),customOptions.simplifyWhiteSpace()));*/ //hide(); //MODIFIED for kopete if (fmode) - emit selectedKey(selectedKeys.first(),QString(),CBshred->isChecked(),CBsymmetric->isChecked()); + emit selectedKey(selectedKeys.first(),TQString(),CBshred->isChecked(),CBsymmetric->isChecked()); else - emit selectedKey(selectedKeys.first(),QString(),false,CBsymmetric->isChecked()); + emit selectedKey(selectedKeys.first(),TQString(),false,CBsymmetric->isChecked()); accept(); } diff --git a/kopete/plugins/cryptography/popuppublic.h b/kopete/plugins/cryptography/popuppublic.h index 7e147385..ac8ab068 100644 --- a/kopete/plugins/cryptography/popuppublic.h +++ b/kopete/plugins/cryptography/popuppublic.h @@ -36,22 +36,22 @@ class popupPublic : public KDialogBase //QDialog Q_OBJECT public: - popupPublic(QWidget *parent=0, const char *name=0,QString sfile="",bool filemode=false,KShortcut goDefaultKey=QKeySequence(CTRL+Qt::Key_Home)); + popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home)); ~popupPublic(); KListView *keysList; - QCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid; + TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid; bool fmode,trusted; - QPixmap keyPair,keySingle,keyGroup; - QString seclist; - QStringList untrustedList; + TQPixmap keyPair,keySingle,keyGroup; + TQString seclist; + TQStringList untrustedList; private: KConfig *config; - QButtonGroup *boutonboxoptions; - QString customOptions; + TQButtonGroup *boutonboxoptions; + TQString customOptions; private slots: - void customOpts(const QString &); + void customOpts(const TQString &); void slotprocread(KProcIO *); void slotpreselect(); void refreshkeys(); @@ -69,7 +69,7 @@ protected slots: virtual void slotOk(); signals: - void selectedKey(QString & ,QString,bool,bool); + void selectedKey(TQString & ,TQString,bool,bool); void keyListFilled(); }; diff --git a/kopete/plugins/highlight/filter.h b/kopete/plugins/highlight/filter.h index b2ac0794..876abf95 100644 --- a/kopete/plugins/highlight/filter.h +++ b/kopete/plugins/highlight/filter.h @@ -19,8 +19,8 @@ #define FILTER_H -#include -#include +#include +#include /** * @author Olivier Goffart @@ -31,8 +31,8 @@ public: Filter(); ~Filter(); - QString displayName; - QString search; + TQString displayName; + TQString search; bool caseSensitive; bool isRegExp; @@ -40,13 +40,13 @@ public: unsigned int importance; bool setFG; - QColor FG; + TQColor FG; bool setBG; - QColor BG; + TQColor BG; bool playSound; - QString soundFN; + TQString soundFN; bool raiseView; }; diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp index ba97e6a8..d6e04d7f 100644 --- a/kopete/plugins/highlight/highlightconfig.cpp +++ b/kopete/plugins/highlight/highlightconfig.cpp @@ -16,11 +16,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -53,7 +53,7 @@ void HighlightConfig::appendFilter(Filter *f) m_filters.append(f); } -QPtrList HighlightConfig::filters() const +TQPtrList HighlightConfig::filters() const { return m_filters; } @@ -78,68 +78,68 @@ void HighlightConfig::load() { m_filters.clear(); //clear filters - QString filename = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) ); if( filename.isEmpty() ) return ; - QDomDocument filterList( QString::fromLatin1( "highlight-plugin" ) ); + TQDomDocument filterList( TQString::fromLatin1( "highlight-plugin" ) ); - QFile filterListFile( filename ); + TQFile filterListFile( filename ); filterListFile.open( IO_ReadOnly ); filterList.setContent( &filterListFile ); - QDomElement list = filterList.documentElement(); + TQDomElement list = filterList.documentElement(); - QDomNode node = list.firstChild(); + TQDomNode node = list.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { -// if( element.tagName() == QString::fromLatin1("filter") +// if( element.tagName() == TQString::fromLatin1("filter") // { Filter *filtre=newFilter(); - QDomNode filterNode = node.firstChild(); + TQDomNode filterNode = node.firstChild(); while( !filterNode.isNull() ) { - QDomElement filterElement = filterNode.toElement(); + TQDomElement filterElement = filterNode.toElement(); if( !filterElement.isNull() ) { - if( filterElement.tagName() == QString::fromLatin1( "display-name" ) ) + if( filterElement.tagName() == TQString::fromLatin1( "display-name" ) ) { filtre->displayName = filterElement.text(); } - else if( filterElement.tagName() == QString::fromLatin1( "search" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "search" ) ) { filtre->search = filterElement.text(); - filtre->caseSensitive= ( filterElement.attribute( QString::fromLatin1( "caseSensitive" ), QString::fromLatin1( "1" ) ) == QString::fromLatin1( "1" ) ); - filtre->isRegExp= ( filterElement.attribute( QString::fromLatin1( "regExp" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->caseSensitive= ( filterElement.attribute( TQString::fromLatin1( "caseSensitive" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ) ); + filtre->isRegExp= ( filterElement.attribute( TQString::fromLatin1( "regExp" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "FG" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "FG" ) ) { filtre->FG = filterElement.text(); - filtre->setFG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->setFG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "BG" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "BG" ) ) { filtre->BG = filterElement.text(); - filtre->setBG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->setBG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "importance" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "importance" ) ) { filtre->importance = filterElement.text().toUInt(); - filtre->setImportance= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->setImportance= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "sound" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "sound" ) ) { filtre->soundFN = filterElement.text(); - filtre->playSound = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->playSound = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "raise" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "raise" ) ) { - filtre->raiseView = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->raiseView = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } } filterNode = filterNode.nextSibling(); @@ -154,50 +154,50 @@ void HighlightConfig::load() void HighlightConfig::save() { - QString fileName = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) ); + TQString fileName = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) ); KSaveFile file( fileName ); if( file.status() == 0 ) { - QTextStream *stream = file.textStream(); - stream->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *stream = file.textStream(); + stream->setEncoding( TQTextStream::UnicodeUTF8 ); - QString xml = QString::fromLatin1( + TQString xml = TQString::fromLatin1( "\n" "\n" "\n" ); // Save metafilter information. - QPtrListIterator filtreIt( m_filters ); + TQPtrListIterator filtreIt( m_filters ); for( ; filtreIt.current(); ++filtreIt ) { Filter *filtre = *filtreIt; - xml += QString::fromLatin1( " \n " ) - + QStyleSheet::escape(filtre->displayName) - + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1( " \n " ) + + TQStyleSheet::escape(filtre->displayName) + + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->caseSensitive ) ) + - QString::fromLatin1("\" regExp=\"") + QString::number( static_cast( filtre->isRegExp ) ) + - QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->search ) + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->caseSensitive ) ) + + TQString::fromLatin1("\" regExp=\"") + TQString::number( static_cast( filtre->isRegExp ) ) + + TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->setBG ) ) + - QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->BG.name() ) + QString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->setFG ) ) + - QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->FG.name() ) + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->setBG ) ) + + TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->setFG ) ) + + TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->setImportance ) ) + - QString::fromLatin1( "\">" ) + QString::number( filtre->importance ) + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->setImportance ) ) + + TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->playSound ) ) + - QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->soundFN ) + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->playSound ) ) + + TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->raiseView ) ) + - QString::fromLatin1( "\">\n" ); + xml += TQString::fromLatin1(" ( filtre->raiseView ) ) + + TQString::fromLatin1( "\">\n" ); - xml += QString::fromLatin1( " \n" ); + xml += TQString::fromLatin1( " \n" ); } - xml += QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1( "\n" ); *stream << xml; } diff --git a/kopete/plugins/highlight/highlightconfig.h b/kopete/plugins/highlight/highlightconfig.h index 35813403..b2d251c7 100644 --- a/kopete/plugins/highlight/highlightconfig.h +++ b/kopete/plugins/highlight/highlightconfig.h @@ -18,8 +18,8 @@ #ifndef HIGHLIGHTCONFIG_H #define HIGHLIGHTCONFIG_H -#include -#include +#include +#include class Filter; @@ -32,13 +32,13 @@ public: void load(); void save(); - QPtrList filters() const; + TQPtrList filters() const; void removeFilter (Filter *f); void appendFilter (Filter *f); Filter* newFilter(); private: - QPtrList m_filters; + TQPtrList m_filters; }; #endif diff --git a/kopete/plugins/highlight/highlightplugin.cpp b/kopete/plugins/highlight/highlightplugin.cpp index 2f1cbb43..7ec6ba5e 100644 --- a/kopete/plugins/highlight/highlightplugin.cpp +++ b/kopete/plugins/highlight/highlightplugin.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include +#include #include #include @@ -29,14 +29,14 @@ typedef KGenericFactory HighlightPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_highlight, HighlightPluginFactory( "kopete_highlight" ) ) -HighlightPlugin::HighlightPlugin( QObject *parent, const char *name, const QStringList &/*args*/ ) +HighlightPlugin::HighlightPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Plugin( HighlightPluginFactory::instance(), parent, name ) { if( !pluginStatic_ ) pluginStatic_=this; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), SLOT( slotIncomingMessage( Kopete::Message & ) ) ); - connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), TQT_SLOT( slotIncomingMessage( Kopete::Message & ) ) ); + connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) ); m_config = new HighlightConfig; @@ -63,14 +63,14 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg ) return; // FIXME: highlighted internal/actions messages are not showed correctly in the chat window (bad style) // but they should maybe be highlinghted if needed - QPtrList filters=m_config->filters(); - QPtrListIterator it( filters ); + TQPtrList filters=m_config->filters(); + TQPtrListIterator it( filters ); Filter *f; while ((f = it.current()) != 0 ) { ++it; if(f->isRegExp ? - msg.plainBody().contains(QRegExp(f->search , f->caseSensitive)) : + msg.plainBody().contains(TQRegExp(f->search , f->caseSensitive)) : msg.plainBody().contains(f->search , f->caseSensitive) ) { if(f->setBG) @@ -80,7 +80,7 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg ) if(f->setImportance) msg.setImportance((Kopete::Message::MessageImportance)f->importance); if(f->playSound) - KNotifyClient::userEvent (QString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN ); + KNotifyClient::userEvent (TQString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN ); if (f->raiseView && msg.manager() && msg.manager()->view()) { diff --git a/kopete/plugins/highlight/highlightplugin.h b/kopete/plugins/highlight/highlightplugin.h index 0a421f55..2ea151d9 100644 --- a/kopete/plugins/highlight/highlightplugin.h +++ b/kopete/plugins/highlight/highlightplugin.h @@ -18,9 +18,9 @@ #ifndef HighlightPLUGIN_H #define HighlightPLUGIN_H -#include -#include -#include +#include +#include +#include #include "kopetemessage.h" #include "kopeteplugin.h" @@ -47,7 +47,7 @@ class HighlightPlugin : public Kopete::Plugin public: static HighlightPlugin *plugin(); - HighlightPlugin( QObject *parent, const char *name, const QStringList &args ); + HighlightPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~HighlightPlugin(); public slots: diff --git a/kopete/plugins/highlight/highlightpreferences.cpp b/kopete/plugins/highlight/highlightpreferences.cpp index 9641d034..5e8da39c 100644 --- a/kopete/plugins/highlight/highlightpreferences.cpp +++ b/kopete/plugins/highlight/highlightpreferences.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -39,35 +39,35 @@ typedef KGenericFactory HighlightPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_highlight, HighlightPreferencesFactory( "kcm_kopete_highlight" ) ) -HighlightPreferences::HighlightPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +HighlightPreferences::HighlightPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule(HighlightPreferencesFactory::instance(), parent, args) { donttouch=true; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new HighlightPrefsUI(this); m_config = new HighlightConfig; - connect(preferencesDialog->m_list , SIGNAL(selectionChanged()) , this , SLOT(slotCurrentFilterChanged())); - connect(preferencesDialog->m_list , SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )) , this , SLOT(slotRenameFilter())); - connect(preferencesDialog->m_add , SIGNAL(pressed()) , this , SLOT(slotAddFilter())); - connect(preferencesDialog->m_remove , SIGNAL(pressed()) , this , SLOT(slotRemoveFilter())); - connect(preferencesDialog->m_rename , SIGNAL(pressed()) , this , SLOT(slotRenameFilter())); - connect(preferencesDialog->m_editregexp , SIGNAL(pressed()) , this , SLOT(slotEditRegExp())); + connect(preferencesDialog->m_list , TQT_SIGNAL(selectionChanged()) , this , TQT_SLOT(slotCurrentFilterChanged())); + connect(preferencesDialog->m_list , TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )) , this , TQT_SLOT(slotRenameFilter())); + connect(preferencesDialog->m_add , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotAddFilter())); + connect(preferencesDialog->m_remove , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotRemoveFilter())); + connect(preferencesDialog->m_rename , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotRenameFilter())); + connect(preferencesDialog->m_editregexp , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotEditRegExp())); //Maybe here i should use a slot per widget, but i am too lazy - connect(preferencesDialog->m_case , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_regexp , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_setImportance , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_setBG , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_setFG , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_search , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_sound , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_soundFN , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_raise , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_search , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_importance , SIGNAL(activated(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_FG , SIGNAL(changed(const QColor&)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_BG , SIGNAL(changed(const QColor&)) , this , SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_case , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_regexp , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_setImportance , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_setBG , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_setFG , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_search , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_sound , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_soundFN , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_raise , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_search , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_importance , TQT_SIGNAL(activated(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_FG , TQT_SIGNAL(changed(const TQColor&)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_BG , TQT_SIGNAL(changed(const TQColor&)) , this , TQT_SLOT(slotSomethingHasChanged())); load(); donttouch=false; @@ -85,14 +85,14 @@ void HighlightPreferences::load() preferencesDialog->m_list->clear(); m_filterItems.clear(); - QPtrList filters=m_config->filters(); - QPtrListIterator it( filters ); + TQPtrList filters=m_config->filters(); + TQPtrListIterator it( filters ); Filter *f; bool first=true; while ( (f=it.current()) != 0 ) { ++it; - QListViewItem* lvi= new QListViewItem(preferencesDialog->m_list); + TQListViewItem* lvi= new TQListViewItem(preferencesDialog->m_list); lvi->setText(0,f->displayName ); m_filterItems.insert(lvi,f); if(first) @@ -172,7 +172,7 @@ void HighlightPreferences::slotCurrentFilterChanged() void HighlightPreferences::slotAddFilter() { Filter *filtre=m_config->newFilter(); - QListViewItem* lvi= new QListViewItem(preferencesDialog->m_list); + TQListViewItem* lvi= new TQListViewItem(preferencesDialog->m_list); lvi->setText(0,filtre->displayName ); m_filterItems.insert(lvi,filtre); preferencesDialog->m_list->setSelected(lvi, true); @@ -180,7 +180,7 @@ void HighlightPreferences::slotAddFilter() void HighlightPreferences::slotRemoveFilter() { - QListViewItem *lvi=preferencesDialog->m_list->selectedItem(); + TQListViewItem *lvi=preferencesDialog->m_list->selectedItem(); if(!lvi) return; Filter *current=m_filterItems[lvi]; @@ -195,7 +195,7 @@ void HighlightPreferences::slotRemoveFilter() void HighlightPreferences::slotRenameFilter() { - QListViewItem *lvi=preferencesDialog->m_list->selectedItem(); + TQListViewItem *lvi=preferencesDialog->m_list->selectedItem(); if(!lvi) return; Filter *current=m_filterItems[lvi]; @@ -203,7 +203,7 @@ void HighlightPreferences::slotRenameFilter() return; bool ok; - QString newname = KInputDialog::getText( + TQString newname = KInputDialog::getText( i18n( "Rename Filter" ), i18n( "Please enter the new name for the filter:" ), current->displayName, &ok ); if( !ok ) return; @@ -242,7 +242,7 @@ void HighlightPreferences::slotSomethingHasChanged() void HighlightPreferences::slotEditRegExp() { - QDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); + TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); if ( editorDialog ) { // kdeutils was installed, so the dialog was found fetch the editor interface @@ -252,7 +252,7 @@ void HighlightPreferences::slotEditRegExp() editor->setRegExp(preferencesDialog->m_search->text()); // Finally exec the dialog - if(editorDialog->exec() == QDialog::Accepted ) + if(editorDialog->exec() == TQDialog::Accepted ) { preferencesDialog->m_search->setText(editor->regExp()); } diff --git a/kopete/plugins/highlight/highlightpreferences.h b/kopete/plugins/highlight/highlightpreferences.h index a2c7e31b..b6e2a8e1 100644 --- a/kopete/plugins/highlight/highlightpreferences.h +++ b/kopete/plugins/highlight/highlightpreferences.h @@ -19,7 +19,7 @@ #define HighlightPREFERENCES_H #include -#include +#include class HighlightPrefsUI; class Filter; @@ -33,7 +33,7 @@ class HighlightPreferences : public KCModule { Q_OBJECT public: - HighlightPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList()); + HighlightPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~HighlightPreferences(); virtual void save(); @@ -42,7 +42,7 @@ public: private: HighlightPrefsUI *preferencesDialog; HighlightConfig *m_config; - QMap m_filterItems; + TQMap m_filterItems; bool donttouch; diff --git a/kopete/plugins/history/converter.cpp b/kopete/plugins/history/converter.cpp index 22f662bc..d2e4839d 100644 --- a/kopete/plugins/history/converter.cpp +++ b/kopete/plugins/history/converter.cpp @@ -28,9 +28,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #define CBUFLENGTH 512 // buffer length for fgets() @@ -40,27 +40,27 @@ void HistoryPlugin::convertOldHistory() i18n( "Would you like to remove old history files?" ) , i18n( "History Converter" ), KStdGuiItem::del(), i18n("Keep") ) == KMessageBox::Yes; KProgressDialog *progressDlg=new KProgressDialog(Kopete::UI::Global::mainWidget() , "history_progress_dlg" , i18n( "History converter" ) , - QString::null , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents()) + TQString::null , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents()) progressDlg->setAllowCancel(false); //because i am too lazy to allow to cancel - QString kopetedir=locateLocal( "data", QString::fromLatin1( "kopete")); - QDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/ + TQString kopetedir=locateLocal( "data", TQString::fromLatin1( "kopete")); + TQDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/ - d.setFilter( QDir::Dirs ); + d.setFilter( TQDir::Dirs ); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { - QString protocolId; - QString accountId; + TQString protocolId; + TQString accountId; if( Kopete::Protocol *p = dynamic_cast( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) ) { protocolId=p->pluginId(); - QDictIterator it(Kopete::AccountManager::self()->accounts(p)); + TQDictIterator it(Kopete::AccountManager::self()->accounts(p)); Kopete::Account *a = it.current(); if(a) accountId=a->accountId(); @@ -103,12 +103,12 @@ void HistoryPlugin::convertOldHistory() if(!protocolId.isEmpty() || !accountId.isEmpty()) { - QDir d2( fi->absFilePath() ); - d2.setFilter( QDir::Files ); + TQDir d2( fi->absFilePath() ); + d2.setFilter( TQDir::Files ); d2.setNameFilter("*.log"); const QFileInfoList *list = d2.entryInfoList(); QFileInfoListIterator it2( *list ); - QFileInfo *fi2; + TQFileInfo *fi2; progressDlg->progressBar()->reset(); progressDlg->progressBar()->setTotalSteps(d2.count()); @@ -118,7 +118,7 @@ void HistoryPlugin::convertOldHistory() while ( (fi2 = it2.current()) != 0 ) { //we assume that all "-" are dots. (like in hotmail.com) - QString contactId=fi2->fileName().replace(".log" , QString::null).replace("-" , "."); + TQString contactId=fi2->fileName().replace(".log" , TQString::null).replace("-" , "."); if(!contactId.isEmpty() ) { @@ -127,48 +127,48 @@ void HistoryPlugin::convertOldHistory() int month=0; int year=0; - QDomDocument doc; - QDomElement docElem; + TQDomDocument doc; + TQDomElement docElem; - QDomElement msgelement; - QDomNode node; - QDomDocument xmllist; + TQDomElement msgelement; + TQDomNode node; + TQDomDocument xmllist; Kopete::Message::MessageDirection dir; - QString body, date, nick; - QString buffer, msgBlock; + TQString body, date, nick; + TQString buffer, msgBlock; char cbuf[CBUFLENGTH]; // buffer for the log file - QString logFileName = fi2->absFilePath(); + TQString logFileName = fi2->absFilePath(); // open the file - FILE *f = fopen(QFile::encodeName(logFileName), "r"); + FILE *f = fopen(TQFile::encodeName(logFileName), "r"); // create a new block while ( ! feof( f ) ) { fgets(cbuf, CBUFLENGTH, f); - buffer = QString::fromUtf8(cbuf); + buffer = TQString::fromUtf8(cbuf); while ( strchr(cbuf, '\n') == NULL && !feof(f) ) { fgets( cbuf, CBUFLENGTH, f ); - buffer += QString::fromUtf8(cbuf); + buffer += TQString::fromUtf8(cbuf); } - if( buffer.startsWith( QString::fromLatin1( "\n" ) /*strcmp("\n", cbuf )*/ ) + while( !feof( f ) && buffer != TQString::fromLatin1( "\n" ) /*strcmp("
\n", cbuf )*/ ) { fgets(cbuf, CBUFLENGTH, f); - buffer = QString::fromUtf8(cbuf); + buffer = TQString::fromUtf8(cbuf); while ( strchr(cbuf, '\n') == NULL && !feof(f) ) { fgets( cbuf, CBUFLENGTH, f ); - buffer += QString::fromUtf8(cbuf); + buffer += TQString::fromUtf8(cbuf); } msgBlock.append(buffer); } @@ -178,14 +178,14 @@ void HistoryPlugin::convertOldHistory() msgelement = xmllist.documentElement(); node = msgelement.firstChild(); - if( msgelement.attribute( QString::fromLatin1( "direction" ) ) == QString::fromLatin1( "inbound" ) ) + if( msgelement.attribute( TQString::fromLatin1( "direction" ) ) == TQString::fromLatin1( "inbound" ) ) dir = Kopete::Message::Inbound; else dir = Kopete::Message::Outbound; // Read all the elements. - QString tagname; - QDomElement element; + TQString tagname; + TQDomElement element; while ( ! node.isNull() ) { @@ -194,12 +194,12 @@ void HistoryPlugin::convertOldHistory() element = node.toElement(); tagname = element.tagName(); - if( tagname == QString::fromLatin1( "srcnick" ) ) + if( tagname == TQString::fromLatin1( "srcnick" ) ) nick = element.text(); - else if( tagname == QString::fromLatin1( "date" ) ) + else if( tagname == TQString::fromLatin1( "date" ) ) date = element.text(); - else if( tagname == QString::fromLatin1( "body" ) ) + else if( tagname == TQString::fromLatin1( "body" ) ) body = element.text().stripWhiteSpace(); } @@ -207,21 +207,21 @@ void HistoryPlugin::convertOldHistory() } //FIXME!! The date in logs writed with kopete running with QT 3.0 is Localised. // so QT can't parse it correctly. - QDateTime dt=QDateTime::fromString(date); + TQDateTime dt=TQDateTime::fromString(date); if(dt.date().month() != month || dt.date().year() != year) { if(!docElem.isNull()) { - QDate date(year,month,1); - QString name = protocolId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - contactId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + + TQDate date(year,month,1); + TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { - QTextStream *stream = file.textStream(); - //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non? + TQTextStream *stream = file.textStream(); + //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non? doc.save( *stream , 1 ); file.close(); } @@ -230,39 +230,39 @@ void HistoryPlugin::convertOldHistory() month=dt.date().month(); year=dt.date().year(); - docElem=QDomElement(); + docElem=TQDomElement(); } if(docElem.isNull()) { - doc=QDomDocument("Kopete-History"); + doc=TQDomDocument("Kopete-History"); docElem= doc.createElement( "kopete-history" ); docElem.setAttribute ( "version" , "0.7" ); doc.appendChild( docElem ); - QDomElement headElem = doc.createElement( "head" ); + TQDomElement headElem = doc.createElement( "head" ); docElem.appendChild( headElem ); - QDomElement dateElem = doc.createElement( "date" ); - dateElem.setAttribute( "year", QString::number(year) ); - dateElem.setAttribute( "month", QString::number(month) ); + TQDomElement dateElem = doc.createElement( "date" ); + dateElem.setAttribute( "year", TQString::number(year) ); + dateElem.setAttribute( "month", TQString::number(month) ); headElem.appendChild(dateElem); - QDomElement myselfElem = doc.createElement( "contact" ); + TQDomElement myselfElem = doc.createElement( "contact" ); myselfElem.setAttribute( "type", "myself" ); myselfElem.setAttribute( "contactId", accountId ); headElem.appendChild(myselfElem); - QDomElement contactElem = doc.createElement( "contact" ); + TQDomElement contactElem = doc.createElement( "contact" ); contactElem.setAttribute( "contactId", contactId ); headElem.appendChild(contactElem); - QDomElement importElem = doc.createElement( "imported" ); + TQDomElement importElem = doc.createElement( "imported" ); importElem.setAttribute( "from", fi->fileName() ); - importElem.setAttribute( "date", QDateTime::currentDateTime().toString() ); + importElem.setAttribute( "date", TQDateTime::currentDateTime().toString() ); headElem.appendChild(importElem); } - QDomElement msgElem = doc.createElement( "msg" ); + TQDomElement msgElem = doc.createElement( "msg" ); msgElem.setAttribute( "in", dir==Kopete::Message::Outbound ? "0" : "1" ); msgElem.setAttribute( "from", dir==Kopete::Message::Outbound ? accountId : contactId ); msgElem.setAttribute( "nick", nick ); //do we have to set this? - msgElem.setAttribute( "time", QString::number(dt.date().day()) + " " + QString::number(dt.time().hour()) + ":" + QString::number(dt.time().minute()) ); - QDomText msgNode = doc.createTextNode( body.stripWhiteSpace() ); + msgElem.setAttribute( "time", TQString::number(dt.date().day()) + " " + TQString::number(dt.time().hour()) + ":" + TQString::number(dt.time().minute()) ); + TQDomText msgNode = doc.createTextNode( body.stripWhiteSpace() ); docElem.appendChild( msgElem ); msgElem.appendChild( msgNode ); } @@ -274,16 +274,16 @@ void HistoryPlugin::convertOldHistory() if(!docElem.isNull()) { - QDate date(year,month,1); - QString name = protocolId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - contactId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + + TQDate date(year,month,1); + TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { - QTextStream *stream = file.textStream(); - //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non? + TQTextStream *stream = file.textStream(); + //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non? doc.save( *stream ,1 ); file.close(); } @@ -304,22 +304,22 @@ void HistoryPlugin::convertOldHistory() bool HistoryPlugin::detectOldHistory() { KGlobal::config()->setGroup("History Plugin"); - QString version=KGlobal::config()->readEntry( "Version" ,"0.6" ); + TQString version=KGlobal::config()->readEntry( "Version" ,"0.6" ); if(version != "0.6") return false; - QDir d( locateLocal( "data", QString::fromLatin1( "kopete/logs")) ); - d.setFilter( QDir::Dirs ); + TQDir d( locateLocal( "data", TQString::fromLatin1( "kopete/logs")) ); + d.setFilter( TQDir::Dirs ); if(d.count() >= 3) // '.' and '..' are included return false; //the new history already exists - QDir d2( locateLocal( "data", QString::fromLatin1( "kopete")) ); - d2.setFilter( QDir::Dirs ); + TQDir d2( locateLocal( "data", TQString::fromLatin1( "kopete")) ); + d2.setFilter( TQDir::Dirs ); const QFileInfoList *list = d2.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { if( dynamic_cast( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) ) diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp index 4dd98fee..5dc550be 100644 --- a/kopete/plugins/history/historydialog.cpp +++ b/kopete/plugins/history/historydialog.cpp @@ -32,15 +32,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -60,30 +60,30 @@ class KListViewDateItem : public KListViewItem { public: - KListViewDateItem(KListView* parent, QDate date, Kopete::MetaContact *mc); - QDate date() { return mDate; } + KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc); + TQDate date() { return mDate; } Kopete::MetaContact *metaContact() { return mMetaContact; } public: - int compare(QListViewItem *i, int col, bool ascending) const; + int compare(TQListViewItem *i, int col, bool ascending) const; private: - QDate mDate; + TQDate mDate; Kopete::MetaContact *mMetaContact; }; -KListViewDateItem::KListViewDateItem(KListView* parent, QDate date, Kopete::MetaContact *mc) +KListViewDateItem::KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc) : KListViewItem(parent, date.toString(Qt::ISODate), mc->displayName()) { mDate = date; mMetaContact = mc; } -int KListViewDateItem::compare(QListViewItem *i, int col, bool ascending) const +int KListViewDateItem::compare(TQListViewItem *i, int col, bool ascending) const { if (col) - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); //compare dates - do NOT use ascending var here KListViewDateItem* item = static_cast(i); @@ -93,16 +93,16 @@ int KListViewDateItem::compare(QListViewItem *i, int col, bool ascending) const } -HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, +HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, const char* name) : KDialogBase(parent, name, false, i18n("History for %1").arg(mc->displayName()), 0), mSearching(false) { - QString fontSize; - QString htmlCode; - QString fontStyle; + TQString fontSize; + TQString htmlCode; + TQString fontStyle; kdDebug(14310) << k_funcinfo << "called." << endl; - setWFlags(Qt::WDestructiveClose); // send SIGNAL(closing()) on quit + setWFlags(Qt::WDestructiveClose); // send TQT_SIGNAL(closing()) on quit // FIXME: Allow to show this dialog for only one contact mMetaContact = mc; @@ -118,7 +118,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, mMainWidget->contactComboBox->insertItem(i18n("All")); mMetaContactList = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it(mMetaContactList); + TQPtrListIterator it(mMetaContactList); for(; it.current(); ++it) { mMainWidget->contactComboBox->insertItem((*it)->displayName()); @@ -133,8 +133,8 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, setMainWidget(mMainWidget); // Initializing HTML Part - mMainWidget->htmlFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->htmlFrame); + mMainWidget->htmlFrame->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->htmlFrame); mHtmlPart = new KHTMLPart(mMainWidget->htmlFrame, "htmlHistoryView"); //Security settings, we don't need this stuff @@ -149,33 +149,33 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, mHtmlView->setMarginHeight(4); mHtmlView->setFocusPolicy(NoFocus); mHtmlView->setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); l->addWidget(mHtmlView); - QTextOStream( &fontSize ) << KopetePrefs::prefs()->fontFace().pointSize(); + TQTextOStream( &fontSize ) << KopetePrefs::prefs()->fontFace().pointSize(); fontStyle = ""; mHtmlPart->begin(); htmlCode = "" + fontStyle + ""; - mHtmlPart->write( QString::fromLatin1( htmlCode.latin1() ) ); + mHtmlPart->write( TQString::fromLatin1( htmlCode.latin1() ) ); mHtmlPart->end(); - connect(mHtmlPart->browserExtension(), SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)), - this, SLOT(slotOpenURLRequest(const KURL &, const KParts::URLArgs &))); - connect(mMainWidget->dateListView, SIGNAL(clicked(QListViewItem*)), this, SLOT(dateSelected(QListViewItem*))); - connect(mMainWidget->searchButton, SIGNAL(clicked()), this, SLOT(slotSearch())); - connect(mMainWidget->searchLine, SIGNAL(returnPressed()), this, SLOT(slotSearch())); - connect(mMainWidget->searchLine, SIGNAL(textChanged(const QString&)), this, SLOT(slotSearchTextChanged(const QString&))); - connect(mMainWidget->searchErase, SIGNAL(clicked()), this, SLOT(slotSearchErase())); - connect(mMainWidget->contactComboBox, SIGNAL(activated(int)), this, SLOT(slotContactChanged(int))); - connect(mMainWidget->messageFilterBox, SIGNAL(activated(int)), this, SLOT(slotFilterChanged(int ))); - connect(mHtmlPart, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(slotRightClick(const QString &, const QPoint &))); + connect(mHtmlPart->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)), + this, TQT_SLOT(slotOpenURLRequest(const KURL &, const KParts::URLArgs &))); + connect(mMainWidget->dateListView, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(dateSelected(TQListViewItem*))); + connect(mMainWidget->searchButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearch())); + connect(mMainWidget->searchLine, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotSearch())); + connect(mMainWidget->searchLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotSearchTextChanged(const TQString&))); + connect(mMainWidget->searchErase, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearchErase())); + connect(mMainWidget->contactComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotContactChanged(int))); + connect(mMainWidget->messageFilterBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotFilterChanged(int ))); + connect(mHtmlPart, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(slotRightClick(const TQString &, const TQPoint &))); //initActions KActionCollection* ac = new KActionCollection(this); - mCopyAct = KStdAction::copy( this, SLOT(slotCopy()), ac ); - mCopyURLAct = new KAction( i18n( "Copy Link Address" ), QString::fromLatin1( "editcopy" ), 0, this, SLOT( slotCopyURL() ), ac ); + mCopyAct = KStdAction::copy( this, TQT_SLOT(slotCopy()), ac ); + mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), ac ); resize(650, 700); centerOnScreen(this); @@ -201,7 +201,7 @@ void HistoryDialog::init() } else { - QPtrListIterator it(mMetaContactList); + TQPtrListIterator it(mMetaContactList); for(; it.current(); ++it) { HistoryLogger logger(*it, this); @@ -211,7 +211,7 @@ void HistoryDialog::init() } initProgressBar(i18n("Loading..."),mInit.dateMCList.count()); - QTimer::singleShot(0,this,SLOT(slotLoadDays())); + TQTimer::singleShot(0,this,TQT_SLOT(slotLoadDays())); } void HistoryDialog::slotLoadDays() @@ -219,7 +219,7 @@ void HistoryDialog::slotLoadDays() if(mInit.dateMCList.isEmpty()) { if (!mMainWidget->searchLine->text().isEmpty()) - QTimer::singleShot(0, this, SLOT(slotSearch())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSearch())); doneProgressBar(); return; } @@ -227,23 +227,23 @@ void HistoryDialog::slotLoadDays() DMPair pair(mInit.dateMCList.first()); mInit.dateMCList.pop_front(); HistoryLogger logger(pair.metaContact(), this); - QValueList dayList = logger.getDaysForMonth(pair.date()); + TQValueList dayList = logger.getDaysForMonth(pair.date()); for (unsigned int i=0; idateListView, c2Date, pair.metaContact()); } mMainWidget->searchProgress->advance(1); - QTimer::singleShot(0,this,SLOT(slotLoadDays())); + TQTimer::singleShot(0,this,TQT_SLOT(slotLoadDays())); } void HistoryDialog::init(Kopete::MetaContact *mc) { - QPtrList contacts=mc->contacts(); - QPtrListIterator it( contacts ); + TQPtrList contacts=mc->contacts(); + TQPtrListIterator it( contacts ); for( ; it.current(); ++it ) { @@ -254,17 +254,17 @@ void HistoryDialog::init(Kopete::MetaContact *mc) void HistoryDialog::init(Kopete::Contact *c) { // Get year and month list - QRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); - const QString contact_in_filename=c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ); - QFileInfo *fi; + TQRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); + const TQString contact_in_filename=c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ); + TQFileInfo *fi; // BEGIN check if there are Kopete 0.7.x - QDir d1(locateLocal("data",QString("kopete/logs/")+ - c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) + TQDir d1(locateLocal("data",TQString("kopete/logs/")+ + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) )); - d1.setFilter( QDir::Files | QDir::NoSymLinks ); - d1.setSorting( QDir::Name ); + d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); + d1.setSorting( TQDir::Name ); const QFileInfoList *list1 = d1.entryInfoList(); if ( list1 != 0 ) @@ -276,7 +276,7 @@ void HistoryDialog::init(Kopete::Contact *c) { rx.search(fi->fileName()); - QDate cDate = QDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1); + TQDate cDate = TQDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1); DMPair pair(cDate, c->metaContact()); mInit.dateMCList.append(pair); @@ -287,14 +287,14 @@ void HistoryDialog::init(Kopete::Contact *c) } // END of kopete 0.7.x check - QString logDir = locateLocal("data",QString("kopete/logs/")+ - c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) + - QString::fromLatin1( "/" ) + - c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + TQString logDir = locateLocal("data",TQString("kopete/logs/")+ + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + + TQString::fromLatin1( "/" ) + + c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) ); - QDir d(logDir); - d.setFilter( QDir::Files | QDir::NoSymLinks ); - d.setSorting( QDir::Name ); + TQDir d(logDir); + d.setFilter( TQDir::Files | TQDir::NoSymLinks ); + d.setSorting( TQDir::Name ); const QFileInfoList *list = d.entryInfoList(); if ( list != 0 ) { @@ -307,7 +307,7 @@ void HistoryDialog::init(Kopete::Contact *c) rx.search(fi->fileName()); // We search for an item in the list view with the same year. If then we add the month - QDate cDate = QDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1); + TQDate cDate = TQDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1); DMPair pair(cDate, c->metaContact()); mInit.dateMCList.append(pair); @@ -317,21 +317,21 @@ void HistoryDialog::init(Kopete::Contact *c) } } -void HistoryDialog::dateSelected(QListViewItem* it) +void HistoryDialog::dateSelected(TQListViewItem* it) { KListViewDateItem *item = static_cast(it); if (!item) return; - QDate chosenDate = item->date(); + TQDate chosenDate = item->date(); HistoryLogger logger(item->metaContact(), this); - QValueList msgs=logger.readMessages(chosenDate); + TQValueList msgs=logger.readMessages(chosenDate); setMessages(msgs); } -void HistoryDialog::setMessages(QValueList msgs) +void HistoryDialog::setMessages(TQValueList msgs) { // Clear View DOM::HTMLElement htmlBody = mHtmlPart->htmlDocument().body(); @@ -339,16 +339,16 @@ void HistoryDialog::setMessages(QValueList msgs) htmlBody.removeChild(htmlBody.childNodes().item(htmlBody.childNodes().length() - 1)); // ---- - QString dir = (QApplication::reverseLayout() ? QString::fromLatin1("rtl") : - QString::fromLatin1("ltr")); + TQString dir = (TQApplication::reverseLayout() ? TQString::fromLatin1("rtl") : + TQString::fromLatin1("ltr")); - QValueList::iterator it = msgs.begin(); + TQValueList::iterator it = msgs.begin(); - QString accountLabel; - QString resultHTML = "" + (*it).timestamp().date().toString() + "
"; - DOM::HTMLElement newNode = mHtmlPart->document().createElement(QString::fromLatin1("span")); - newNode.setAttribute(QString::fromLatin1("dir"), dir); + TQString accountLabel; + TQString resultHTML = "" + (*it).timestamp().date().toString() + "
"; + DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); + newNode.setAttribute(TQString::fromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -370,7 +370,7 @@ void HistoryDialog::setMessages(QValueList msgs) } accountLabel = (*it).from()->account()->accountLabel(); - QString body = (*it).parsedBody(); + TQString body = (*it).parsedBody(); if (!mMainWidget->searchLine->text().isEmpty()) // If there is a search, then we hightlight the keywords @@ -384,8 +384,8 @@ void HistoryDialog::setMessages(QValueList msgs) : "textColor().light(200).name() + "\">< ") + body + "
"; - newNode = mHtmlPart->document().createElement(QString::fromLatin1("span")); - newNode.setAttribute(QString::fromLatin1("dir"), dir); + newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); + newNode.setAttribute(TQString::fromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -405,7 +405,7 @@ void HistoryDialog::slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/ } // Disable search button if there is no search text -void HistoryDialog::slotSearchTextChanged(const QString& searchText) +void HistoryDialog::slotSearchTextChanged(const TQString& searchText) { if (searchText.isEmpty()) { @@ -442,8 +442,8 @@ void HistoryDialog::slotSearchErase() * We do the search respecting the current metacontact filter item. To do this, we iterate over the * elements in the KListView (KListViewDateItems) and, for each one, we iterate over its subcontacts, * manually searching the log files of each one. To avoid searching files twice, the months that have -* been searched already are stored in searchedMonths. The matches are placed in the matches QMap. -* Finally, the current date item is checked in the matches QMap, and if it is present, it is shown. +* been searched already are stored in searchedMonths. The matches are placed in the matches TQMap. +* Finally, the current date item is checked in the matches TQMap, and if it is present, it is shown. * * Keyword highlighting is done in setMessages() : if the search field isn't empty, we highlight the * search keyword. @@ -454,9 +454,9 @@ void HistoryDialog::slotSearch() { if (mMainWidget->dateListView->childCount() == 0) return; - QRegExp rx("^ ([^<]*)<"); - QMap > monthsSearched; - QMap > matches; + TQRegExp rx("^ ([^<]*)<"); + TQMap > monthsSearched; + TQMap > matches; // cancel button pressed if (mSearching) @@ -480,18 +480,18 @@ void HistoryDialog::slotSearch() qApp->processEvents(); if (!mSearching) return; - QDate month(curItem->date().year(),curItem->date().month(),1); + TQDate month(curItem->date().year(),curItem->date().month(),1); // if we haven't searched the relevant history logs, search them now if (!monthsSearched[month].contains(curItem->metaContact())) { monthsSearched[month].push_back(curItem->metaContact()); - QPtrList contacts = curItem->metaContact()->contacts(); - for(QPtrListIterator it( contacts ); it.current(); ++it) + TQPtrList contacts = curItem->metaContact()->contacts(); + for(TQPtrListIterator it( contacts ); it.current(); ++it) { // get filename and open file - QString filename(HistoryLogger::getFileName(*it, curItem->date())); - if (!QFile::exists(filename)) continue; - QFile file(filename); + TQString filename(HistoryLogger::getFileName(*it, curItem->date())); + if (!TQFile::exists(filename)) continue; + TQFile file(filename); file.open(IO_ReadOnly); if (!file.isOpen()) { @@ -500,8 +500,8 @@ void HistoryDialog::slotSearch() continue; } - QTextStream stream(&file); - QString textLine; + TQTextStream stream(&file); + TQString textLine; while(!stream.atEnd()) { textLine = stream.readLine(); @@ -511,7 +511,7 @@ void HistoryDialog::slotSearch() { // only match message body if (rx.cap(2).contains(mMainWidget->searchLine->text())) - matches[QDate(curItem->date().year(),curItem->date().month(),rx.cap(1).toInt())].push_back(curItem->metaContact()); + matches[TQDate(curItem->date().year(),curItem->date().month(),rx.cap(1).toInt())].push_back(curItem->metaContact()); } // this will happen when multiline messages are searched, properly // parsing the files would fix this @@ -558,7 +558,7 @@ void HistoryDialog::slotContactChanged(int index) } } -void HistoryDialog::initProgressBar(const QString& text, int nbSteps) +void HistoryDialog::initProgressBar(const TQString& text, int nbSteps) { mMainWidget->searchProgress->setTotalSteps(nbSteps); mMainWidget->searchProgress->setProgress(0); @@ -572,7 +572,7 @@ void HistoryDialog::doneProgressBar() mMainWidget->statusLabel->setText(i18n("Ready")); } -void HistoryDialog::slotRightClick(const QString &url, const QPoint &point) +void HistoryDialog::slotRightClick(const TQString &url, const TQPoint &point) { KPopupMenu *chatWindowPopup = 0L; chatWindowPopup = new KPopupMenu(); @@ -586,28 +586,28 @@ void HistoryDialog::slotRightClick(const QString &url, const QPoint &point) mCopyAct->setEnabled( mHtmlPart->hasSelection() ); mCopyAct->plug( chatWindowPopup ); - connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup, SLOT( deleteLater() ) ); + connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup, TQT_SLOT( deleteLater() ) ); chatWindowPopup->popup(point); } void HistoryDialog::slotCopy() { - QString qsSelection; + TQString qsSelection; qsSelection = mHtmlPart->selectedText(); if ( qsSelection.isEmpty() ) return; - disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection())); - QApplication::clipboard()->setText(qsSelection, QClipboard::Clipboard); - QApplication::clipboard()->setText(qsSelection, QClipboard::Selection); - connect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection())); + disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); + TQApplication::clipboard()->setText(qsSelection, QClipboard::Clipboard); + TQApplication::clipboard()->setText(qsSelection, QClipboard::Selection); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); } void HistoryDialog::slotCopyURL() { - disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection())); - QApplication::clipboard()->setText( mURL, QClipboard::Clipboard); - QApplication::clipboard()->setText( mURL, QClipboard::Selection); - connect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection())); + disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); + TQApplication::clipboard()->setText( mURL, QClipboard::Clipboard); + TQApplication::clipboard()->setText( mURL, QClipboard::Selection); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); } #include "historydialog.moc" diff --git a/kopete/plugins/history/historydialog.h b/kopete/plugins/history/historydialog.h index cf26037d..63b08470 100644 --- a/kopete/plugins/history/historydialog.h +++ b/kopete/plugins/history/historydialog.h @@ -19,8 +19,8 @@ #ifndef _HISTORYDIALOG_H #define _HISTORYDIALOG_H -#include -#include +#include +#include #include #include @@ -45,13 +45,13 @@ class KListViewDateItem; class DMPair { public: - DMPair() {md = QDate(0, 0, 0); mc = 0; } - DMPair(QDate d, Kopete::MetaContact *c) { md = d; mc =c; } - QDate date() const { return md; } + DMPair() {md = TQDate(0, 0, 0); mc = 0; } + DMPair(TQDate d, Kopete::MetaContact *c) { md = d; mc =c; } + TQDate date() const { return md; } Kopete::MetaContact* metaContact() const { return mc; } bool operator==(const DMPair p1) const { return p1.date() == this->date() && p1.metaContact() == this->metaContact(); } private: - QDate md; + TQDate md; Kopete::MetaContact *mc; }; @@ -64,7 +64,7 @@ class HistoryDialog : public KDialogBase Q_OBJECT public: - HistoryDialog(Kopete::MetaContact *mc, QWidget* parent=0, + HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent=0, const char* name="HistoryDialog"); ~HistoryDialog(); @@ -80,20 +80,20 @@ class HistoryDialog : public KDialogBase void slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/*args*/); // Called when a date is selected in the treeview - void dateSelected(QListViewItem *); + void dateSelected(TQListViewItem *); void slotSearch(); // Reinitialise search void slotSearchErase(); - void slotSearchTextChanged(const QString& txt); // To enable/disable search button + void slotSearchTextChanged(const TQString& txt); // To enable/disable search button void slotContactChanged(int index); void slotFilterChanged(int index); void init(); void slotLoadDays(); - void slotRightClick(const QString &url, const QPoint &point); + void slotRightClick(const TQString &url, const TQPoint &point); void slotCopy(); void slotCopyURL(); @@ -101,7 +101,7 @@ class HistoryDialog : public KDialogBase enum Disabled { Prev=1, Next=2 }; void refreshEnabled( /*Disabled*/ uint disabled ); - void initProgressBar(const QString& text, int nbSteps); + void initProgressBar(const TQString& text, int nbSteps); void doneProgressBar(); void init(Kopete::MetaContact *mc); void init(Kopete::Contact *c); @@ -109,7 +109,7 @@ class HistoryDialog : public KDialogBase /** * Show the messages in the HTML View */ - void setMessages(QValueList m); + void setMessages(TQValueList m); void listViewShowElements(bool s); @@ -123,7 +123,7 @@ class HistoryDialog : public KDialogBase */ Kopete::MetaContact *mMetaContact; - QPtrList mMetaContactList; + TQPtrList mMetaContactList; // History View KHTMLView *mHtmlView; @@ -133,14 +133,14 @@ class HistoryDialog : public KDialogBase struct Init { - QValueList dateMCList; // mc for MetaContact + TQValueList dateMCList; // mc for MetaContact } mInit; bool mSearching; KAction *mCopyAct; KAction *mCopyURLAct; - QString mURL; + TQString mURL; }; #endif diff --git a/kopete/plugins/history/historyguiclient.cpp b/kopete/plugins/history/historyguiclient.cpp index 133e50a3..4b1798ae 100644 --- a/kopete/plugins/history/historyguiclient.cpp +++ b/kopete/plugins/history/historyguiclient.cpp @@ -28,7 +28,7 @@ class HistoryPlugin; HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name) - : QObject(parent, name), KXMLGUIClient(parent) + : TQObject(parent, name), KXMLGUIClient(parent) { setInstance(KGenericFactory::instance()); @@ -38,12 +38,12 @@ HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name if(!m_manager || m_manager->members().isEmpty()) deleteLater(); - QPtrList mb=m_manager->members(); + TQPtrList mb=m_manager->members(); m_logger=new HistoryLogger( mb.first() , this ); - actionLast=new KAction( i18n("History Last" ), QString::fromLatin1( "finish" ), 0, this, SLOT(slotLast()), actionCollection() , "historyLast" ); - actionPrev = KStdAction::back( this, SLOT(slotPrevious()), actionCollection() , "historyPrevious" ); - actionNext = KStdAction::forward( this, SLOT(slotNext()), actionCollection() , "historyNext" ); + actionLast=new KAction( i18n("History Last" ), TQString::fromLatin1( "finish" ), 0, this, TQT_SLOT(slotLast()), actionCollection() , "historyLast" ); + actionPrev = KStdAction::back( this, TQT_SLOT(slotPrevious()), actionCollection() , "historyPrevious" ); + actionNext = KStdAction::forward( this, TQT_SLOT(slotNext()), actionCollection() , "historyNext" ); // we are generally at last when begining actionPrev->setEnabled(true); @@ -64,8 +64,8 @@ void HistoryGUIClient::slotPrevious() KopeteView *m_currentView = m_manager->view(true); m_currentView->clear(); - QPtrList mb = m_manager->members(); - QValueList msgs = m_logger->readMessages( + TQPtrList mb = m_manager->members(); + TQValueList msgs = m_logger->readMessages( HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L, HistoryLogger::AntiChronological, true); @@ -81,9 +81,9 @@ void HistoryGUIClient::slotLast() KopeteView *m_currentView = m_manager->view(true); m_currentView->clear(); - QPtrList mb = m_manager->members(); + TQPtrList mb = m_manager->members(); m_logger->setPositionToLast(); - QValueList msgs = m_logger->readMessages( + TQValueList msgs = m_logger->readMessages( HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L, HistoryLogger::AntiChronological, true); @@ -100,8 +100,8 @@ void HistoryGUIClient::slotNext() KopeteView *m_currentView = m_manager->view(true); m_currentView->clear(); - QPtrList mb = m_manager->members(); - QValueList msgs = m_logger->readMessages( + TQPtrList mb = m_manager->members(); + TQValueList msgs = m_logger->readMessages( HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L, HistoryLogger::Chronological, false); diff --git a/kopete/plugins/history/historyguiclient.h b/kopete/plugins/history/historyguiclient.h index 420795e0..792325fc 100644 --- a/kopete/plugins/history/historyguiclient.h +++ b/kopete/plugins/history/historyguiclient.h @@ -16,7 +16,7 @@ #ifndef HISTORYGUICLIENT_H #define HISTORYGUICLIENT_H -#include +#include #include namespace Kopete { class ChatSession; } @@ -26,7 +26,7 @@ class KAction; /** *@author Olivier Goffart */ -class HistoryGUIClient : public QObject , public KXMLGUIClient +class HistoryGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT public: diff --git a/kopete/plugins/history/historylogger.cpp b/kopete/plugins/history/historylogger.cpp index 7848136f..96f4d6dc 100644 --- a/kopete/plugins/history/historylogger.cpp +++ b/kopete/plugins/history/historylogger.cpp @@ -18,12 +18,12 @@ #include "historylogger.h" #include "historyconfig.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -37,37 +37,37 @@ #include "kopetechatsession.h" // ----------------------------------------------------------------------------- -HistoryLogger::HistoryLogger( Kopete::MetaContact *m, QObject *parent, const char *name ) - : QObject(parent, name) +HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *parent, const char *name ) + : TQObject(parent, name) { m_saveTimer=0L; m_saveTimerTime=0; m_metaContact=m; m_hideOutgoing=false; m_cachedMonth=-1; - m_realMonth=QDate::currentDate().month(); + m_realMonth=TQDate::currentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact - connect(m_metaContact , SIGNAL(destroyed(QObject *)) , this , SLOT(slotMCDeleted())); + connect(m_metaContact , TQT_SIGNAL(destroyed(TQObject *)) , this , TQT_SLOT(slotMCDeleted())); setPositionToLast(); } -HistoryLogger::HistoryLogger( Kopete::Contact *c, QObject *parent, const char *name ) - : QObject(parent, name) +HistoryLogger::HistoryLogger( Kopete::Contact *c, TQObject *parent, const char *name ) + : TQObject(parent, name) { m_saveTimer=0L; m_saveTimerTime=0; m_cachedMonth=-1; m_metaContact=c->metaContact(); m_hideOutgoing=false; - m_realMonth=QDate::currentDate().month(); + m_realMonth=TQDate::currentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact - connect(m_metaContact , SIGNAL(destroyed(QObject *)) , this , SLOT(slotMCDeleted())); + connect(m_metaContact , TQT_SIGNAL(destroyed(TQObject *)) , this , TQT_SLOT(slotMCDeleted())); setPositionToLast(); } @@ -105,16 +105,16 @@ void HistoryLogger::setCurrentMonth(int month) } -QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad , bool* contain) +TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad , bool* contain) { - if(m_realMonth!=QDate::currentDate().month()) + if(m_realMonth!=TQDate::currentDate().month()) { //We changed month, our indice are not correct anymore, clean memory. // or we will see what i called "the 31 midnight bug"(TM) :-) -Olivier m_documents.clear(); m_cachedMonth=-1; m_currentMonth++; //Not usre it's ok, but should work; m_oldMonth++; // idem - m_realMonth=QDate::currentDate().month(); + m_realMonth=TQDate::currentDate().month(); } if(!m_metaContact) @@ -122,22 +122,22 @@ QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int m if(c && c->metaContact()) m_metaContact=c->metaContact(); else - return QDomDocument(); + return TQDomDocument(); } if(!m_metaContact->contacts().contains(c)) { if(contain) *contain=false; - return QDomDocument(); + return TQDomDocument(); } - QMap documents = m_documents[c]; + TQMap documents = m_documents[c]; if (documents.contains(month)) return documents[month]; - QDomDocument doc = getDocument(c, QDate::currentDate().addMonths(0-month), canLoad, contain); + TQDomDocument doc = getDocument(c, TQDate::currentDate().addMonths(0-month), canLoad, contain); documents.insert(month, doc); m_documents[c]=documents; @@ -146,35 +146,35 @@ QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int m } -QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const QDate date , bool canLoad , bool* contain) +TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const TQDate date , bool canLoad , bool* contain) { if(!m_metaContact) { //this may happen if the contact has been moved, and the MC deleted if(c && c->metaContact()) m_metaContact=c->metaContact(); else - return QDomDocument(); + return TQDomDocument(); } if(!m_metaContact->contacts().contains(c)) { if(contain) *contain=false; - return QDomDocument(); + return TQDomDocument(); } if(!canLoad) { if(contain) *contain=false; - return QDomDocument(); + return TQDomDocument(); } QString FileName = getFileName(c, date); - QDomDocument doc( "Kopete-History" ); + TQDomDocument doc( "Kopete-History" ); - QFile file( FileName ); + TQFile file( FileName ); if ( !file.open( IO_ReadOnly ) ) { if(contain) @@ -207,7 +207,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co const Kopete::Contact *c = ct; if(!c && msg.manager() ) { - QPtrList mb=msg.manager()->members() ; + TQPtrList mb=msg.manager()->members() ; c = mb.first(); } if(!c) //If the contact is still not initialized, use the message author. @@ -225,8 +225,8 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co if(!c || !m_metaContact->contacts().contains(c) ) { - /*QPtrList contacts= m_metaContact->contacts(); - QPtrListIterator it( contacts ); + /*TQPtrList contacts= m_metaContact->contacts(); + TQPtrListIterator it( contacts ); for( ; it.current(); ++it ) { if( (*it)->protocol()->pluginId() == msg.from()->protocol()->pluginId() ) @@ -242,36 +242,36 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co return; } - QDomDocument doc=getDocument(c,0); - QDomElement docElem = doc.documentElement(); + TQDomDocument doc=getDocument(c,0); + TQDomElement docElem = doc.documentElement(); if(docElem.isNull()) { docElem= doc.createElement( "kopete-history" ); docElem.setAttribute ( "version" , "0.9" ); doc.appendChild( docElem ); - QDomElement headElem = doc.createElement( "head" ); + TQDomElement headElem = doc.createElement( "head" ); docElem.appendChild( headElem ); - QDomElement dateElem = doc.createElement( "date" ); - dateElem.setAttribute( "year", QString::number(QDate::currentDate().year()) ); - dateElem.setAttribute( "month", QString::number(QDate::currentDate().month()) ); + TQDomElement dateElem = doc.createElement( "date" ); + dateElem.setAttribute( "year", TQString::number(TQDate::currentDate().year()) ); + dateElem.setAttribute( "month", TQString::number(TQDate::currentDate().month()) ); headElem.appendChild(dateElem); - QDomElement myselfElem = doc.createElement( "contact" ); + TQDomElement myselfElem = doc.createElement( "contact" ); myselfElem.setAttribute( "type", "myself" ); myselfElem.setAttribute( "contactId", c->account()->myself()->contactId() ); headElem.appendChild(myselfElem); - QDomElement contactElem = doc.createElement( "contact" ); + TQDomElement contactElem = doc.createElement( "contact" ); contactElem.setAttribute( "contactId", c->contactId() ); headElem.appendChild(contactElem); } - QDomElement msgElem = doc.createElement( "msg" ); + TQDomElement msgElem = doc.createElement( "msg" ); msgElem.setAttribute( "in", msg.direction()==Kopete::Message::Outbound ? "0" : "1" ); msgElem.setAttribute( "from", msg.from()->contactId() ); msgElem.setAttribute( "nick", msg.from()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); //do we have to set this? msgElem.setAttribute( "time", msg.timestamp().toString("d h:m:s") ); - QDomText msgNode = doc.createTextNode( msg.plainBody() ); + TQDomText msgNode = doc.createTextNode( msg.plainBody() ); docElem.appendChild( msgElem ); msgElem.appendChild( msgNode ); @@ -280,7 +280,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co // On hight-traffic channel, saving can take lots of CPU. (because the file is big) // So i wait a time proportional to the time needed to save.. - const QString filename=getFileName(c,QDate::currentDate()); + const TQString filename=getFileName(c,TQDate::currentDate()); if(!m_toSaveFileName.isEmpty() && m_toSaveFileName != filename) { //that mean the contact or the month has changed, save it now. saveToDisk(); @@ -291,8 +291,8 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co if(!m_saveTimer) { - m_saveTimer=new QTimer(this); - connect( m_saveTimer, SIGNAL( timeout() ) , this, SLOT(saveToDisk()) ); + m_saveTimer=new TQTimer(this); + connect( m_saveTimer, TQT_SIGNAL( timeout() ) , this, TQT_SLOT(saveToDisk()) ); } if(!m_saveTimer->isActive()) m_saveTimer->start( m_saveTimerTime, true /*singleshot*/ ); @@ -305,14 +305,14 @@ void HistoryLogger::saveToDisk() if(m_toSaveFileName.isEmpty() || m_toSaveDocument.isNull()) return; - QTime t; + TQTime t; t.start(); //mesure the time needed to save. KSaveFile file( m_toSaveFileName ); if( file.status() == 0 ) { - QTextStream *stream = file.textStream(); - //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non? + TQTextStream *stream = file.textStream(); + //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non? m_toSaveDocument.save( *stream, 1 ); file.close(); @@ -323,36 +323,36 @@ void HistoryLogger::saveToDisk() // But it may take 500 ms if the file to save becomes too big (1Mb). kdDebug(14310) << k_funcinfo << m_toSaveFileName << " saved in " << t.elapsed() << " ms " < HistoryLogger::readMessages(QDate date) +TQValueList HistoryLogger::readMessages(TQDate date) { - QRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility) - QValueList messages; + TQRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility) + TQValueList messages; - QPtrList ct=m_metaContact->contacts(); - QPtrListIterator it( ct ); + TQPtrList ct=m_metaContact->contacts(); + TQPtrListIterator it( ct ); for( ; it.current(); ++it ) { - QDomDocument doc=getDocument(*it,date, true, 0L); - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomDocument doc=getDocument(*it,date, true, 0L); + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); while(!n.isNull()) { - QDomElement msgElem2 = n.toElement(); + TQDomElement msgElem2 = n.toElement(); if( !msgElem2.isNull() && msgElem2.tagName()=="msg") { rxTime.search(msgElem2.attribute("time")); - QDateTime dt( QDate(date.year() , date.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); + TQDateTime dt( TQDate(date.year() , date.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); if (dt.date() != date) { @@ -366,7 +366,7 @@ QValueList HistoryLogger::readMessages(QDate date) if(!m_hideOutgoing || dir != Kopete::Message::Outbound) { //parse only if we don't hide it - QString f=msgElem2.attribute("from" ); + TQString f=msgElem2.attribute("from" ); const Kopete::Contact *from=f.isNull()? 0L : (*it)->account()->contacts()[f]; if(!from) @@ -376,13 +376,13 @@ QValueList HistoryLogger::readMessages(QDate date) to.append( dir==Kopete::Message::Inbound ? (*it)->account()->myself() : *it ); Kopete::Message msg(dt, from, to, msgElem2.text(), dir); - msg.setBody( QString::fromLatin1("%2") + msg.setBody( TQString::fromLatin1("%2") .arg( dt.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText); // We insert it at the good place, given its date - QValueListIterator msgIt; + TQValueListIterator msgIt; for (msgIt = messages.begin(); msgIt != messages.end(); ++msgIt) { @@ -400,15 +400,15 @@ QValueList HistoryLogger::readMessages(QDate date) return messages; } -QValueList HistoryLogger::readMessages(unsigned int lines, +TQValueList HistoryLogger::readMessages(unsigned int lines, const Kopete::Contact *c, Sens sens, bool reverseOrder, bool colorize) { - //QDate dd = QDate::currentDate().addMonths(0-m_currentMonth); + //TQDate dd = TQDate::currentDate().addMonths(0-m_currentMonth); - QValueList messages; + TQValueList messages; // A regexp useful for this function - QRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility) + TQRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility) if(!m_metaContact) { //this may happen if the contact has been moved, and the MC deleted @@ -436,7 +436,7 @@ QValueList HistoryLogger::readMessages(unsigned int lines, m_oldSens=sens; //getting the color for messages: - QColor fgColor = HistoryConfig::history_color(); + TQColor fgColor = HistoryConfig::history_color(); //Hello guest! @@ -448,7 +448,7 @@ QValueList HistoryLogger::readMessages(unsigned int lines, // we see what contact we have to read first, and we look at the firt date before another contact // has a message with a bigger date. - QDateTime timeLimit; + TQDateTime timeLimit; const Kopete::Contact *currentContact=c; if(!c && m_metaContact->contacts().count()==1) currentContact=m_metaContact->contacts().first(); @@ -459,26 +459,26 @@ QValueList HistoryLogger::readMessages(unsigned int lines, while(messages.count() < lines) { - timeLimit=QDateTime(); - QDomElement msgElem; //here is the message element - QDateTime timestamp; //and the timestamp of this message + timeLimit=TQDateTime(); + TQDomElement msgElem; //here is the message element + TQDateTime timestamp; //and the timestamp of this message if(!c && m_metaContact->contacts().count()>1) { //we have to merge the differents subcontact history - QPtrList ct=m_metaContact->contacts(); - QPtrListIterator it( ct ); + TQPtrList ct=m_metaContact->contacts(); + TQPtrListIterator it( ct ); for( ; it.current(); ++it ) { //we loop over each contact. we are searching the contact with the next message with the smallest date, // it will becomes our current contact, and the contact with the mext message with the second smallest // date, this date will bocomes the limit. - QDomNode n; + TQDomNode n; if(m_currentElements.contains(*it)) n=m_currentElements[*it]; else //there is not yet "next message" register, so we will take the first (for the current month) { - QDomDocument doc=getDocument(*it,m_currentMonth); - QDomElement docElem = doc.documentElement(); + TQDomDocument doc=getDocument(*it,m_currentMonth); + TQDomElement docElem = doc.documentElement(); n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild(); //i can't drop the root element @@ -486,12 +486,12 @@ QValueList HistoryLogger::readMessages(unsigned int lines, } while(!n.isNull()) { - QDomElement msgElem2 = n.toElement(); + TQDomElement msgElem2 = n.toElement(); if( !msgElem2.isNull() && msgElem2.tagName()=="msg") { rxTime.search(msgElem2.attribute("time")); - QDate d=QDate::currentDate().addMonths(0-m_currentMonth); - QDateTime dt( QDate(d.year() , d.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); + TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth); + TQDateTime dt( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); if(!timestamp.isValid() || ((sens==Chronological )? dt < timestamp : dt > timestamp) ) { timeLimit=timestamp; @@ -516,10 +516,10 @@ QValueList HistoryLogger::readMessages(unsigned int lines, msgElem=m_currentElements[currentContact]; else { - QDomDocument doc=getDocument(currentContact,m_currentMonth); - QDomElement docElem = doc.documentElement(); - QDomNode n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild(); - msgElem=QDomElement(); + TQDomDocument doc=getDocument(currentContact,m_currentMonth); + TQDomElement docElem = doc.documentElement(); + TQDomNode n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild(); + msgElem=TQDomElement(); while(!n.isNull()) //continue until we get a msg { msgElem=n.toElement(); @@ -572,9 +572,9 @@ QValueList HistoryLogger::readMessages(unsigned int lines, if(!m_hideOutgoing || dir != Kopete::Message::Outbound) { //parse only if we don't hide it - if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(QRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) )) + if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) )) { - QString f=msgElem.attribute("from" ); + TQString f=msgElem.attribute("from" ); const Kopete::Contact *from=(f.isNull() || !currentContact) ? 0L : currentContact->account()->contacts()[f]; if(!from) @@ -587,14 +587,14 @@ QValueList HistoryLogger::readMessages(unsigned int lines, { //parse timestamp only if it was not already parsed rxTime.search(msgElem.attribute("time")); - QDate d=QDate::currentDate().addMonths(0-m_currentMonth); - timestamp=QDateTime( QDate(d.year() , d.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt() , rxTime.cap(5).toUInt() ) ); + TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth); + timestamp=TQDateTime( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt() , rxTime.cap(5).toUInt() ) ); } Kopete::Message msg(timestamp, from, to, msgElem.text(), dir); if (colorize) { - msg.setBody( QString::fromLatin1("%3") + msg.setBody( TQString::fromLatin1("%3") .arg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); @@ -602,7 +602,7 @@ QValueList HistoryLogger::readMessages(unsigned int lines, } else { - msg.setBody( QString::fromLatin1("%2") + msg.setBody( TQString::fromLatin1("%2") .arg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); @@ -617,10 +617,10 @@ QValueList HistoryLogger::readMessages(unsigned int lines, //here is the point of workaround. If i drop the root element, this crashes //get the next message - QDomNode node = ( (sens==Chronological) ? msgElem.nextSibling() : + TQDomNode node = ( (sens==Chronological) ? msgElem.nextSibling() : msgElem.previousSibling() ); - msgElem = QDomElement(); //n.toElement(); + msgElem = TQDomElement(); //n.toElement(); while (!node.isNull() && msgElem.isNull()) { msgElem = node.toElement(); @@ -632,19 +632,19 @@ QValueList HistoryLogger::readMessages(unsigned int lines, { // In case of hideoutgoing messages, it is faster to do // this, so we don't parse the date if it is not needed - QRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)"); + TQRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)"); rx.search(msgElem.attribute("time")); - QDate d = QDate::currentDate().addMonths(0-m_currentMonth); - timestamp = QDateTime( - QDate(d.year(), d.month(), rx.cap(1).toUInt()), - QTime( rx.cap(2).toUInt(), rx.cap(3).toUInt() ) ); + TQDate d = TQDate::currentDate().addMonths(0-m_currentMonth); + timestamp = TQDateTime( + TQDate(d.year(), d.month(), rx.cap(1).toUInt()), + TQTime( rx.cap(2).toUInt(), rx.cap(3).toUInt() ) ); } else - timestamp = QDateTime(); //invalid + timestamp = TQDateTime(); //invalid } else - msgElem = QDomElement(); + msgElem = TQDomElement(); } node = (sens == Chronological) ? node.nextSibling() : @@ -660,30 +660,30 @@ QValueList HistoryLogger::readMessages(unsigned int lines, return messages; } -QString HistoryLogger::getFileName(const Kopete::Contact* c, QDate date) +TQString HistoryLogger::getFileName(const Kopete::Contact* c, TQDate date) { - QString name = c->protocol()->pluginId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + + TQString name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - QString filename=locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ; + TQString filename=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; //Check if there is a kopete 0.7.x file - QFileInfo fi(filename); + TQFileInfo fi(filename); if(!fi.exists()) { - name = c->protocol()->pluginId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + + name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - QString filename2=locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ; + TQString filename2=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; - QFileInfo fi2(filename2); + TQFileInfo fi2(filename2); if(fi2.exists()) return filename2; } @@ -697,25 +697,25 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) if(!c) return getFirstMonth(); - QRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); - QFileInfo *fi; + TQRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); + TQFileInfo *fi; // BEGIN check if there are Kopete 0.7.x - QDir d1(locateLocal("data",QString("kopete/logs/")+ - c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) + TQDir d1(locateLocal("data",TQString("kopete/logs/")+ + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) )); - d1.setFilter( QDir::Files | QDir::NoSymLinks ); - d1.setSorting( QDir::Name ); + d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); + d1.setSorting( TQDir::Name ); const QFileInfoList *list1 = d1.entryInfoList(); QFileInfoListIterator it1( *list1 ); while ( (fi = it1.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ))) + if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(QDate::currentDate().year() - rx.cap(1).toUInt()) +QDate::currentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); if(result < 0) { @@ -729,23 +729,23 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) // END of kopete 0.7.x check - QDir d(locateLocal("data",QString("kopete/logs/")+ - c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) + - QString::fromLatin1( "/" ) + - c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + TQDir d(locateLocal("data",TQString("kopete/logs/")+ + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + + TQString::fromLatin1( "/" ) + + c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) )); - d.setFilter( QDir::Files | QDir::NoSymLinks ); - d.setSorting( QDir::Name ); + d.setFilter( TQDir::Files | TQDir::NoSymLinks ); + d.setSorting( TQDir::Name ); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); while ( (fi = it.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ))) + if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(QDate::currentDate().year() - rx.cap(1).toUInt()) +QDate::currentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); if(result < 0) { kdWarning(14310) << k_funcinfo << "Kopete only found log file made in the future. Check your date!" << endl; @@ -767,8 +767,8 @@ unsigned int HistoryLogger::getFirstMonth() return 0; int m=0; - QPtrList contacts=m_metaContact->contacts(); - QPtrListIterator it( contacts ); + TQPtrList contacts=m_metaContact->contacts(); + TQPtrListIterator it( contacts ); for( ; it.current(); ++it ) { int m2=getFirstMonth(*it); @@ -788,14 +788,14 @@ void HistoryLogger::slotMCDeleted() m_metaContact = 0; } -void HistoryLogger::setFilter(const QString& filter, bool caseSensitive , bool isRegExp) +void HistoryLogger::setFilter(const TQString& filter, bool caseSensitive , bool isRegExp) { m_filter=filter; m_filterCaseSensitive=caseSensitive; m_filterRegExp=isRegExp; } -QString HistoryLogger::filter() const +TQString HistoryLogger::filter() const { return m_filter; } @@ -810,26 +810,26 @@ bool HistoryLogger::filterRegExp() const return m_filterRegExp; } -QValueList HistoryLogger::getDaysForMonth(QDate date) +TQValueList HistoryLogger::getDaysForMonth(TQDate date) { - QRegExp rxTime("time=\"(\\d+) \\d+:\\d+(:\\d+)?\""); //(with a 0.7.x compatibility) + TQRegExp rxTime("time=\"(\\d+) \\d+:\\d+(:\\d+)?\""); //(with a 0.7.x compatibility) - QValueList dayList; + TQValueList dayList; - QPtrList contacts = m_metaContact->contacts(); - QPtrListIterator it(contacts); + TQPtrList contacts = m_metaContact->contacts(); + TQPtrListIterator it(contacts); int lastDay=0; for(; it.current(); ++it) { // kdDebug() << getFileName(*it, date) << endl; - QFile file(getFileName(*it, date)); + TQFile file(getFileName(*it, date)); if(!file.open(IO_ReadOnly)) { continue; } - QTextStream stream(&file); - QString fullText = stream.read(); + TQTextStream stream(&file); + TQString fullText = stream.read(); file.close(); int pos = 0; diff --git a/kopete/plugins/history/historylogger.h b/kopete/plugins/history/historylogger.h index 85cdbdd7..49e368d9 100644 --- a/kopete/plugins/history/historylogger.h +++ b/kopete/plugins/history/historylogger.h @@ -17,7 +17,7 @@ #ifndef HISTORYLOGGER_H #define HISTORYLOGGER_H -#include +#include #include "kopetemessage.h" //TODO: REMOVE namespace Kopete { class Contact; } @@ -46,8 +46,8 @@ public: /** * Constructor, takes the contact, and the color of messages */ - HistoryLogger( Kopete::MetaContact *m , QObject *parent = 0, const char *name = 0); - HistoryLogger( Kopete::Contact *c , QObject *parent = 0, const char *name = 0); + HistoryLogger( Kopete::MetaContact *m , TQObject *parent = 0, const char *name = 0); + HistoryLogger( Kopete::Contact *c , TQObject *parent = 0, const char *name = 0); ~HistoryLogger(); @@ -62,10 +62,10 @@ public: * set a searching filter * @param filter is the string to search * @param caseSensitive say if the case is important - * @param isRegExp say if the filter is a QRegExp, or a simle string + * @param isRegExp say if the filter is a TQRegExp, or a simle string */ - void setFilter(const QString& filter, bool caseSensitive=false , bool isRegExp=false); - QString filter() const; + void setFilter(const TQString& filter, bool caseSensitive=false , bool isRegExp=false); + TQString filter() const; bool filterCaseSensitive() const ; bool filterRegExp() const; @@ -83,7 +83,7 @@ public: * read @param lines message from the current position * from Kopete::Contact @param c in the given @param sens */ - QValueList readMessages(unsigned int lines, + TQValueList readMessages(unsigned int lines, const Kopete::Contact *c=0, Sens sens=Default, bool reverseOrder=false, bool colorize=true); @@ -92,7 +92,7 @@ public: * because its structure is really different. * Read all the messages for the given @param date */ - QValueList readMessages(QDate date); + TQValueList readMessages(TQDate date); /** @@ -113,40 +113,40 @@ public: /** * @return The list of the days for which there is a log for m_metaContact for month of * @param date (don't care of the day) */ - QValueList getDaysForMonth(QDate date); + TQValueList getDaysForMonth(TQDate date); /** * Get the filename of the xml file which contains the history from the * contact in the specified @param date. Specify @param date in order to get the filename for * the given date.year() date.month(). */ - static QString getFileName(const Kopete::Contact* , QDate date); + static TQString getFileName(const Kopete::Contact* , TQDate date); private: bool m_hideOutgoing; bool m_filterCaseSensitive; bool m_filterRegExp; - QString m_filter; + TQString m_filter; /* - *contais all QDomDocument, for a KC, for a specified Month + *contais all TQDomDocument, for a KC, for a specified Month */ - QMap > m_documents; + TQMap > m_documents; /** * Contains the current message. * in fact, this is the next, still not showed */ - QMap m_currentElements; + TQMap m_currentElements; /** * Get the document, open it is @param canload is true, contain is set to false if the document * is not already contained */ - QDomDocument getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad=true , bool* contain=0L); + TQDomDocument getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad=true , bool* contain=0L); - QDomDocument getDocument(const Kopete::Contact *c, const QDate date, bool canLoad=true, bool* contain=0L); + TQDomDocument getDocument(const Kopete::Contact *c, const TQDate date, bool canLoad=true, bool* contain=0L); /** * look over files to get the last month for this contact @@ -175,16 +175,16 @@ private: /* * keep the old position in memory, so if we change the sens, we can begin here */ - QMap m_oldElements; + TQMap m_oldElements; unsigned int m_oldMonth; Sens m_oldSens; /** * the timer used to save the file */ - QTimer *m_saveTimer; - QDomDocument m_toSaveDocument; - QString m_toSaveFileName; + TQTimer *m_saveTimer; + TQDomDocument m_toSaveDocument; + TQString m_toSaveFileName; unsigned int m_saveTimerTime; //time in ms between each save /** @@ -199,7 +199,7 @@ private: * due to a bug in QT, i have to keep the document element in the memory to * prevent crashes */ - QValueList workaround; + TQValueList workaround; private slots: /** diff --git a/kopete/plugins/history/historyplugin.cpp b/kopete/plugins/history/historyplugin.cpp index bf8d70b4..af92fc09 100644 --- a/kopete/plugins/history/historyplugin.cpp +++ b/kopete/plugins/history/historyplugin.cpp @@ -41,22 +41,22 @@ typedef KGenericFactory HistoryPluginFactory; static const KAboutData aboutdata("kopete_history", I18N_NOOP("History") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_history, HistoryPluginFactory( &aboutdata ) ) -HistoryPlugin::HistoryPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +HistoryPlugin::HistoryPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( HistoryPluginFactory::instance(), parent, name ), m_loggerFactory( this ) { KAction *viewMetaContactHistory = new KAction( i18n("View &History" ), - QString::fromLatin1( "history" ), 0, this, SLOT(slotViewHistory()), + TQString::fromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()), actionCollection(), "viewMetaContactHistory" ); viewMetaContactHistory->setEnabled( Kopete::ContactList::self()->selectedMetaContacts().count() == 1 ); - connect(Kopete::ContactList::self(), SIGNAL(metaContactSelected(bool)), - viewMetaContactHistory, SLOT(setEnabled(bool))); + connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactSelected(bool)), + viewMetaContactHistory, TQT_SLOT(setEnabled(bool))); - connect(Kopete::ChatSessionManager::self(), SIGNAL(viewCreated(KopeteView*)), - this, SLOT(slotViewCreated(KopeteView*))); + connect(Kopete::ChatSessionManager::self(), TQT_SIGNAL(viewCreated(KopeteView*)), + this, TQT_SLOT(slotViewCreated(KopeteView*))); - connect(this, SIGNAL(settingsChanged()), this, SLOT(slotSettingsChanged())); + connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotSettingsChanged())); setXMLFile("historyui.rc"); if(detectOldHistory()) @@ -73,14 +73,14 @@ HistoryPlugin::HistoryPlugin( QObject *parent, const char *name, const QStringLi // Add GUI action to all existing kmm objects // (Needed if the plugin is enabled while kopete is already running) - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) { if(!m_loggers.contains(*it)) { m_loggers.insert(*it, new HistoryGUIClient( *it ) ); - connect( *it, SIGNAL(closing(Kopete::ChatSession*)), - this, SLOT(slotKMMClosed(Kopete::ChatSession*))); + connect( *it, TQT_SIGNAL(closing(Kopete::ChatSession*)), + this, TQT_SLOT(slotKMMClosed(Kopete::ChatSession*))); } } } @@ -105,14 +105,14 @@ void HistoryPlugin::messageDisplayed(const Kopete::Message &m) if(!m_loggers.contains(m.manager())) { m_loggers.insert(m.manager() , new HistoryGUIClient( m.manager() ) ); - connect(m.manager(), SIGNAL(closing(Kopete::ChatSession*)), - this, SLOT(slotKMMClosed(Kopete::ChatSession*))); + connect(m.manager(), TQT_SIGNAL(closing(Kopete::ChatSession*)), + this, TQT_SLOT(slotKMMClosed(Kopete::ChatSession*))); } HistoryLogger *l=m_loggers[m.manager()]->logger(); if(l) { - QPtrList mb=m.manager()->members(); + TQPtrList mb=m.manager()->members(); l->appendMessage(m,mb.first()); } @@ -136,7 +136,7 @@ void HistoryPlugin::slotViewHistory() void HistoryPlugin::slotViewCreated( KopeteView* v ) { - if(v->plugin()->pluginInfo()->pluginName() != QString::fromLatin1("kopete_chatwindow") ) + if(v->plugin()->pluginInfo()->pluginName() != TQString::fromLatin1("kopete_chatwindow") ) return; //Email chat windows are not supported. bool autoChatWindow = HistoryConfig::auto_chatwindow(); @@ -144,7 +144,7 @@ void HistoryPlugin::slotViewCreated( KopeteView* v ) KopeteView *m_currentView = v; Kopete::ChatSession *m_currentChatSession = v->msgManager(); - QPtrList mb = m_currentChatSession->members(); + TQPtrList mb = m_currentChatSession->members(); if(!m_currentChatSession) return; //i am sorry @@ -152,8 +152,8 @@ void HistoryPlugin::slotViewCreated( KopeteView* v ) if(!m_loggers.contains(m_currentChatSession)) { m_loggers.insert(m_currentChatSession , new HistoryGUIClient( m_currentChatSession ) ); - connect( m_currentChatSession, SIGNAL(closing(Kopete::ChatSession*)), - this , SLOT(slotKMMClosed(Kopete::ChatSession*))); + connect( m_currentChatSession, TQT_SIGNAL(closing(Kopete::ChatSession*)), + this , TQT_SLOT(slotKMMClosed(Kopete::ChatSession*))); } if(!autoChatWindow || nbAutoChatWindow == 0) @@ -163,7 +163,7 @@ void HistoryPlugin::slotViewCreated( KopeteView* v ) logger->setPositionToLast(); - QValueList msgs = logger->readMessages(nbAutoChatWindow, + TQValueList msgs = logger->readMessages(nbAutoChatWindow, /*mb.first()*/ 0L, HistoryLogger::AntiChronological, true, true); // make sure the last message is not the one which will be appened right diff --git a/kopete/plugins/history/historyplugin.h b/kopete/plugins/history/historyplugin.h index 63e2c87b..8c0f553d 100644 --- a/kopete/plugins/history/historyplugin.h +++ b/kopete/plugins/history/historyplugin.h @@ -18,9 +18,9 @@ #ifndef HISTORYPLUGIN_H #define HISTORYPLUGIN_H -#include -#include -#include +#include +#include +#include #include "kopeteplugin.h" @@ -75,7 +75,7 @@ class HistoryPlugin : public Kopete::Plugin { Q_OBJECT public: - HistoryPlugin( QObject *parent, const char *name, const QStringList &args ); + HistoryPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~HistoryPlugin(); /** @@ -97,7 +97,7 @@ class HistoryPlugin : public Kopete::Plugin private: HistoryMessageLoggerFactory m_loggerFactory; - QMap m_loggers; + TQMap m_loggers; Kopete::Message m_lastmessage; }; diff --git a/kopete/plugins/history/historypreferences.cpp b/kopete/plugins/history/historypreferences.cpp index 61fce469..370e6721 100644 --- a/kopete/plugins/history/historypreferences.cpp +++ b/kopete/plugins/history/historypreferences.cpp @@ -20,29 +20,29 @@ #include "historyprefsui.h" #include -#include -#include +#include +#include #include #include -#include +#include typedef KGenericFactory HistoryConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_history, HistoryConfigFactory( "kcm_kopete_history" ) ) -HistoryPreferences::HistoryPreferences(QWidget *parent, const char*/*name*/, const QStringList &args) +HistoryPreferences::HistoryPreferences(TQWidget *parent, const char*/*name*/, const TQStringList &args) : KCModule(HistoryConfigFactory::instance(), parent, args) { kdDebug(14310) << k_funcinfo << "called." << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); p = new HistoryPrefsUI(this); - connect(p->chkShowPrevious, SIGNAL(toggled(bool)), this, SLOT(slotShowPreviousChanged(bool))); - connect(p->Number_Auto_chatwindow, SIGNAL(valueChanged(int)), - this, SLOT(slotModified())); - connect(p->Number_ChatWindow, SIGNAL(valueChanged(int)), - this, SLOT(slotModified())); - connect(p->History_color, SIGNAL(changed(const QColor&)), - this, SLOT(slotModified())); + connect(p->chkShowPrevious, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotShowPreviousChanged(bool))); + connect(p->Number_Auto_chatwindow, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotModified())); + connect(p->Number_ChatWindow, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotModified())); + connect(p->History_color, TQT_SIGNAL(changed(const TQColor&)), + this, TQT_SLOT(slotModified())); load(); } diff --git a/kopete/plugins/history/historypreferences.h b/kopete/plugins/history/historypreferences.h index 247e2bc8..bed6de7b 100644 --- a/kopete/plugins/history/historypreferences.h +++ b/kopete/plugins/history/historypreferences.h @@ -19,7 +19,7 @@ #define HISTORYPREFERENCES_H #include -#include +#include class HistoryPrefsUI; @@ -30,8 +30,8 @@ class HistoryPreferences : public KCModule { Q_OBJECT public: - HistoryPreferences(QWidget *parent=0, const char* name=0, - const QStringList &args = QStringList()); + HistoryPreferences(TQWidget *parent=0, const char* name=0, + const TQStringList &args = TQStringList()); ~HistoryPreferences(); virtual void save(); diff --git a/kopete/plugins/latex/latexguiclient.cpp b/kopete/plugins/latex/latexguiclient.cpp index 8d7cbf3e..ea9420fb 100644 --- a/kopete/plugins/latex/latexguiclient.cpp +++ b/kopete/plugins/latex/latexguiclient.cpp @@ -17,14 +17,14 @@ ************************************************************************* */ -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include "kopetechatsession.h" #include "kopeteview.h" @@ -34,14 +34,14 @@ #include "latexguiclient.h" LatexGUIClient::LatexGUIClient( Kopete::ChatSession *parent, const char *name ) -: QObject( parent, name ), KXMLGUIClient( parent ) +: TQObject( parent, name ), KXMLGUIClient( parent ) { setInstance( LatexPlugin::plugin()->instance() ); - connect( LatexPlugin::plugin(), SIGNAL( destroyed( QObject * ) ), this, SLOT( deleteLater() ) ); + connect( LatexPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) ); m_manager = parent; - new KAction( i18n( "Preview Latex Images" ), "latex", CTRL + Key_L, this, SLOT( slotPreview() ), actionCollection(), "latexPreview" ); + new KAction( i18n( "Preview Latex Images" ), "latex", CTRL + Key_L, this, TQT_SLOT( slotPreview() ), actionCollection(), "latexPreview" ); setXMLFile( "latexchatui.rc" ); } @@ -56,10 +56,10 @@ void LatexGUIClient::slotPreview() return; Kopete::Message msg = m_manager->view()->currentMessage(); - QString messageText = msg.plainBody(); + TQString messageText = msg.plainBody(); if(!messageText.contains("$$")) //we haven't found any latex strings { - KMessageBox::sorry(reinterpret_cast(m_manager->view()) , i18n("There are no latex in the message you are typing. The latex formula must be included between $$ and $$ "), i18n("No Latex Formula") ); + KMessageBox::sorry(reinterpret_cast(m_manager->view()) , i18n("There are no latex in the message you are typing. The latex formula must be included between $$ and $$ "), i18n("No Latex Formula") ); return; } diff --git a/kopete/plugins/latex/latexguiclient.h b/kopete/plugins/latex/latexguiclient.h index c8ca9e99..03fdbd9e 100644 --- a/kopete/plugins/latex/latexguiclient.h +++ b/kopete/plugins/latex/latexguiclient.h @@ -20,7 +20,7 @@ #ifndef TRANSLATORGUICLIENT_H #define TRANSLATORGUICLIENT_H -#include +#include #include #include @@ -34,7 +34,7 @@ namespace Kopete { class ChatSession; } * @author Olivier Goffart */ -class LatexGUIClient : public QObject , public KXMLGUIClient +class LatexGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT diff --git a/kopete/plugins/latex/latexplugin.cpp b/kopete/plugins/latex/latexplugin.cpp index 7ceab209..11537aba 100644 --- a/kopete/plugins/latex/latexplugin.cpp +++ b/kopete/plugins/latex/latexplugin.cpp @@ -16,11 +16,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -41,7 +41,7 @@ typedef KGenericFactory LatexPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_latex, LatexPluginFactory( "kopete_latex" ) ) -LatexPlugin::LatexPlugin( QObject *parent, const char *name, const QStringList &/*args*/ ) +LatexPlugin::LatexPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Plugin( LatexPluginFactory::instance(), parent, name ) { // kdDebug() << k_funcinfo << endl; @@ -49,18 +49,18 @@ LatexPlugin::LatexPlugin( QObject *parent, const char *name, const QStringList & s_pluginStatic = this; mMagickNotFoundShown = false; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), SLOT( slotMessageAboutToShow( Kopete::Message & ) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend(Kopete::Message& ) ), this, SLOT(slotMessageAboutToSend(Kopete::Message& ) ) ); - connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ), - this, SLOT( slotNewChatSession( Kopete::ChatSession * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), TQT_SLOT( slotMessageAboutToShow( Kopete::Message & ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend(Kopete::Message& ) ), this, TQT_SLOT(slotMessageAboutToSend(Kopete::Message& ) ) ); + connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ), + this, TQT_SLOT( slotNewChatSession( Kopete::ChatSession * ) ) ); m_convScript = KStandardDirs::findExe("kopete_latexconvert.sh"); slotSettingsChanged(); //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining) - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) slotNewChatSession( *it ); } @@ -84,7 +84,7 @@ void LatexPlugin::slotNewChatSession( Kopete::ChatSession *KMM ) void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) { - QString mMagick = KStandardDirs::findExe("convert"); + TQString mMagick = KStandardDirs::findExe("convert"); if ( mMagick.isEmpty() ) { // show just once @@ -100,7 +100,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) return; } - QString messageText = msg.plainBody(); + TQString messageText = msg.plainBody(); if( !messageText.contains("$$")) return; @@ -110,14 +110,14 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) // \$\$.+?\$\$ // this searches for $$formula$$ - QRegExp rg("\\$\\$.+\\$\\$"); + TQRegExp rg("\\$\\$.+\\$\\$"); rg.setMinimal(true); // this searches for [latex]formula[/latex] - //QRegExp rg("\\[([^]\]).*?\\[/$1\\]"); + //TQRegExp rg("\\[([^]\]).*?\\[/$1\\]"); int pos = 0; - QMap replaceMap; + TQMap replaceMap; while (pos >= 0 && (unsigned int)pos < messageText.length()) { // kdDebug() << k_funcinfo << " searching pos: " << pos << endl; @@ -125,27 +125,27 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) if (pos >= 0 ) { - QString match = rg.cap(0); + TQString match = rg.cap(0); pos += rg.matchedLength(); - QString formul=match; + TQString formul=match; if(!securityCheck(formul)) continue; - QString fileName=handleLatex(formul.replace("$$","")); + TQString fileName=handleLatex(formul.replace("$$","")); // get the image and encode it with base64 #if ENCODED_IMAGE_MODE - QImage renderedImage( fileName ); + TQImage renderedImage( fileName ); imagePxWidth = renderedImage.width(); imagePxHeight = renderedImage.height(); if ( !renderedImage.isNull() ) { - QByteArray ba; - QBuffer buffer( ba ); + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); renderedImage.save( &buffer, "PNG" ); - QString imageURL = QString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) ); + TQString imageURL = TQString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) ); replaceMap[match] = imageURL; } #else @@ -160,15 +160,15 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) messageText= msg.escapedBody(); int imagePxWidth,imagePxHeight; - for (QMap::ConstIterator it = replaceMap.begin(); it != replaceMap.end(); ++it) + for (TQMap::ConstIterator it = replaceMap.begin(); it != replaceMap.end(); ++it) { - QImage theImage(*it); + TQImage theImage(*it); if(theImage.isNull()) continue; imagePxWidth = theImage.width(); imagePxHeight = theImage.height(); - QString escapedLATEX=QStyleSheet::escape(it.key()).replace("\"","""); //we need the escape quotes because that string will be in a title="" argument, but not the \n - messageText.replace(Kopete::Message::escape(it.key()), " \"" "); + TQString escapedLATEX=TQStyleSheet::escape(it.key()).replace("\"","""); //we need the escape quotes because that string will be in a title="" argument, but not the \n + messageText.replace(Kopete::Message::escape(it.key()), " \"" "); } msg.setBody( messageText, Kopete::Message::RichText ); @@ -186,62 +186,62 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg) if(!config->readBoolEntry("ParseOutgoing", false)) return; - QString messageText = msg.plainBody(); + TQString messageText = msg.plainBody(); if( !messageText.contains("$$")) return; /* if( msg.from()->protocol()->pluginId()!="MSNProtocol" ) return;*/ // this searches for $$formula$$ - QRegExp rg("^\\s*\\$\\$([^$]+)\\$\\$\\s*$"); + TQRegExp rg("^\\s*\\$\\$([^$]+)\\$\\$\\s*$"); if( rg.search(messageText) != -1 ) { - QString latexFormula = rg.cap(1); + TQString latexFormula = rg.cap(1); if(!securityCheck( latexFormula )) return; - QString url = handleLatex(latexFormula); + TQString url = handleLatex(latexFormula); if(!url.isNull()) { - QString escapedLATEX= QStyleSheet::escape(messageText).replace("\"","""); - QString messageText="\"""; + TQString escapedLATEX= TQStyleSheet::escape(messageText).replace("\"","""); + TQString messageText="\"""; msg.setBody( messageText, Kopete::Message::RichText ); } } #endif } -QString LatexPlugin::handleLatex(const QString &latexFormula) +TQString LatexPlugin::handleLatex(const TQString &latexFormula) { KTempFile *tempFile=new KTempFile( locateLocal( "tmp", "kopetelatex-" ), ".png" ); tempFile->setAutoDelete(true); m_tempFiles.append(tempFile); m_tempFiles.setAutoDelete(true); - QString fileName = tempFile->name(); + TQString fileName = tempFile->name(); KProcess p; - QString argumentRes = "-r %1x%2"; - QString argumentOut = "-o %1"; - //QString argumentFormat = "-fgif"; //we uses gif format because MSN only handle gif + TQString argumentRes = "-r %1x%2"; + TQString argumentOut = "-o %1"; + //TQString argumentFormat = "-fgif"; //we uses gif format because MSN only handle gif int hDPI, vDPI; hDPI = LatexConfig::self()->horizontalDPI(); vDPI = LatexConfig::self()->verticalDPI(); - p << m_convScript << argumentRes.arg(QString::number(hDPI), QString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ; + p << m_convScript << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ; - kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(QString::number(hDPI), QString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl; + kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl; // FIXME our sucky sync filter API limitations :-) p.start(KProcess::Block); return fileName; } -bool LatexPlugin::securityCheck(const QString &latexFormula) +bool LatexPlugin::securityCheck(const TQString &latexFormula) { - return !latexFormula.contains(QRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include" + return !latexFormula.contains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include" "|chardef|catcode|makeatletter|noexpand|toksdef|every|errhelp|errorstopmode|scrollmode|nonstopmode|batchmode" "|read|csname|newhelp|relax|afterground|afterassignment|expandafter|noexpand|special|command|loop|repeat|toks" "|output|line|mathcode|name|item|section|mbox|DeclareRobustCommand)[^a-zA-Z]")); diff --git a/kopete/plugins/latex/latexplugin.h b/kopete/plugins/latex/latexplugin.h index a0fcd7fd..ebff5f8d 100644 --- a/kopete/plugins/latex/latexplugin.h +++ b/kopete/plugins/latex/latexplugin.h @@ -21,8 +21,8 @@ #ifndef LATEXPLUGIN_H #define LATEXPLUGIN_H -#include -#include +#include +#include #include @@ -46,7 +46,7 @@ class LatexPlugin : public Kopete::Plugin public: static LatexPlugin *plugin(); - LatexPlugin( QObject *parent, const char *name, const QStringList &args ); + LatexPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~LatexPlugin(); public slots: @@ -59,19 +59,19 @@ public: /** * gives a latex formula, and return the filename of the file where the latex is stored. */ - QString handleLatex(const QString &latex); + TQString handleLatex(const TQString &latex); /** * return false if the latex formula may contains malicious commands */ - bool securityCheck(const QString & formula); + bool securityCheck(const TQString & formula); private: static LatexPlugin* s_pluginStatic; - QString m_convScript; + TQString m_convScript; bool mMagickNotFoundShown; - QPtrList m_tempFiles; + TQPtrList m_tempFiles; }; #endif diff --git a/kopete/plugins/latex/latexpreferences.cpp b/kopete/plugins/latex/latexpreferences.cpp index 1727ae49..ff02c831 100644 --- a/kopete/plugins/latex/latexpreferences.cpp +++ b/kopete/plugins/latex/latexpreferences.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -30,17 +30,17 @@ typedef KGenericFactory LatexPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_latex, LatexPreferencesFactory( "kcm_kopete_latex" ) ) -LatexPreferences::LatexPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +LatexPreferences::LatexPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule(LatexPreferencesFactory::instance(), parent, args) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); m_preferencesDialog = new LatexPrefsUI(this); // connect widget signals here m_preferencesDialog->horizontalDPI->setMinValue(1); m_preferencesDialog->verticalDPI->setMinValue(1); - connect(m_preferencesDialog->horizontalDPI, SIGNAL(valueChanged(int)), this, SLOT(slotModified())); - connect(m_preferencesDialog->verticalDPI, SIGNAL(valueChanged(int)), this, SLOT(slotModified())); + connect(m_preferencesDialog->horizontalDPI, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified())); + connect(m_preferencesDialog->verticalDPI, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified())); load(); } diff --git a/kopete/plugins/latex/latexpreferences.h b/kopete/plugins/latex/latexpreferences.h index c08b35b5..5bfc2f8f 100644 --- a/kopete/plugins/latex/latexpreferences.h +++ b/kopete/plugins/latex/latexpreferences.h @@ -19,7 +19,7 @@ #define LatexPREFERENCES_H #include -#include +#include class LatexPrefsUI; class QListViewItem; @@ -33,7 +33,7 @@ class LatexPreferences : public KCModule Q_OBJECT public: - LatexPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList()); + LatexPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~LatexPreferences(); virtual void save(); diff --git a/kopete/plugins/motionautoaway/motionawayplugin.cpp b/kopete/plugins/motionautoaway/motionawayplugin.cpp index d534a186..8dbd8853 100644 --- a/kopete/plugins/motionautoaway/motionawayplugin.cpp +++ b/kopete/plugins/motionautoaway/motionawayplugin.cpp @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include @@ -92,7 +92,7 @@ typedef __signed__ long long __s64; typedef KGenericFactory MotionAwayPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_motionaway, MotionAwayPluginFactory( "kopete_motionaway" ) ) -MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +MotionAwayPlugin::MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( MotionAwayPluginFactory::instance(), parent, name ) { kdDebug(14305) << k_funcinfo << "Called." << endl; @@ -106,11 +106,11 @@ MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QSt /* We haven't took the first picture yet */ m_tookFirst = false; - m_captureTimer = new QTimer(this); - m_awayTimer = new QTimer(this); + m_captureTimer = new TQTimer(this); + m_awayTimer = new TQTimer(this); - connect( m_captureTimer, SIGNAL(timeout()), this, SLOT(slotCapture()) ); - connect( m_awayTimer, SIGNAL(timeout()), this, SLOT(slotTimeout()) ); + connect( m_captureTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCapture()) ); + connect( m_awayTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) ); signal(SIGCHLD, SIG_IGN); @@ -143,7 +143,7 @@ MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QSt m_awayTimer->start( awayTimeout * 60 * 1000 ); } loadSettings(); - connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) ); + connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) ); } MotionAwayPlugin::~MotionAwayPlugin() @@ -163,7 +163,7 @@ void MotionAwayPlugin::loadSettings(){ m_awayTimer->changeInterval(awayTimeout * 60 * 1000); } -int MotionAwayPlugin::getImage(int _dev, QByteArray &_image, int _width, int _height, int _input, int _norm, int _fmt) +int MotionAwayPlugin::getImage(int _dev, TQByteArray &_image, int _width, int _height, int _input, int _norm, int _fmt) { struct video_capability vid_caps; struct video_channel vid_chnl; diff --git a/kopete/plugins/motionautoaway/motionawayplugin.h b/kopete/plugins/motionautoaway/motionawayplugin.h index 98e7e343..84172f33 100644 --- a/kopete/plugins/motionautoaway/motionawayplugin.h +++ b/kopete/plugins/motionautoaway/motionawayplugin.h @@ -38,7 +38,7 @@ class MotionAwayPlugin : public Kopete::Plugin Q_OBJECT public: - MotionAwayPlugin( QObject *parent, const char *name, const QStringList &args ); + MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~MotionAwayPlugin(); public slots: @@ -50,12 +50,12 @@ public slots: private: int awayTimeout; bool becomeAvailableWithActivity; - QString videoDevice; + TQString videoDevice; - QTimer *m_captureTimer; - QTimer *m_awayTimer; + TQTimer *m_captureTimer; + TQTimer *m_awayTimer; - int getImage(int, QByteArray& ,int ,int ,int ,int ,int ); + int getImage(int, TQByteArray& ,int ,int ,int ,int ,int ); bool m_tookFirst; bool m_wentAway; @@ -70,10 +70,10 @@ private: int shots; int m_gap; - QByteArray m_imageRef; - QByteArray m_imageNew; - QByteArray m_imageOld; - QByteArray m_imageOut; + TQByteArray m_imageRef; + TQByteArray m_imageNew; + TQByteArray m_imageOld; + TQByteArray m_imageOut; /* time_t currenttimep; diff --git a/kopete/plugins/motionautoaway/motionawaypreferences.cpp b/kopete/plugins/motionautoaway/motionawaypreferences.cpp index a4962c5c..889d4d30 100644 --- a/kopete/plugins/motionautoaway/motionawaypreferences.cpp +++ b/kopete/plugins/motionautoaway/motionawaypreferences.cpp @@ -15,9 +15,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -30,15 +30,15 @@ typedef KGenericFactory MotionAwayPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_motionaway, MotionAwayPreferencesFactory("kcm_kopete_motionaway")) -MotionAwayPreferences::MotionAwayPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +MotionAwayPreferences::MotionAwayPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule(MotionAwayPreferencesFactory::instance(), parent, args) { // Add actuall widget generated from ui file. - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new motionawayPrefsUI(this); - connect(preferencesDialog->BecomeAvailableWithActivity, SIGNAL(toggled(bool)), this, SLOT(slotWidgetModified())); - connect(preferencesDialog->AwayTimeout, SIGNAL(valueChanged(int)), this, SLOT(slotWidgetModified())); - connect(preferencesDialog->VideoDevice, SIGNAL(textChanged(const QString &)), this, SLOT(slotWidgetModified())); + connect(preferencesDialog->BecomeAvailableWithActivity, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotWidgetModified())); + connect(preferencesDialog->AwayTimeout, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWidgetModified())); + connect(preferencesDialog->VideoDevice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotWidgetModified())); load(); } diff --git a/kopete/plugins/motionautoaway/motionawaypreferences.h b/kopete/plugins/motionautoaway/motionawaypreferences.h index 43b33411..c93784d3 100644 --- a/kopete/plugins/motionautoaway/motionawaypreferences.h +++ b/kopete/plugins/motionautoaway/motionawaypreferences.h @@ -30,7 +30,7 @@ class MotionAwayPreferences : public KCModule { Q_OBJECT public: - MotionAwayPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList()); + MotionAwayPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); virtual void save(); virtual void load(); diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.cpp b/kopete/plugins/netmeeting/netmeetingguiclient.cpp index e024a872..9dffde7f 100644 --- a/kopete/plugins/netmeeting/netmeetingguiclient.cpp +++ b/kopete/plugins/netmeeting/netmeetingguiclient.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -33,12 +33,12 @@ class NetMeetingPlugin; NetMeetingGUIClient::NetMeetingGUIClient( MSNChatSession *parent, const char *name ) -: QObject( parent, name ) , KXMLGUIClient(parent) +: TQObject( parent, name ) , KXMLGUIClient(parent) { setInstance(KGenericFactory::instance()); m_manager=parent; - new KAction( i18n( "Invite to Use NetMeeting" ), 0, this, SLOT( slotStartInvitation() ), actionCollection() , "netmeeting" ) ; + new KAction( i18n( "Invite to Use NetMeeting" ), 0, this, TQT_SLOT( slotStartInvitation() ), actionCollection() , "netmeeting" ) ; setXMLFile("netmeetingchatui.rc"); } @@ -50,7 +50,7 @@ NetMeetingGUIClient::~NetMeetingGUIClient() void NetMeetingGUIClient::slotStartInvitation() { - QPtrList c=m_manager->members(); + TQPtrList c=m_manager->members(); NetMeetingInvitation *i=new NetMeetingInvitation(false, static_cast(c.first()),m_manager); m_manager->initInvitation(i); } diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.h b/kopete/plugins/netmeeting/netmeetingguiclient.h index fa84b694..c847a5cd 100644 --- a/kopete/plugins/netmeeting/netmeetingguiclient.h +++ b/kopete/plugins/netmeeting/netmeetingguiclient.h @@ -20,7 +20,7 @@ #ifndef TRANSLATORGUICLIENT_H #define TRANSLATORGUICLIENT_H -#include +#include #include namespace Kopete { class ChatSession; } @@ -31,7 +31,7 @@ class NetMeetingPlugin; * @author Olivier Goffart */ -class NetMeetingGUIClient : public QObject , public KXMLGUIClient +class NetMeetingGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.cpp b/kopete/plugins/netmeeting/netmeetinginvitation.cpp index 191bc140..5fb799c1 100644 --- a/kopete/plugins/netmeeting/netmeetinginvitation.cpp +++ b/kopete/plugins/netmeeting/netmeetinginvitation.cpp @@ -29,11 +29,11 @@ #include -#include +#include #include -NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, QObject *parent) - : QObject(parent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") ) +NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, TQObject *parent) + : TQObject(parent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") ) { m_contact=c; oki=false; @@ -45,20 +45,20 @@ NetMeetingInvitation::~NetMeetingInvitation() } -QString NetMeetingInvitation::invitationHead() +TQString NetMeetingInvitation::invitationHead() { - QTimer::singleShot( 10*60000, this, SLOT( slotTimeout() ) ); //send TIMEOUT in 10 minute if the invitation has not been accepted/refused - return QString( MSNInvitation::invitationHead()+ + TQTimer::singleShot( 10*60000, this, TQT_SLOT( slotTimeout() ) ); //send TIMEOUT in 10 minute if the invitation has not been accepted/refused + return TQString( MSNInvitation::invitationHead()+ "Session-Protocol: SM1\r\n" "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME i don't know what is the session id "\r\n").utf8(); } -void NetMeetingInvitation::parseInvitation(const QString& msg) +void NetMeetingInvitation::parseInvitation(const TQString& msg) { - QRegExp rx("Invitation-Command: ([A-Z]*)"); + TQRegExp rx("Invitation-Command: ([A-Z]*)"); rx.search(msg); - QString command=rx.cap(1); + TQString command=rx.cap(1); if( msg.contains("Invitation-Command: INVITE") ) { MSNInvitation::parseInvitation(msg); //for the cookie @@ -73,12 +73,12 @@ void NetMeetingInvitation::parseInvitation(const QString& msg) { if(result==3) // Yes == 3 { - QCString message=QString( + TQCString message=TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Invitation-Command: ACCEPT\r\n" - "Invitation-Cookie: " + QString::number(cookie()) + "\r\n" + "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n" "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME "Session-Protocol: SM1\r\n" "Launch-Application: TRUE\r\n" @@ -89,7 +89,7 @@ void NetMeetingInvitation::parseInvitation(const QString& msg) manager->service()->sendCommand( "MSG" , "N", true, message ); oki=false; - QTimer::singleShot( 10* 60000, this, SLOT( slotTimeout() ) ); //TIMOUT afte 10 min + TQTimer::singleShot( 10* 60000, this, TQT_SLOT( slotTimeout() ) ); //TIMOUT afte 10 min } else //No { @@ -105,12 +105,12 @@ void NetMeetingInvitation::parseInvitation(const QString& msg) MSNChatSession* manager=dynamic_cast(m_contact->manager()); if(manager && manager->service()) { - QCString message=QString( + TQCString message=TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Invitation-Command: ACCEPT\r\n" - "Invitation-Cookie: " + QString::number(cookie()) + "\r\n" + "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n" "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME: what is session id? "Session-Protocol: SM1\r\n" "Launch-Application: TRUE\r\n" @@ -119,17 +119,17 @@ void NetMeetingInvitation::parseInvitation(const QString& msg) "\r\n" ).utf8(); manager->service()->sendCommand( "MSG" , "N", true, message ); } - rx=QRegExp("IP-Address: ([0-9\\:\\.]*)"); + rx=TQRegExp("IP-Address: ([0-9\\:\\.]*)"); rx.search(msg); - QString ip_address = rx.cap(1); + TQString ip_address = rx.cap(1); startMeeting(ip_address); kdDebug() << k_funcinfo << ip_address << endl; } else { - rx=QRegExp("IP-Address: ([0-9\\:\\.]*)"); + rx=TQRegExp("IP-Address: ([0-9\\:\\.]*)"); rx.search(msg); - QString ip_address = rx.cap(1); + TQString ip_address = rx.cap(1); startMeeting(ip_address); } @@ -156,20 +156,20 @@ void NetMeetingInvitation::slotTimeout() } -void NetMeetingInvitation::startMeeting(const QString & ip_address) +void NetMeetingInvitation::startMeeting(const TQString & ip_address) { //TODO: use KProcess KConfig *config=KGlobal::config(); config->setGroup("Netmeeting Plugin"); - QString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address); + TQString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address); kdDebug() << k_funcinfo << app << endl ; - QStringList args=QStringList::split(" ", app); + TQStringList args=TQStringList::split(" ", app); KProcess p; - for(QStringList::Iterator it=args.begin() ; it != args.end() ; ++it) + for(TQStringList::Iterator it=args.begin() ; it != args.end() ; ++it) { p << *it; } diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.h b/kopete/plugins/netmeeting/netmeetinginvitation.h index 0fbaf318..eb4b2ba6 100644 --- a/kopete/plugins/netmeeting/netmeetinginvitation.h +++ b/kopete/plugins/netmeeting/netmeetinginvitation.h @@ -17,7 +17,7 @@ #ifndef MSNVOICEINVITATION_H #define MSNVOICEINVITATION_H -#include +#include #include "msninvitation.h" class MSNContact; @@ -25,19 +25,19 @@ class MSNContact; /** *@author Olivier Goffart */ -class NetMeetingInvitation : public QObject , public MSNInvitation +class NetMeetingInvitation : public TQObject , public MSNInvitation { Q_OBJECT public: - NetMeetingInvitation(bool incoming ,MSNContact*, QObject *parent = 0); + NetMeetingInvitation(bool incoming ,MSNContact*, TQObject *parent = 0); ~NetMeetingInvitation(); - static QString applicationID() { return "44BBA842-CC51-11CF-AAFA-00AA00B6015C"; } - QString invitationHead(); + static TQString applicationID() { return "44BBA842-CC51-11CF-AAFA-00AA00B6015C"; } + TQString invitationHead(); - virtual void parseInvitation(const QString& invitation); + virtual void parseInvitation(const TQString& invitation); - virtual QObject* object() { return this; } + virtual TQObject* object() { return this; } signals: void done( MSNInvitation * ); @@ -48,7 +48,7 @@ private slots: private: MSNContact *m_contact; bool oki; - void startMeeting(const QString & ip_address); + void startMeeting(const TQString & ip_address); }; diff --git a/kopete/plugins/netmeeting/netmeetingplugin.cpp b/kopete/plugins/netmeeting/netmeetingplugin.cpp index d2ea501c..2d71c257 100644 --- a/kopete/plugins/netmeeting/netmeetingplugin.cpp +++ b/kopete/plugins/netmeeting/netmeetingplugin.cpp @@ -35,19 +35,19 @@ static const KAboutData aboutdata("kopete_netmeeting", I18N_NOOP("NetMeeting") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_netmeeting, KGenericFactory( &aboutdata ) ) -NetMeetingPlugin::NetMeetingPlugin( QObject *parent, const char *name, const QStringList &/*args*/ ) +NetMeetingPlugin::NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Plugin( KGlobal::instance(), parent, name ) { if(MSNProtocol::protocol()) slotPluginLoaded(MSNProtocol::protocol()); else - connect(Kopete::PluginManager::self() , SIGNAL(pluginLoaded(Kopete::Plugin*) ), this, SLOT(slotPluginLoaded(Kopete::Plugin*))); + connect(Kopete::PluginManager::self() , TQT_SIGNAL(pluginLoaded(Kopete::Plugin*) ), this, TQT_SLOT(slotPluginLoaded(Kopete::Plugin*))); - connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining) - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) { slotNewKMM(*it); } @@ -62,8 +62,8 @@ void NetMeetingPlugin::slotPluginLoaded(Kopete::Plugin *p) { if(p->pluginId()=="MSNProtocol") { - connect( p , SIGNAL(invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* )) , - this, SLOT( slotInvitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* ))); + connect( p , TQT_SIGNAL(invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* )) , + this, TQT_SLOT( slotInvitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* ))); } } @@ -72,14 +72,14 @@ void NetMeetingPlugin::slotNewKMM(Kopete::ChatSession *KMM) MSNChatSession *msnMM=dynamic_cast(KMM); if(msnMM) { - connect(this , SIGNAL( destroyed(QObject*)) , + connect(this , TQT_SIGNAL( destroyed(TQObject*)) , new NetMeetingGUIClient(msnMM) - , SLOT(deleteLater())); + , TQT_SLOT(deleteLater())); } } -void NetMeetingPlugin::slotInvitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int /*cookie*/ , MSNChatSession* msnMM , MSNContact* c ) +void NetMeetingPlugin::slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int /*cookie*/ , MSNChatSession* msnMM , MSNContact* c ) { if(!invitation && bodyMSG.contains(NetMeetingInvitation::applicationID())) { diff --git a/kopete/plugins/netmeeting/netmeetingplugin.h b/kopete/plugins/netmeeting/netmeetingplugin.h index 7427bbf8..495eb510 100644 --- a/kopete/plugins/netmeeting/netmeetingplugin.h +++ b/kopete/plugins/netmeeting/netmeetingplugin.h @@ -31,13 +31,13 @@ class NetMeetingPlugin : public Kopete::Plugin Q_OBJECT public: - NetMeetingPlugin( QObject *parent, const char *name, const QStringList &args ); + NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~NetMeetingPlugin(); private slots: void slotNewKMM(Kopete::ChatSession *); void slotPluginLoaded(Kopete::Plugin*); - void slotInvitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c ); + void slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c ); }; diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.cpp b/kopete/plugins/netmeeting/netmeetingpreferences.cpp index b28dfe09..313eb197 100644 --- a/kopete/plugins/netmeeting/netmeetingpreferences.cpp +++ b/kopete/plugins/netmeeting/netmeetingpreferences.cpp @@ -14,8 +14,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -39,13 +39,13 @@ typedef KGenericFactory NetmeetingPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_netmeeting, NetmeetingPreferencesFactory( "kcm_kopete_netmeeting" ) ) -NetmeetingPreferences::NetmeetingPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +NetmeetingPreferences::NetmeetingPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule(NetmeetingPreferencesFactory::instance(), parent, args) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new NetmeetingPrefsUI(this); - connect(preferencesDialog->m_app , SIGNAL(textChanged(const QString &)) , this , SLOT(slotChanged())); + connect(preferencesDialog->m_app , TQT_SIGNAL(textChanged(const TQString &)) , this , TQT_SLOT(slotChanged())); load(); } diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.h b/kopete/plugins/netmeeting/netmeetingpreferences.h index 94a7031e..6ad09f58 100644 --- a/kopete/plugins/netmeeting/netmeetingpreferences.h +++ b/kopete/plugins/netmeeting/netmeetingpreferences.h @@ -18,7 +18,7 @@ #define NetmeetingPREFERENCES_H #include -#include +#include class NetmeetingPrefsUI; @@ -30,7 +30,7 @@ class NetmeetingPreferences : public KCModule { Q_OBJECT public: - NetmeetingPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList()); + NetmeetingPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~NetmeetingPreferences(); virtual void save(); diff --git a/kopete/plugins/nowlistening/nlamarok.cpp b/kopete/plugins/nowlistening/nlamarok.cpp index 15d19411..9101758c 100644 --- a/kopete/plugins/nowlistening/nlamarok.cpp +++ b/kopete/plugins/nowlistening/nlamarok.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include "nlmediaplayer.h" #include "nlamarok.h" @@ -38,10 +38,10 @@ void NLamaroK::update() { m_playing = false; m_newTrack = false; - QString newTrack; - QByteArray data, replyData; - QCString replyType; - QString result; + TQString newTrack; + TQByteArray data, replyData; + TQCString replyType; + TQString result; // see if amaroK is registered with DCOP if ( !m_client->isApplicationRegistered( "amarok" ) ) @@ -64,7 +64,7 @@ void NLamaroK::update() } else { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "bool" ) { reply >> m_playing; } @@ -74,7 +74,7 @@ void NLamaroK::update() { int status = 0; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "int" ) { reply >> status; kdDebug( 14307 ) << k_funcinfo << "Amarok status()=" << status << endl; @@ -89,9 +89,9 @@ void NLamaroK::update() if ( m_client->call( "amarok", "player", "title()", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> newTrack; } } @@ -105,9 +105,9 @@ void NLamaroK::update() if ( m_client->call( "amarok", "player", "album()", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> m_album; } } @@ -115,9 +115,9 @@ void NLamaroK::update() if ( m_client->call( "amarok", "player", "artist()", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> m_artist; } } diff --git a/kopete/plugins/nowlistening/nljuk.cpp b/kopete/plugins/nowlistening/nljuk.cpp index 41de23bc..422e0db9 100644 --- a/kopete/plugins/nowlistening/nljuk.cpp +++ b/kopete/plugins/nowlistening/nljuk.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include "nlmediaplayer.h" #include "nljuk.h" @@ -37,62 +37,62 @@ NLJuk::NLJuk( DCOPClient *client ) : NLMediaPlayer() void NLJuk::update() { m_playing = false; - QString newTrack; + TQString newTrack; // see if JuK is registered with DCOP if ( m_client->isApplicationRegistered( "juk" ) ) { // see if it's playing - QByteArray data, replyData; - QCString replyType; - QString result; + TQByteArray data, replyData; + TQCString replyType; + TQString result; if ( m_client->call( "juk", "Player", "playing()", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "bool" ) { reply >> m_playing; } } { - QDataStream arg( data, IO_WriteOnly ); - arg << QString::fromLatin1("Album"); - if ( m_client->call( "juk", "Player", "trackProperty(QString)", data, + TQDataStream arg( data, IO_WriteOnly ); + arg << TQString::fromLatin1("Album"); + if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> m_album; } } } { - QDataStream arg( data, IO_WriteOnly ); - arg << QString::fromLatin1("Artist"); - if ( m_client->call( "juk", "Player", "trackProperty(QString)", data, + TQDataStream arg( data, IO_WriteOnly ); + arg << TQString::fromLatin1("Artist"); + if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> m_artist; } } } { - QDataStream arg( data, IO_WriteOnly ); - arg << QString::fromLatin1("Title"); - if ( m_client->call( "juk", "Player", "trackProperty(QString)", data, + TQDataStream arg( data, IO_WriteOnly ); + arg << TQString::fromLatin1("Title"); + if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> newTrack; } } diff --git a/kopete/plugins/nowlistening/nlkaffeine.cpp b/kopete/plugins/nowlistening/nlkaffeine.cpp index fe02077f..d5823298 100644 --- a/kopete/plugins/nowlistening/nlkaffeine.cpp +++ b/kopete/plugins/nowlistening/nlkaffeine.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include "nlmediaplayer.h" #include "nlkaffeine.h" @@ -38,17 +38,17 @@ void NLKaffeine::update() { m_playing = false; m_newTrack = false; - QString newTrack; + TQString newTrack; bool error = true; // Asume we have a error first. - QCString kaffeineIface("Kaffeine"), kaffeineGetTrack("getTitle()"); + TQCString kaffeineIface("Kaffeine"), kaffeineGetTrack("getTitle()"); // see if kaffeine is registered with DCOP if ( m_client->isApplicationRegistered( "kaffeine" ) ) { // see if it's playing - QByteArray data, replyData; - QCString replyType; - QString result; + TQByteArray data, replyData; + TQCString replyType; + TQString result; if ( !m_client->call( "kaffeine", kaffeineIface, "isPlaying()", data, replyType, replyData ) ) { @@ -73,7 +73,7 @@ void NLKaffeine::update() // If we didn't get any DCOP error, check if Kaffeine is playing. if(!error) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "bool" ) { reply >> m_playing; kdDebug( 14307 ) << "checked if Kaffeine is playing!" << endl; @@ -83,9 +83,9 @@ void NLKaffeine::update() if ( m_client->call( "kaffeine", kaffeineIface, kaffeineGetTrack, data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> newTrack; } } diff --git a/kopete/plugins/nowlistening/nlkscd.cpp b/kopete/plugins/nowlistening/nlkscd.cpp index a20c809b..06bf6c28 100644 --- a/kopete/plugins/nowlistening/nlkscd.cpp +++ b/kopete/plugins/nowlistening/nlkscd.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include "nlmediaplayer.h" @@ -38,13 +38,13 @@ NLKscd::NLKscd( DCOPClient *client ) : NLMediaPlayer() void NLKscd::update() { m_playing = false; - QString newTrack; + TQString newTrack; // see if it's registered with DCOP if ( m_client->isApplicationRegistered( "kscd" ) ) { // see if it's playing - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if ( !m_client->call( "kscd", "CDPlayer", "playing()", data, replyType, replyData ) ) { @@ -55,7 +55,7 @@ void NLKscd::update() } else { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "bool" ) { reply >> m_playing; // kdDebug( 14307 ) << "NLKscd::update() - KsCD is " << @@ -68,8 +68,8 @@ void NLKscd::update() kdDebug( 14307 ) << "NLKscd::update() DCOP error" << endl; else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) reply >> m_artist; else kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl; @@ -81,8 +81,8 @@ void NLKscd::update() kdDebug( 14307 ) << "NLKscd::update() DCOP error" << endl; else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) reply >> m_album; else kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl; @@ -93,8 +93,8 @@ void NLKscd::update() "currentTrackTitle()", data, replyType, replyData ) ) kdDebug( 14307 ) << "NLKscd::update() - there was some error using DCOP." << endl; else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) { reply >> newTrack; //kdDebug( 14307 ) << "the result is: " << newTrack.latin1() // << endl; diff --git a/kopete/plugins/nowlistening/nlmediaplayer.h b/kopete/plugins/nowlistening/nlmediaplayer.h index 5c619150..dad13190 100644 --- a/kopete/plugins/nowlistening/nlmediaplayer.h +++ b/kopete/plugins/nowlistening/nlmediaplayer.h @@ -38,19 +38,19 @@ class NLMediaPlayer virtual void update() = 0; bool playing() const { return m_playing; } bool newTrack() const { return m_newTrack; } - QString artist() const { return m_artist; } - QString album() const { return m_album; } - QString track() const { return m_track; } - QString name() const{ return m_name; } + TQString artist() const { return m_artist; } + TQString album() const { return m_album; } + TQString track() const { return m_track; } + TQString name() const{ return m_name; } NLMediaType mediaType() const { return m_type; } protected: // The name of the application - QString m_name; + TQString m_name; bool m_playing; bool m_newTrack; - QString m_artist; - QString m_album; - QString m_track; + TQString m_artist; + TQString m_album; + TQString m_track; NLMediaType m_type; }; diff --git a/kopete/plugins/nowlistening/nlnoatun.cpp b/kopete/plugins/nowlistening/nlnoatun.cpp index 62bdc8ba..c9c504c2 100644 --- a/kopete/plugins/nowlistening/nlnoatun.cpp +++ b/kopete/plugins/nowlistening/nlnoatun.cpp @@ -37,14 +37,14 @@ void NLNoatun::update() { // Thanks mETz for telling me about Noatun's currentProperty() m_playing = false; - QString newTrack; + TQString newTrack; // see if it's registered with DCOP - QCString appname = find(); + TQCString appname = find(); if ( !appname.isEmpty() ) { // see if it's playing - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if ( !m_client->call( appname, "Noatun", "state()", data, replyType, replyData ) ) { @@ -52,7 +52,7 @@ void NLNoatun::update() } else { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "int" ) { int state = 0; reply >> state; @@ -64,7 +64,7 @@ void NLNoatun::update() // Using properties m_artist = currentProperty( appname, "author" ); m_album = currentProperty( appname, "album" ); - QString title = currentProperty( appname, "title" ); + TQString title = currentProperty( appname, "title" ); // if properties not set ( no id3 tags... ) fallback to filename if ( !title.isEmpty() ) newTrack = title; @@ -75,8 +75,8 @@ void NLNoatun::update() kdDebug( 14307 ) << "NLNoatun::update() DCOP error on " << appname << endl; else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) { reply >> newTrack; } else kdDebug( 14307 ) << "NLNoatun::update(), title() returned unexpected reply type!" << endl; @@ -97,9 +97,9 @@ void NLNoatun::update() kdDebug( 14307 ) << "NLNoatun::update() - noatun not found" << endl; } -QCString NLNoatun::find() const +TQCString NLNoatun::find() const { - QCString app = "noatun"; + TQCString app = "noatun"; if ( !m_client->isApplicationRegistered( app ) ) { // looking for a registered app prefixed with 'app' @@ -121,23 +121,23 @@ QCString NLNoatun::find() const return app; } -QString NLNoatun::currentProperty( QCString appname, QString property ) const +TQString NLNoatun::currentProperty( TQCString appname, TQString property ) const { - QByteArray data, replyData; - QCString replyType; - QDataStream arg( data, IO_WriteOnly ); - QString result = ""; + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg( data, IO_WriteOnly ); + TQString result = ""; arg << property; if ( !m_client->call( appname, "Noatun", - "currentProperty(QString)", data, replyType, replyData ) ) + "currentProperty(TQString)", data, replyType, replyData ) ) { kdDebug( 14307 ) << "NLNoatun::currentProperty() DCOP error on " << appname << endl; } else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) { reply >> result; } diff --git a/kopete/plugins/nowlistening/nlnoatun.h b/kopete/plugins/nowlistening/nlnoatun.h index 88441754..85e1aaac 100644 --- a/kopete/plugins/nowlistening/nlnoatun.h +++ b/kopete/plugins/nowlistening/nlnoatun.h @@ -32,8 +32,8 @@ class NLNoatun : public NLMediaPlayer NLNoatun( DCOPClient *client ); virtual void update(); protected: - QCString find() const; - QString currentProperty( QCString appname, QString property ) const; + TQCString find() const; + TQString currentProperty( TQCString appname, TQString property ) const; DCOPClient *m_client; }; diff --git a/kopete/plugins/nowlistening/nlxmms.cpp b/kopete/plugins/nowlistening/nlxmms.cpp index a2d3637d..3f5bb675 100644 --- a/kopete/plugins/nowlistening/nlxmms.cpp +++ b/kopete/plugins/nowlistening/nlxmms.cpp @@ -49,7 +49,7 @@ void NLXmms::update() if ( xmmslib && xmms_remote_get_version( 0 ) ) { - QString newTrack; + TQString newTrack; // see if it's playing if ( xmms_remote_is_playing( 0 ) && !xmms_remote_is_paused( 0 ) ) { diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp index 8e7b1908..c5e47ef0 100644 --- a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp +++ b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp @@ -30,12 +30,12 @@ #include NowListeningGUIClient::NowListeningGUIClient( Kopete::ChatSession *parent, NowListeningPlugin *plugin ) - : QObject(parent) , KXMLGUIClient(parent) + : TQObject(parent) , KXMLGUIClient(parent) { - connect(plugin, SIGNAL(readyForUnload()), SLOT(slotPluginUnloaded())); + connect(plugin, TQT_SIGNAL(readyForUnload()), TQT_SLOT(slotPluginUnloaded())); m_msgManager = parent; m_action = new KAction( i18n( "Send Media Info" ), 0, this, - SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" ); + TQT_SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" ); setXMLFile("nowlisteningchatui.rc"); } @@ -47,13 +47,13 @@ void NowListeningGUIClient::slotAdvertToCurrentChat() if (!NowListeningPlugin::plugin()) return; - QString message = NowListeningPlugin::plugin()->mediaPlayerAdvert(); + TQString message = NowListeningPlugin::plugin()->mediaPlayerAdvert(); // We warn in a mode appropriate to the mode the user invoked the // plugin - GUI on menu action, in message if they typed '/media' if ( message.isEmpty() ) { - QWidget * origin = 0L; + TQWidget * origin = 0L; if ( m_msgManager && m_msgManager->view() ) origin = m_msgManager->view()->mainWidget(); KMessageBox::queuedMessageBox( origin, KMessageBox::Sorry, diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.h b/kopete/plugins/nowlistening/nowlisteningguiclient.h index 9f89d351..b12b0424 100644 --- a/kopete/plugins/nowlistening/nowlisteningguiclient.h +++ b/kopete/plugins/nowlistening/nowlisteningguiclient.h @@ -21,7 +21,7 @@ #ifndef NOWLISTENINGGUICLIENT_H #define NOWLISTENINGGUICLIENT_H -#include +#include #include class KAction; @@ -31,7 +31,7 @@ namespace Kopete { class ChatSession; } -class NowListeningGUIClient : public QObject, public KXMLGUIClient +class NowListeningGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp index e28316be..4c286b0f 100644 --- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp +++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp @@ -18,9 +18,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -59,7 +59,7 @@ public: {} // abstracted media player interfaces - QPtrList m_mediaPlayerList; + TQPtrList m_mediaPlayerList; NLMediaPlayer *m_currentMediaPlayer; // Needed for DCOP interprocess communication @@ -69,16 +69,16 @@ public: // Used when using automatic advertising to know who has already gotten // the music information - QStringList m_musicSentTo; + TQStringList m_musicSentTo; // Used when advertising to status message. - QTimer *advertTimer; + TQTimer *advertTimer; }; typedef KGenericFactory NowListeningPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_nowlistening, NowListeningPluginFactory( "kopete_nowlistening" ) ) -NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const QStringList& /*args*/ ) +NowListeningPlugin::NowListeningPlugin( TQObject *parent, const char* name, const TQStringList& /*args*/ ) : Kopete::Plugin( NowListeningPluginFactory::instance(), parent, name ) { if ( pluginStatic_ ) @@ -91,18 +91,18 @@ NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const kdDebug(14307) << k_funcinfo << endl; // Connection for the "/media" command (always needed) - connect( Kopete::ChatSessionManager::self(), SIGNAL( - chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( + chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); // If autoadvertising is on... connect(Kopete::ChatSessionManager::self(), - SIGNAL(aboutToSend(Kopete::Message&)), + TQT_SIGNAL(aboutToSend(Kopete::Message&)), this, - SLOT(slotOutgoingMessage(Kopete::Message&))); + TQT_SLOT(slotOutgoingMessage(Kopete::Message&))); - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) slotNewKMM( *it ); // get a pointer to the dcop client @@ -130,16 +130,16 @@ NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const Kopete::CommandHandler::commandHandler()->registerCommand( this, "media", - SLOT( slotMediaCommand( const QString &, Kopete::ChatSession * ) ), + TQT_SLOT( slotMediaCommand( const TQString &, Kopete::ChatSession * ) ), i18n("USAGE: /media - Displays information on current song"), 0 ); - connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) ); + connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) ); // Advert the accounts with the current listened track. - d->advertTimer = new QTimer(this); - connect(d->advertTimer, SIGNAL( timeout() ), this, SLOT( slotAdvertCurrentMusic() ) ); + d->advertTimer = new TQTimer(this); + connect(d->advertTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAdvertCurrentMusic() ) ); d->advertTimer->start(5000); // Update every 5 seconds } @@ -162,9 +162,9 @@ NowListeningPlugin* NowListeningPlugin::plugin() return pluginStatic_ ; } -void NowListeningPlugin::slotMediaCommand( const QString &args, Kopete::ChatSession *theChat ) +void NowListeningPlugin::slotMediaCommand( const TQString &args, Kopete::ChatSession *theChat ) { - QString advert = mediaPlayerAdvert(); + TQString advert = mediaPlayerAdvert(); if ( advert.isEmpty() ) { // Catch no players/no track playing message case: @@ -189,14 +189,14 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg) if(!NowListeningConfig::self()->chatAdvertising()) return; - QString originalBody = msg.plainBody(); + TQString originalBody = msg.plainBody(); // If it is a /media message, don't process it if(originalBody.startsWith(NowListeningConfig::self()->header())) return; // What will be sent - QString newBody; + TQString newBody; // Getting the list of contacts the message will be sent to to determine if at least // one of them has never gotten the current music information. @@ -204,7 +204,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg) bool mustSendAnyway = false; for( Kopete::Contact *c = dest.first() ; c ; c = dest.next() ) { - const QString& cId = c->contactId(); + const TQString& cId = c->contactId(); if( 0 == d->m_musicSentTo.contains( cId ) ) { mustSendAnyway = true; @@ -220,7 +220,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg) // has changed since it was last sent. if ( mustSendAnyway || newTrack ) { - QString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update + TQString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update if( !advert.isEmpty() ) newBody = originalBody + "
" + advert; @@ -252,9 +252,9 @@ void NowListeningPlugin::slotAdvertCurrentMusic() // This slot is called every 5 seconds, so we check if we have a new track playing. if( newTrackPlaying() ) { - QString advert; + TQString advert; - QPtrList accountsList = Kopete::AccountManager::self()->accounts(); + TQPtrList accountsList = Kopete::AccountManager::self()->accounts(); for( Kopete::Account* a = accountsList.first(); a; a = accountsList.next() ) { /* @@ -266,7 +266,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic() */ if( a->protocol()->pluginId() == "MSNProtocol" && !NowListeningConfig::self()->appendStatusAdvertising() ) { - QString track, artist, album, mediaList; + TQString track, artist, album, mediaList; bool isPlaying=false; if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer ) @@ -298,7 +298,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic() // KDE4 TODO: Use the new status message framework, and remove this "hack". if( isPlaying ) { - advert = QString("[Music]%1").arg(mediaList); + advert = TQString("[Music]%1").arg(mediaList); } } @@ -308,21 +308,21 @@ void NowListeningPlugin::slotAdvertCurrentMusic() { // Check for the now listening message in parenthesis, // include the header to not override other messages in parenthesis. - QRegExp statusSong( QString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) ); + TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) ); // HACK: Don't keep appending the now listened song. Replace it in the status message. advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); // Remove the braces when they are no listened song. - QString mediaAdvert = mediaPlayerAdvert(false); + TQString mediaAdvert = mediaPlayerAdvert(false); if(!mediaAdvert.isEmpty()) { if(statusSong.search(advert) != -1) { - advert = advert.replace(statusSong, QString(" (%1)").arg(mediaPlayerAdvert(false)) ); + advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) ); } else { - advert += QString(" (%1)").arg( mediaPlayerAdvert(false) ); + advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) ); } } else @@ -341,10 +341,10 @@ void NowListeningPlugin::slotAdvertCurrentMusic() } } -QString NowListeningPlugin::mediaPlayerAdvert(bool update) +TQString NowListeningPlugin::mediaPlayerAdvert(bool update) { // generate message for all players - QString message; + TQString message; if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer != 0L ) { @@ -363,9 +363,9 @@ QString NowListeningPlugin::mediaPlayerAdvert(bool update) return message; } -void NowListeningPlugin::buildTrackMessage(QString &message, NLMediaPlayer *player, bool update) +void NowListeningPlugin::buildTrackMessage(TQString &message, NLMediaPlayer *player, bool update) { - QString perTrack = NowListeningConfig::self()->perTrack(); + TQString perTrack = NowListeningConfig::self()->perTrack(); if(update) player->update(); @@ -401,17 +401,17 @@ bool NowListeningPlugin::newTrackPlaying(void) const return false; } -QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, - QString in, bool inBrackets ) const +TQString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, + TQString in, bool inBrackets ) const { - QString track = player->track(); - QString artist = player->artist(); - QString album = player->album(); - QString playerName = player->name(); + TQString track = player->track(); + TQString artist = player->artist(); + TQString album = player->album(); + TQString playerName = player->name(); for ( unsigned int i = 0; i < in.length(); i++ ) { - QChar c = in.at( i ); + TQChar c = in.at( i ); //kdDebug(14307) << "Now working on:" << in << " char is: " << c << endl; if ( c == '(' ) { @@ -420,7 +420,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, //kdDebug(14307) << "Looking for ')'" << endl; for ( unsigned int j = i + 1; j < in.length(); j++ ) { - QChar d = in.at( j ); + TQChar d = in.at( j ); //kdDebug(14307) << "Got " << d << endl; if ( d == '(' ) depth++; @@ -430,7 +430,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, if ( depth == 0 ) { // recursively replace contents of matching () - QString substitution = substDepthFirst( player, + TQString substitution = substDepthFirst( player, in.mid( i + 1, j - i - 1), true ) ; in.replace ( i, j - i + 1, substitution ); // perform substitution and return the result @@ -484,7 +484,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, return in; } -void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, QString message ) +void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, TQString message ) { Kopete::ContactPtrList pl = theChat->members(); @@ -522,27 +522,27 @@ void NowListeningPlugin::slotSettingsChanged() updateCurrentMediaPlayer(); disconnect(Kopete::ChatSessionManager::self(), - SIGNAL(aboutToSend(Kopete::Message&)), + TQT_SIGNAL(aboutToSend(Kopete::Message&)), this, - SLOT(slotOutgoingMessage(Kopete::Message&))); + TQT_SLOT(slotOutgoingMessage(Kopete::Message&))); d->advertTimer->stop(); - disconnect(d->advertTimer, SIGNAL(timeout()), this, SLOT(slotAdvertCurrentMusic())); + disconnect(d->advertTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvertCurrentMusic())); if( NowListeningConfig::self()->chatAdvertising() ) { kdDebug(14307) << k_funcinfo << "Now using chat window advertising." << endl; connect(Kopete::ChatSessionManager::self(), - SIGNAL(aboutToSend(Kopete::Message&)), + TQT_SIGNAL(aboutToSend(Kopete::Message&)), this, - SLOT(slotOutgoingMessage(Kopete::Message&))); + TQT_SLOT(slotOutgoingMessage(Kopete::Message&))); } else if( NowListeningConfig::self()->statusAdvertising() || NowListeningConfig::self()->appendStatusAdvertising() ) { kdDebug(14307) << k_funcinfo << "Now using status message advertising." << endl; - connect(d->advertTimer, SIGNAL(timeout()), this, SLOT(slotAdvertCurrentMusic())); + connect(d->advertTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvertCurrentMusic())); d->advertTimer->start(5000); } } diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.h b/kopete/plugins/nowlistening/nowlisteningplugin.h index 7a608fd2..848b8aef 100644 --- a/kopete/plugins/nowlistening/nowlisteningplugin.h +++ b/kopete/plugins/nowlistening/nowlisteningplugin.h @@ -23,7 +23,7 @@ #include "kopeteplugin.h" -#include +#include namespace Kopete { class ChatSession; class Message; } @@ -41,12 +41,12 @@ class NowListeningPlugin : public Kopete::Plugin friend class NowListeningGUIClient; public: - NowListeningPlugin( QObject *parent, const char *name, const QStringList &args ); + NowListeningPlugin( TQObject *parent, const char *name, const TQStringList &args ); virtual ~NowListeningPlugin(); static NowListeningPlugin* plugin(); public slots: - void slotMediaCommand( const QString &, Kopete::ChatSession *theChat ); + void slotMediaCommand( const TQString &, Kopete::ChatSession *theChat ); void slotOutgoingMessage(Kopete::Message&); void slotAdvertCurrentMusic(); @@ -57,17 +57,17 @@ friend class NowListeningGUIClient; * useful to set it to false if one already has called * update somewhere else, for instance in newTrackPlaying(). */ - QString mediaPlayerAdvert(bool update = true); + TQString mediaPlayerAdvert(bool update = true); /** * @internal Build the message for @ref mediaPlayerAdvert - * @param message Reference to the messsage, because return QString cause data loss. + * @param message Reference to the messsage, because return TQString cause data loss. * @param player Pointer to the current Media Player. * Used to get the information about the current track playing. * @param update Whether the players must update their data. It can be * useful to set it to false if one already has called * update somewhere else, for instance in newTrackPlaying(). */ - void buildTrackMessage(QString &message, NLMediaPlayer *player, bool update); + void buildTrackMessage(TQString &message, NLMediaPlayer *player, bool update); /** * @return true if one of the players has changed track since the last message. */ @@ -78,11 +78,11 @@ friend class NowListeningGUIClient; * @p in - the source format string * @p bool - is this call within a set of brackets for conditional expansion? */ - QString substDepthFirst( NLMediaPlayer *player, QString in, bool inBrackets) const; + TQString substDepthFirst( NLMediaPlayer *player, TQString in, bool inBrackets) const; /** * Sends a message to a single chat */ - void advertiseToChat( Kopete::ChatSession* theChat, QString message ); + void advertiseToChat( Kopete::ChatSession* theChat, TQString message ); /** * Update the currentMedia pointer on config change. */ diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp index 179ce3a5..118b37da 100644 --- a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp @@ -17,10 +17,10 @@ * * ************************************************************************* */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -36,22 +36,22 @@ typedef KGenericFactory NowListeningPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_nowlistening, NowListeningPreferencesFactory( "kcm_kopete_nowlistening" ) ) -NowListeningPreferences::NowListeningPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +NowListeningPreferences::NowListeningPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule( NowListeningPreferencesFactory::instance(), parent, args ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new NowListeningPrefsUI( this ); addConfig( NowListeningConfig::self(), preferencesDialog ); // Fill the media player listbox. - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kscd")); - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Noatun")); - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Juk")); - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("amaroK")); - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kaffeine")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kscd")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Noatun")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Juk")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("amaroK")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kaffeine")); #if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("XMMS")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("XMMS")); #endif load(); } diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.h b/kopete/plugins/nowlistening/nowlisteningpreferences.h index 14d9ceea..078b1a0c 100644 --- a/kopete/plugins/nowlistening/nowlisteningpreferences.h +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.h @@ -33,7 +33,7 @@ class NowListeningPreferences : public KCModule { Q_OBJECT public: - NowListeningPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList()); + NowListeningPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); virtual ~NowListeningPreferences(); virtual void save(); virtual void load(); diff --git a/kopete/plugins/smpppdcs/detectordcop.cpp b/kopete/plugins/smpppdcs/detectordcop.cpp index 2536674d..f5f5f992 100644 --- a/kopete/plugins/smpppdcs/detectordcop.cpp +++ b/kopete/plugins/smpppdcs/detectordcop.cpp @@ -23,7 +23,7 @@ #include "detectordcop.h" #include "iconnector.h" -QCString DetectorDCOP::m_kinternetApp = ""; +TQCString DetectorDCOP::m_kinternetApp = ""; DetectorDCOP::DetectorDCOP(IConnector * connector) : Detector(connector) {} @@ -33,7 +33,7 @@ DetectorDCOP::~DetectorDCOP() {} /*! \fn DetectorDCOP::getKInternetDCOP() */ -QCString DetectorDCOP::getKInternetDCOP() const { +TQCString DetectorDCOP::getKInternetDCOP() const { DCOPClient * client = kapp->dcopClient(); if(m_kinternetApp.isEmpty() && client && client->isAttached()) { // get all registered dcop apps and search for kinternet diff --git a/kopete/plugins/smpppdcs/detectordcop.h b/kopete/plugins/smpppdcs/detectordcop.h index 5306998b..6a9602d3 100644 --- a/kopete/plugins/smpppdcs/detectordcop.h +++ b/kopete/plugins/smpppdcs/detectordcop.h @@ -41,11 +41,11 @@ protected: ERROR }; - QCString getKInternetDCOP() const; + TQCString getKInternetDCOP() const; KInternetDCOPState getConnectionStatusDCOP() const; protected: - static QCString m_kinternetApp; + static TQCString m_kinternetApp; }; #endif diff --git a/kopete/plugins/smpppdcs/detectornetstat.cpp b/kopete/plugins/smpppdcs/detectornetstat.cpp index 60dff658..cb9a393a 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.cpp +++ b/kopete/plugins/smpppdcs/detectornetstat.cpp @@ -21,7 +21,7 @@ #include "detectornetstat.h" DetectorNetstat::DetectorNetstat(IConnector* connector) - : Detector(connector), m_buffer(QString::null), m_process(NULL) {} + : Detector(connector), m_buffer(TQString::null), m_process(NULL) {} DetectorNetstat::~DetectorNetstat() { delete m_process; @@ -37,7 +37,7 @@ void DetectorNetstat::checkStatus() const { return; } - m_buffer = QString::null; + m_buffer = TQString::null; // Use KProcess to run netstat -r. We'll then parse the output of // netstat -r in slotProcessStdout() to see if it mentions the @@ -45,8 +45,8 @@ void DetectorNetstat::checkStatus() const { m_process = new KProcess; *m_process << "netstat" << "-r"; - connect(m_process, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotProcessStdout( KProcess *, char *, int))); - connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *))); + connect(m_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotProcessStdout( KProcess *, char *, int))); + connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *))); if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stdout)) { kdWarning(14312) << k_funcinfo << "Unable to start netstat process!" << endl; @@ -59,7 +59,7 @@ void DetectorNetstat::checkStatus() const { void DetectorNetstat::slotProcessStdout(KProcess *, char *buffer, int buflen) { // Look for a default gateway kdDebug(14312) << k_funcinfo << endl; - m_buffer += QString::fromLatin1(buffer, buflen); + m_buffer += TQString::fromLatin1(buffer, buflen); kdDebug(14312) << m_buffer << endl; } @@ -67,7 +67,7 @@ void DetectorNetstat::slotProcessExited(KProcess *process) { kdDebug(14312) << k_funcinfo << m_buffer << endl; if(process == m_process) { m_connector->setConnectedStatus(m_buffer.contains("default")); - m_buffer = QString::null; + m_buffer = TQString::null; delete m_process; m_process = 0L; } diff --git a/kopete/plugins/smpppdcs/detectornetstat.h b/kopete/plugins/smpppdcs/detectornetstat.h index d51a6d97..bd41ae58 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.h +++ b/kopete/plugins/smpppdcs/detectornetstat.h @@ -17,7 +17,7 @@ #ifndef DETECTORNETSTAT_H #define DETECTORNETSTAT_H -#include +#include #include "detector.h" @@ -27,7 +27,7 @@ class IConnector; /** @author Heiko Schäfer */ -class DetectorNetstat : protected QObject, public Detector { +class DetectorNetstat : protected TQObject, public Detector { Q_OBJECT DetectorNetstat(const DetectorNetstat&); @@ -49,7 +49,7 @@ private slots: void slotProcessExited(KProcess *process); private: - mutable QString m_buffer; + mutable TQString m_buffer; mutable KProcess * m_process; }; diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp index 921718b7..e2b1ae19 100644 --- a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp @@ -26,8 +26,8 @@ DetectorNetworkStatus::DetectorNetworkStatus(IConnector* connector) : Detector(connector), m_connManager(NULL) { m_connManager = ConnectionManager::self(); - connect(m_connManager, SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus)), - this, SLOT(statusChanged(const QString&, NetworkStatus::EnumStatus))); + connect(m_connManager, TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus)), + this, TQT_SLOT(statusChanged(const TQString&, NetworkStatus::EnumStatus))); } DetectorNetworkStatus::~DetectorNetworkStatus() {} @@ -36,7 +36,7 @@ void DetectorNetworkStatus::checkStatus() const { // needs to do nothing } -void DetectorNetworkStatus::statusChanged(const QString& host, NetworkStatus::EnumStatus status) { +void DetectorNetworkStatus::statusChanged(const TQString& host, NetworkStatus::EnumStatus status) { switch(status) { case NetworkStatus::Offline: kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Offline" << endl; diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.h b/kopete/plugins/smpppdcs/detectornetworkstatus.h index 20315902..dd3a7394 100644 --- a/kopete/plugins/smpppdcs/detectornetworkstatus.h +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.h @@ -17,7 +17,7 @@ #ifndef DETECTORNETWORKSTATUS_H #define DETECTORNETWORKSTATUS_H -#include +#include #include "detector.h" @@ -27,7 +27,7 @@ class ConnectionManager; /** @author Heiko Schäfer */ -class DetectorNetworkStatus : protected QObject, public Detector +class DetectorNetworkStatus : protected TQObject, public Detector { Q_OBJECT @@ -41,7 +41,7 @@ public: virtual void checkStatus() const; protected slots: - void statusChanged(const QString& host, NetworkStatus::EnumStatus status); + void statusChanged(const TQString& host, NetworkStatus::EnumStatus status); private: ConnectionManager * m_connManager; diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.cpp b/kopete/plugins/smpppdcs/detectorsmpppd.cpp index 35ed1e05..772090d9 100644 --- a/kopete/plugins/smpppdcs/detectorsmpppd.cpp +++ b/kopete/plugins/smpppdcs/detectorsmpppd.cpp @@ -58,7 +58,7 @@ void DetectorSMPPPD::checkStatus() const { SMPPPD::Client c; unsigned int port = SMPPPDCSConfig::self()->port(); - QString server = SMPPPDCSConfig::self()->server(); + TQString server = SMPPPDCSConfig::self()->server(); c.setPassword(SMPPPDCSConfig::self()->password().utf8()); diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.h b/kopete/plugins/smpppdcs/detectorsmpppd.h index 0f72d46d..197fe65b 100644 --- a/kopete/plugins/smpppdcs/detectorsmpppd.h +++ b/kopete/plugins/smpppdcs/detectorsmpppd.h @@ -17,7 +17,7 @@ #ifndef DETECTORSMPPPD_H #define DETECTORSMPPPD_H -#include +#include #include "detectordcop.h" diff --git a/kopete/plugins/smpppdcs/kinternetiface.h b/kopete/plugins/smpppdcs/kinternetiface.h index b0ac8aa7..6e5f0203 100644 --- a/kopete/plugins/smpppdcs/kinternetiface.h +++ b/kopete/plugins/smpppdcs/kinternetiface.h @@ -29,7 +29,7 @@ class KInternetIface : public DCOPObject public: - KInternetIface (const QCString& name) : DCOPObject (name) { } + KInternetIface (const TQCString& name) : DCOPObject (name) { } k_dcop: diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp index d386b669..5ff1654b 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp @@ -22,7 +22,7 @@ using namespace SMPPPD; Client::Client() - : m_state(NULL), m_sock(NULL), m_serverID(QString::null), m_serverVer(QString::null), m_password(QString::null) { + : m_state(NULL), m_sock(NULL), m_serverID(TQString::null), m_serverVer(TQString::null), m_password(TQString::null) { changeState(Unsettled::instance()); } @@ -30,7 +30,7 @@ Client::~Client() { disconnect(); } -bool Client::connect(const QString& server, uint port) { +bool Client::connect(const TQString& server, uint port) { return m_state->connect(this, server, port); } @@ -38,27 +38,27 @@ void Client::disconnect() { m_state->disconnect(this); } -QStringList Client::getInterfaceConfigurations() { +TQStringList Client::getInterfaceConfigurations() { return m_state->getInterfaceConfigurations(this); } -bool Client::statusInterface(const QString& ifcfg) { +bool Client::statusInterface(const TQString& ifcfg) { return m_state->statusInterface(this, ifcfg); } -QString Client::serverID() const { +TQString Client::serverID() const { return m_serverID; } -QString Client::serverVersion() const { +TQString Client::serverVersion() const { return m_serverVer; } -QStringList Client::read() const { - QStringList qsl; +TQStringList Client::read() const { + TQStringList qsl; if(isReady()) { - QDataStream stream(m_sock); + TQDataStream stream(m_sock); char s[1024]; stream.readRawBytes(s, 1023); @@ -78,7 +78,7 @@ QStringList Client::read() const { void Client::write(const char * cmd) { if(isReady()) { - QDataStream stream(m_sock); + TQDataStream stream(m_sock); stream.writeRawBytes(cmd, strlen(cmd)); stream.writeRawBytes("\n", strlen("\n")); m_sock->flush(); @@ -92,7 +92,7 @@ bool Client::isReady() const { bool Client::isOnline() { if(isReady()) { - QStringList ifcfgs = getInterfaceConfigurations(); + TQStringList ifcfgs = getInterfaceConfigurations(); for(uint i = 0; i < ifcfgs.count(); i++) { if(statusInterface(ifcfgs[i])) { return true; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h index a123cd4c..badda45c 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h @@ -17,7 +17,7 @@ #ifndef SMPPPDCLIENT_H #define SMPPPDCLIENT_H -#include +#include namespace KNetwork { class KStreamSocket; @@ -40,38 +40,38 @@ public: bool isReady() const; - bool connect(const QString& server, uint port = 3185); + bool connect(const TQString& server, uint port = 3185); void disconnect(); - QStringList getInterfaceConfigurations(); - bool statusInterface(const QString& ifcfg); + TQStringList getInterfaceConfigurations(); + bool statusInterface(const TQString& ifcfg); bool isOnline(); - QString serverID() const; - QString serverVersion() const; + TQString serverID() const; + TQString serverVersion() const; - void setPassword(const QString& password); + void setPassword(const TQString& password); private: friend class State; void changeState(State * newState); - QStringList read() const; + TQStringList read() const; void write(const char * cmd); private: State * m_state; KNetwork::KStreamSocket * m_sock; - QString m_serverID; - QString m_serverVer; - QString m_password; + TQString m_serverID; + TQString m_serverVer; + TQString m_password; }; inline void Client::changeState(State * newState) { m_state = newState; } -inline void Client::setPassword(const QString& password) { +inline void Client::setPassword(const TQString& password) { m_password = password; } diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp index 421914bb..f51aa301 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -48,33 +48,33 @@ void Ready::disconnect(Client * client) { delete socket(client); setSocket(client, NULL); - setServerID(client, QString::null); - setServerVersion(client, QString::null); + setServerID(client, TQString::null); + setServerVersion(client, TQString::null); } changeState(client, Unsettled::instance()); } -QStringList Ready::getInterfaceConfigurations(Client * client) { +TQStringList Ready::getInterfaceConfigurations(Client * client) { - QStringList ifcfgs; + TQStringList ifcfgs; // we want all ifcfgs kdDebug(14312) << k_funcinfo << "smpppd req: list-ifcfgs" << endl; write(client, "list-ifcfgs"); - QStringList stream = read(client); + TQStringList stream = read(client); kdDebug(14312) << k_funcinfo << "smpppd ack: " << stream[0] << endl; if(stream[0].startsWith("ok")) { - // we have now a QStringList with all ifcfgs + // we have now a TQStringList with all ifcfgs // we extract them and put them in the global ifcfgs-list // stream[1] tells us how many ifcfgs are coming next - QRegExp numIfcfgsRex("^BEGIN IFCFGS ([0-9]+).*"); + TQRegExp numIfcfgsRex("^BEGIN IFCFGS ([0-9]+).*"); if(numIfcfgsRex.exactMatch(stream[1])) { int count_ifcfgs = numIfcfgsRex.cap(1).toInt(); kdDebug(14312) << k_funcinfo << "ifcfgs: " << count_ifcfgs << endl; for(int i = 0; i < count_ifcfgs; i++) { - QRegExp ifcfgRex("^i \"(ifcfg-[a-zA-Z]+[0-9]+)\".*"); + TQRegExp ifcfgRex("^i \"(ifcfg-[a-zA-Z]+[0-9]+)\".*"); if(ifcfgRex.exactMatch(stream[i+2])) { ifcfgs.push_back(ifcfgRex.cap(1)); } @@ -85,14 +85,14 @@ QStringList Ready::getInterfaceConfigurations(Client * client) { return ifcfgs; } -bool Ready::statusInterface(Client * client, const QString& ifcfg) { +bool Ready::statusInterface(Client * client, const TQString& ifcfg) { - QString cmd = "list-status " + ifcfg; + TQString cmd = "list-status " + ifcfg; write(client, cmd.latin1()); socket(client)->waitForMore(0); - QStringList stream = read(client); + TQStringList stream = read(client); if(stream[0].startsWith("ok")) { if(stream[2].startsWith("status connected")) { diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h index 9ec3ab93..f3be8667 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h @@ -37,8 +37,8 @@ public: static Ready * instance(); virtual void disconnect(Client * client); - virtual QStringList getInterfaceConfigurations(Client * client); - virtual bool statusInterface(Client * client, const QString& ifcfg); + virtual TQStringList getInterfaceConfigurations(Client * client); + virtual bool statusInterface(Client * client, const TQString& ifcfg); private: static Ready * m_instance; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp index 9e4bd508..8ae0f1d4 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp @@ -25,7 +25,7 @@ State::State() {} State::~State() {} -QStringList State::read(Client * client) const { +TQStringList State::read(Client * client) const { return client->read(); } @@ -41,19 +41,19 @@ KNetwork::KStreamSocket * State::socket(Client * client) const { return client->m_sock; } -QString State::password(Client * client) const { +TQString State::password(Client * client) const { return client->m_password; } -void State::setPassword(Client * client, const QString& pass) { +void State::setPassword(Client * client, const TQString& pass) { client->m_password = pass; } -void State::setServerID(Client * client, const QString& id) { +void State::setServerID(Client * client, const TQString& id) { client->m_serverID = id; } -void State::setServerVersion(Client * client, const QString& ver) { +void State::setServerVersion(Client * client, const TQString& ver) { client->m_serverVer = ver; } @@ -61,16 +61,16 @@ void State::setSocket(Client * client, KNetwork::KStreamSocket * sock) { client->m_sock = sock; } -bool State::connect(Client * /* client */, const QString& /* server */, uint /* port */) { +bool State::connect(Client * /* client */, const TQString& /* server */, uint /* port */) { return false; } void State::disconnect(Client * /* client */) {} -QStringList State::getInterfaceConfigurations(Client * /* client */) { - return QStringList(); +TQStringList State::getInterfaceConfigurations(Client * /* client */) { + return TQStringList(); } -bool State::statusInterface(Client * /* client */, const QString& /* ifcfg */) { +bool State::statusInterface(Client * /* client */, const TQString& /* ifcfg */) { return false; } diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h index 0e7d393b..8f1ac32e 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h @@ -17,7 +17,7 @@ #ifndef SMPPPDSTATE_H #define SMPPPDSTATE_H -#include +#include namespace SMPPPD { @@ -34,22 +34,22 @@ public: State(); virtual ~State(); - virtual bool connect(Client * client, const QString& server, uint port = 3185); + virtual bool connect(Client * client, const TQString& server, uint port = 3185); virtual void disconnect(Client * client); - virtual QStringList getInterfaceConfigurations(Client * client); - virtual bool statusInterface(Client * client, const QString& ifcfg); + virtual TQStringList getInterfaceConfigurations(Client * client); + virtual bool statusInterface(Client * client, const TQString& ifcfg); protected: - QStringList read(Client * client) const; + TQStringList read(Client * client) const; void write(Client * client, const char * cmd); void changeState(Client * client, State * state); KNetwork::KStreamSocket * socket(Client * client) const; void setSocket(Client * client, KNetwork::KStreamSocket * sock); - QString password(Client * client) const; - void setPassword(Client * client, const QString& pass); - void setServerID(Client * client, const QString& id); - void setServerVersion(Client * client, const QString& ver); + TQString password(Client * client) const; + void setPassword(Client * client, const TQString& pass); + void setServerID(Client * client, const TQString& id); + void setServerVersion(Client * client, const TQString& ver); }; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp index 7ed5f516..3d1f8a79 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -41,12 +41,12 @@ Unsettled * Unsettled::instance() { return m_instance; } -bool Unsettled::connect(Client * client, const QString& server, uint port) { +bool Unsettled::connect(Client * client, const TQString& server, uint port) { if(!socket(client) || socket(client)->state() != KNetwork::KStreamSocket::Connected || socket(client)->state() != KNetwork::KStreamSocket::Connecting) { - QString resolvedServer = server; + TQString resolvedServer = server; changeState(client, Ready::instance()); disconnect(client); @@ -58,7 +58,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { if(resolver.wait(500)) { KNetwork::KResolverResults results = resolver.results(); if(!results.empty()) { - QString ip = results[0].address().asInet().ipAddress().toString(); + TQString ip = results[0].address().asInet().ipAddress().toString(); kdDebug(14312) << k_funcinfo << "Found IP-Address for " << server << ": " << ip << endl; resolvedServer = ip; } else { @@ -70,7 +70,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { return false; } - setSocket(client, new KNetwork::KStreamSocket(resolvedServer, QString::number(port))); + setSocket(client, new KNetwork::KStreamSocket(resolvedServer, TQString::number(port))); socket(client)->setBlocking(TRUE); if(!socket(client)->connect()) { @@ -78,25 +78,25 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { } else { kdDebug(14312) << k_funcinfo << "Successfully connected to smpppd \"" << server << ":" << port << "\"" << endl; - static QString verRex = "^SuSE Meta pppd \\(smpppd\\), Version (.*)$"; - static QString clgRex = "^challenge = (.*)$"; + static TQString verRex = "^SuSE Meta pppd \\(smpppd\\), Version (.*)$"; + static TQString clgRex = "^challenge = (.*)$"; - QRegExp ver(verRex); - QRegExp clg(clgRex); + TQRegExp ver(verRex); + TQRegExp clg(clgRex); - QString response = read(client)[0]; + TQString response = read(client)[0]; - if(response != QString::null && + if(response != TQString::null && ver.exactMatch(response)) { setServerID(client, response); setServerVersion(client, ver.cap(1)); changeState(client, Ready::instance()); return true; - } else if(response != QString::null && + } else if(response != TQString::null && clg.exactMatch(response)) { - if(password(client) != QString::null) { + if(password(client) != TQString::null) { // we are challenged, ok, respond - write(client, QString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); + write(client, TQString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); response = read(client)[0]; if(ver.exactMatch(response)) { setServerID(client, response); @@ -119,7 +119,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { return false; } -QString Unsettled::make_response(const QString& chex, const QString& password) const { +TQString Unsettled::make_response(const TQString& chex, const TQString& password) const { int size = chex.length (); if (size & 1) @@ -127,9 +127,9 @@ QString Unsettled::make_response(const QString& chex, const QString& password) c size >>= 1; // convert challenge from hex to bin - QString cbin; + TQString cbin; for (int i = 0; i < size; i++) { - QString tmp = chex.mid (2 * i, 2); + TQString tmp = chex.mid (2 * i, 2); cbin.append ((char) strtol (tmp.ascii (), 0, 16)); } @@ -142,7 +142,7 @@ QString Unsettled::make_response(const QString& chex, const QString& password) c MD5_Final (rbin, &md5); // convert response from bin to hex - QString rhex; + TQString rhex; for (int i = 0; i < MD5_DIGEST_LENGTH; i++) { char buffer[3]; snprintf (buffer, 3, "%02x", rbin[i]); diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h index 57a83752..bf19035e 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h @@ -35,10 +35,10 @@ public: static Unsettled * instance(); - virtual bool connect(Client * client, const QString& server, uint port = 3185); + virtual bool connect(Client * client, const TQString& server, uint port = 3185); private: - QString make_response(const QString& chex, const QString& password) const; + TQString make_response(const TQString& chex, const TQString& password) const; private: static Unsettled * m_instance; diff --git a/kopete/plugins/smpppdcs/smpppdcsiface.h b/kopete/plugins/smpppdcs/smpppdcsiface.h index face60ad..7bd8febe 100644 --- a/kopete/plugins/smpppdcs/smpppdcsiface.h +++ b/kopete/plugins/smpppdcs/smpppdcsiface.h @@ -29,7 +29,7 @@ class SMPPPDCSIFace : virtual public DCOPObject k_dcop: - virtual QString detectionMethod() const = 0; + virtual TQString detectionMethod() const = 0; virtual bool isOnline() const = 0; }; diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp index 2ed8455c..f17f2ca9 100644 --- a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp +++ b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp @@ -19,7 +19,7 @@ #include "onlineinquiry.h" #include "smpppdcsplugin.h" -#include +#include #include #include @@ -37,7 +37,7 @@ typedef KGenericFactory SMPPPDCSPluginFactory; K_EXPORT_COMPONENT_FACTORY(kopete_smpppdcs, SMPPPDCSPluginFactory("kopete_smpppdcs")) -SMPPPDCSPlugin::SMPPPDCSPlugin(QObject *parent, const char * name, const QStringList& /* args */) +SMPPPDCSPlugin::SMPPPDCSPlugin(TQObject *parent, const char * name, const TQStringList& /* args */) : DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), parent, name), m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworkStatus(NULL), m_timer(NULL), m_onlineInquiry(NULL) { @@ -56,13 +56,13 @@ m_onlineInquiry(NULL) { // we wait for the allPluginsLoaded signal, to connect // as early as possible after startup, but not before // all accounts are ready - connect(Kopete::PluginManager::self(), SIGNAL(allPluginsLoaded()), - this, SLOT(allPluginsLoaded())); + connect(Kopete::PluginManager::self(), TQT_SIGNAL(allPluginsLoaded()), + this, TQT_SLOT(allPluginsLoaded())); // if kopete was already running and the plugin // was loaded later, we check once after 15 secs // if all other plugins have been loaded - QTimer::singleShot(15000, this, SLOT(allPluginsLoaded())); + TQTimer::singleShot(15000, this, TQT_SLOT(allPluginsLoaded())); } SMPPPDCSPlugin::~SMPPPDCSPlugin() { @@ -79,8 +79,8 @@ SMPPPDCSPlugin::~SMPPPDCSPlugin() { void SMPPPDCSPlugin::allPluginsLoaded() { if(Kopete::PluginManager::self()->isAllPluginsLoaded()) { - m_timer = new QTimer(); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotCheckStatus())); + m_timer = new TQTimer(); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus())); if(SMPPPDCSConfig::self()->useSmpppd()) { m_timer->start(30000); @@ -137,10 +137,10 @@ void SMPPPDCSPlugin::setConnectedStatus( bool connected ) { void SMPPPDCSPlugin::connectAllowed() { - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); Kopete::AccountManager * m = Kopete::AccountManager::self(); - for(QPtrListIterator it(m->accounts()) + for(TQPtrListIterator it(m->accounts()) ; it.current(); ++it) { @@ -162,10 +162,10 @@ void SMPPPDCSPlugin::connectAllowed() { void SMPPPDCSPlugin::disconnectAllowed() { - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); Kopete::AccountManager * m = Kopete::AccountManager::self(); - for(QPtrListIterator it(m->accounts()) + for(TQPtrListIterator it(m->accounts()) ; it.current(); ++it) { @@ -184,7 +184,7 @@ void SMPPPDCSPlugin::disconnectAllowed() { } } -QString SMPPPDCSPlugin::detectionMethod() const { +TQString SMPPPDCSPlugin::detectionMethod() const { if(SMPPPDCSConfig::self()->useSmpppd()) { return "smpppd"; } else { @@ -193,11 +193,11 @@ QString SMPPPDCSPlugin::detectionMethod() const { } /*! - \fn SMPPPDCSPlugin::smpppdServerChanged(const QString& server) + \fn SMPPPDCSPlugin::smpppdServerChanged(const TQString& server) */ -void SMPPPDCSPlugin::smpppdServerChanged(const QString& server) { +void SMPPPDCSPlugin::smpppdServerChanged(const TQString& server) { - QString oldServer = SMPPPDCSConfig::self()->server().utf8(); + TQString oldServer = SMPPPDCSConfig::self()->server().utf8(); if(oldServer != server) { kdDebug(14312) << k_funcinfo << "Detected a server change" << endl; diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.h b/kopete/plugins/smpppdcs/smpppdcsplugin.h index 789d9c41..5c4ba2e6 100644 --- a/kopete/plugins/smpppdcs/smpppdcsplugin.h +++ b/kopete/plugins/smpppdcs/smpppdcsplugin.h @@ -55,7 +55,7 @@ public: /** * @brief Creates an SMPPPDCSPlugin instance */ - SMPPPDCSPlugin( QObject *parent, const char *name, const QStringList &args ); + SMPPPDCSPlugin( TQObject *parent, const char *name, const TQStringList &args ); /** * @brief Destroys an SMPPPDCSPlugin instance @@ -78,12 +78,12 @@ public: */ virtual void setConnectedStatus( bool newStatus ); - virtual QString detectionMethod() const; + virtual TQString detectionMethod() const; virtual void aboutToUnload(); public slots: - void smpppdServerChanged(const QString& server); + void smpppdServerChanged(const TQString& server); private slots: void slotCheckStatus(); @@ -100,7 +100,7 @@ private: Detector * m_detectorNetstat; Detector * m_detectorNetworkStatus; bool m_pluginConnected; - QTimer * m_timer; + TQTimer * m_timer; OnlineInquiry * m_onlineInquiry; }; diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp index ddce3572..671008bc 100644 --- a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp +++ b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp @@ -14,9 +14,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -35,17 +35,17 @@ typedef KGenericFactory SMPPPDCSPreferencesFactory; K_EXPORT_COMPONENT_FACTORY(kcm_kopete_smpppdcs, SMPPPDCSPreferencesFactory("kcm_kopete_smpppdcs")) -SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name */, const QStringList& args) +SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * parent, const char * /* name */, const TQStringList& args) : KCModule(SMPPPDCSPreferencesFactory::instance(), parent, args), m_ui(NULL) { Kopete::AccountManager * manager = Kopete::AccountManager::self(); - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); m_ui = new SMPPPDCSPrefs(this); - for(QPtrListIterator it(manager->accounts()); it.current(); ++it) + for(TQPtrListIterator it(manager->accounts()); it.current(); ++it) { - QString protoName; - QRegExp rex("(.*)Protocol"); + TQString protoName; + TQRegExp rex("(.*)Protocol"); if(rex.search((*it)->protocol()->pluginId()) > -1) { protoName = rex.cap(1); @@ -54,11 +54,11 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name } if(it.current()->inherits("Kopete::ManagedConnectionAccount")) { - protoName += QString(", %1").arg(i18n("connection status is managed by Kopete")); + protoName += TQString(", %1").arg(i18n("connection status is managed by Kopete")); } - QCheckListItem * cli = new QCheckListItem(m_ui->accountList, - (*it)->accountId() + " (" + protoName + ")", QCheckListItem::CheckBox); + TQCheckListItem * cli = new TQCheckListItem(m_ui->accountList, + (*it)->accountId() + " (" + protoName + ")", TQCheckListItem::CheckBox); cli->setPixmap(0, (*it)->accountIcon()); m_accountMapOld[cli->text(0)] = AccountPrivMap(FALSE, (*it)->protocol()->pluginId() + "_" + (*it)->accountId()); @@ -66,15 +66,15 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name m_ui->accountList->insertItem(cli); } - connect(m_ui->accountList, SIGNAL(clicked(QListViewItem *)), this, SLOT(listClicked(QListViewItem *))); + connect(m_ui->accountList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(listClicked(TQListViewItem *))); // connect for modified - connect(m_ui->useNetstat, SIGNAL(clicked()), this, SLOT(slotModified())); - connect(m_ui->useSmpppd, SIGNAL(clicked()), this, SLOT(slotModified())); + connect(m_ui->useNetstat, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModified())); + connect(m_ui->useSmpppd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->server, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->port, SIGNAL(valueChanged(int)), this, SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->Password, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->server, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->port, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->Password, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotModified())); load(); } @@ -83,9 +83,9 @@ SMPPPDCSPreferences::~SMPPPDCSPreferences() { delete m_ui; } -void SMPPPDCSPreferences::listClicked(QListViewItem * item) +void SMPPPDCSPreferences::listClicked(TQListViewItem * item) { - QCheckListItem * cli = dynamic_cast(item); + TQCheckListItem * cli = dynamic_cast(item); if(cli->isOn() != m_accountMapCur[cli->text(0)].m_on) { AccountMap::iterator itOld = m_accountMapOld.begin(); @@ -105,9 +105,9 @@ void SMPPPDCSPreferences::listClicked(QListViewItem * item) void SMPPPDCSPreferences::defaults() { - QListViewItemIterator it(m_ui->accountList); + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast(it.current()); + TQCheckListItem * cli = dynamic_cast(it.current()); cli->setOn(FALSE); ++it; } @@ -127,12 +127,12 @@ void SMPPPDCSPreferences::load() SMPPPDCSConfig::self()->readConfig(); - static QString rexStr = "^(.*) \\((.*)\\)"; - QRegExp rex(rexStr); - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); - QListViewItemIterator it(m_ui->accountList); + static TQString rexStr = "^(.*) \\((.*)\\)"; + TQRegExp rex(rexStr); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast(it.current()); + TQCheckListItem * cli = dynamic_cast(it.current()); if(rex.search(cli->text(0)) > -1) { bool isOn = list.contains(rex.cap(2) + "Protocol_" + rex.cap(1)); // m_accountMapOld[cli->text(0)].m_on = isOn; @@ -154,11 +154,11 @@ void SMPPPDCSPreferences::load() void SMPPPDCSPreferences::save() { - QStringList list; - QListViewItemIterator it(m_ui->accountList); + TQStringList list; + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast(it.current()); + TQCheckListItem * cli = dynamic_cast(it.current()); if(cli->isOn()) { list.append(m_accountMapCur[cli->text(0)].m_id); } diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.h b/kopete/plugins/smpppdcs/smpppdcspreferences.h index 8bbeff69..dba3470b 100644 --- a/kopete/plugins/smpppdcs/smpppdcspreferences.h +++ b/kopete/plugins/smpppdcs/smpppdcspreferences.h @@ -25,10 +25,10 @@ class SMPPPDCSPrefs; class AccountPrivMap { public: - AccountPrivMap(bool isOn = FALSE, const QString& id = QString::null) + AccountPrivMap(bool isOn = FALSE, const TQString& id = TQString::null) : m_on(isOn), m_id(id) {} bool m_on; - QString m_id; + TQString m_id; }; /** @@ -43,12 +43,12 @@ class SMPPPDCSPreferences : public KCModule { SMPPPDCSPreferences& operator=(const SMPPPDCSPreferences&); public: - typedef QMap AccountMap; + typedef TQMap AccountMap; /** * @brief Creates an SMPPPDCSPreferences instance */ - SMPPPDCSPreferences(QWidget * parent = 0, const char * name = 0, const QStringList &args = QStringList()); + SMPPPDCSPreferences(TQWidget * parent = 0, const char * name = 0, const TQStringList &args = TQStringList()); /** * @brief Destroys an SMPPPDCSPreferences instance @@ -60,7 +60,7 @@ public: virtual void defaults(); protected slots: - void listClicked(QListViewItem * item); + void listClicked(TQListViewItem * item); private slots: void slotModified(); diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp index 5a834c97..4dbedc54 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp +++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -35,7 +35,7 @@ #include "smpppdcsprefsimpl.h" #include "smpppdsearcher.h" -SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl) +SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* parent, const char* name, WFlags fl) : SMPPPDCSPrefsBase(parent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) { // search for our main-plugin instance @@ -45,17 +45,17 @@ SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl) } // signals and slots connections - connect(useNetstat, SIGNAL(toggled(bool)), this, SLOT(disableSMPPPDSettings())); - connect(useSmpppd, SIGNAL(toggled(bool)), this, SLOT(enableSMPPPDSettings())); - connect(autoCSTest, SIGNAL(clicked()), this, SLOT(determineCSType())); + connect(useNetstat, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(disableSMPPPDSettings())); + connect(useSmpppd, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableSMPPPDSettings())); + connect(autoCSTest, TQT_SIGNAL(clicked()), this, TQT_SLOT(determineCSType())); if(m_plugin) { - connect((QObject *)SMPPPDLocation->server, SIGNAL(textChanged(const QString&)), - m_plugin, SLOT(smpppdServerChanged(const QString&))); + connect((TQObject *)SMPPPDLocation->server, TQT_SIGNAL(textChanged(const TQString&)), + m_plugin, TQT_SLOT(smpppdServerChanged(const TQString&))); } // if netstat is NOT available, disable the option and set to SMPPPD - if(KStandardDirs::findExe("netstat") == QString::null) { + if(KStandardDirs::findExe("netstat") == TQString::null) { autoCSTest->setEnabled(FALSE); useNetstat->setEnabled(FALSE); useNetstat->setChecked(FALSE); @@ -79,11 +79,11 @@ void SMPPPDCSPrefs::determineCSType() { SMPPPDSearcher searcher; m_curSearcher = &searcher; - connect(&searcher, SIGNAL(smpppdFound(const QString&)), this, SLOT(smpppdFound(const QString&))); - connect(&searcher, SIGNAL(smpppdNotFound()), this, SLOT(smpppdNotFound())); - connect(&searcher, SIGNAL(scanStarted(uint)), this, SLOT(scanStarted(uint))); - connect(&searcher, SIGNAL(scanProgress(uint)), this, SLOT(scanProgress(uint))); - connect(&searcher, SIGNAL(scanFinished()), this, SLOT(scanFinished())); + connect(&searcher, TQT_SIGNAL(smpppdFound(const TQString&)), this, TQT_SLOT(smpppdFound(const TQString&))); + connect(&searcher, TQT_SIGNAL(smpppdNotFound()), this, TQT_SLOT(smpppdNotFound())); + connect(&searcher, TQT_SIGNAL(scanStarted(uint)), this, TQT_SLOT(scanStarted(uint))); + connect(&searcher, TQT_SIGNAL(scanProgress(uint)), this, TQT_SLOT(scanProgress(uint))); + connect(&searcher, TQT_SIGNAL(scanFinished()), this, TQT_SLOT(scanFinished())); searcher.searchNetwork(); m_curSearcher = NULL; @@ -99,7 +99,7 @@ void SMPPPDCSPrefs::scanStarted(uint total) { m_scanProgressDlg->setAllowCancel(TRUE); m_scanProgressDlg->setMinimumDuration(2000); - connect(m_scanProgressDlg, SIGNAL(cancelClicked()), this, SLOT(cancelScanning())); + connect(m_scanProgressDlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelScanning())); } m_scanProgressDlg->progressBar()->setTotalSteps(total); m_scanProgressDlg->progressBar()->setProgress(0); @@ -117,10 +117,10 @@ void SMPPPDCSPrefs::cancelScanning() { m_curSearcher->cancelSearch(); } -void SMPPPDCSPrefs::smpppdFound(const QString& host) { +void SMPPPDCSPrefs::smpppdFound(const TQString& host) { kdDebug(14312) << k_funcinfo << endl; - QString myHost = host; + TQString myHost = host; // try to get the domain name struct in_addr addr; diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h index 181ba9fa..4dcbe46b 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h +++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h @@ -17,7 +17,7 @@ #ifndef SMPPPDCSPREFSIMPL_H #define SMPPPDCSPREFSIMPL_H -#include +#include #include @@ -38,7 +38,7 @@ class SMPPPDCSPrefs : public SMPPPDCSPrefsBase public: - SMPPPDCSPrefs(QWidget* parent, const char* name = 0, WFlags fl = 0); + SMPPPDCSPrefs(TQWidget* parent, const char* name = 0, WFlags fl = 0); ~SMPPPDCSPrefs(); signals: @@ -48,7 +48,7 @@ protected slots: void enableSMPPPDSettings(); void disableSMPPPDSettings(); void determineCSType(); - void smpppdFound(const QString & host); + void smpppdFound(const TQString & host); void smpppdNotFound(); void scanStarted(uint total); void scanProgress(uint cur); diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp index b20509d9..44de2552 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp +++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp @@ -18,12 +18,12 @@ #include "smpppdlocationwidget.h" -SMPPPDLocationWidget::SMPPPDLocationWidget(QWidget* parent, const char* name, WFlags fl) +SMPPPDLocationWidget::SMPPPDLocationWidget(TQWidget* parent, const char* name, WFlags fl) : SMPPPDLocationWidgetBase(parent, name, fl) {} SMPPPDLocationWidget::~SMPPPDLocationWidget() {} -void SMPPPDLocationWidget::setServer(const QString& serv) { +void SMPPPDLocationWidget::setServer(const TQString& serv) { server->setText(serv); } diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.h b/kopete/plugins/smpppdcs/smpppdlocationwidget.h index 00fa9157..16d1edfb 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationwidget.h +++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.h @@ -30,10 +30,10 @@ class SMPPPDLocationWidget : public SMPPPDLocationWidgetBase SMPPPDLocationWidget& operator=(const SMPPPDLocationWidget&); public: - SMPPPDLocationWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); + SMPPPDLocationWidget(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0); ~SMPPPDLocationWidget(); - void setServer(const QString& serv); + void setServer(const TQString& serv); }; #endif diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.cpp b/kopete/plugins/smpppdcs/smpppdsearcher.cpp index 6ee9c878..a06e30a9 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.cpp +++ b/kopete/plugins/smpppdcs/smpppdsearcher.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -46,7 +46,7 @@ void SMPPPDSearcher::searchNetwork() { m_procNetstat->setEnvironment("LANG", "C"); // we want to force english output *m_procNetstat << "/bin/netstat" << "-rn"; - connect(m_procNetstat, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int))); + connect(m_procNetstat, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int))); if(!m_procNetstat->start(KProcess::Block, KProcess::Stdout)) { kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/netstat -rn" << endl << "Perhaps the package net-tools isn't installed." << endl; @@ -64,11 +64,11 @@ void SMPPPDSearcher::searchNetwork() { void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) { kdDebug(14312) << k_funcinfo << endl; - QString myBuf = QString::fromLatin1(buf,len); - QRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"); + TQString myBuf = TQString::fromLatin1(buf,len); + TQRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"); // tokenize the string into lines - QStringList toks = QStringList::split("\n", myBuf); - for(QStringList::size_type i = 0; i < toks.count(); i++) { + TQStringList toks = TQStringList::split("\n", myBuf); + for(TQStringList::size_type i = 0; i < toks.count(); i++) { if(rex.exactMatch(toks[i])) { if(scan(rex.cap(1), rex.cap(2))) { return; @@ -81,8 +81,8 @@ void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * bu void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf, int len) { kdDebug(14312) << k_funcinfo << endl; - QRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*"); - QString myBuf = QString::fromLatin1(buf,len); + TQRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*"); + TQString myBuf = TQString::fromLatin1(buf,len); if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) { // if netstat -r found no gateway we search the network @@ -90,7 +90,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf m_procIfconfig->setEnvironment("LANG", "C"); // we want to force english output *m_procIfconfig << "/sbin/ifconfig"; - connect(m_procIfconfig, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int))); + connect(m_procIfconfig, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int))); if(!m_procIfconfig->start(KProcess::Block, KProcess::Stdout)) { kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/ifconfig" << endl << "Perhaps the package net-tools isn't installed." << endl; @@ -105,7 +105,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf /*! \fn SMPPPDSearcher::scan() const */ -bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { +bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) { kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << mask << "..." << endl; SMPPPD::Client client; @@ -124,12 +124,12 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { uint max_range = 255; // calculate ip range (only last mask entry) - QRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"); + TQRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"); if(lastRex.exactMatch(ip)) { uint lastWordIP = lastRex.cap(4).toUInt(); - QStringList ipToks; + TQStringList ipToks; for(int i = 1; i < 5; i++) { ipToks.push_back(lastRex.cap(i)); } @@ -164,7 +164,7 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { emit scanProgress(i); } - if(client.connect(QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)), 3185)) { + if(client.connect(TQString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + TQString::number(i)), 3185)) { client.disconnect(); emit smpppdFound(ip); if(range > 1) { @@ -174,7 +174,7 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { } #ifndef NDEBUG else { - kdDebug(14312) << k_funcinfo << "No smpppd found at " << QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)) << endl; + kdDebug(14312) << k_funcinfo << "No smpppd found at " << TQString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + TQString::number(i)) << endl; } #endif } diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.h b/kopete/plugins/smpppdcs/smpppdsearcher.h index af36637d..81c9cb03 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.h +++ b/kopete/plugins/smpppdcs/smpppdsearcher.h @@ -28,7 +28,7 @@ class KProcess; * @todo Use of the SLP to find the smpppd * @author Heiko Schäfer */ -class SMPPPDSearcher : public QObject { +class SMPPPDSearcher : public TQObject { Q_OBJECT SMPPPDSearcher(const SMPPPDSearcher&); @@ -65,7 +65,7 @@ protected: * @param mask the network mask * @return TRUE if an smpppd was found */ - bool scan(const QString& ip, const QString& mask); + bool scan(const TQString& ip, const TQString& mask); signals: /** @@ -73,7 +73,7 @@ signals: * * @param host the host there the smpppd was found */ - void smpppdFound(const QString& host); + void smpppdFound(const TQString& host); /** * @brief No smpppd was found diff --git a/kopete/plugins/smpppdcs/unittest/clienttest.cpp b/kopete/plugins/smpppdcs/unittest/clienttest.cpp index 5affd83c..f668135f 100644 --- a/kopete/plugins/smpppdcs/unittest/clienttest.cpp +++ b/kopete/plugins/smpppdcs/unittest/clienttest.cpp @@ -45,7 +45,7 @@ void ClientTest::testConnect() { void ClientTest::testCommunicationBeforeConnect() { SMPPPD::Client c; - QStringList l = c.getInterfaceConfigurations(); + TQStringList l = c.getInterfaceConfigurations(); CHECK(l.count() == 0, true); CHECK(c.statusInterface("ifcfg0"), false); @@ -53,12 +53,12 @@ void ClientTest::testCommunicationBeforeConnect() { void ClientTest::testServerIDBeforeConnect() { SMPPPD::Client c; - CHECK(c.serverID(), QString::null); + CHECK(c.serverID(), TQString::null); } void ClientTest::testServerVersionBeforeConnect() { SMPPPD::Client c; - CHECK(c.serverVersion(), QString::null); + CHECK(c.serverVersion(), TQString::null); } void ClientTest::testCommunicationAfterConnect() { @@ -102,7 +102,7 @@ void ClientTest::testServerIDAfterDisconnect() { SMPPPD::Client c; if(c.connect("warwar", 3185)) { c.disconnect(); - CHECK(c.serverID(), QString::null); + CHECK(c.serverID(), TQString::null); } else { SKIP("Test skipped because no smpppd at warwar:3185"); } @@ -112,7 +112,7 @@ void ClientTest::testServerVersionAfterDisconnect() { SMPPPD::Client c; if(c.connect("warwar", 3185)) { c.disconnect(); - CHECK(c.serverVersion(), QString::null); + CHECK(c.serverVersion(), TQString::null); } else { SKIP("Test skipped because no smpppd at warwar:3185"); } diff --git a/kopete/plugins/statistics/statisticscontact.cpp b/kopete/plugins/statistics/statisticscontact.cpp index e9068fe5..821b8f59 100644 --- a/kopete/plugins/statistics/statisticscontact.cpp +++ b/kopete/plugins/statistics/statisticscontact.cpp @@ -16,8 +16,8 @@ #include -#include -#include +#include +#include #include #include @@ -31,7 +31,7 @@ StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldStatus(Kopete::OnlineStatus::Unknown) { m_isChatWindowOpen = false; - m_oldStatusDateTime = QDateTime::currentDateTime(); + m_oldStatusDateTime = TQDateTime::currentDateTime(); // Last*Changed are always false at start m_timeBetweenTwoMessagesChanged = false; @@ -48,9 +48,9 @@ StatisticsContact::~StatisticsContact() if (m_statisticsContactId.isEmpty()) return; - commonStatsSave("timebetweentwomessages",QString::number(m_timeBetweenTwoMessages), - QString::number(m_timeBetweenTwoMessagesOn), m_timeBetweenTwoMessagesChanged); - commonStatsSave("messagelength",QString::number(m_messageLength), QString::number(m_messageLengthOn), m_messageLengthChanged); + commonStatsSave("timebetweentwomessages",TQString::number(m_timeBetweenTwoMessages), + TQString::number(m_timeBetweenTwoMessagesOn), m_timeBetweenTwoMessagesChanged); + commonStatsSave("messagelength",TQString::number(m_messageLength), TQString::number(m_messageLengthOn), m_messageLengthChanged); commonStatsSave("lasttalk", m_lastTalk.toString(), "", m_lastTalkChanged); commonStatsSave("lastpresent", m_lastPresent.toString(), "", m_lastPresentChanged); } @@ -58,7 +58,7 @@ StatisticsContact::~StatisticsContact() void StatisticsContact::initialize(Kopete::Contact *c) { // Generate statisticsContactId or get it from database - QStringList buffer = m_db->query(QString("SELECT statisticid FROM contacts " + TQStringList buffer = m_db->query(TQString("SELECT statisticid FROM contacts " "WHERE contactid LIKE '%1';" ).arg(c->contactId())); @@ -66,7 +66,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) { // Check if we don't have old data if ( !c->metaContact()->metaContactId().isEmpty() && - !m_db->query(QString("SELECT metacontactid FROM commonstats " + !m_db->query(TQString("SELECT metacontactid FROM commonstats " "WHERE metacontactid LIKE '%1';" ).arg(c->metaContact()->metaContactId())).isEmpty()) { @@ -80,7 +80,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) } // Assign contactId to m_statisticsContactId - m_db->query(QString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" + m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" ).arg(m_statisticsContactId).arg(c->contactId())); } else @@ -94,8 +94,8 @@ void StatisticsContact::initialize(Kopete::Contact *c) commonStatsCheck("messagelength", m_messageLength, m_messageLengthOn, 0, 0); // Check for last talk - QString lastTalk; - QString dummy = ""; + TQString lastTalk; + TQString dummy = ""; commonStatsCheck("lasttalk", lastTalk, dummy); if (lastTalk.isEmpty()) { @@ -103,15 +103,15 @@ void StatisticsContact::initialize(Kopete::Contact *c) m_lastTalkChanged = true; } else - m_lastTalk = QDateTime::fromString(lastTalk); + m_lastTalk = TQDateTime::fromString(lastTalk); // Get last time a message was received - m_lastMessageReceived = QDateTime::currentDateTime(); + m_lastMessageReceived = TQDateTime::currentDateTime(); // Check for lastPresent - QString lastPresent = ""; + TQString lastPresent = ""; commonStatsCheck("lastpresent", lastPresent, dummy); if (lastPresent.isEmpty()) { @@ -119,7 +119,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) m_lastPresentChanged = true; } else - m_lastPresent = QDateTime::fromString(lastPresent); + m_lastPresent = TQDateTime::fromString(lastPresent); } void StatisticsContact::contactAdded( Kopete::Contact *c ) @@ -127,12 +127,12 @@ void StatisticsContact::contactAdded( Kopete::Contact *c ) if ( !m_statisticsContactId.isEmpty() ) { // Check if contact is allready in database if not add it - if (m_db->query(QString("SELECT id FROM contacts " + if (m_db->query(TQString("SELECT id FROM contacts " "WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" ).arg(m_statisticsContactId).arg(c->contactId())).isEmpty()) { // Assign contactId to m_statisticsContactId - m_db->query(QString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" + m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" ).arg(m_statisticsContactId).arg(c->contactId())); } kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; @@ -150,7 +150,7 @@ void StatisticsContact::contactRemoved( Kopete::Contact *c ) return; kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; - m_db->query(QString("DELETE FROM contacts WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" + m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" ).arg(m_statisticsContactId).arg(c->contactId())); } @@ -160,14 +160,14 @@ void StatisticsContact::removeFromDB() return; kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; - m_db->query(QString("DELETE FROM contacts WHERE statisticid LIKE '%1';").arg(m_statisticsContactId)); - m_db->query(QString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); - m_db->query(QString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1';").arg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); - m_statisticsContactId = QString::null; + m_statisticsContactId = TQString::null; } -void StatisticsContact::commonStatsSave(const QString name, const QString statVar1, const QString statVar2, const bool statVarChanged) +void StatisticsContact::commonStatsSave(const TQString name, const TQString statVar1, const TQString statVar2, const bool statVarChanged) { // Only update the database if there was a change if (!statVarChanged) return; @@ -175,28 +175,28 @@ void StatisticsContact::commonStatsSave(const QString name, const QString statVa if (m_statisticsContactId.isEmpty()) return; - m_db->query(QString("UPDATE commonstats SET statvalue1 = '%1', statvalue2='%2'" + m_db->query(TQString("UPDATE commonstats SET statvalue1 = '%1', statvalue2='%2'" "WHERE statname LIKE '%3' AND metacontactid LIKE '%4';").arg(statVar1).arg(statVar2).arg(name).arg(m_statisticsContactId)); } -void StatisticsContact::commonStatsCheck(const QString name, int& statVar1, int& statVar2, const int defaultValue1, const int defaultValue2) +void StatisticsContact::commonStatsCheck(const TQString name, int& statVar1, int& statVar2, const int defaultValue1, const int defaultValue2) { - QString a = QString::number(statVar1); - QString b = QString::number(statVar2); + TQString a = TQString::number(statVar1); + TQString b = TQString::number(statVar2); - commonStatsCheck(name, a, b, QString::number(defaultValue1), QString::number(defaultValue2)); + commonStatsCheck(name, a, b, TQString::number(defaultValue1), TQString::number(defaultValue2)); statVar1 = a.toInt(); statVar2 = b.toInt(); } -void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1, QString& statVar2, const QString defaultValue1, const QString defaultValue2) +void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1, TQString& statVar2, const TQString defaultValue1, const TQString defaultValue2) { if (m_statisticsContactId.isEmpty()) return; - QStringList buffer = m_db->query(QString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").arg(name, m_statisticsContactId)); + TQStringList buffer = m_db->query(TQString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").arg(name, m_statisticsContactId)); if (!buffer.isEmpty()) { statVar1 = buffer[0]; @@ -204,7 +204,7 @@ void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1, } else { - m_db->query(QString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").arg(m_statisticsContactId, name)); + m_db->query(TQString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").arg(m_statisticsContactId, name)); statVar1 = defaultValue1; statVar2 = defaultValue2; } @@ -234,7 +234,7 @@ void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1, void StatisticsContact::newMessageReceived(Kopete::Message& m) { kdDebug() << "statistics: new message received" << endl; - QDateTime currentDateTime = QDateTime::currentDateTime(); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); if (m_timeBetweenTwoMessagesOn != -1 && m_isChatWindowOpen) { @@ -269,17 +269,17 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta if (m_statisticsContactId.isEmpty()) return; - QDateTime currentDateTime = QDateTime::currentDateTime(); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); /// We don't want to log if oldStatus is unknown /// the change could not be a real one; see StatisticsPlugin::slotMySelfOnlineStatusChanged if (m_oldStatus != Kopete::OnlineStatus::Unknown) { - kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< QString::number(m_oldStatus) << endl; - m_db->query(QString("INSERT INTO contactstatus " + kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldStatus) << endl; + m_db->query(TQString("INSERT INTO contactstatus " "(metacontactid, status, datetimebegin, datetimeend) " - "VALUES('%1', '%2', '%3', '%4'" ");").arg(m_statisticsContactId).arg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).arg(QString::number(m_oldStatusDateTime.toTime_t())).arg(QString::number(currentDateTime.toTime_t()))); + "VALUES('%1', '%2', '%3', '%4'" ");").arg(m_statisticsContactId).arg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).arg(TQString::number(m_oldStatusDateTime.toTime_t())).arg(TQString::number(currentDateTime.toTime_t()))); } if (m_oldStatus == Kopete::OnlineStatus::Online || m_oldStatus == Kopete::OnlineStatus::Away) @@ -294,12 +294,12 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta } -bool StatisticsContact::wasStatus(QDateTime dt, Kopete::OnlineStatus::StatusType status) +bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status) { if (m_statisticsContactId.isEmpty()) return false; - QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend " + TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 " "AND status LIKE '%4' " "ORDER BY datetimebegin;" @@ -310,12 +310,12 @@ bool StatisticsContact::wasStatus(QDateTime dt, Kopete::OnlineStatus::StatusType return false; } -QString StatisticsContact::statusAt(QDateTime dt) +TQString StatisticsContact::statusAt(TQDateTime dt) { if (m_statisticsContactId.isEmpty()) return ""; - QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend " + TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 " "ORDER BY datetimebegin;" ).arg(m_statisticsContactId).arg(dt.toTime_t()).arg(dt.toTime_t())); @@ -324,28 +324,28 @@ QString StatisticsContact::statusAt(QDateTime dt) else return ""; } -QString StatisticsContact::mainStatusDate(const QDate& date) +TQString StatisticsContact::mainStatusDate(const TQDate& date) { if (m_statisticsContactId.isEmpty()) return ""; - QDateTime dt1(date, QTime(0,0,0)); - QDateTime dt2(date.addDays(1), QTime(0,0,0)); + TQDateTime dt1(date, TQTime(0,0,0)); + TQDateTime dt2(date.addDays(1), TQTime(0,0,0)); kdDebug() << "dt1:" << dt1.toString() << " dt2:" << dt2.toString() << endl; - QString request = QString("SELECT status, datetimebegin, datetimeend, metacontactid " + TQString request = TQString("SELECT status, datetimebegin, datetimeend, metacontactid " "FROM contactstatus WHERE metacontactid = '%1' AND " "(datetimebegin >= %2 AND datetimebegin <= %3 OR " "datetimeend >= %4 AND datetimeend <= %5) " "ORDER BY datetimebegin;" ).arg(m_statisticsContactId).arg(dt1.toTime_t()).arg(dt2.toTime_t()).arg(dt1.toTime_t()).arg(dt2.toTime_t()); kdDebug() << request << endl; - QStringList values = m_db->query(request); + TQStringList values = m_db->query(request); unsigned int online = 0, offline = 0, away = 0; for(uint i=0; i= dt2.toTime_t()) datetimeend = dt2.toTime_t(); @@ -366,35 +366,35 @@ QString StatisticsContact::mainStatusDate(const QDate& date) return ""; } -// QDateTime StatisticsContact::nextOfflineEvent() +// TQDateTime StatisticsContact::nextOfflineEvent() // { // return nextEvent(Kopete::OnlineStatus::Offline); // } // -// QDateTime StatisticsContact::nextOnlineEvent() +// TQDateTime StatisticsContact::nextOnlineEvent() // { // return nextEvent(Kopete::OnlineStatus::Online); // } -// QDateTime StatisticsContact::nextEvent(const Kopete::OnlineStatus::StatusType& status) +// TQDateTime StatisticsContact::nextEvent(const Kopete::OnlineStatus::StatusType& status) // { // // } -QValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::StatusType& status) +TQValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::StatusType& status) { - QStringList buffer; - QValueList mainEvents; + TQStringList buffer; + TQValueList mainEvents; if (m_statisticsContactId.isEmpty()) return mainEvents; - QDateTime currentDateTime = QDateTime::currentDateTime(); - buffer = m_db->query(QString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").arg(m_statisticsContactId)); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); + buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").arg(m_statisticsContactId)); // Only select the events for which the previous is not Unknown AND the status is status. - QStringList values; + TQStringList values; for (uint i=0; i StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat // First we compute the average number of events/day : avEventsPerDay; int avEventsPerDay = 0; - QDateTime dt1, dt2; + TQDateTime dt1, dt2; dt1.setTime_t(values[0].toInt()); dt2.setTime_t(values[values.count()-1].toInt()); @@ -417,19 +417,19 @@ QValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat kdDebug() << "statistics: average events per day : " < hoursValues; + TQValueList hoursValues; for (uint i=0; i centroids; + TQValueList centroids; int incr=qRound((double)hoursValues.count()/(double)avEventsPerDay); incr = incr ? incr : 1; for (uint i=0; i StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat { kdDebug() << "statistics: new centroid : " << centroids[i] << endl; - QTime dt(0, 0, 0); + TQTime dt(0, 0, 0); dt = dt.addSecs(centroids[i]); mainEvents.push_back(dt); } @@ -456,12 +456,12 @@ QValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat return mainEvents; } -QValueList StatisticsContact::computeCentroids(const QValueList& centroids, const QValueList& values) +TQValueList StatisticsContact::computeCentroids(const TQValueList& centroids, const TQValueList& values) { kdDebug() << "statistics: enter compute centroids"<< endl; - QValueList whichCentroid; // whichCentroid[i] = j <=> values[i] has centroid j for closest one - QValueList newCentroids; + TQValueList whichCentroid; // whichCentroid[i] = j <=> values[i] has centroid j for closest one + TQValueList newCentroids; for (uint i=0; i mainEvents(const Kopete::OnlineStatus::StatusType& status); + TQValueList mainEvents(const Kopete::OnlineStatus::StatusType& status); /// \brief used by mainEvents() - QValueList computeCentroids(const QValueList& centroids, const QValueList& values); + TQValueList computeCentroids(const TQValueList& centroids, const TQValueList& values); /** * \brief adds contact to "contacts" database and generates m_statisticsContactId if needed @@ -179,13 +179,13 @@ private: * \retval statvar1 * \retval statvar2 */ - void commonStatsCheck(const QString name, QString& statVar1, QString& statVar2, const QString defaultValue1 = "", const QString defaultValue2 = ""); + void commonStatsCheck(const TQString name, TQString& statVar1, TQString& statVar2, const TQString defaultValue1 = "", const TQString defaultValue2 = ""); /** * @brief Same as commonStatsCheck for integers. * Provided for convenience */ - void commonStatsCheck(const QString name, int& statVar1, int& statVar2, const int defaultValue1 = 0, const int defaultValue2 = -1); + void commonStatsCheck(const TQString name, int& statVar1, int& statVar2, const int defaultValue1 = 0, const int defaultValue2 = -1); /** * @brief Save a value in the "commonstats" table @@ -194,7 +194,7 @@ private: * \param statVar2 the second stat we can save in this table for this entry * \param statVarChanged if this param is true, we save. Else, we don't. Spare some disk usage. */ - void commonStatsSave(const QString name, const QString statVar1, const QString statVar2, const bool statVarChanged); + void commonStatsSave(const TQString name, const TQString statVar1, const TQString statVar2, const bool statVarChanged); /** * Kopete::MetaContact linked to this StatisticsContact @@ -213,7 +213,7 @@ private: */ Kopete::OnlineStatus::StatusType m_oldStatus; /// We keep the old status datetime here - QDateTime m_oldStatusDateTime; + TQDateTime m_oldStatusDateTime; /** * Average time this user takes between two of his messages @@ -223,7 +223,7 @@ private: bool m_timeBetweenTwoMessagesChanged; /// Date at which the last message was received. /// Used to compute m_timeBetweenTwoMessages - QDateTime m_lastMessageReceived; + TQDateTime m_lastMessageReceived; /// This is the ponderation corresponding to m_timeBetweenTwoMessagesOn int m_timeBetweenTwoMessagesOn; /// We don't count time if a chatwindow isn't open @@ -240,20 +240,20 @@ private: /** * Last time user talked with this contact */ - QDateTime m_lastTalk; + TQDateTime m_lastTalk; bool m_lastTalkChanged; /** * Last time user was present (=online or away) */ - QDateTime m_lastPresent; + TQDateTime m_lastPresent; bool m_lastPresentChanged; /** * Unique id that identifies StatisticsContact * It's also identifier for database records */ - QString m_statisticsContactId; + TQString m_statisticsContactId; }; diff --git a/kopete/plugins/statistics/statisticsdb.cpp b/kopete/plugins/statistics/statisticsdb.cpp index 450c4371..c0a41232 100644 --- a/kopete/plugins/statistics/statisticsdb.cpp +++ b/kopete/plugins/statistics/statisticsdb.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include "sqlite/sqlite3.h" @@ -33,15 +33,15 @@ StatisticsDB::StatisticsDB() { - QCString path = (::locateLocal("appdata", "kopete_statistics-0.1.db")).latin1(); + TQCString path = (::locateLocal("appdata", "kopete_statistics-0.1.db")).latin1(); kdDebug() << "statistics: DB path:" << path << endl; // Open database file and check for correctness bool failOpen = true; - QFile file( path ); + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QString format; + TQString format; file.readLine( format, 50 ); if ( !format.startsWith( "SQLite format 3" ) ) { @@ -59,18 +59,18 @@ StatisticsDB::StatisticsDB() if ( failOpen ) { // Remove old db file; create new - QFile::remove( path ); + TQFile::remove( path ); sqlite3_open( path, &m_db ); } kdDebug() << "[Statistics] Contructor"<< endl; // Creates the tables if they do not exist. - QStringList result = query("SELECT name FROM sqlite_master WHERE type='table'"); + TQStringList result = query("SELECT name FROM sqlite_master WHERE type='table'"); if (!result.contains("contacts")) { - query(QString("CREATE TABLE contacts " + query(TQString("CREATE TABLE contacts " "(id INTEGER PRIMARY KEY," "statisticid TEXT," "contactid TEXT" @@ -80,7 +80,7 @@ StatisticsDB::StatisticsDB() if (!result.contains("contactstatus")) { kdDebug() << "[Statistics] Database empty"<< endl; - query(QString("CREATE TABLE contactstatus " + query(TQString("CREATE TABLE contactstatus " "(id INTEGER PRIMARY KEY," "metacontactid TEXT," "status TEXT," @@ -92,7 +92,7 @@ StatisticsDB::StatisticsDB() if (!result.contains("commonstats")) { // To store things like the contact answer time etc. - query(QString("CREATE TABLE commonstats" + query(TQString("CREATE TABLE commonstats" " (id INTEGER PRIMARY KEY," "metacontactid TEXT," "statname TEXT," // for instance, answertime, lastmessage, messagelength ... @@ -104,7 +104,7 @@ StatisticsDB::StatisticsDB() /// @fixme This is not used anywhere if (!result.contains("statsgroup")) { - query(QString("CREATE TABLE statsgroup" + query(TQString("CREATE TABLE statsgroup" "(id INTEGER PRIMARY KEY," "datetimebegin INTEGER," "datetimeend INTEGER," @@ -123,9 +123,9 @@ StatisticsDB::~StatisticsDB() * @param statement SQL program to execute. Only one SQL statement is allowed. * @param debug Set to true for verbose debug output. * @retval names Will contain all column names, set to NULL if not used. - * @return The queried data, or QStringList() on error. + * @return The queried data, or TQStringList() on error. */ - QStringList StatisticsDB::query( const QString& statement, QStringList* const names, bool debug ) + TQStringList StatisticsDB::query( const TQString& statement, TQStringList* const names, bool debug ) { if ( debug ) @@ -136,11 +136,11 @@ StatisticsDB::~StatisticsDB() if ( !m_db ) { kdError() << k_funcinfo << "[CollectionDB] SQLite pointer == NULL.\n"; - return QStringList(); + return TQStringList(); } int error; - QStringList values; + TQStringList values; const char* tail; sqlite3_stmt* stmt; @@ -153,7 +153,7 @@ StatisticsDB::~StatisticsDB() kdError() << sqlite3_errmsg( m_db ) << endl; kdError() << "on query: " << statement << endl; - return QStringList(); + return TQStringList(); } int busyCnt = 0; @@ -180,8 +180,8 @@ StatisticsDB::~StatisticsDB() //iterate over columns for ( int i = 0; i < number; i++ ) { - values << QString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) ); - if ( names ) *names << QString( sqlite3_column_name( stmt, i ) ); + values << TQString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) ); + if ( names ) *names << TQString( sqlite3_column_name( stmt, i ) ); } } //deallocate vm ressources @@ -193,7 +193,7 @@ StatisticsDB::~StatisticsDB() kdError() << sqlite3_errmsg( m_db ) << endl; kdError() << "on query: " << statement << endl; - return QStringList(); + return TQStringList(); } if ( debug ) diff --git a/kopete/plugins/statistics/statisticsdb.h b/kopete/plugins/statistics/statisticsdb.h index 130b1d0e..444e80c0 100644 --- a/kopete/plugins/statistics/statisticsdb.h +++ b/kopete/plugins/statistics/statisticsdb.h @@ -26,8 +26,8 @@ public: StatisticsDB(); ~StatisticsDB(); //sql helper methods - QStringList query( const QString& statement, QStringList* const names = 0, bool debug = false ); - QString escapeString( QString string ); + TQStringList query( const TQString& statement, TQStringList* const names = 0, bool debug = false ); + TQString escapeString( TQString string ); private: sqlite3 *m_db; }; diff --git a/kopete/plugins/statistics/statisticsdcopiface.h b/kopete/plugins/statistics/statisticsdcopiface.h index b45a2c95..9a769935 100644 --- a/kopete/plugins/statistics/statisticsdcopiface.h +++ b/kopete/plugins/statistics/statisticsdcopiface.h @@ -29,46 +29,46 @@ k_dcop: /** * Shows the statistics dialog for contact which has KABC id \var contactId */ - virtual void dcopStatisticsDialog(QString contactId) = 0; + virtual void dcopStatisticsDialog(TQString contactId) = 0; /** * \returns true if contact was online at time timeStamp, false else. Returns false if contact does not exist. */ - virtual bool dcopWasOnline(QString id, int timeStamp) = 0; + virtual bool dcopWasOnline(TQString id, int timeStamp) = 0; /** * \returns true if contact was online at dt, false else. Returns false if contact does not exist or if date is invalid. */ - virtual bool dcopWasOnline(QString id, QString datetime) = 0; + virtual bool dcopWasOnline(TQString id, TQString datetime) = 0; /** * \returns true if contact was away at time timeStamp, false else. Returns false if contact does not exist. */ - virtual bool dcopWasAway(QString id, int timeStamp) = 0; + virtual bool dcopWasAway(TQString id, int timeStamp) = 0; /** * \returns true if contact was away at dt, false else. Returns false if contact does not exist or if date is invalid. */ - virtual bool dcopWasAway(QString id, QString datetime) = 0; + virtual bool dcopWasAway(TQString id, TQString datetime) = 0; /** * \returns true if contact was offline at time timeStamp, false else. Returns false if contact does not exist. */ - virtual bool dcopWasOffline(QString id, int timeStamp) = 0; + virtual bool dcopWasOffline(TQString id, int timeStamp) = 0; /** * \returns true if contact was offline at dt, false else. Returns false if contact does not exist or if date is invalid. */ - virtual bool dcopWasOffline(QString id, QString datetime) = 0; + virtual bool dcopWasOffline(TQString id, TQString datetime) = 0; /** * \returns return the status of the contact at datetime. */ - virtual QString dcopStatus(QString id, QString datetime) = 0; + virtual TQString dcopStatus(TQString id, TQString datetime) = 0; /** * \returns return the status of the contact at timeStamp. */ - virtual QString dcopStatus(QString id, int timeStamp) = 0; + virtual TQString dcopStatus(TQString id, int timeStamp) = 0; /** * \returns the main status (most used status) of the contact id at date (not time) timeStamp. Will take the day where timeStamp is. */ - virtual QString dcopMainStatus(QString id, int timeStamp) = 0; + virtual TQString dcopMainStatus(TQString id, int timeStamp) = 0; }; #endif // STATISTICSDCOP_H diff --git a/kopete/plugins/statistics/statisticsdialog.cpp b/kopete/plugins/statistics/statisticsdialog.cpp index 485eb7ad..461dd696 100644 --- a/kopete/plugins/statistics/statisticsdialog.cpp +++ b/kopete/plugins/statistics/statisticsdialog.cpp @@ -14,14 +14,14 @@ */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "kdialogbase.h" #include "klocale.h" @@ -40,7 +40,7 @@ #include "statisticsplugin.h" #include "statisticsdb.h" -StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, QWidget* parent, +StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, TQWidget* parent, const char* name) : KDialogBase(parent, name, false, i18n("Statistics for %1").arg(contact->metaContact()->displayName()), Close, Close), m_db(db), m_contact(contact) { @@ -51,20 +51,20 @@ StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, setMinimumHeight(400); adjustSize(); - QHBox *hbox = new QHBox(this); + TQHBox *hbox = new TQHBox(this); generalHTMLPart = new KHTMLPart(hbox); generalHTMLPart->setOnlyLocalReferences(true); - connect ( generalHTMLPart->browserExtension(), SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), - this, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); + connect ( generalHTMLPart->browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), + this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); mainWidget->tabWidget->insertTab(hbox, i18n("General"), 0); mainWidget->tabWidget->setCurrentPage(0); - mainWidget->timePicker->setTime(QTime::currentTime()); - mainWidget->datePicker->setDate(QDate::currentDate()); - connect(mainWidget->askButton, SIGNAL(clicked()), this, SLOT(slotAskButtonClicked())); + mainWidget->timePicker->setTime(TQTime::currentTime()); + mainWidget->datePicker->setDate(TQDate::currentDate()); + connect(mainWidget->askButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAskButtonClicked())); setFocus(); setEscapeButton(Close); @@ -89,14 +89,14 @@ void StatisticsDialog::slotOpenURLRequest(const KURL& url, const KParts::URLArgs } } -/*void StatisticsDialog::parseTemplate(QString Template) +/*void StatisticsDialog::parseTemplate(TQString Template) { - QString fileString = ::locate("appdata", "kopete_statistics.template.html"); - QString templateString; - QFile file(file); + TQString fileString = ::locate("appdata", "kopete_statistics.template.html"); + TQString templateString; + TQFile file(file); if (file.open(IO_ReadOnly)) { - QTextStream stream(&file); + TQTextStream stream(&file); templateString = stream.read(); file.close(); } @@ -106,14 +106,14 @@ void StatisticsDialog::slotOpenURLRequest(const KURL& url, const KParts::URLArgs void StatisticsDialog::generatePageForMonth(const int monthOfYear) { - QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend " + TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId())); - QStringList values2; + TQStringList values2; for (uint i=0; iquery(QString("SELECT status, datetimebegin, datetimeend " + TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId())); - QStringList values2; + TQStringList values2; for (uint i=0; ibegin(); - generalHTMLPart->write(QString("")); + s.replace ( TQRegExp( TQString::fromLatin1("([^<]*)")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("\\2")); //okay now change the to //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("")),QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")),TQString::fromLatin1("")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("")),QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")),TQString::fromLatin1("")); - s.replace ( QRegExp ( QString::fromLatin1("")), QString::fromLatin1("
") ); + s.replace ( TQRegExp ( TQString::fromLatin1("")), TQString::fromLatin1("
") ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -200,34 +200,34 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio } -AIMAccount::AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name) +AIMAccount::AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, false) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; AIMMyselfContact* mc = new AIMMyselfContact( this ); setMyself( mc ); myself()->setOnlineStatus( static_cast( parent )->statusOffline ); - QString profile = configGroup()->readEntry( "Profile", + TQString profile = configGroup()->readEntry( "Profile", i18n( "Visit the Kopete website at http://kopete.kde.org") ); mc->setOwnProfile( profile ); m_joinChatDialog = 0; m_visibilityDialog = 0; - QObject::connect( Kopete::ContactList::self(), - SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), + TQObject::connect( Kopete::ContactList::self(), + TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), this, - SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( engine(), SIGNAL( chatRoomConnected( WORD, const QString& ) ), - this, SLOT( connectedToChatRoom( WORD, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( chatRoomConnected( WORD, const TQString& ) ), + this, TQT_SLOT( connectedToChatRoom( WORD, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); } @@ -235,19 +235,19 @@ AIMAccount::~AIMAccount() { } -OscarContact *AIMAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *AIMAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - AIMContact* contact = new AIMContact( this, contactId, parentContact, QString::null, ssiItem ); + AIMContact* contact = new AIMContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); return contact; } -QString AIMAccount::sanitizedMessage( const QString& message ) +TQString AIMAccount::sanitizedMessage( const TQString& message ) { - QDomDocument doc; - QString domError; + TQDomDocument doc; + TQString domError; int errLine = 0, errCol = 0; doc.setContent( message, false, &domError, &errLine, &errCol ); if ( !domError.isEmpty() ) //error parsing, do nothing @@ -260,7 +260,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "conversion to dom document successful." << "looking for font tags" << endl; - QDomNodeList fontTagList = doc.elementsByTagName( "font" ); + TQDomNodeList fontTagList = doc.elementsByTagName( "font" ); if ( fontTagList.count() == 0 ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "No font tags found. Returning normal message" << endl; @@ -272,8 +272,8 @@ QString AIMAccount::sanitizedMessage( const QString& message ) uint numFontTags = fontTagList.count(); for ( uint i = 0; i < numFontTags; i++ ) { - QDomNode fontNode = fontTagList.item(i); - QDomElement fontEl; + TQDomNode fontNode = fontTagList.item(i); + TQDomElement fontEl; if ( !fontNode.isNull() && fontNode.isElement() ) fontEl = fontTagList.item(i).toElement(); else @@ -281,7 +281,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) if ( fontEl.hasAttribute( "back" ) ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Found attribute to replace. Doing replacement" << endl; - QString backgroundColor = fontEl.attribute( "back" ); + TQString backgroundColor = fontEl.attribute( "back" ); backgroundColor.insert( 0, "background-color: " ); backgroundColor.append( ';' ); fontEl.setAttribute( "style", backgroundColor ); @@ -304,42 +304,42 @@ KActionMenu* AIMAccount::actionMenu() AIMProtocol *p = AIMProtocol::protocol(); - QString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); mActionMenu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), i18n( "%2 <%1>" ).arg( accountId(), accountNick )); mActionMenu->insert( new KAction( i18n("Online"), p->statusOnline.iconFor( this ), 0, this, - SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); + TQT_SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); KAction* mActionAway = new Kopete::AwayAction(i18n("Away"), p->statusAway.iconFor( this ), 0, this, - SLOT(slotGoAway( const QString & )), this, "AIMAccount::mActionNA" ); + TQT_SLOT(slotGoAway( const TQString & )), this, "AIMAccount::mActionNA" ); mActionAway->setEnabled( isConnected() ); mActionMenu->insert( mActionAway ); KAction* mActionOffline = new KAction( i18n("Offline"), p->statusOffline.iconFor(this), 0, this, - SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); + TQT_SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); mActionMenu->insert( mActionOffline ); mActionMenu->popupMenu()->insertSeparator(); - KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), QString::null, 0, this, - SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); + KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), TQString::null, 0, this, + TQT_SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); mActionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "AIMAccount::mActionSetVisibility") ); mActionMenu->insert( m_joinChatAction ); KAction* m_editInfoAction = new KAction( i18n( "Edit User Info..." ), "identity", 0, - this, SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); + this, TQT_SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); mActionMenu->insert( m_editInfoAction ); return mActionMenu; } -void AIMAccount::setAway(bool away, const QString &awayReason) +void AIMAccount::setAway(bool away, const TQString &awayReason) { // kdDebug(14152) << k_funcinfo << accountId() << "reason is " << awayReason << endl; if ( away ) @@ -353,12 +353,12 @@ void AIMAccount::setAway(bool away, const QString &awayReason) { engine()->setStatus( Client::Online ); AIMMyselfContact* me = static_cast ( myself() ); - me->setLastAwayMessage(QString::null); + me->setLastAwayMessage(TQString::null); me->removeProperty( Kopete::Global::Properties::self()->awayMessage() ); } } -void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { kdDebug(14152) << k_funcinfo << "called with reason = " << reason <<" status = "<< status.status() << endl;; if ( status.status() == Kopete::OnlineStatus::Online ) @@ -368,13 +368,13 @@ void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -void AIMAccount::setUserProfile(const QString &profile) +void AIMAccount::setUserProfile(const TQString &profile) { kdDebug(14152) << k_funcinfo << "called." << endl; AIMMyselfContact* aimmc = dynamic_cast( myself() ); if ( aimmc ) aimmc->setOwnProfile( profile ); - configGroup()->writeEntry( QString::fromLatin1( "Profile" ), profile ); + configGroup()->writeEntry( TQString::fromLatin1( "Profile" ), profile ); } void AIMAccount::slotEditInfo() @@ -391,7 +391,7 @@ void AIMAccount::slotEditInfo() myInfo->exec(); // This is a modal dialog } -void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void AIMAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Global identity changed" << endl; @@ -415,14 +415,14 @@ void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void AIMAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -435,7 +435,7 @@ void AIMAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -447,7 +447,7 @@ void AIMAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -467,7 +467,7 @@ void AIMAccount::slotBuddyIconChanged() memcpy(t.data.data() + 2, iconHash.rawDigest(), 16); t.length = t.data.size(); - QValueList list; + TQValueList list; list.append( t ); Oscar::SSI s( "1", 0, ssi->nextContactId(), ROSTER_BUDDYICONS, list ); @@ -480,7 +480,7 @@ void AIMAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) @@ -520,9 +520,9 @@ void AIMAccount::slotJoinChat() if ( !m_joinChatDialog ) { m_joinChatDialog = new AIMJoinChatUI( this, false, Kopete::UI::Global::mainWidget() ); - QObject::connect( m_joinChatDialog, SIGNAL( closing( int ) ), - this, SLOT( joinChatDialogClosed( int ) ) ); - QValueList list = engine()->chatExchangeList(); + TQObject::connect( m_joinChatDialog, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( joinChatDialogClosed( int ) ) ); + TQValueList list = engine()->chatExchangeList(); m_joinChatDialog->setExchangeList( list ); m_joinChatDialog->show(); } @@ -549,7 +549,7 @@ void AIMAccount::slotGoOnline() } } -void AIMAccount::slotGoAway(const QString &message) +void AIMAccount::slotGoAway(const TQString &message) { kdDebug(14152) << k_funcinfo << message << endl; setAway(true, message); @@ -557,7 +557,7 @@ void AIMAccount::slotGoAway(const QString &message) void AIMAccount::joinChatDialogClosed( int code ) { - if ( code == QDialog::Accepted ) + if ( code == TQDialog::Accepted ) { //join the chat kdDebug(14152) << k_funcinfo << "chat accepted." << endl; @@ -583,7 +583,7 @@ void AIMAccount::disconnected( DisconnectReason reason ) kdDebug( OSCAR_AIM_DEBUG ) << k_funcinfo << "Attempting to set status offline" << endl; myself()->setOnlineStatus( static_cast( protocol() )->statusOffline ); - QDictIterator it( contacts() ); + TQDictIterator it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast( it.current() ); @@ -608,7 +608,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(14152) << k_funcinfo << "Checking to see if I'm online.." << endl; if( myself()->onlineStatus().status() == Kopete::OnlineStatus::Away ) { - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); AIMContact* aimSender = static_cast ( contacts()[sender] ); //should exist now if ( !aimSender ) { @@ -621,7 +621,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) // get the away message we have set AIMMyselfContact* myContact = static_cast ( myself() ); - QString msg = myContact->lastAwayMessage(); + TQString msg = myContact->lastAwayMessage(); kdDebug(14152) << k_funcinfo << "Got away message: " << msg << endl; // Create the message Kopete::Message chatMessage( myself(), aimSender, msg, Kopete::Message::Outbound, @@ -636,8 +636,8 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "have chat message" << endl; //handle chat room messages seperately - QValueList chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList::iterator it, itEnd = chats.end(); + TQValueList chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -652,7 +652,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "found chat session for chat room" << endl; Kopete::Contact* ocSender = contacts()[Oscar::normalize( message.sender() )]; //sanitize; - QString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); + TQString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); Kopete::ContactPtrList me; me.append( myself() ); @@ -665,7 +665,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) } } -void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) +void AIMAccount::connectedToChatRoom( WORD exchange, const TQString& room ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Creating chat room session" << endl; Kopete::ContactPtrList emptyList; @@ -677,14 +677,14 @@ void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) session->raiseView(); } -void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userJoinedChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "user " << contact << " has joined the chat" << endl; - QValueList chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList::iterator it, itEnd = chats.end(); + TQValueList chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -717,13 +717,13 @@ void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QStri } } -void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userLeftChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; - QValueList chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList::iterator it, itEnd = chats.end(); + TQValueList chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -753,18 +753,18 @@ void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString } -void AIMAccount::connectWithPassword( const QString & ) +void AIMAccount::connectWithPassword( const TQString & ) { kdDebug(14152) << k_funcinfo << "accountId='" << accountId() << "'" << endl; // Get the screen name for this account - QString screenName = accountId(); - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString screenName = accountId(); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); - QString _password = password().cachedValue(); + TQString _password = password().cachedValue(); if ( _password.isEmpty() ) { kdDebug(14150) << "Kopete is unable to attempt to sign-on to the " @@ -794,19 +794,19 @@ void AIMAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; - QMap revContactMap; + TQMap revContactMap; - QValueList contactList = engine()->ssiManager()->contactList(); - QValueList::const_iterator it, cEnd = contactList.constEnd(); + TQValueList contactList = engine()->ssiManager()->contactList(); + TQValueList::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast( contacts()[( *it ).name()] ); if ( oc ) @@ -823,7 +823,7 @@ void AIMAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -895,9 +895,9 @@ void AIMAccount::setPrivacySettings( int privacy ) void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) { SSIManager* ssi = engine()->ssiManager(); - Oscar::SSI item = ssi->findItem( QString::null, ROSTER_VISIBILITY ); + Oscar::SSI item = ssi->findItem( TQString::null, ROSTER_VISIBILITY ); - QValueList tList; + TQValueList tList; tList.append( TLV( 0x00CA, 1, (char *)&privacy ) ); tList.append( TLV( 0x00CB, sizeof(userClasses), (char *)&userClasses ) ); @@ -905,7 +905,7 @@ void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) if ( !item ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Adding new privacy TLV item" << endl; - Oscar::SSI s( QString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); + Oscar::SSI s( TQString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); engine()->modifySSIItem( item, s ); } else diff --git a/kopete/protocols/oscar/aim/aimaccount.h b/kopete/protocols/oscar/aim/aimaccount.h index 034b9836..2df309b6 100644 --- a/kopete/protocols/oscar/aim/aimaccount.h +++ b/kopete/protocols/oscar/aim/aimaccount.h @@ -19,9 +19,9 @@ #ifndef AIMACCOUNT_H #define AIMACCOUNT_H -#include -#include -#include +#include +#include +#include #include "oscartypeclasses.h" #include "oscaraccount.h" @@ -56,26 +56,26 @@ Q_OBJECT public: AIMMyselfContact( AIMAccount *acct ); void userInfoUpdated(); - void setOwnProfile( const QString& newProfile ); - QString userProfile(); - void setLastAwayMessage( const QString& msg) {m_lastAwayMessage = msg;} - QString lastAwayMessage() { return m_lastAwayMessage; }; + void setOwnProfile( const TQString& newProfile ); + TQString userProfile(); + void setLastAwayMessage( const TQString& msg) {m_lastAwayMessage = msg;} + TQString lastAwayMessage() { return m_lastAwayMessage; }; virtual Kopete::ChatSession* manager( Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate, - WORD exchange = 0, const QString& room = QString::null); + WORD exchange = 0, const TQString& room = TQString::null); public slots: void sendMessage( Kopete::Message&, Kopete::ChatSession* session ); void chatSessionDestroyed( Kopete::ChatSession* ); private: - QString m_profileString; + TQString m_profileString; AIMAccount* m_acct; /** * There has GOT to be a better way to get this away message */ - QString m_lastAwayMessage; - QValueList m_chatRoomSessions; + TQString m_lastAwayMessage; + TQValueList m_chatRoomSessions; }; @@ -85,42 +85,42 @@ class AIMAccount : public OscarAccount Q_OBJECT public: - AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name=0L); + AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name=0L); virtual ~AIMAccount(); // Accessor method for the action menu virtual KActionMenu* actionMenu(); - void setAway(bool away, const QString &awayReason = QString::null ); + void setAway(bool away, const TQString &awayReason = TQString::null ); - virtual void connectWithPassword( const QString &password ); + virtual void connectWithPassword( const TQString &password ); - void setUserProfile(const QString &profile); + void setUserProfile(const TQString &profile); void setPrivacySettings( int privacy ); public slots: /** Reimplementation from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason = QString::null ); + void setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason = TQString::null ); void slotEditInfo(); void slotGoOnline(); - void slotGlobalIdentityChanged( const QString&, const QVariant& ); + void slotGlobalIdentityChanged( const TQString&, const TQVariant& ); void slotBuddyIconChanged(); void slotJoinChat(); protected slots: - void slotGoAway(const QString&); + void slotGoAway(const TQString&); void joinChatDialogClosed( int ); virtual void loginActions(); virtual void disconnected( Kopete::Account::DisconnectReason reason ); virtual void messageReceived( const Oscar::Message& message ); - void connectedToChatRoom( WORD exchange, const QString& roomName ); - void userJoinedChat( Oscar::WORD exchange, const QString& room, const QString& contact ); - void userLeftChat( Oscar::WORD exchange, const QString& room, const QString& contact ); + void connectedToChatRoom( WORD exchange, const TQString& roomName ); + void userJoinedChat( Oscar::WORD exchange, const TQString& room, const TQString& contact ); + void userLeftChat( Oscar::WORD exchange, const TQString& room, const TQString& contact ); void slotSetVisiblility(); void slotVisibilityDialogClosed(); @@ -131,9 +131,9 @@ protected: * Implement virtual method from OscarAccount * This allows OscarAccount to take care of adding new contacts */ - OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); + OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); - QString sanitizedMessage( const QString& message ); + TQString sanitizedMessage( const TQString& message ); private: // Set privacy tlv item diff --git a/kopete/protocols/oscar/aim/aimchatsession.cpp b/kopete/protocols/oscar/aim/aimchatsession.cpp index fa0616a6..10938a6a 100644 --- a/kopete/protocols/oscar/aim/aimchatsession.cpp +++ b/kopete/protocols/oscar/aim/aimchatsession.cpp @@ -26,7 +26,7 @@ AIMChatSession::AIMChatSession( const Kopete::Contact* user, Kopete::ContactPtrList others, Kopete::Protocol* protocol, Oscar::WORD exchange, - const QString& room ) + const TQString& room ) : Kopete::ChatSession( user, others, protocol, "AIMChatSession" ) { @@ -48,13 +48,13 @@ void AIMChatSession::setEngine( Client* engine ) m_engine = engine; } -QString AIMChatSession::roomName() const +TQString AIMChatSession::roomName() const { return m_roomName; } -void AIMChatSession::setRoomName( const QString& room ) +void AIMChatSession::setRoomName( const TQString& room ) { m_roomName = room; } diff --git a/kopete/protocols/oscar/aim/aimchatsession.h b/kopete/protocols/oscar/aim/aimchatsession.h index 79c0685e..9ce3ce1f 100644 --- a/kopete/protocols/oscar/aim/aimchatsession.h +++ b/kopete/protocols/oscar/aim/aimchatsession.h @@ -30,7 +30,7 @@ Q_OBJECT public: AIMChatSession( const Kopete::Contact* contact, Kopete::ContactPtrList others, Kopete::Protocol* protocol, Oscar::WORD exchange = 0, - const QString& room = QString::null ); + const TQString& room = TQString::null ); virtual ~AIMChatSession(); /** @@ -44,14 +44,14 @@ public: * this ChatSession object * @return the name of the chat room */ - QString roomName() const; + TQString roomName() const; /** * Set the name of the AIM chat room represented by * this ChatSession object * @param room the name of the AIM chat room */ - void setRoomName( const QString& room ); + void setRoomName( const TQString& room ); /** * Get the exchange of the AIM chat room represented by @@ -68,7 +68,7 @@ public: void setExchange( Oscar::WORD exchange ); private: - QString m_roomName; + TQString m_roomName; Oscar::WORD m_exchange; Client* m_engine; }; diff --git a/kopete/protocols/oscar/aim/aimcontact.cpp b/kopete/protocols/oscar/aim/aimcontact.cpp index 7e46c585..fc55537d 100644 --- a/kopete/protocols/oscar/aim/aimcontact.cpp +++ b/kopete/protocols/oscar/aim/aimcontact.cpp @@ -16,10 +16,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -43,8 +43,8 @@ #include "aimcontact.h" #include "aimaccount.h" -AIMContact::AIMContact( Kopete::Account* account, const QString& name, Kopete::MetaContact* parent, - const QString& icon, const Oscar::SSI& ssiItem ) +AIMContact::AIMContact( Kopete::Account* account, const TQString& name, Kopete::MetaContact* parent, + const TQString& icon, const Oscar::SSI& ssiItem ) : OscarContact(account, name, parent, icon, ssiItem ) { mProtocol=static_cast(protocol()); @@ -56,23 +56,23 @@ AIMContact::AIMContact( Kopete::Account* account, const QString& name, Kopete::M m_haveAwayMessage = false; m_mobile = false; // Set the last autoresponse time to the current time yesterday - m_lastAutoresponseTime = QDateTime::currentDateTime().addDays(-1); - - QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ), - this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), - this, SLOT( userOffline( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SLOT( updateAwayMessage( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedProfile( const QString&, const QString& ) ), - this, SLOT( updateProfile( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ), - this, SLOT( gotWarning( const QString&, Q_UINT16, Q_UINT16 ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( haveIconForContact( const QString&, QByteArray ) ), - this, SLOT( haveIcon( const QString&, QByteArray ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( iconServerConnected() ), - this, SLOT( requestBuddyIcon() ) ); - QObject::connect( this, SIGNAL( featuresUpdated() ), this, SLOT( updateFeatures() ) ); + m_lastAutoresponseTime = TQDateTime::currentDateTime().addDays(-1); + + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( userInfoUpdated( const TQString&, const UserDetails& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOffline( const TQString& ) ), + this, TQT_SLOT( userOffline( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SLOT( updateAwayMessage( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ), + this, TQT_SLOT( updateProfile( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), + this, TQT_SLOT( gotWarning( const TQString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ), + this, TQT_SLOT( haveIcon( const TQString&, TQByteArray ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( requestBuddyIcon() ) ); + TQObject::connect( this, TQT_SIGNAL( featuresUpdated() ), this, TQT_SLOT( updateFeatures() ) ); } AIMContact::~AIMContact() @@ -84,18 +84,18 @@ bool AIMContact::isReachable() return true; } -QPtrList *AIMContact::customContextMenuActions() +TQPtrList *AIMContact::customContextMenuActions() { - QPtrList *actionCollection = new QPtrList(); + TQPtrList *actionCollection = new TQPtrList(); if ( !m_warnUserAction ) { - m_warnUserAction = new KAction( i18n( "&Warn User" ), 0, this, SLOT( warnUser() ), this, "warnAction" ); + m_warnUserAction = new KAction( i18n( "&Warn User" ), 0, this, TQT_SLOT( warnUser() ), this, "warnAction" ); } m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), "", 0, - this, SLOT(slotVisibleTo()), this, "actionVisibleTo"); + this, TQT_SLOT(slotVisibleTo()), this, "actionVisibleTo"); m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), "", 0, - this, SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); + this, TQT_SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); bool on = account()->isConnected(); @@ -117,26 +117,26 @@ QPtrList *AIMContact::customContextMenuActions() return actionCollection; } -const QString AIMContact::awayMessage() +const TQString AIMContact::awayMessage() { return property(mProtocol->awayMessage).value().toString(); } -void AIMContact::setAwayMessage(const QString &message) +void AIMContact::setAwayMessage(const TQString &message) { kdDebug(14152) << k_funcinfo << "Called for '" << contactId() << "', away msg='" << message << "'" << endl; - QString filteredMessage = message; + TQString filteredMessage = message; filteredMessage.replace( - QRegExp(QString::fromLatin1("<[hH][tT][mM][lL].*>(.*)")), - QString::fromLatin1("\\1")); + TQRegExp(TQString::fromLatin1("<[hH][tT][mM][lL].*>(.*)")), + TQString::fromLatin1("\\1")); filteredMessage.replace( - QRegExp(QString::fromLatin1("<[bB][oO][dD][yY].*>(.*)")), - QString::fromLatin1("\\1") ); - QRegExp fontRemover( QString::fromLatin1("<[fF][oO][nN][tT].*>(.*)") ); + TQRegExp(TQString::fromLatin1("<[bB][oO][dD][yY].*>(.*)")), + TQString::fromLatin1("\\1") ); + TQRegExp fontRemover( TQString::fromLatin1("<[fF][oO][nN][tT].*>(.*)") ); fontRemover.setMinimal(true); while ( filteredMessage.find( fontRemover ) != -1 ) - filteredMessage.replace( fontRemover, QString::fromLatin1("\\1") ); + filteredMessage.replace( fontRemover, TQString::fromLatin1("\\1") ); setProperty(mProtocol->awayMessage, filteredMessage); } @@ -162,7 +162,7 @@ void AIMContact::slotUserInfo() m_infoDialog = new AIMUserInfoDialog( this, static_cast( account() ), false, Kopete::UI::Global::mainWidget(), 0 ); if( !m_infoDialog ) return; - connect( m_infoDialog, SIGNAL( finished() ), this, SLOT( closeUserInfoDialog() ) ); + connect( m_infoDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfoDialog() ) ); m_infoDialog->show(); if ( mAccount->isConnected() ) { @@ -174,7 +174,7 @@ void AIMContact::slotUserInfo() m_infoDialog->raise(); } -void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void AIMContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -183,7 +183,7 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& det //if they don't have an SSI alias, make sure we use the capitalization from the //server so their contact id looks all pretty. - QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nickname.isEmpty() || Oscar::normalize( nickname ) == Oscar::normalize( contact ) ) setNickName( contact ); @@ -240,13 +240,13 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& det int time = ( KApplication::random() % 10 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestBuddyIcon() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); } OscarContact::userInfoUpdated( contact, details ); } -void AIMContact::userOnline( const QString& userId ) +void AIMContact::userOnline( const TQString& userId ) { if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { @@ -255,7 +255,7 @@ void AIMContact::userOnline( const QString& userId ) } } -void AIMContact::userOffline( const QString& userId ) +void AIMContact::userOffline( const TQString& userId ) { if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { @@ -264,7 +264,7 @@ void AIMContact::userOffline( const QString& userId ) } } -void AIMContact::updateAwayMessage( const QString& contact, const QString& message ) +void AIMContact::updateAwayMessage( const TQString& contact, const TQString& message ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -293,7 +293,7 @@ void AIMContact::updateAwayMessage( const QString& contact, const QString& messa emit updatedProfile(); } -void AIMContact::updateProfile( const QString& contact, const QString& profile ) +void AIMContact::updateProfile( const TQString& contact, const TQString& profile ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -302,7 +302,7 @@ void AIMContact::updateProfile( const QString& contact, const QString& profile ) emit updatedProfile(); } -void AIMContact::gotWarning( const QString& contact, Q_UINT16 increase, Q_UINT16 newLevel ) +void AIMContact::gotWarning( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ) { //somebody just got bitchslapped! :O Q_UNUSED( increase ); @@ -322,16 +322,16 @@ void AIMContact::requestBuddyIcon() } } -void AIMContact::haveIcon( const QString& user, QByteArray icon ) +void AIMContact::haveIcon( const TQString& user, TQByteArray icon ) { if ( Oscar::normalize( user ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << endl; - QImage buddyIcon( icon ); + TQImage buddyIcon( icon ); if ( buddyIcon.isNull() ) { - kdWarning(OSCAR_AIM_DEBUG) << k_funcinfo << "Failed to convert buddy icon to QImage" << endl; + kdWarning(OSCAR_AIM_DEBUG) << k_funcinfo << "Failed to convert buddy icon to TQImage" << endl; return; } @@ -346,8 +346,8 @@ void AIMContact::closeUserInfoDialog() void AIMContact::warnUser() { - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); - QString message = i18n( "Would you like to warn %1 anonymously or with your name?
" \ + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString message = i18n( "Would you like to warn %1 anonymously or with your name?
" \ "(Warning a user on AIM will result in a \"Warning Level\"" \ " increasing for the user you warn. Once this level has reached a" \ " certain point, they will not be able to sign on. Please do not abuse" \ @@ -377,7 +377,7 @@ void AIMContact::slotInvisibleTo() void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) { Oscar::Message msg; - QString s; + TQString s; if (message.plainBody().isEmpty()) // no text, do nothing return; @@ -392,56 +392,56 @@ void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) //font-size:xxpt -> s=message.escapedBody(); - s.replace ( QRegExp( QString::fromLatin1("([^<]*)")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("([^<]*)")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("\\2")); //okay now change the to //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("")),QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")),TQString::fromLatin1("")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("")),QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")),TQString::fromLatin1("")); - s.replace ( QRegExp ( QString::fromLatin1("")), QString::fromLatin1("
") ); + s.replace ( TQRegExp ( TQString::fromLatin1("")), TQString::fromLatin1("
") ); // strip left over line break - s.remove( QRegExp( QString::fromLatin1( "
$" ) ) ); + s.remove( TQRegExp( TQString::fromLatin1( "
$" ) ) ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -472,9 +472,9 @@ void AIMContact::updateFeatures() void AIMContact::sendAutoResponse(Kopete::Message& msg) { // The target time is 2 minutes later than the last message - int delta = m_lastAutoresponseTime.secsTo( QDateTime::currentDateTime() ); + int delta = m_lastAutoresponseTime.secsTo( TQDateTime::currentDateTime() ); kdDebug(14152) << k_funcinfo << "Last autoresponse time: " << m_lastAutoresponseTime << endl; - kdDebug(14152) << k_funcinfo << "Current time: " << QDateTime::currentDateTime() << endl; + kdDebug(14152) << k_funcinfo << "Current time: " << TQDateTime::currentDateTime() << endl; kdDebug(14152) << k_funcinfo << "Difference: " << delta << endl; // Check to see if we're past that time if(delta > 120) @@ -491,7 +491,7 @@ void AIMContact::sendAutoResponse(Kopete::Message& msg) } else { - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); message.setText( Oscar::Message::UserDefined, msg.plainBody(), codec ); } @@ -506,7 +506,7 @@ void AIMContact::sendAutoResponse(Kopete::Message& msg) manager(Kopete::Contact::CanCreate)->appendMessage(msg); manager(Kopete::Contact::CanCreate)->messageSucceeded(); // Update the last autoresponse time - m_lastAutoresponseTime = QDateTime::currentDateTime(); + m_lastAutoresponseTime = TQDateTime::currentDateTime(); } else { diff --git a/kopete/protocols/oscar/aim/aimcontact.h b/kopete/protocols/oscar/aim/aimcontact.h index 458db2f5..a246c029 100644 --- a/kopete/protocols/oscar/aim/aimcontact.h +++ b/kopete/protocols/oscar/aim/aimcontact.h @@ -18,7 +18,7 @@ #ifndef AIMCONTACT_H #define AIMCONTACT_H -#include +#include #include "oscarcontact.h" @@ -37,25 +37,25 @@ class AIMContact : public OscarContact Q_OBJECT public: - AIMContact( Kopete::Account*, const QString&, Kopete::MetaContact*, - const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + AIMContact( Kopete::Account*, const TQString&, Kopete::MetaContact*, + const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~AIMContact(); bool isReachable(); - QPtrList *customContextMenuActions(); + TQPtrList *customContextMenuActions(); - const QString &userProfile() { return mUserProfile; } + const TQString &userProfile() { return mUserProfile; } - virtual const QString awayMessage(); - virtual void setAwayMessage( const QString &message ); + virtual const TQString awayMessage(); + virtual void setAwayMessage( const TQString &message ); int warningLevel() const; /** * Gets the last time an autoresponse was sent to this contact - * @returns QDateTime Object that represents the date/time + * @returns TQDateTime Object that represents the date/time */ - QDateTime lastAutoResponseTime() {return m_lastAutoresponseTime;} + TQDateTime lastAutoResponseTime() {return m_lastAutoresponseTime;} /** Sends an auto response to this contact */ virtual void sendAutoResponse(Kopete::Message& msg); @@ -63,12 +63,12 @@ public: public slots: void updateSSIItem(); void slotUserInfo(); - void userInfoUpdated( const QString& contact, const UserDetails& details ); - void userOnline( const QString& userId ); - void userOffline( const QString& userId ); - void updateAwayMessage( const QString& userId, const QString& message ); - void updateProfile( const QString& contact, const QString& profile ); - void gotWarning( const QString& contact, Q_UINT16, Q_UINT16 ); + void userInfoUpdated( const TQString& contact, const UserDetails& details ); + void userOnline( const TQString& userId ); + void userOffline( const TQString& userId ); + void updateAwayMessage( const TQString& userId, const TQString& message ); + void updateProfile( const TQString& contact, const TQString& profile ); + void gotWarning( const TQString& contact, Q_UINT16, Q_UINT16 ); signals: void updatedProfile(); @@ -79,7 +79,7 @@ protected slots: private slots: void requestBuddyIcon(); - void haveIcon( const QString&, QByteArray ); + void haveIcon( const TQString&, TQByteArray ); void closeUserInfoDialog(); void warnUser(); @@ -89,10 +89,10 @@ private slots: private: AIMProtocol* mProtocol; AIMUserInfoDialog* m_infoDialog; - QString mUserProfile; + TQString mUserProfile; bool m_haveAwayMessage; bool m_mobile; // Is this user mobile (i.e. do they have message forwarding on, or mobile AIM) - QDateTime m_lastAutoresponseTime; + TQDateTime m_lastAutoresponseTime; KAction* m_warnUserAction; KToggleAction *m_actionVisibleTo; diff --git a/kopete/protocols/oscar/aim/aimjoinchat.cpp b/kopete/protocols/oscar/aim/aimjoinchat.cpp index 8b8c78a9..2ccec9b2 100644 --- a/kopete/protocols/oscar/aim/aimjoinchat.cpp +++ b/kopete/protocols/oscar/aim/aimjoinchat.cpp @@ -19,15 +19,15 @@ #include "aimjoinchat.h" -#include -#include +#include +#include #include #include "aimjoinchatbase.h" #include "aimaccount.h" AIMJoinChatUI::AIMJoinChatUI( AIMAccount* account, bool modal, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( parent, name, modal, i18n( "Join AIM Chat Room" ), Cancel | User1, User1, true, i18n( "Join" ) ) { @@ -41,8 +41,8 @@ AIMJoinChatUI::AIMJoinChatUI( AIMAccount* account, bool modal, setMainWidget( m_joinUI ); - QObject::connect( this, SIGNAL( user1Clicked() ), this, SLOT( joinChat() ) ); - QObject::connect( this, SIGNAL( cancelClicked() ), this, SLOT( closeClicked() ) ); + TQObject::connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( joinChat() ) ); + TQObject::connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( closeClicked() ) ); } AIMJoinChatUI::~AIMJoinChatUI() @@ -50,14 +50,14 @@ AIMJoinChatUI::~AIMJoinChatUI() m_exchanges.clear(); } -void AIMJoinChatUI::setExchangeList( const QValueList& list ) +void AIMJoinChatUI::setExchangeList( const TQValueList& list ) { m_exchanges = list; - QStringList exchangeList; - QValueList::const_iterator it = list.begin(); + TQStringList exchangeList; + TQValueList::const_iterator it = list.begin(); while ( it != list.end() ) { - exchangeList.append( QString::number( ( *it ) ) ); + exchangeList.append( TQString::number( ( *it ) ) ); ++it; } @@ -71,21 +71,21 @@ void AIMJoinChatUI::joinChat() int item = m_joinUI->exchange->currentItem(); m_exchange = m_joinUI->exchange->text( item ); - emit closing( QDialog::Accepted ); + emit closing( TQDialog::Accepted ); } void AIMJoinChatUI::closeClicked() { //hmm, do nothing? - emit closing( QDialog::Rejected ); + emit closing( TQDialog::Rejected ); } -QString AIMJoinChatUI::roomName() const +TQString AIMJoinChatUI::roomName() const { return m_roomName; } -QString AIMJoinChatUI::exchange() const +TQString AIMJoinChatUI::exchange() const { return m_exchange; } diff --git a/kopete/protocols/oscar/aim/aimjoinchat.h b/kopete/protocols/oscar/aim/aimjoinchat.h index dc74a8a9..a6e493d4 100644 --- a/kopete/protocols/oscar/aim/aimjoinchat.h +++ b/kopete/protocols/oscar/aim/aimjoinchat.h @@ -31,15 +31,15 @@ class AIMJoinChatUI : public KDialogBase { Q_OBJECT public: - AIMJoinChatUI( AIMAccount*, bool modal, QWidget* parent = 0, + AIMJoinChatUI( AIMAccount*, bool modal, TQWidget* parent = 0, const char* name = 0 ); ~AIMJoinChatUI(); - void setExchangeList( const QValueList& ); - QValueList exchangeList() const; + void setExchangeList( const TQValueList& ); + TQValueList exchangeList() const; - QString roomName() const; - QString exchange() const; + TQString roomName() const; + TQString exchange() const; protected slots: @@ -52,9 +52,9 @@ signals: private: AIMJoinChatBase* m_joinUI; AIMAccount* m_account; - QValueList m_exchanges; - QString m_roomName; - QString m_exchange; + TQValueList m_exchanges; + TQString m_roomName; + TQString m_exchange; }; diff --git a/kopete/protocols/oscar/aim/aimprotocol.cpp b/kopete/protocols/oscar/aim/aimprotocol.cpp index 9f64fe28..779c63c8 100644 --- a/kopete/protocols/oscar/aim/aimprotocol.cpp +++ b/kopete/protocols/oscar/aim/aimprotocol.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -46,7 +46,7 @@ AIMProtocol* AIMProtocol::protocolStatic_ = 0L; AIMProtocolHandler::AIMProtocolHandler() : Kopete::MimeTypeHandler(false) { - registerAsProtocolHandler(QString::fromLatin1("aim")); + registerAsProtocolHandler(TQString::fromLatin1("aim")); } void AIMProtocolHandler::handleURL(const KURL &url) const @@ -78,8 +78,8 @@ void AIMProtocolHandler::handleURL(const KURL &url) const AIMProtocol *proto = AIMProtocol::protocol(); kdDebug(14152) << k_funcinfo << "URL url : '" << url.url() << "'" << endl; kdDebug(14152) << k_funcinfo << "URL path : '" << url.path() << "'" << endl; - QString command = url.path(); - QString realCommand, firstParam, secondParam; + TQString command = url.path(); + TQString realCommand, firstParam, secondParam; bool needContactAddition = false; if ( command.find( "goim", 0, false ) != -1 ) { @@ -150,11 +150,11 @@ void AIMProtocolHandler::handleURL(const KURL &url) const } Kopete::Account *account = 0; - QDict accounts = Kopete::AccountManager::self()->accounts(proto); + TQDict accounts = Kopete::AccountManager::self()->accounts(proto); if (accounts.count() == 1) { - QDictIterator it(accounts); + TQDictIterator it(accounts); account = it.current(); } @@ -170,7 +170,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const account = accSelector->selectedItem(); delete chooser; - if (ret == QDialog::Rejected || account == 0) + if (ret == TQDialog::Rejected || account == 0) { kdDebug(14152) << k_funcinfo << "Cancelled" << endl; return; @@ -190,7 +190,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), i18n("Do you want to add '%1' to your contact list?").arg(command), - QString::null, i18n("Add"), i18n("Do Not Add")) + TQString::null, i18n("Add"), i18n("Do Not Add")) != KMessageBox::Yes) { kdDebug(14152) << k_funcinfo << "Cancelled" << endl; @@ -213,7 +213,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n( "Unable to connect to the chat room %1 because the account" " for %2 is not connected." ).arg( firstParam ).arg( aimAccount->accountId() ), - QString::null ); + TQString::null ); } @@ -227,21 +227,21 @@ void AIMProtocolHandler::handleURL(const KURL &url) const -AIMProtocol::AIMProtocol(QObject *parent, const char *name, const QStringList &) +AIMProtocol::AIMProtocol(TQObject *parent, const char *name, const TQStringList &) : Kopete::Protocol( AIMProtocolFactory::instance(), parent, name ), - statusOnline( Kopete::OnlineStatus::Online, 2, this, 0, QString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online ), - statusOffline( Kopete::OnlineStatus::Offline, 2, this, 10, QString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline ), + statusOnline( Kopete::OnlineStatus::Online, 2, this, 0, TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online ), + statusOffline( Kopete::OnlineStatus::Offline, 2, this, 10, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline ), statusAway( Kopete::OnlineStatus::Away, 2, this, 20, "contact_away_overlay", i18n("Away"), i18n("Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage ), statusWirelessOnline( Kopete::OnlineStatus::Online, 1, this, 30, "contact_phone_overlay", i18n("Mobile"), i18n("Mobile"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HideFromMenu ), - statusWirelessAway( Kopete::OnlineStatus::Away, 1, this, 31, QStringList::split( " ", "contact_phone_overlay contact_away_overlay"), + statusWirelessAway( Kopete::OnlineStatus::Away, 1, this, 31, TQStringList::split( " ", "contact_phone_overlay contact_away_overlay"), i18n("Mobile Away"), i18n("Mobile Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HideFromMenu ), statusConnecting(Kopete::OnlineStatus::Connecting, 99, this, 99, "aim_connecting", i18n("Connecting...")), awayMessage(Kopete::Global::Properties::self()->awayMessage()), clientFeatures("clientFeatures", i18n("Client Features"), 0, false), clientProfile( "clientProfile", i18n( "User Profile"), 0, false, true), - iconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true) + iconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true) { if (protocolStatic_) kdDebug(14152) << k_funcinfo << "AIM plugin already initialized" << endl; @@ -265,28 +265,28 @@ AIMProtocol *AIMProtocol::protocol(void) } Kopete::Contact *AIMProtocol::deserializeContact(Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &/*addressBookData*/) + const TQMap &serializedData, + const TQMap &/*addressBookData*/) { - QString contactId = serializedData["contactId"]; - QString accountId = serializedData["accountId"]; - QString displayName = serializedData["displayName"]; + TQString contactId = serializedData["contactId"]; + TQString accountId = serializedData["accountId"]; + TQString displayName = serializedData["displayName"]; // Get the account it belongs to - QDict accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[accountId]; if ( !account ) //no account return 0; uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF; - QString ssiName; + TQString ssiName; bool ssiWaitingAuth = false; if ( serializedData.contains( "ssi_type" ) ) { ssiName = serializedData["ssi_name"]; - QString authStatus = serializedData["ssi_waitingAuth"]; + TQString authStatus = serializedData["ssi_waitingAuth"]; if ( authStatus == "true" ) ssiWaitingAuth = true; ssiGid = serializedData["ssi_gid"].toUInt(); @@ -294,24 +294,24 @@ Kopete::Contact *AIMProtocol::deserializeContact(Kopete::MetaContact *metaContac 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 ); - AIMContact *c = new AIMContact( account, contactId, metaContact, QString::null, item ); + AIMContact *c = new AIMContact( account, contactId, metaContact, TQString::null, item ); return c; } -AddContactPage *AIMProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *AIMProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return ( new AIMAddContactPage( account->isConnected(), parent ) ); } -KopeteEditAccountWidget *AIMProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *AIMProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return ( new AIMEditAccountWidget( this, account, parent ) ); } -Kopete::Account *AIMProtocol::createNewAccount(const QString &accountId) +Kopete::Account *AIMProtocol::createNewAccount(const TQString &accountId) { return ( new AIMAccount( this, accountId ) ); } diff --git a/kopete/protocols/oscar/aim/aimprotocol.h b/kopete/protocols/oscar/aim/aimprotocol.h index e6c578e6..16c8860a 100644 --- a/kopete/protocols/oscar/aim/aimprotocol.h +++ b/kopete/protocols/oscar/aim/aimprotocol.h @@ -23,7 +23,7 @@ #include "kopetemimetypehandler.h" #include "kopeteonlinestatus.h" -#include +#include namespace Kopete { @@ -42,7 +42,7 @@ class AIMProtocol : public Kopete::Protocol Q_OBJECT public: - AIMProtocol( QObject *parent, const char *name, const QStringList &args ); + AIMProtocol( TQObject *parent, const char *name, const TQStringList &args ); virtual ~AIMProtocol(); /** * Return the active instance of the protocol @@ -53,12 +53,12 @@ public: bool canSendOffline() const { return false; } virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &addressBookData ); + const TQMap &serializedData, + const TQMap &addressBookData ); - AddContactPage*createAddContactWidget( QWidget *parent, Kopete::Account *account ); - KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account *account, QWidget *parent ); - Kopete::Account* createNewAccount( const QString &accountId ); + AddContactPage*createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); + Kopete::Account* createNewAccount( const TQString &accountId ); /** * The set of online statuses that AIM contacts can have diff --git a/kopete/protocols/oscar/aim/aimuserinfo.cpp b/kopete/protocols/oscar/aim/aimuserinfo.cpp index 81bdd9c7..927a12ec 100644 --- a/kopete/protocols/oscar/aim/aimuserinfo.cpp +++ b/kopete/protocols/oscar/aim/aimuserinfo.cpp @@ -21,11 +21,11 @@ #include "aimcontact.h" #include "aimprotocol.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -37,7 +37,7 @@ #include AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool modal, - QWidget *parent, const char* name ) + TQWidget *parent, const char* name ) : KDialogBase( parent, name, modal, i18n( "User Information on %1" ) .arg( c->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ), Cancel | Ok , Ok, true ) @@ -50,14 +50,14 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool mMainWidget = new AIMUserInfoWidget(this, "aimuserinfowidget"); setMainWidget(mMainWidget); - QObject::connect(this, SIGNAL(okClicked()), this, SLOT(slotSaveClicked())); - QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotUpdateClicked())); - QObject::connect(this, SIGNAL(cancelClicked()), this, SLOT(slotCloseClicked())); - QObject::connect(c, SIGNAL(updatedProfile()), this, SLOT(slotUpdateProfile())); + TQObject::connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotSaveClicked())); + TQObject::connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotUpdateClicked())); + TQObject::connect(this, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCloseClicked())); + TQObject::connect(c, TQT_SIGNAL(updatedProfile()), this, TQT_SLOT(slotUpdateProfile())); mMainWidget->txtScreenName->setText( c->contactId() ); - QString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nickName.isEmpty() ) mMainWidget->txtNickName->setText( c->contactId() ); else @@ -75,9 +75,9 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool mMainWidget->lblAwayMessage->hide(); userInfoView=0L; - mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame); - userInfoEdit = new KTextEdit(QString::null, QString::null, + mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); + userInfoEdit = new KTextEdit(TQString::null, TQString::null, mMainWidget->userInfoFrame, "userInfoEdit"); userInfoEdit->setTextFormat(PlainText); @@ -85,7 +85,7 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool if ( aimmc ) userInfoEdit->setText( aimmc->userProfile() ); else - userInfoEdit->setText( QString::null ); + userInfoEdit->setText( TQString::null ); setButtonText(Ok, i18n("&Save Profile")); showButton(User1, false); @@ -94,17 +94,17 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool else { userInfoEdit=0L; - mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame); + mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); userInfoView = new KTextBrowser(mMainWidget->userInfoFrame, "userInfoView"); userInfoView->setTextFormat(AutoText); userInfoView->setNotifyClick(true); - QObject::connect( - userInfoView, SIGNAL(urlClick(const QString&)), - this, SLOT(slotUrlClicked(const QString&))); - QObject::connect( - userInfoView, SIGNAL(mailClick(const QString&, const QString&)), - this, SLOT(slotMailClicked(const QString&, const QString&))); + TQObject::connect( + userInfoView, TQT_SIGNAL(urlClick(const TQString&)), + this, TQT_SLOT(slotUrlClicked(const TQString&))); + TQObject::connect( + userInfoView, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), + this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); showButton(Cancel, false); setButtonText(Ok, i18n("&Close")); setEscapeButton(Ok); @@ -115,7 +115,7 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool // Update the user view to indicate that we're requesting the user's profile userInfoView->setText(i18n("Requesting User Profile, please wait...")); } - QTimer::singleShot(0, this, SLOT(slotUpdateProfile())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateProfile())); } } @@ -127,8 +127,8 @@ AIMUserInfoDialog::~AIMUserInfoDialog() void AIMUserInfoDialog::slotUpdateClicked() { kdDebug(14200) << k_funcinfo << "Called." << endl; - QString newNick = mMainWidget->txtNickName->text(); - QString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString newNick = mMainWidget->txtNickName->text(); + TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( !newNick.isEmpty() && ( newNick != currentNick ) ) { //m_contact->rename(newNick); @@ -144,8 +144,8 @@ void AIMUserInfoDialog::slotSaveClicked() if (userInfoEdit) { // editable mode, set profile - QString newNick = mMainWidget->txtNickName->text(); - QString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString newNick = mMainWidget->txtNickName->text(); + TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if(!newNick.isEmpty() && ( newNick != currentNick ) ) { //m_contact->rename(newNick); @@ -169,7 +169,7 @@ void AIMUserInfoDialog::slotUpdateProfile() { kdDebug(14152) << k_funcinfo << "Got User Profile." << endl; AIMProtocol* p = static_cast( mAccount->protocol() ); - QString awayMessage = m_contact->property( p->awayMessage ).value().toString(); + TQString awayMessage = m_contact->property( p->awayMessage ).value().toString(); mMainWidget->txtAwayMessage->setText( awayMessage ); if ( awayMessage.isNull() ) @@ -183,15 +183,15 @@ void AIMUserInfoDialog::slotUpdateProfile() mMainWidget->lblAwayMessage->show(); } - QString onlineSince = m_contact->property("onlineSince").value().toString(); - //QString onlineSince = m_details.onlineSinceTime().toString(); + TQString onlineSince = m_contact->property("onlineSince").value().toString(); + //TQString onlineSince = m_details.onlineSinceTime().toString(); mMainWidget->txtOnlineSince->setText( onlineSince ); AIMContact* c = static_cast( m_contact ); mMainWidget->txtIdleTime->setText(c->formattedIdleTime()); - mMainWidget->txtWarnLevel->setText(QString::number(c->warningLevel())); + mMainWidget->txtWarnLevel->setText(TQString::number(c->warningLevel())); - QString contactProfile = m_contact->property( p->clientProfile ).value().toString(); + TQString contactProfile = m_contact->property( p->clientProfile ).value().toString(); if ( contactProfile.isNull() ) { contactProfile = @@ -209,12 +209,12 @@ void AIMUserInfoDialog::slotUpdateProfile() } -void AIMUserInfoDialog::slotUrlClicked(const QString &url) +void AIMUserInfoDialog::slotUrlClicked(const TQString &url) { new KRun(KURL(url)); } -void AIMUserInfoDialog::slotMailClicked(const QString&, const QString &address) +void AIMUserInfoDialog::slotMailClicked(const TQString&, const TQString &address) { new KRun(KURL(address)); } diff --git a/kopete/protocols/oscar/aim/aimuserinfo.h b/kopete/protocols/oscar/aim/aimuserinfo.h index f128610f..886274ac 100644 --- a/kopete/protocols/oscar/aim/aimuserinfo.h +++ b/kopete/protocols/oscar/aim/aimuserinfo.h @@ -32,7 +32,7 @@ class AIMUserInfoDialog : public KDialogBase Q_OBJECT public: AIMUserInfoDialog(Kopete::Contact *c, AIMAccount *acc, bool modal, - QWidget *parent, const char* name); + TQWidget *parent, const char* name); ~AIMUserInfoDialog(); private: @@ -47,11 +47,11 @@ class AIMUserInfoDialog : public KDialogBase void slotCloseClicked(); void slotUpdateClicked(); void slotUpdateProfile(); - void slotUrlClicked(const QString&); - void slotMailClicked(const QString&, const QString&); + void slotUrlClicked(const TQString&); + void slotMailClicked(const TQString&, const TQString&); signals: -// void updateNickname(const QString &); +// void updateNickname(const TQString &); void closing(); }; diff --git a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp index cf5fbae5..f00741c9 100644 --- a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp +++ b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp @@ -20,17 +20,17 @@ #include "kopeteaccount.h" -#include -#include +#include +#include #include #include -AIMAddContactPage::AIMAddContactPage(bool connected, QWidget *parent, +AIMAddContactPage::AIMAddContactPage(bool connected, TQWidget *parent, const char *name ) : AddContactPage(parent,name) { m_gui = 0; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); if(connected) { @@ -39,8 +39,8 @@ AIMAddContactPage::AIMAddContactPage(bool connected, QWidget *parent, } else { - noaddMsg1 = new QLabel(i18n("You need to be connected to be able to add contacts."), this); - noaddMsg2 = new QLabel(i18n("Connect to the AIM network and try again."), this); + noaddMsg1 = new TQLabel(i18n("You need to be connected to be able to add contacts."), this); + noaddMsg2 = new TQLabel(i18n("Connect to the AIM network and try again."), this); canadd = false; } } @@ -58,7 +58,7 @@ bool AIMAddContactPage::validateData() if ( !m_gui ) return false; - QString sn = m_gui->addSN->text(); + TQString sn = m_gui->addSN->text(); if ( sn.isEmpty() ) { KMessageBox::sorry ( this, diff --git a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h index 979d0472..7f6c732d 100644 --- a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h +++ b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h @@ -2,8 +2,8 @@ #ifndef AIMADDCONTACTPAGE_H #define AIMADDCONTACTPAGE_H -#include -#include +#include +#include #include "addcontactpage.h" class aimAddContactUI; @@ -19,7 +19,7 @@ class AIMAddContactPage : public AddContactPage Q_OBJECT public: - AIMAddContactPage(bool connected, QWidget *parent=0, + AIMAddContactPage(bool connected, TQWidget *parent=0, const char *name=0); ~AIMAddContactPage(); @@ -31,8 +31,8 @@ public: protected: /** The actual GUI */ aimAddContactUI *m_gui; - QLabel *noaddMsg1; - QLabel *noaddMsg2; + TQLabel *noaddMsg1; + TQLabel *noaddMsg2; bool canadd; }; #endif diff --git a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp index de720e17..2e0100ab 100644 --- a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp +++ b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp @@ -1,12 +1,12 @@ #include "aimeditaccountwidget.h" #include "aimeditaccountui.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -20,8 +20,8 @@ #include "aimaccount.h" AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, - Kopete::Account *account, QWidget *parent, const char *name ) - : QWidget( parent, name ), KopeteEditAccountWidget( account ) + Kopete::Account *account, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), KopeteEditAccountWidget( account ) { //kdDebug(14152) << k_funcinfo << "Called." << endl; @@ -29,7 +29,7 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, mProtocol = protocol; // create the gui (generated from a .ui file) - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); mGui = new aimEditAccountUI( this, "AIMEditAccountWidget::mGui" ); // Read in the settings from the account if it exists @@ -40,7 +40,7 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, //Remove me after we can change Account IDs (Matt) mGui->edtAccountId->setDisabled( true ); mGui->mAutoLogon->setChecked( account->excludeConnect() ); - QString serverEntry = account->configGroup()->readEntry( "Server", "login.oscar.aol.com" ); + TQString serverEntry = account->configGroup()->readEntry( "Server", "login.oscar.aol.com" ); int portEntry = account->configGroup()->readNumEntry( "Port", 5190 ); if ( serverEntry != "login.oscar.aol.com" || portEntry != 5190 ) mGui->optionOverrideServer->setChecked( true ); @@ -80,12 +80,12 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, // Global Identity mGui->mGlobalIdentity->setChecked( account->configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ); } - QObject::connect( mGui->buttonRegister, SIGNAL( clicked() ), this, SLOT( slotOpenRegister() ) ); + TQObject::connect( mGui->buttonRegister, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenRegister() ) ); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mGui->edtAccountId, mGui->mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mGui->mPasswordWidget->mRemembered, mGui->mPasswordWidget->mPassword ); - QWidget::setTabOrder( mGui->mPasswordWidget->mPassword, mGui->mAutoLogon ); + TQWidget::setTabOrder( mGui->edtAccountId, mGui->mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mGui->mPasswordWidget->mRemembered, mGui->mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mGui->mPasswordWidget->mPassword, mGui->mAutoLogon ); } AIMEditAccountWidget::~AIMEditAccountWidget() @@ -99,7 +99,7 @@ Kopete::Account *AIMEditAccountWidget::apply() if ( !mAccount ) { kdDebug( 14152 ) << k_funcinfo << "creating a new account" << endl; - QString newId = mGui->edtAccountId->text(); + TQString newId = mGui->edtAccountId->text(); mAccount = new AIMAccount( mProtocol, newId ); } @@ -145,8 +145,8 @@ bool AIMEditAccountWidget::validateData() { //kdDebug(14152) << k_funcinfo << "Called." << endl; - QString userName = mGui->edtAccountId->text(); - QString server = mGui->edtServerAddress->text(); + TQString userName = mGui->edtAccountId->text(); + TQString server = mGui->edtServerAddress->text(); int port = mGui->sbxServerPort->value(); if ( userName.length() < 1 ) diff --git a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h index ccb2b451..9f180315 100644 --- a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h +++ b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h @@ -19,7 +19,7 @@ #ifndef AIMEDITACCOUNTWIDGET_H #define AIMEDITACCOUNTWIDGET_H -#include +#include #include "editaccountwidget.h" /** * @author Chris TenHarmsel @@ -34,13 +34,13 @@ class AIMAccount; class AIMProtocol; class aimEditAccountUI; -class AIMEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class AIMEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: AIMEditAccountWidget(AIMProtocol *protocol, Kopete::Account *account, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual ~AIMEditAccountWidget(); virtual bool validateData(); diff --git a/kopete/protocols/oscar/icq/icqaccount.cpp b/kopete/protocols/oscar/icq/icqaccount.cpp index 9a071442..7e358346 100644 --- a/kopete/protocols/oscar/icq/icqaccount.cpp +++ b/kopete/protocols/oscar/icq/icqaccount.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -43,21 +43,21 @@ ICQMyselfContact::ICQMyselfContact( ICQAccount *acct ) : OscarMyselfContact( acct ) { - QObject::connect( acct->engine(), SIGNAL( loggedIn() ), this, SLOT( fetchShortInfo() ) ); - QObject::connect( acct->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( fetchShortInfo() ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); } void ICQMyselfContact::userInfoUpdated() { DWORD extendedStatus = details().extendedStatus(); - kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << QString::number( extendedStatus, 16 ) << endl; + kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << TQString::number( extendedStatus, 16 ) << endl; ICQ::Presence presence = ICQ::Presence::fromOscarStatus( extendedStatus & 0xffff ); setOnlineStatus( presence.toOnlineStatus() ); setProperty( Kopete::Global::Properties::self()->awayMessage(), static_cast( account() )->engine()->statusMessage() ); } -void ICQMyselfContact::receivedShortInfo( const QString& contact ) +void ICQMyselfContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -74,7 +74,7 @@ void ICQMyselfContact::fetchShortInfo() static_cast( account() )->engine()->requestShortInfo( contactId() ); } -ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char *name) +ICQAccount::ICQAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, true) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; @@ -83,15 +83,15 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * m_visibilityDialog = 0; - QString nickName = configGroup()->readEntry("NickName", QString::null); + TQString nickName = configGroup()->readEntry("NickName", TQString::null); mWebAware = configGroup()->readBoolEntry( "WebAware", false ); mHideIP = configGroup()->readBoolEntry( "HideIP", true ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; - QObject::connect( Kopete::ContactList::self(), SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), - this, SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), + this, TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); //setIgnoreUnknownContacts(pluginData(protocol(), "IgnoreUnknownContacts").toUInt() == 1); @@ -100,7 +100,7 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * { kdDebug(14153) << k_funcinfo << "sending status to reflect HideIP and WebAware settings" << endl; - //setStatus(mStatus, QString::null); + //setStatus(mStatus, TQString::null); }*/ } @@ -129,21 +129,21 @@ KActionMenu* ICQAccount::actionMenu() KToggleAction* actionInvisible = new KToggleAction( i18n( "In&visible" ), ICQ::Presence( presence().type(), ICQ::Presence::Invisible ).toOnlineStatus().iconFor( this ), - 0, this, SLOT( slotToggleInvisible() ), this ); + 0, this, TQT_SLOT( slotToggleInvisible() ), this ); actionInvisible->setChecked( presence().visibility() == ICQ::Presence::Invisible ); actionMenu->insert( actionInvisible ); actionMenu->popupMenu()->insertSeparator(); actionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "ICQAccount::mActionSetVisibility") ); - //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); + //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, TQT_SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); return actionMenu; } -void ICQAccount::connectWithPassword( const QString &password ) +void ICQAccount::connectWithPassword( const TQString &password ) { if ( password.isNull() ) return; @@ -162,9 +162,9 @@ void ICQAccount::connectWithPassword( const QString &password ) if ( accountIsOffline ) { myself()->setOnlineStatus( protocol()->statusManager()->connectingStatus() ); - QString icqNumber = accountId(); + TQString icqNumber = accountId(); kdDebug(14153) << k_funcinfo << "Logging in as " << icqNumber << endl ; - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); @@ -185,7 +185,7 @@ void ICQAccount::connectWithPassword( const QString &password ) engine()->start( server, port, accountId(), password ); engine()->connectToServer( c, server, true /* doAuth */ ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; } } @@ -195,7 +195,7 @@ void ICQAccount::disconnected( DisconnectReason reason ) ICQ::Presence presOffline = ICQ::Presence( ICQ::Presence::Offline, presence().visibility() ); myself()->setOnlineStatus( presOffline.toOnlineStatus() ); - QDictIterator it( contacts() ); + TQDictIterator it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast( it.current() ); @@ -231,25 +231,25 @@ void ICQAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; //temporary map for faster lookup of contactId - QMap revContactMap; + TQMap revContactMap; - QValueList contactList = engine()->ssiManager()->contactList(); - QValueList::const_iterator it, cEnd = contactList.constEnd(); + TQValueList contactList = engine()->ssiManager()->contactList(); + TQValueList::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast( contacts()[( *it ).name()] ); if ( oc ) { //for better orientation in lists use nickName and icq number - QString screenName( "%1 (%2)" ); + TQString screenName( "%1 (%2)" ); screenName = screenName.arg( oc->nickName(), contactId); contactMap.insert( screenName, contactId ); revContactMap.insert( contactId, screenName ); @@ -263,7 +263,7 @@ void ICQAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -299,7 +299,7 @@ void ICQAccount::slotVisibilityDialogClosed() m_visibilityDialog = 0L; } -void ICQAccount::setAway( bool away, const QString &awayReason ) +void ICQAccount::setAway( bool away, const TQString &awayReason ) { kdDebug(14153) << k_funcinfo << "account='" << accountId() << "'" << endl; if ( away ) @@ -319,7 +319,7 @@ void ICQAccount::setInvisible( ICQ::Presence::Visibility vis ) setPresenceTarget( ICQ::Presence( pres.type(), vis ) ); } -void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &message ) +void ICQAccount::setPresenceType( ICQ::Presence::Type type, const TQString &message ) { ICQ::Presence pres = presence(); kdDebug(14153) << k_funcinfo << "new type=" << (int)type << ", old type=" << (int)pres.type() << ", new message=" << message << endl; @@ -327,7 +327,7 @@ void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &messa setPresenceTarget( ICQ::Presence( type, pres.visibility() ), message ); } -void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString &message ) +void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const TQString &message ) { bool targetIsOffline = (newPres.type() == ICQ::Presence::Offline); bool accountIsOffline = ( presence().type() == ICQ::Presence::Offline || @@ -351,7 +351,7 @@ void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString } -void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { if ( status.status() == Kopete::OnlineStatus::Invisible ) { @@ -375,9 +375,9 @@ void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *ICQAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - ICQContact* contact = new ICQContact( this, contactId, parentContact, QString::null, ssiItem ); + ICQContact* contact = new ICQContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); @@ -387,13 +387,13 @@ OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::Me return contact; } -QString ICQAccount::sanitizedMessage( const QString& message ) +TQString ICQAccount::sanitizedMessage( const TQString& message ) { return Kopete::Message::escape( message ); } -void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void ICQAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(14153) << k_funcinfo << "Global identity changed" << endl; @@ -417,14 +417,14 @@ void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void ICQAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -437,7 +437,7 @@ void ICQAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -453,7 +453,7 @@ void ICQAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -478,7 +478,7 @@ void ICQAccount::slotBuddyIconChanged() t2.type = 0x0131; t2.length = 0; - QValueList list; + TQValueList list; list.append( t ); list.append( t2 ); @@ -492,7 +492,7 @@ void ICQAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(14153) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) diff --git a/kopete/protocols/oscar/icq/icqaccount.h b/kopete/protocols/oscar/icq/icqaccount.h index f6231ec9..d64fe5d7 100644 --- a/kopete/protocols/oscar/icq/icqaccount.h +++ b/kopete/protocols/oscar/icq/icqaccount.h @@ -39,7 +39,7 @@ public: void userInfoUpdated(); public slots: - void receivedShortInfo( const QString& ); + void receivedShortInfo( const TQString& ); void fetchShortInfo(); }; @@ -49,7 +49,7 @@ class ICQAccount : public OscarAccount Q_OBJECT public: - ICQAccount( Kopete::Protocol *parent, QString accountID, const char *name = 0L ); + ICQAccount( Kopete::Protocol *parent, TQString accountID, const char *name = 0L ); virtual ~ICQAccount(); ICQProtocol *protocol(); @@ -58,18 +58,18 @@ public: virtual KActionMenu* actionMenu(); /** Reimplementation from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus&, const QString& ); + void setOnlineStatus( const Kopete::OnlineStatus&, const TQString& ); - virtual void setAway( bool away, const QString &awayReason ); + virtual void setAway( bool away, const TQString &awayReason ); - void connectWithPassword( const QString &password ); + void connectWithPassword( const TQString &password ); - void setUserProfile( const QString &profile ); + void setUserProfile( const TQString &profile ); protected: - virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); + virtual OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); - virtual QString sanitizedMessage( const QString& message ); + virtual TQString sanitizedMessage( const TQString& message ); protected slots: virtual void disconnected( DisconnectReason reason ); @@ -79,8 +79,8 @@ private: ICQ::Presence presence(); void setInvisible( ICQ::Presence::Visibility ); - void setPresenceType( ICQ::Presence::Type, const QString &awayMessage = QString::null ); - void setPresenceTarget( const ICQ::Presence &presence, const QString &message = QString::null ); + void setPresenceType( ICQ::Presence::Type, const TQString &awayMessage = TQString::null ); + void setPresenceTarget( const ICQ::Presence &presence, const TQString &message = TQString::null ); //const unsigned long fullStatus( const unsigned long plainStatus ); @@ -90,14 +90,14 @@ private slots: void slotSetVisiblility(); void slotVisibilityDialogClosed(); - void slotGlobalIdentityChanged( const QString& key, const QVariant& value ); + void slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ); void slotBuddyIconChanged(); private: bool mWebAware; bool mHideIP; - QString mInitialStatusMessage; + TQString mInitialStatusMessage; OscarVisibilityDialog* m_visibilityDialog; }; diff --git a/kopete/protocols/oscar/icq/icqcontact.cpp b/kopete/protocols/oscar/icq/icqcontact.cpp index 8ba8d195..90204bdf 100644 --- a/kopete/protocols/oscar/icq/icqcontact.cpp +++ b/kopete/protocols/oscar/icq/icqcontact.cpp @@ -17,9 +17,9 @@ #include "icqcontact.h" -#include -#include -#include +#include +#include +#include #include #include @@ -51,8 +51,8 @@ #include "oscarencodingselectiondialog.h" #include "ssimanager.h" -ICQContact::ICQContact( ICQAccount *account, const QString &name, Kopete::MetaContact *parent, - const QString& icon, const Oscar::SSI& ssiItem ) +ICQContact::ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, + const TQString& icon, const Oscar::SSI& ssiItem ) : OscarContact( account, name, parent, icon, ssiItem ) { mProtocol = static_cast(protocol()); @@ -66,28 +66,28 @@ ICQContact::ICQContact( ICQAccount *account, const QString &name, Kopete::MetaCo else setOnlineStatus( ICQ::Presence( ICQ::Presence::Offline, ICQ::Presence::Visible ).toOnlineStatus() ); - QObject::connect( mAccount->engine(), SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); - //QObject::connect( mAccount->engine(), SIGNAL( userIsOnline( const QString& ) ), this, SLOT( userOnline( const QString&, UserDetails ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), this, SLOT( userOffline( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( authRequestReceived( const QString&, const QString& ) ), - this, SLOT( slotGotAuthRequest( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ), - this, SLOT( slotGotAuthReply(const QString&, const QString&, bool ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedIcqLongInfo( const QString& ) ), - this, SLOT( receivedLongInfo( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ), - this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SLOT( receivedStatusMessage( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const Oscar::Message& ) ), - this, SLOT( receivedStatusMessage( const Oscar::Message& ) ) ); - QObject::connect( this, SIGNAL( featuresUpdated() ), this, SLOT( updateFeatures() ) ); - QObject::connect( mAccount->engine(), SIGNAL( iconServerConnected() ), - this, SLOT( requestBuddyIcon() ) ); - QObject::connect( mAccount->engine(), SIGNAL( haveIconForContact( const QString&, QByteArray ) ), - this, SLOT( haveIcon( const QString&, QByteArray ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loggedIn() ) ); + //TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOnline( const TQString& ) ), this, TQT_SLOT( userOnline( const TQString&, UserDetails ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOffline( const TQString& ) ), this, TQT_SLOT( userOffline( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ), + this, TQT_SLOT( slotGotAuthRequest( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ), + this, TQT_SLOT( slotGotAuthReply(const TQString&, const TQString&, bool ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedIcqLongInfo( const TQString& ) ), + this, TQT_SLOT( receivedLongInfo( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( userInfoUpdated( const TQString&, const UserDetails& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SLOT( receivedStatusMessage( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const Oscar::Message& ) ), + this, TQT_SLOT( receivedStatusMessage( const Oscar::Message& ) ) ); + TQObject::connect( this, TQT_SIGNAL( featuresUpdated() ), this, TQT_SLOT( updateFeatures() ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( requestBuddyIcon() ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ), + this, TQT_SLOT( haveIcon( const TQString&, TQByteArray ) ) ); } @@ -111,7 +111,7 @@ void ICQContact::updateSSIItem() } -void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void ICQContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { //kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << contact << contactId() << endl; if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) @@ -193,7 +193,7 @@ void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& det int time = ( KApplication::random() % 10 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestBuddyIcon() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); } } } @@ -201,7 +201,7 @@ void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& det OscarContact::userInfoUpdated( contact, details ); } -void ICQContact::userOnline( const QString& userId ) +void ICQContact::userOnline( const TQString& userId ) { if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; @@ -211,7 +211,7 @@ void ICQContact::userOnline( const QString& userId ) //mAccount->engine()->requestStatusInfo( contactId() ); } -void ICQContact::userOffline( const QString& userId ) +void ICQContact::userOffline( const TQString& userId ) { if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; @@ -237,7 +237,7 @@ void ICQContact::loggedIn() m_requestingNickname = true; int time = ( KApplication::random() % 20 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestShortInfo() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestShortInfo() ) ); } } @@ -250,7 +250,7 @@ void ICQContact::requestShortInfo() void ICQContact::slotRequestAuth() { - QString reason = KInputDialog::getText( i18n("Request Authorization"), + TQString reason = KInputDialog::getText( i18n("Request Authorization"), i18n("Reason for requesting authorization:") ); if ( !reason.isNull() ) mAccount->engine()->requestAuth( contactId(), reason ); @@ -266,13 +266,13 @@ void ICQContact::slotSendAuth() mAccount->engine()->sendAuth( contactId(), replyDialog.reason(), replyDialog.grantAuth() ); } -void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason, bool granted ) +void ICQContact::slotGotAuthReply( const TQString& contact, const TQString& reason, bool granted ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << endl; - QString message; + TQString message; if( granted ) { message = i18n( "User %1 has granted your authorization request.\nReason: %2" ) @@ -291,14 +291,14 @@ void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason KNotifyClient::event( Kopete::UI::Global::sysTrayWId(), "icq_authorization", message ); } -void ICQContact::slotGotAuthRequest( const QString& contact, const QString& reason ) +void ICQContact::slotGotAuthRequest( const TQString& contact, const TQString& reason ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; ICQAuthReplyDialog *replyDialog = new ICQAuthReplyDialog(); - connect( replyDialog, SIGNAL( okClicked() ), this, SLOT( slotAuthReplyDialogOkClicked() ) ); + connect( replyDialog, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotAuthReplyDialogOkClicked() ) ); replyDialog->setUser( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); replyDialog->setRequestReason( reason ); replyDialog->setModal( TRUE ); @@ -314,7 +314,7 @@ void ICQContact::slotAuthReplyDialogOkClicked() mAccount->engine()->sendAuth( contactId(), replyDialog->reason(), replyDialog->grantAuth() ); } -void ICQContact::receivedLongInfo( const QString& contact ) +void ICQContact::receivedLongInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) { @@ -323,7 +323,7 @@ void ICQContact::receivedLongInfo( const QString& contact ) return; } - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "received long info from engine" << endl; @@ -343,12 +343,12 @@ void ICQContact::receivedLongInfo( const QString& contact ) } -void ICQContact::receivedShortInfo( const QString& contact ) +void ICQContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); m_requestingNickname = false; //done requesting nickname ICQShortInfo shortInfo = mAccount->engine()->getShortInfo( contact ); @@ -372,7 +372,7 @@ void ICQContact::receivedShortInfo( const QString& contact ) } -void ICQContact::receivedStatusMessage( const QString &contact, const QString &message ) +void ICQContact::receivedStatusMessage( const TQString &contact, const TQString &message ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -389,9 +389,9 @@ void ICQContact::receivedStatusMessage( const Oscar::Message &message ) return; //decode message - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); - QString realText = message.text(codec); + TQString realText = message.text(codec); if ( !realText.isEmpty() ) setProperty( mProtocol->awayMessage, realText ); @@ -404,7 +404,7 @@ void ICQContact::slotSendMsg( Kopete::Message& msg, Kopete::ChatSession* session //Why is this unused? Q_UNUSED( session ); - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); int messageChannel = 0x01; Oscar::Message::Encoding messageEncoding; @@ -414,14 +414,14 @@ void ICQContact::slotSendMsg( Kopete::Message& msg, Kopete::ChatSession* session else messageEncoding = Oscar::Message::UserDefined; - QString msgText( msg.plainBody() ); + TQString msgText( msg.plainBody() ); // TODO: More intelligent handling of message length. uint chunk_length = !isOnline() ? 450 : 4096; uint msgPosition = 0; do { - QString msgChunk( msgText.mid( msgPosition, chunk_length ) ); + TQString msgChunk( msgText.mid( msgPosition, chunk_length ) ); // Try to split on space if needed if ( msgChunk.length() == chunk_length ) { @@ -460,7 +460,7 @@ void ICQContact::requestBuddyIcon() } } -void ICQContact::haveIcon( const QString& user, QByteArray icon ) +void ICQContact::haveIcon( const TQString& user, TQByteArray icon ) { if ( Oscar::normalize( user ) != Oscar::normalize( contactId() ) ) return; @@ -470,9 +470,9 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) KMD5 buddyIconHash( icon ); if ( memcmp( buddyIconHash.rawDigest(), m_details.buddyIconHash().data(), 16 ) == 0 ) { - QString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); + TQString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); - QFile iconFile( iconLocation ); + TQFile iconFile( iconLocation ); if ( !iconFile.open( IO_WriteOnly ) ) { kdDebug(14153) << k_funcinfo << "Cannot open file" @@ -483,7 +483,7 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) iconFile.writeBlock( icon ); iconFile.close(); - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; } @@ -494,11 +494,11 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) } } -bool ICQContact::cachedBuddyIcon( QByteArray hash ) +bool ICQContact::cachedBuddyIcon( TQByteArray hash ) { - QString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); + TQString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); - QFile iconFile( iconLocation ); + TQFile iconFile( iconLocation ); if ( !iconFile.open( IO_ReadOnly ) ) return false; @@ -510,7 +510,7 @@ bool ICQContact::cachedBuddyIcon( QByteArray hash ) { kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << " from local cache" << endl; - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; return true; @@ -532,7 +532,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) /*kdDebug(14190) << k_funcinfo << "Called for '" << displayName() << "', contactName()=" << contactName() << endl;*/ - QStringList capList; + TQStringList capList; // Append client name and version in case we found one if (!mInfo.clientName.isEmpty()) { @@ -595,7 +595,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) setStatus(newStatus); } -void ICQContact::slotOffgoingBuddy(QString sender) +void ICQContact::slotOffgoingBuddy(TQString sender) { if(sender != contactName()) return; @@ -605,7 +605,7 @@ void ICQContact::slotOffgoingBuddy(QString sender) setOnlineStatus(mProtocol->statusOffline); } -void ICQContact::gotIM(OscarSocket::OscarMessageType /*type*/, const QString &message) +void ICQContact::gotIM(OscarSocket::OscarMessageType /*type*/, const TQString &message) { // Build a Kopete::Message and set the body as Rich Text Kopete::ContactPtrList tmpList; @@ -649,12 +649,12 @@ bool ICQContact::isReachable() return account()->isConnected(); } -QPtrList *ICQContact::customContextMenuActions() +TQPtrList *ICQContact::customContextMenuActions() { - QPtrList *actionCollection = new QPtrList(); + TQPtrList *actionCollection = new TQPtrList(); /* - QString awTxt; - QString awIcn; + TQString awTxt; + TQString awIcn; unsigned int status = onlineStatus().internalStatus(); if (status >= 15) status -= 15; // get rid of invis addon @@ -685,12 +685,12 @@ QPtrList *ICQContact::customContextMenuActions() if(actionReadAwayMessage==0) { actionReadAwayMessage = new KAction(awTxt, awIcn, 0, - this, SLOT(slotReadAwayMessage()), this, "actionReadAwayMessage"); + this, TQT_SLOT(slotReadAwayMessage()), this, "actionReadAwayMessage"); */ actionRequestAuth = new KAction(i18n("&Request Authorization"), "mail_reply", 0, - this, SLOT(slotRequestAuth()), this, "actionRequestAuth"); + this, TQT_SLOT(slotRequestAuth()), this, "actionRequestAuth"); actionSendAuth = new KAction(i18n("&Grant Authorization"), "mail_forward", 0, - this, SLOT(slotSendAuth()), this, "actionSendAuth"); + this, TQT_SLOT(slotSendAuth()), this, "actionSendAuth"); /* } else @@ -701,11 +701,11 @@ QPtrList *ICQContact::customContextMenuActions() */ m_actionIgnore = new KToggleAction(i18n("&Ignore"), "", 0, - this, SLOT(slotIgnore()), this, "actionIgnore"); + this, TQT_SLOT(slotIgnore()), this, "actionIgnore"); m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), "", 0, - this, SLOT(slotVisibleTo()), this, "actionVisibleTo"); + this, TQT_SLOT(slotVisibleTo()), this, "actionVisibleTo"); m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), "", 0, - this, SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); + this, TQT_SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); bool on = account()->isConnected(); if ( m_ssiItem.waitingAuth() ) @@ -717,7 +717,7 @@ QPtrList *ICQContact::customContextMenuActions() m_selectEncoding = new KAction( i18n( "Select Encoding..." ), "charset", 0, - this, SLOT( changeContactEncoding() ), this, "changeEncoding" ); + this, TQT_SLOT( changeContactEncoding() ), this, "changeEncoding" ); /* actionReadAwayMessage->setEnabled(status != OSCAR_OFFLINE && status != OSCAR_ONLINE); @@ -748,7 +748,7 @@ QPtrList *ICQContact::customContextMenuActions() void ICQContact::slotUserInfo() { m_infoWidget = new ICQUserInfoWidget( Kopete::UI::Global::mainWidget(), "icq info" ); - QObject::connect( m_infoWidget, SIGNAL( finished() ), this, SLOT( closeUserInfoDialog() ) ); + TQObject::connect( m_infoWidget, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfoDialog() ) ); m_infoWidget->setContact( this ); m_infoWidget->show(); if ( account()->isConnected() ) @@ -757,7 +757,7 @@ void ICQContact::slotUserInfo() void ICQContact::closeUserInfoDialog() { - QObject::disconnect( this, 0, m_infoWidget, 0 ); + TQObject::disconnect( this, 0, m_infoWidget, 0 ); m_infoWidget->delayedDestruct(); m_infoWidget = 0L; } @@ -768,14 +768,14 @@ void ICQContact::changeContactEncoding() return; m_oesd = new OscarEncodingSelectionDialog( Kopete::UI::Global::mainWidget(), property(mProtocol->contactEncoding).value().toInt() ); - connect( m_oesd, SIGNAL( closing( int ) ), - this, SLOT( changeEncodingDialogClosed( int ) ) ); + connect( m_oesd, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( changeEncodingDialogClosed( int ) ) ); m_oesd->show(); } void ICQContact::changeEncodingDialogClosed( int result ) { - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { int mib = m_oesd->selectedEncoding(); if ( mib != 0 ) @@ -827,7 +827,7 @@ void ICQContact::slotReadAwayMessage() awayMessageDialog = new ICQReadAway(this, 0L, "awayMessageDialog"); if(!awayMessageDialog) return; - QObject::connect(awayMessageDialog, SIGNAL(closing()), this, SLOT(slotCloseAwayMessageDialog())); + TQObject::connect(awayMessageDialog, TQT_SIGNAL(closing()), this, TQT_SLOT(slotCloseAwayMessageDialog())); awayMessageDialog->show(); } else @@ -844,14 +844,14 @@ void ICQContact::slotCloseAwayMessageDialog() } -const QString ICQContact::awayMessage() +const TQString ICQContact::awayMessage() { kdDebug(14150) << k_funcinfo << property(mProtocol->awayMessage).value().toString() << endl; return property(mProtocol->awayMessage).value().toString(); } -void ICQContact::setAwayMessage(const QString &message) +void ICQContact::setAwayMessage(const TQString &message) { /*kdDebug(14150) << k_funcinfo << "Called for '" << displayName() << "', away msg='" << message << "'" << endl;*/ diff --git a/kopete/protocols/oscar/icq/icqcontact.h b/kopete/protocols/oscar/icq/icqcontact.h index 41084e63..8e3301cf 100644 --- a/kopete/protocols/oscar/icq/icqcontact.h +++ b/kopete/protocols/oscar/icq/icqcontact.h @@ -51,30 +51,30 @@ Q_OBJECT public: /** Normal ICQ constructor */ - ICQContact( ICQAccount *account, const QString &name, Kopete::MetaContact *parent, - const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, + const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~ICQContact(); /** * Returns a set of custom menu items for * the context menu */ - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); /** Return whether or not this contact is reachable. */ virtual bool isReachable(); - //virtual const QString awayMessage(); - //virtual void setAwayMessage(const QString &message); + //virtual const TQString awayMessage(); + //virtual void setAwayMessage(const TQString &message); public slots: virtual void slotUserInfo(); virtual void updateSSIItem(); - void userInfoUpdated( const QString& contact, const UserDetails& details ); + void userInfoUpdated( const TQString& contact, const UserDetails& details ); - void userOnline( const QString& userId ); - void userOffline( const QString& userID ); + void userOnline( const TQString& userId ); + void userOffline( const TQString& userID ); void loggedIn(); void requestShortInfo(); @@ -87,7 +87,7 @@ signals: void haveInterestInfo( const ICQInterestInfo& ); private: - bool cachedBuddyIcon( QByteArray hash ); + bool cachedBuddyIcon( TQByteArray hash ); bool m_buddyIconDirty; bool m_requestingNickname; @@ -125,22 +125,22 @@ private slots: void slotAuthReplyDialogOkClicked(); /** We have received an auth request */ - void slotGotAuthRequest( const QString& contact, const QString& reason ); + void slotGotAuthRequest( const TQString& contact, const TQString& reason ); /** We have received an auth reply */ - void slotGotAuthReply( const QString& contact, const QString& reason, bool granted ); + void slotGotAuthReply( const TQString& contact, const TQString& reason, bool granted ); void closeUserInfoDialog(); - void receivedLongInfo( const QString& contact ); - void receivedShortInfo( const QString& contact ); + void receivedLongInfo( const TQString& contact ); + void receivedShortInfo( const TQString& contact ); void changeContactEncoding(); void changeEncodingDialogClosed( int ); void requestBuddyIcon(); - void haveIcon( const QString&, QByteArray ); - void receivedStatusMessage( const QString &contact, const QString &message ); + void haveIcon( const TQString&, TQByteArray ); + void receivedStatusMessage( const TQString &contact, const TQString &message ); void receivedStatusMessage( const Oscar::Message &message ); //void slotCloseAwayMessageDialog(); diff --git a/kopete/protocols/oscar/icq/icqpresence.cpp b/kopete/protocols/oscar/icq/icqpresence.cpp index ab6bb670..393f04c9 100644 --- a/kopete/protocols/oscar/icq/icqpresence.cpp +++ b/kopete/protocols/oscar/icq/icqpresence.cpp @@ -39,9 +39,9 @@ struct PresenceTypeData Kopete::OnlineStatus::StatusType onlineStatusType; unsigned long setFlag; unsigned long getFlag; - QString caption; - QString visibleName; - QString invisibleName; + TQString caption; + TQString visibleName; + TQString invisibleName; const char *visibleIcon; const char *invisibleIcon; unsigned int categories; @@ -132,8 +132,8 @@ public: , waitingForAuth( Kopete::OnlineStatus::Unknown, 1, ICQProtocol::protocol(), Presence::Offline, "button_cancel", i18n("Waiting for Authorization") ) , invisible( Kopete::OnlineStatus::Invisible, 2, ICQProtocol::protocol(), - Presence::Offline, QString::null, QString::null, - QString::null, Kopete::OnlineStatusManager::Invisible, + Presence::Offline, TQString::null, TQString::null, + TQString::null, Kopete::OnlineStatusManager::Invisible, Kopete::OnlineStatusManager::HideFromMenu ) { @@ -150,8 +150,8 @@ public: const PresenceTypeData &data = PresenceTypeData::forType( static_cast(n) ); const uint weight = n + firstUsableWeight; const uint internalStatus = n + invisibleOffset; - QStringList overlayIcons( data.visibleIcon ); - QString description( data.visibleName ); + TQStringList overlayIcons( data.visibleIcon ); + TQString description( data.visibleName ); Kopete::OnlineStatus status; if ( invisible ) { 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); } diff --git a/kopete/protocols/oscar/icq/icqprotocol.h b/kopete/protocols/oscar/icq/icqprotocol.h index 8e3c1be9..96b2e201 100644 --- a/kopete/protocols/oscar/icq/icqprotocol.h +++ b/kopete/protocols/oscar/icq/icqprotocol.h @@ -31,7 +31,7 @@ class ICQProtocolHandler : public Kopete::MimeTypeHandler { public: ICQProtocolHandler(); - void handleURL(const QString &mimeType, const KURL & url) const; + void handleURL(const TQString &mimeType, const KURL & url) const; }; @@ -40,7 +40,7 @@ class ICQProtocol : public Kopete::Protocol Q_OBJECT public: - ICQProtocol(QObject *parent, const char *name, const QStringList &args); + ICQProtocol(TQObject *parent, const char *name, const TQStringList &args); virtual ~ICQProtocol(); /** @@ -51,11 +51,11 @@ public: virtual bool canSendOffline() const; virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &addressBookData ); - AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account); - KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - Kopete::Account *createNewAccount(const QString &accountId); + const TQMap &serializedData, + const TQMap &addressBookData ); + AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account); + KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + Kopete::Account *createNewAccount(const TQString &accountId); ICQ::OnlineStatusManager *statusManager(); @@ -69,19 +69,19 @@ public: const Kopete::ContactPropertyTmpl buddyIconHash; const Kopete::ContactPropertyTmpl contactEncoding; - const QMap &genders() { return mGenders; } - const QMap &countries() { return mCountries; } - const QMap &languages() { return mLanguages; } - const QMap &encodings() { return mEncodings; } - const QMap &maritals() { return mMarital; } - const QMap &interests() { return mInterests; } + const TQMap &genders() { return mGenders; } + const TQMap &countries() { return mCountries; } + const TQMap &languages() { return mLanguages; } + const TQMap &encodings() { return mEncodings; } + const TQMap &maritals() { return mMarital; } + const TQMap &interests() { return mInterests; } - void fillComboFromTable( QComboBox*, const QMap& ); - void setComboFromTable( QComboBox*, const QMap&, int ); - int getCodeForCombo( QComboBox*, const QMap& ); - /* void fillTZCombo(QComboBox *combo); - void setTZComboValue(QComboBox *combo, const char &tz); - char getTZComboValue(QComboBox *combo); */ + void fillComboFromTable( TQComboBox*, const TQMap& ); + void setComboFromTable( TQComboBox*, const TQMap&, int ); + int getCodeForCombo( TQComboBox*, const TQMap& ); + /* void fillTZCombo(TQComboBox *combo); + void setTZComboValue(TQComboBox *combo, const char &tz); + char getTZComboValue(TQComboBox *combo); */ private: void initGenders(); @@ -94,12 +94,12 @@ private: private: static ICQProtocol* protocolStatic_; ICQ::OnlineStatusManager* statusManager_; - QMap mGenders; - QMap mCountries; - QMap mLanguages; - QMap mEncodings; - QMap mMarital; - QMap mInterests; + TQMap mGenders; + TQMap mCountries; + TQMap mLanguages; + TQMap mEncodings; + TQMap mMarital; + TQMap mInterests; ICQProtocolHandler protohandler; }; #endif diff --git a/kopete/protocols/oscar/icq/icqreadaway.cpp b/kopete/protocols/oscar/icq/icqreadaway.cpp index 94cccafd..28b86d33 100644 --- a/kopete/protocols/oscar/icq/icqreadaway.cpp +++ b/kopete/protocols/oscar/icq/icqreadaway.cpp @@ -20,7 +20,7 @@ #include "icqaccount.h" #include "icqcontact.h" -#include +#include #include #include @@ -29,8 +29,8 @@ #include -ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name) - : KDialogBase(parent, name, false, QString::null, Close | User1, +ICQReadAway::ICQReadAway(ICQContact *c, TQWidget *parent, const char* name) + : KDialogBase(parent, name, false, TQString::null, Close | User1, Close, false, i18n("&Fetch Again")) { assert(c); @@ -39,27 +39,27 @@ ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name) mContact = c; setCaption(i18n("'%2' Message for %1").arg(c->displayName()).arg(c->onlineStatus().description())); - QVBox *mMainWidget = makeVBoxMainWidget(); + TQVBox *mMainWidget = makeVBoxMainWidget(); awayMessageBrowser = new KTextBrowser(mMainWidget, "userInfoView"); awayMessageBrowser->setTextFormat(AutoText); awayMessageBrowser->setNotifyClick(true); awayMessageBrowser->setText(mContact->awayMessage()); - QObject::connect( - awayMessageBrowser, SIGNAL(urlClick(const QString&)), - this, SLOT(slotUrlClicked(const QString&))); - QObject::connect( - awayMessageBrowser, SIGNAL(mailClick(const QString&, const QString&)), - this, SLOT(slotMailClicked(const QString&, const QString&))); + TQObject::connect( + awayMessageBrowser, TQT_SIGNAL(urlClick(const TQString&)), + this, TQT_SLOT(slotUrlClicked(const TQString&))); + TQObject::connect( + awayMessageBrowser, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), + this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotFetchAwayMessage())); - connect(this, SIGNAL(closeClicked()), - this, SLOT(slotCloseClicked())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotFetchAwayMessage())); + connect(this, TQT_SIGNAL(closeClicked()), + this, TQT_SLOT(slotCloseClicked())); - connect(c, SIGNAL(awayMessageChanged()), - this, SLOT(slotAwayMessageChanged())); + connect(c, TQT_SIGNAL(awayMessageChanged()), + this, TQT_SLOT(slotAwayMessageChanged())); slotFetchAwayMessage(); } @@ -92,12 +92,12 @@ void ICQReadAway::slotCloseClicked() emit closing(); } -void ICQReadAway::slotUrlClicked(const QString &url) +void ICQReadAway::slotUrlClicked(const TQString &url) { new KRun(KURL(url)); } -void ICQReadAway::slotMailClicked(const QString&, const QString &address) +void ICQReadAway::slotMailClicked(const TQString&, const TQString &address) { new KRun(KURL(address)); } diff --git a/kopete/protocols/oscar/icq/icqreadaway.h b/kopete/protocols/oscar/icq/icqreadaway.h index 7e62588e..81981257 100644 --- a/kopete/protocols/oscar/icq/icqreadaway.h +++ b/kopete/protocols/oscar/icq/icqreadaway.h @@ -30,14 +30,14 @@ class ICQReadAway : public KDialogBase Q_OBJECT public: - ICQReadAway(ICQContact *, QWidget *parent = 0, const char* name = "ICQReadAway"); + ICQReadAway(ICQContact *, TQWidget *parent = 0, const char* name = "ICQReadAway"); private slots: void slotFetchAwayMessage(); void slotAwayMessageChanged(); void slotCloseClicked(); - void slotUrlClicked(const QString &url); - void slotMailClicked(const QString&, const QString &address); + void slotUrlClicked(const TQString &url); + void slotMailClicked(const TQString&, const TQString &address); signals: void closing(); @@ -45,7 +45,7 @@ class ICQReadAway : public KDialogBase private: ICQAccount *mAccount; ICQContact *mContact; - QVBox *mMainWidget; + TQVBox *mMainWidget; KTextBrowser *awayMessageBrowser; }; #endif diff --git a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp index b1ab2eb4..3461ed8f 100644 --- a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp +++ b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp @@ -18,13 +18,13 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,28 +39,28 @@ #include "icqsearchdialog.h" -ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, QWidget *parent, const char *name) +ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, TQWidget *parent, const char *name) : AddContactPage(parent,name) { kdDebug(14153) << k_funcinfo << "called" << endl; mAccount = owner; m_searchDialog = 0L; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); addUI = new icqAddUI(this); - connect( addUI->searchButton, SIGNAL( clicked() ), this, SLOT( showSearchDialog() ) ); + connect( addUI->searchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( showSearchDialog() ) ); } ICQAddContactPage::~ICQAddContactPage() { } -void ICQAddContactPage::setUINFromSearch( const QString& uin ) +void ICQAddContactPage::setUINFromSearch( const TQString& uin ) { addUI->uinEdit->setText( uin ); } -void ICQAddContactPage::showEvent(QShowEvent *e) +void ICQAddContactPage::showEvent(TQShowEvent *e) { // slotSelectionChanged(); AddContactPage::showEvent(e); @@ -70,7 +70,7 @@ bool ICQAddContactPage::apply(Kopete::Account* , Kopete::MetaContact *parentCont { kdDebug(14153) << k_funcinfo << "called; adding contact..." << endl; - QString contactId = addUI->uinEdit->text(); + TQString contactId = addUI->uinEdit->text(); kdDebug(14153) << k_funcinfo << "uin=" << contactId << endl; return mAccount->addContact(contactId, parentContact, Kopete::Account::ChangeKABC ); @@ -109,13 +109,13 @@ void ICQAddContactPage::showSearchDialog() { m_searchDialog = new ICQSearchDialog( mAccount, this, "icqSearchDialog" ); m_searchDialog->show(); - connect( m_searchDialog, SIGNAL( finished() ), this, SLOT( searchDialogDestroyed() ) ); + connect( m_searchDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( searchDialogDestroyed() ) ); } } void ICQAddContactPage::searchDialogDestroyed() { - QObject::disconnect( this, 0, m_searchDialog, 0 ); + TQObject::disconnect( this, 0, m_searchDialog, 0 ); m_searchDialog->delayedDestruct(); m_searchDialog = NULL; } diff --git a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h index e9285b79..c6c22eb2 100644 --- a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h +++ b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h @@ -18,7 +18,7 @@ #ifndef ICQADDCONTACTPAGE_H #define ICQADDCONTACTPAGE_H -#include +#include #include /** @@ -34,16 +34,16 @@ class ICQAddContactPage : public AddContactPage Q_OBJECT public: - ICQAddContactPage(ICQAccount *owner, QWidget *parent = 0, const char *name = 0); + ICQAddContactPage(ICQAccount *owner, TQWidget *parent = 0, const char *name = 0); ~ICQAddContactPage(); virtual bool validateData(); virtual bool apply(Kopete::Account* , Kopete::MetaContact *parentContact); - void setUINFromSearch( const QString& ); + void setUINFromSearch( const TQString& ); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); private slots: void showSearchDialog(); diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp index 76b56fba..a92b33de 100644 --- a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp @@ -20,11 +20,11 @@ #include -#include -#include -#include +#include +#include +#include -ICQAuthReplyDialog::ICQAuthReplyDialog( QWidget *parent, const char *name, bool wasRequested ) +ICQAuthReplyDialog::ICQAuthReplyDialog( TQWidget *parent, const char *name, bool wasRequested ) : KDialogBase( parent, name, true, i18n( "Authorization Reply" ), KDialogBase::Ok | KDialogBase::Cancel ) { m_ui = new ICQAuthReplyUI( this ); @@ -46,7 +46,7 @@ ICQAuthReplyDialog::~ICQAuthReplyDialog() { } -void ICQAuthReplyDialog::setUser( const QString & user ) +void ICQAuthReplyDialog::setUser( const TQString & user ) { if ( m_wasRequested ) m_ui->lblUserReq->setText( @@ -55,12 +55,12 @@ void ICQAuthReplyDialog::setUser( const QString & user ) m_ui->lblUserReq->setText( i18n( "Authorization reply to %1." ).arg( user ) ); } -void ICQAuthReplyDialog::setRequestReason( const QString & reason ) +void ICQAuthReplyDialog::setRequestReason( const TQString & reason ) { m_ui->lblRequestReason->setText( reason ); } -QString ICQAuthReplyDialog::reason() +TQString ICQAuthReplyDialog::reason() { return m_ui->leReason->text(); } diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h index da27b241..f32d4569 100644 --- a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h @@ -30,12 +30,12 @@ class ICQAuthReplyDialog : public KDialogBase { Q_OBJECT public: - ICQAuthReplyDialog(QWidget *parent = 0, const char *name = 0, bool wasRequested = true); + ICQAuthReplyDialog(TQWidget *parent = 0, const char *name = 0, bool wasRequested = true); ~ICQAuthReplyDialog(); - void setUser( const QString& user ); - void setRequestReason( const QString& reason ); - QString reason(); + void setUser( const TQString& user ); + void setRequestReason( const TQString& reason ); + TQString reason(); bool grantAuth(); private: bool m_wasRequested; diff --git a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp index e4b308be..04a312a4 100644 --- a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp +++ b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp @@ -17,13 +17,13 @@ #include "icqeditaccountwidget.h" #include "icqeditaccountui.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -44,15 +44,15 @@ #include "icqcontact.h" ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, - Kopete::Account *account, QWidget *parent, const char *name) - : QWidget(parent, name), KopeteEditAccountWidget(account) + Kopete::Account *account, TQWidget *parent, const char *name) + : TQWidget(parent, name), KopeteEditAccountWidget(account) { kdDebug(14153) << k_funcinfo << "Called." << endl; mAccount=dynamic_cast(account); mProtocol=protocol; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); mAccountSettings = new ICQEditAccountUI( this ); mProtocol->fillComboFromTable( mAccountSettings->encodingCombo, mProtocol->encodings() ); @@ -67,7 +67,7 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, mAccountSettings->mPasswordWidget->load(&mAccount->password()); mAccountSettings->chkAutoLogin->setChecked(mAccount->excludeConnect()); - QString serverEntry = mAccount->configGroup()->readEntry("Server", "login.oscar.aol.com"); + TQString serverEntry = mAccount->configGroup()->readEntry("Server", "login.oscar.aol.com"); int portEntry = mAccount->configGroup()->readNumEntry("Port", 5190); if ( serverEntry != "login.oscar.aol.com" || ( portEntry != 5190) ) mAccountSettings->optionOverrideServer->setChecked( true ); @@ -99,12 +99,12 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, 4 ); } - QObject::connect(mAccountSettings->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); + TQObject::connect(mAccountSettings->buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister())); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword ); - QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin ); + TQWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin ); } @@ -158,7 +158,7 @@ bool ICQEditAccountWidget::validateData() { kdDebug(14153) << k_funcinfo << "Called." << endl; - QString userName = mAccountSettings->edtAccountId->text(); + TQString userName = mAccountSettings->edtAccountId->text(); if (userName.isEmpty()) return false; diff --git a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h index fc5c6d38..4bc1a52b 100644 --- a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h +++ b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h @@ -18,8 +18,8 @@ #ifndef ICQEDITACCOUNTWIDGET_H #define ICQEDITACCOUNTWIDGET_H -#include -#include +#include +#include #include "editaccountwidget.h" namespace Kopete { class Account; } @@ -28,13 +28,13 @@ class ICQAccount; class ICQProtocol; class ICQEditAccountUI; -class ICQEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class ICQEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: ICQEditAccountWidget(ICQProtocol *, Kopete::Account *, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual bool validateData(); virtual Kopete::Account *apply(); diff --git a/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp b/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp index 0010166a..e52e707f 100644 --- a/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp +++ b/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp @@ -18,12 +18,12 @@ #include "icqsearchdialog.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -41,20 +41,20 @@ #include "icqcontact.h" #include "icquserinfowidget.h" -ICQSearchDialog::ICQSearchDialog( ICQAccount* account, QWidget* parent, const char* name ) +ICQSearchDialog::ICQSearchDialog( ICQAccount* account, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "ICQ User Search" ), 0, NoDefault ) { m_account = account; m_searchUI = new ICQSearchBase( this, name ); setMainWidget( m_searchUI ); - connect( m_searchUI->searchButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); - connect( m_searchUI->searchResults, SIGNAL( selectionChanged() ), this, SLOT( resultSelectionChanged() ) ); - connect( m_searchUI->addButton, SIGNAL( clicked() ), this, SLOT( addContact() ) ); - connect( m_searchUI->clearButton, SIGNAL( clicked() ), this, SLOT( clearResults() ) ); - connect( m_searchUI->stopButton, SIGNAL( clicked() ), this, SLOT( stopSearch() ) ); - connect( m_searchUI->closeButton, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); - connect( m_searchUI->userInfoButton, SIGNAL( clicked() ), this, SLOT( userInfo() ) ); - connect( m_searchUI->newSearchButton, SIGNAL( clicked() ), this, SLOT( newSearch() ) ); + connect( m_searchUI->searchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startSearch() ) ); + connect( m_searchUI->searchResults, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( resultSelectionChanged() ) ); + connect( m_searchUI->addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addContact() ) ); + connect( m_searchUI->clearButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clearResults() ) ); + connect( m_searchUI->stopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stopSearch() ) ); + connect( m_searchUI->closeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeDialog() ) ); + connect( m_searchUI->userInfoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( userInfo() ) ); + connect( m_searchUI->newSearchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newSearch() ) ); ICQProtocol *p = ICQProtocol::protocol(); p->fillComboFromTable( m_searchUI->gender, p->genders() ); @@ -91,12 +91,12 @@ void ICQSearchDialog::startSearch() m_searchUI->searchButton->setEnabled( false ); m_searchUI->newSearchButton->setEnabled( false ); - connect( m_account->engine(), SIGNAL( gotSearchResults( const ICQSearchResult& ) ), - this, SLOT( newResult( const ICQSearchResult& ) ) ); - connect( m_account->engine(), SIGNAL( endOfSearch( int ) ), - this, SLOT( searchFinished( int ) ) ); + connect( m_account->engine(), TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ), + this, TQT_SLOT( newResult( const ICQSearchResult& ) ) ); + connect( m_account->engine(), TQT_SIGNAL( endOfSearch( int ) ), + this, TQT_SLOT( searchFinished( int ) ) ); - const QWidget* currentPage = m_searchUI->tabWidget3->currentPage(); + const TQWidget* currentPage = m_searchUI->tabWidget3->currentPage(); if ( currentPage == m_searchUI->tab ) { @@ -119,7 +119,7 @@ void ICQSearchDialog::startSearch() //create a ICQWPSearchInfo struct and send it ICQProtocol* p = ICQProtocol::protocol(); ICQWPSearchInfo info; - QTextCodec* codec = m_account->defaultCodec(); + TQTextCodec* codec = m_account->defaultCodec(); info.firstName = codec->fromUnicode( m_searchUI->firstName->text() ); info.lastName = codec->fromUnicode( m_searchUI->lastName->text() ); info.nickName = codec->fromUnicode( m_searchUI->nickName->text() ); @@ -159,10 +159,10 @@ void ICQSearchDialog::startSearch() void ICQSearchDialog::stopSearch() { - disconnect( m_account->engine(), SIGNAL( gotSearchResults( const ICQSearchResult& ) ), - this, SLOT( newResult( const ICQSearchResult& ) ) ); - disconnect( m_account->engine(), SIGNAL( endOfSearch( int ) ), - this, SLOT( searchFinished( int ) ) ); + disconnect( m_account->engine(), TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ), + this, TQT_SLOT( newResult( const ICQSearchResult& ) ) ); + disconnect( m_account->engine(), TQT_SIGNAL( endOfSearch( int ) ), + this, TQT_SLOT( searchFinished( int ) ) ); m_searchUI->stopButton->setEnabled( false ); m_searchUI->searchButton->setEnabled( true ); @@ -178,7 +178,7 @@ void ICQSearchDialog::addContact() } else { - QString uin = m_searchUI->searchResults->selectedItem()->text( 0 ); + TQString uin = m_searchUI->searchResults->selectedItem()->text( 0 ); kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Passing " << uin << " back to the ACP" << endl; iacp->setUINFromSearch( uin ); @@ -203,7 +203,7 @@ void ICQSearchDialog::userInfo() NULL); m_infoWidget = new ICQUserInfoWidget( Kopete::UI::Global::mainWidget(), "icq info" ); - QObject::connect( m_infoWidget, SIGNAL( finished() ), this, SLOT( closeUserInfo() ) ); + TQObject::connect( m_infoWidget, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfo() ) ); m_infoWidget->setContact( m_contact ); m_infoWidget->setModal(true); @@ -217,7 +217,7 @@ void ICQSearchDialog::userInfo() void ICQSearchDialog::closeUserInfo() { // Free the ICQUserInfoWidget - QObject::disconnect( this, 0, m_infoWidget, 0 ); + TQObject::disconnect( this, 0, m_infoWidget, 0 ); m_infoWidget->delayedDestruct(); m_infoWidget = NULL; @@ -266,9 +266,9 @@ void ICQSearchDialog::newResult( const ICQSearchResult& info ) return; } - QTextCodec* codec = m_account->defaultCodec(); + TQTextCodec* codec = m_account->defaultCodec(); - QListViewItem *item = new QListViewItem( m_searchUI->searchResults, QString::number( info.uin ), + TQListViewItem *item = new TQListViewItem( m_searchUI->searchResults, TQString::number( info.uin ), codec->toUnicode( info.nickName ), codec->toUnicode( info.firstName ), codec->toUnicode( info.lastName ), @@ -296,13 +296,13 @@ void ICQSearchDialog::searchFinished( int numLeft ) void ICQSearchDialog::clearFields() { - m_searchUI->uin->setText( QString::null ); + m_searchUI->uin->setText( TQString::null ); - m_searchUI->firstName->setText( QString::null ); - m_searchUI->lastName->setText( QString::null ); - m_searchUI->nickName->setText( QString::null ); - m_searchUI->email->setText( QString::null ); - m_searchUI->city->setText( QString::null ); + m_searchUI->firstName->setText( TQString::null ); + m_searchUI->lastName->setText( TQString::null ); + m_searchUI->nickName->setText( TQString::null ); + m_searchUI->email->setText( TQString::null ); + m_searchUI->city->setText( TQString::null ); m_searchUI->gender->setCurrentItem( 0 ); // Unspecified m_searchUI->country->setCurrentItem( 0 ); m_searchUI->language->setCurrentItem( 0 ); diff --git a/kopete/protocols/oscar/icq/ui/icqsearchdialog.h b/kopete/protocols/oscar/icq/ui/icqsearchdialog.h index b14aa2a1..aca61ee7 100644 --- a/kopete/protocols/oscar/icq/ui/icqsearchdialog.h +++ b/kopete/protocols/oscar/icq/ui/icqsearchdialog.h @@ -33,7 +33,7 @@ class ICQSearchDialog : public KDialogBase { Q_OBJECT public: - ICQSearchDialog( ICQAccount* account, QWidget* parent = 0, const char* name = 0 ); + ICQSearchDialog( ICQAccount* account, TQWidget* parent = 0, const char* name = 0 ); ~ICQSearchDialog(); private slots: diff --git a/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp b/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp index 3830e05f..44fd5afd 100644 --- a/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp +++ b/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp @@ -18,12 +18,12 @@ #include "icquserinfowidget.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -40,36 +40,36 @@ #include "icqinterestinfowidget.h" -ICQUserInfoWidget::ICQUserInfoWidget( QWidget * parent, const char * name ) +ICQUserInfoWidget::ICQUserInfoWidget( TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::IconList, 0, parent, name, false, i18n( "ICQ User Information" ), Ok ) { kdDebug(14153) << k_funcinfo << "Creating new icq user info widget" << endl; - QFrame* genInfo = addPage( i18n( "General Info" ), + TQFrame* genInfo = addPage( i18n( "General Info" ), i18n( "General ICQ Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "identity" ), KIcon::Desktop ) ); - QVBoxLayout* genLayout = new QVBoxLayout( genInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "identity" ), KIcon::Desktop ) ); + TQVBoxLayout* genLayout = new TQVBoxLayout( genInfo ); m_genInfoWidget = new ICQGeneralInfoWidget( genInfo, "Basic Information" ); genLayout->addWidget( m_genInfoWidget ); - QFrame* workInfo = addPage( i18n( "Work Info" ), + TQFrame* workInfo = addPage( i18n( "Work Info" ), i18n( "Work Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "attach" ), KIcon::Desktop ) ); - QVBoxLayout* workLayout = new QVBoxLayout( workInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "attach" ), KIcon::Desktop ) ); + TQVBoxLayout* workLayout = new TQVBoxLayout( workInfo ); m_workInfoWidget = new ICQWorkInfoWidget( workInfo, "Work Information" ); workLayout->addWidget( m_workInfoWidget ); - QFrame* otherInfo = addPage( i18n( "Other Info" ), + TQFrame* otherInfo = addPage( i18n( "Other Info" ), i18n( "Other ICQ Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* otherLayout = new QVBoxLayout( otherInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* otherLayout = new TQVBoxLayout( otherInfo ); m_otherInfoWidget = new ICQOtherInfoWidget( otherInfo, "Other Information" ); otherLayout->addWidget( m_otherInfoWidget ); - QFrame* interestInfo = addPage( i18n( "Interest Info" ), + TQFrame* interestInfo = addPage( i18n( "Interest Info" ), i18n( "Interest" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* interestLayout = new QVBoxLayout( interestInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* interestLayout = new TQVBoxLayout( interestInfo ); m_interestInfoWidget = new ICQInterestInfoWidget( interestInfo, "Other Information" ); interestLayout->addWidget( m_interestInfoWidget ); @@ -78,21 +78,21 @@ ICQUserInfoWidget::ICQUserInfoWidget( QWidget * parent, const char * name ) void ICQUserInfoWidget::setContact( ICQContact* contact ) { m_contact = contact; - QObject::connect( contact, SIGNAL( haveBasicInfo( const ICQGeneralUserInfo& ) ), - this, SLOT( fillBasicInfo( const ICQGeneralUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveWorkInfo( const ICQWorkUserInfo& ) ), - this, SLOT( fillWorkInfo( const ICQWorkUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveEmailInfo( const ICQEmailInfo& ) ), - this, SLOT( fillEmailInfo( const ICQEmailInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveMoreInfo( const ICQMoreUserInfo& ) ), - this, SLOT( fillMoreInfo( const ICQMoreUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveInterestInfo( const ICQInterestInfo& ) ), - this, SLOT( fillInterestInfo( const ICQInterestInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveBasicInfo( const ICQGeneralUserInfo& ) ), + this, TQT_SLOT( fillBasicInfo( const ICQGeneralUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveWorkInfo( const ICQWorkUserInfo& ) ), + this, TQT_SLOT( fillWorkInfo( const ICQWorkUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveEmailInfo( const ICQEmailInfo& ) ), + this, TQT_SLOT( fillEmailInfo( const ICQEmailInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveMoreInfo( const ICQMoreUserInfo& ) ), + this, TQT_SLOT( fillMoreInfo( const ICQMoreUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveInterestInfo( const ICQInterestInfo& ) ), + this, TQT_SLOT( fillInterestInfo( const ICQInterestInfo& ) ) ); } void ICQUserInfoWidget::fillBasicInfo( const ICQGeneralUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_genInfoWidget->uinEdit->setText( m_contact->contactId() ); m_genInfoWidget->nickNameEdit->setText( codec->toUnicode( ui.nickname ) ); m_genInfoWidget->fullNameEdit->setText( codec->toUnicode( ui.firstName ) + " " + codec->toUnicode( ui.lastName ) ); @@ -106,13 +106,13 @@ void ICQUserInfoWidget::fillBasicInfo( const ICQGeneralUserInfo& ui ) m_genInfoWidget->cellEdit->setText( codec->toUnicode( ui.cellNumber ) ); m_genInfoWidget->zipEdit->setText( codec->toUnicode( ui.zip ) ); - QString country = static_cast( m_contact->protocol() )->countries()[ui.country]; + TQString country = static_cast( m_contact->protocol() )->countries()[ui.country]; m_genInfoWidget->countryEdit->setText( country ); } void ICQUserInfoWidget::fillWorkInfo( const ICQWorkUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_workInfoWidget->cityEdit->setText( codec->toUnicode( ui.city ) ); m_workInfoWidget->stateEdit->setText( codec->toUnicode( ui.state ) ); m_workInfoWidget->phoneEdit->setText( codec->toUnicode( ui.phone ) ); @@ -125,7 +125,7 @@ void ICQUserInfoWidget::fillWorkInfo( const ICQWorkUserInfo& ui ) m_workInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) ); ICQProtocol* p = static_cast( m_contact->protocol() ); - QString country = p->countries()[ui.country]; + TQString country = p->countries()[ui.country]; m_workInfoWidget->countryEdit->setText( country ); //TODO handle the occupation @@ -137,24 +137,24 @@ void ICQUserInfoWidget::fillEmailInfo( const ICQEmailInfo& ) void ICQUserInfoWidget::fillInterestInfo( const ICQInterestInfo& info) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); if (info.count>0) { - QString topic = static_cast( m_contact->protocol() )->interests()[info.topics[0]]; + TQString topic = static_cast( m_contact->protocol() )->interests()[info.topics[0]]; m_interestInfoWidget->topic1->setText( topic ); m_interestInfoWidget->desc1->setText( codec->toUnicode( info.descriptions[0] ) ); } if (info.count>1) { - QString topic = static_cast( m_contact->protocol() )->interests()[info.topics[1]]; + TQString topic = static_cast( m_contact->protocol() )->interests()[info.topics[1]]; m_interestInfoWidget->topic2->setText( topic ); m_interestInfoWidget->desc2->setText( codec->toUnicode( info.descriptions[1] ) ); } if (info.count>2) { - QString topic = static_cast( m_contact->protocol() )->interests()[info.topics[2]]; + TQString topic = static_cast( m_contact->protocol() )->interests()[info.topics[2]]; m_interestInfoWidget->topic3->setText( topic ); m_interestInfoWidget->desc3->setText( codec->toUnicode( info.descriptions[2] ) ); } if (info.count>3) { - QString topic = static_cast( m_contact->protocol() )->interests()[info.topics[3]]; + TQString topic = static_cast( m_contact->protocol() )->interests()[info.topics[3]]; m_interestInfoWidget->topic4->setText( topic ); m_interestInfoWidget->desc4->setText( codec->toUnicode( info.descriptions[3] ) ); } @@ -162,22 +162,22 @@ void ICQUserInfoWidget::fillInterestInfo( const ICQInterestInfo& info) void ICQUserInfoWidget::fillMoreInfo( const ICQMoreUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_genInfoWidget->ageSpinBox->setValue( ui.age ); if ( ui.birthday.isValid() ) m_genInfoWidget->birthday->setText( KGlobal::locale()->formatDate( ui.birthday,true ) ); - QString gender = static_cast( m_contact->protocol() )->genders()[ui.gender]; + TQString gender = static_cast( m_contact->protocol() )->genders()[ui.gender]; m_genInfoWidget->genderEdit->setText( gender ); m_genInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) ); - QString ms = static_cast( m_contact->protocol() )->maritals()[ui.marital]; + TQString ms = static_cast( m_contact->protocol() )->maritals()[ui.marital]; m_genInfoWidget->marital->setText( ms ); m_genInfoWidget->oCityEdit->setText( codec->toUnicode( ui.ocity) ); m_genInfoWidget->oStateEdit->setText( codec->toUnicode( ui.ostate) ); - QString ocountry = static_cast( m_contact->protocol() )->countries()[ui.ocountry]; + TQString ocountry = static_cast( m_contact->protocol() )->countries()[ui.ocountry]; m_genInfoWidget->oCountryEdit->setText( ocountry ); //TODO languages diff --git a/kopete/protocols/oscar/icq/ui/icquserinfowidget.h b/kopete/protocols/oscar/icq/ui/icquserinfowidget.h index ef478e59..ac4048ab 100644 --- a/kopete/protocols/oscar/icq/ui/icquserinfowidget.h +++ b/kopete/protocols/oscar/icq/ui/icquserinfowidget.h @@ -33,7 +33,7 @@ class ICQUserInfoWidget : public KDialogBase { Q_OBJECT public: - ICQUserInfoWidget( QWidget* parent = 0, const char* name = 0 ); + ICQUserInfoWidget( TQWidget* parent = 0, const char* name = 0 ); void setContact( ICQContact* contact ); public slots: diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.cpp b/kopete/protocols/oscar/liboscar/aimlogintask.cpp index 69a9c770..da066333 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/aimlogintask.cpp @@ -43,7 +43,7 @@ void AimLoginTask::onGo() //send Snac 17,06 sendAuthStringRequest(); //when we have the authKey, login - connect( this, SIGNAL( haveAuthKey() ), this, SLOT( sendLoginRequest() ) ); + connect( this, TQT_SIGNAL( haveAuthKey() ), this, TQT_SLOT( sendLoginRequest() ) ); } bool AimLoginTask::forMe( Transfer* transfer ) const @@ -72,17 +72,17 @@ bool AimLoginTask::forMe( Transfer* transfer ) const return false; } -const QByteArray& AimLoginTask::cookie() const +const TQByteArray& AimLoginTask::cookie() const { return m_cookie; } -const QString& AimLoginTask::bosHost() const +const TQString& AimLoginTask::bosHost() const { return m_bosHost; } -const QString& AimLoginTask::bosPort() const +const TQString& AimLoginTask::bosPort() const { return m_bosPort; } @@ -158,7 +158,7 @@ void AimLoginTask::sendLoginRequest() outbuf->addTLV(0x0001, client()->userId().length(), client()->userId().latin1()); - QByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long + TQByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long encodePassword( digest ); digest[16] = '\0'; //do this so that addTLV sees a NULL-terminator @@ -189,16 +189,16 @@ void AimLoginTask::handleLoginResponse() if ( !st ) { - setError( -1 , QString::null ); + setError( -1 , TQString::null ); return; } - QValueList tlvList = st->buffer()->getTLVList(); + TQValueList tlvList = st->buffer()->getTLVList(); TLV uin = findTLV( tlvList, 0x0001 ); if ( uin ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [SN], SN=" << QString( uin.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [SN], SN=" << TQString( uin.data ) << endl; } TLV err = findTLV( tlvList, 0x0008 ); @@ -211,14 +211,14 @@ void AimLoginTask::handleLoginResponse() errorNum << endl; Oscar::SNAC s = { 0, 0, 0, 0 }; client()->fatalTaskError( s, errorNum ); - setError( errorNum, QString::null ); + setError( errorNum, TQString::null ); return; //if there's an error, we'll need to disconnect anyways } TLV server = findTLV( tlvList, 0x0005 ); if ( server ) { - QString ip = QString( server.data ); + TQString ip = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << ip << endl; int index = ip.find( ':' ); m_bosHost = ip.left( index ); @@ -233,12 +233,12 @@ void AimLoginTask::handleLoginResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(6) [COOKIE]" << endl; m_cookie.duplicate( cookie.data ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } tlvList.clear(); } -void AimLoginTask::encodePassword( QByteArray& digest ) const +void AimLoginTask::encodePassword( TQByteArray& digest ) const { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; md5_state_t state; diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.h b/kopete/protocols/oscar/liboscar/aimlogintask.h index 66308178..cc564592 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.h +++ b/kopete/protocols/oscar/liboscar/aimlogintask.h @@ -33,9 +33,9 @@ public: virtual void onGo(); //Protocol specific stuff - const QByteArray& cookie() const; - const QString& bosHost() const; - const QString& bosPort() const; + const TQByteArray& cookie() const; + const TQString& bosHost() const; + const TQString& bosPort() const; protected: bool forMe( Transfer* transfer ) const; @@ -45,7 +45,7 @@ signals: private: //! Encodes a password using MD5 - void encodePassword( QByteArray& digest ) const; + void encodePassword( TQByteArray& digest ) const; //! Send SNAC 0x17, 0x06 void sendAuthStringRequest(); @@ -58,7 +58,7 @@ private: //! Parse the error codes to generate a reason why sign-on failed //Massive code duplication with CloseConnectionTask - bool parseDisconnectCode( int error, QString& reason ); + bool parseDisconnectCode( int error, TQString& reason ); private slots: //! Send SNAC 0x17, 0x02 @@ -66,16 +66,16 @@ private slots: private: //! The authorization key to use when encoding the password - QByteArray m_authKey; + TQByteArray m_authKey; //! The all important connection cookie - QByteArray m_cookie; + TQByteArray m_cookie; //! The new BOS Host - QString m_bosHost; + TQString m_bosHost; //! The new BOS Port - QString m_bosPort; + TQString m_bosPort; }; diff --git a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp index c3fe7e6e..0b866de8 100644 --- a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp +++ b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp @@ -71,7 +71,7 @@ bool BLMLimitsTask::take(Transfer* transfer) break; } } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } else diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.cpp b/kopete/protocols/oscar/liboscar/buddyicontask.cpp index 1828b7b9..facaae1a 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.cpp +++ b/kopete/protocols/oscar/liboscar/buddyicontask.cpp @@ -19,7 +19,7 @@ #include "buddyicontask.h" -#include +#include #include #include "buffer.h" #include "connection.h" @@ -36,20 +36,20 @@ BuddyIconTask::BuddyIconTask( Task* parent ) m_hashType = 0; } -void BuddyIconTask::uploadIcon( WORD length, const QByteArray& data ) +void BuddyIconTask::uploadIcon( WORD length, const TQByteArray& data ) { m_iconLength = length; m_icon = data; m_action = Send; } -void BuddyIconTask::requestIconFor( const QString& user ) +void BuddyIconTask::requestIconFor( const TQString& user ) { m_user = user; m_action = Receive; } -void BuddyIconTask::setHash( const QByteArray& md5Hash ) +void BuddyIconTask::setHash( const TQByteArray& md5Hash ) { m_hash = md5Hash; } @@ -125,7 +125,7 @@ bool BuddyIconTask::take( Transfer* transfer ) else handleICQBuddyIconResponse(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } @@ -150,10 +150,10 @@ void BuddyIconTask::handleUploadResponse() Buffer* b = transfer()->buffer(); b->skipBytes( 4 ); BYTE iconHashSize = b->getByte(); - QByteArray hash( b->getBlock( iconHashSize ) ); + TQByteArray hash( b->getBlock( iconHashSize ) ); //check the hash kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "hash " << hash << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } @@ -178,16 +178,16 @@ void BuddyIconTask::sendAIMBuddyIconRequest() void BuddyIconTask::handleAIMBuddyIconResponse() { Buffer* b = transfer()->buffer(); - QString user = b->getBUIN(); + TQString user = b->getBUIN(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Receiving buddy icon for " << user << endl; b->skipBytes(2); //unknown field. not used BYTE iconType = b->getByte(); Q_UNUSED( iconType ); BYTE hashSize = b->getByte(); - QByteArray iconHash; + TQByteArray iconHash; iconHash.duplicate( b->getBlock(hashSize) ); WORD iconSize = b->getWord(); - QByteArray icon; + TQByteArray icon; icon.duplicate( b->getBlock(iconSize) ); emit haveIcon( user, icon ); } @@ -213,7 +213,7 @@ void BuddyIconTask::sendICQBuddyIconRequest() void BuddyIconTask::handleICQBuddyIconResponse() { Buffer* b = transfer()->buffer(); - QString user = b->getBUIN(); + TQString user = b->getBUIN(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Receiving buddy icon for " << user << endl; b->skipBytes(2); //not used @@ -221,7 +221,7 @@ void BuddyIconTask::handleICQBuddyIconResponse() Q_UNUSED( iconType ); BYTE hashSize = b->getByte(); - QByteArray iconHash; + TQByteArray iconHash; iconHash.duplicate( b->getBlock(hashSize) ); b->skipBytes(1); //not used @@ -230,11 +230,11 @@ void BuddyIconTask::handleICQBuddyIconResponse() Q_UNUSED( iconType2 ); BYTE hashSize2 = b->getByte(); - QByteArray iconHash2; + TQByteArray iconHash2; iconHash2.duplicate( b->getBlock(hashSize2) ); WORD iconSize = b->getWord(); - QByteArray icon; + TQByteArray icon; icon.duplicate( b->getBlock(iconSize) ); emit haveIcon( user, icon ); diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.h b/kopete/protocols/oscar/liboscar/buddyicontask.h index 83e70a53..f00a5b23 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.h +++ b/kopete/protocols/oscar/liboscar/buddyicontask.h @@ -21,7 +21,7 @@ #define BUDDYICONTASK_H #include "task.h" -#include +#include class Transfer; @@ -31,11 +31,11 @@ Q_OBJECT public: BuddyIconTask( Task* parent ); - void uploadIcon( WORD length, const QByteArray& data ); + void uploadIcon( WORD length, const TQByteArray& data ); void setReferenceNum( WORD num ); - void requestIconFor( const QString& user ); - void setHash( const QByteArray& md5Hash ); + void requestIconFor( const TQString& user ); + void setHash( const TQByteArray& md5Hash ); void setHashType( BYTE type ); //! Task implementation @@ -44,7 +44,7 @@ public: bool take( Transfer* transfer ); signals: - void haveIcon( const QString&, QByteArray ); + void haveIcon( const TQString&, TQByteArray ); private: void sendIcon(); @@ -59,9 +59,9 @@ private: Action m_action; WORD m_iconLength; int m_refNum; - QByteArray m_icon; - QString m_user; - QByteArray m_hash; + TQByteArray m_icon; + TQString m_user; + TQByteArray m_hash; BYTE m_hashType; DWORD m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/buffer.cpp b/kopete/protocols/oscar/liboscar/buffer.cpp index b04587e7..23dca1bb 100644 --- a/kopete/protocols/oscar/liboscar/buffer.cpp +++ b/kopete/protocols/oscar/liboscar/buffer.cpp @@ -40,7 +40,7 @@ Buffer::Buffer(const char *b, Q_ULONG len) mReadPos=0; } -Buffer::Buffer( const QByteArray& data ) +Buffer::Buffer( const TQByteArray& data ) { mBuffer.duplicate( data ); mReadPos = 0; @@ -110,7 +110,7 @@ int Buffer::addLEDWord(const DWORD dw) return mBuffer.size(); } -int Buffer::addString(QByteArray s) +int Buffer::addString(TQByteArray s) { unsigned int pos = mBuffer.size(); int len = s.size(); @@ -122,7 +122,7 @@ int Buffer::addString(QByteArray s) return mBuffer.size(); } -int Buffer::addString(QByteArray s, DWORD len) +int Buffer::addString(TQByteArray s, DWORD len) { Q_UNUSED( len ); return addString( s ); @@ -130,14 +130,14 @@ int Buffer::addString(QByteArray s, DWORD len) int Buffer::addString( const char* s, DWORD len ) { - QByteArray qba; + TQByteArray qba; qba.duplicate( s, len ); return addString( qba ); } int Buffer::addString(const unsigned char* s, DWORD len) { - QByteArray qba; + TQByteArray qba; qba.duplicate( (const char*) s, len ); return addString( qba ); } @@ -253,9 +253,9 @@ void Buffer::setBuf(char *b, const WORD len) mReadPos = 0; } -QByteArray Buffer::getBlock(WORD len) +TQByteArray Buffer::getBlock(WORD len) { - QByteArray ch( len ); + TQByteArray ch( len ); for ( int i = 0; i < len; i++ ) { ch[i] = getByte(); @@ -264,9 +264,9 @@ QByteArray Buffer::getBlock(WORD len) return ch; } -QByteArray Buffer::getBBlock(WORD len) +TQByteArray Buffer::getBBlock(WORD len) { - QByteArray data; + TQByteArray data; data.duplicate(mBuffer.data() + mReadPos, len); mReadPos += len; return data; @@ -286,9 +286,9 @@ WORD *Buffer::getWordBlock(WORD len) } -QCString Buffer::getLEBlock(WORD len) +TQCString Buffer::getLEBlock(WORD len) { - QCString ch; + TQCString ch; for (unsigned int i=0;i Buffer::getTLVList() +TQValueList Buffer::getTLVList() { - QValueList ql; + TQValueList ql; while (mReadPos < mBuffer.size()) { @@ -363,7 +363,7 @@ QValueList Buffer::getTLVList() } int Buffer::addChatTLV(const WORD type, const WORD exchange, - const QString &roomname, const WORD instance) + const TQString &roomname, const WORD instance) { addWord(type); addWord(0x0005 + roomname.length()); @@ -376,21 +376,21 @@ int Buffer::addChatTLV(const WORD type, const WORD exchange, void Buffer::expandBuffer(unsigned int inc) { - mBuffer.resize(mBuffer.size()+inc, QGArray::SpeedOptim); + mBuffer.resize(mBuffer.size()+inc, TQGArray::SpeedOptim); } -QCString Buffer::getLNTS() +TQCString Buffer::getLNTS() { WORD len = getLEWord(); - QCString qcs; + TQCString qcs; qcs.duplicate( getBlock(len) ); return qcs; } -QCString Buffer::getLELNTS() +TQCString Buffer::getLELNTS() { WORD len = getLEWord(); - QCString qcs; + TQCString qcs; qcs.duplicate( getBlock(len) ); return qcs; } @@ -425,10 +425,10 @@ int Buffer::addBSTR(const char * s) return ret; } -QByteArray Buffer::getBSTR() +TQByteArray Buffer::getBSTR() { WORD len = getWord(); - QByteArray qba; + TQByteArray qba; qba.duplicate( getBlock(len) ); return qba; } @@ -441,10 +441,10 @@ int Buffer::addBUIN(const char * s) return ret; } -QByteArray Buffer::getBUIN() +TQByteArray Buffer::getBUIN() { BYTE len = getByte(); - QByteArray qba; + TQByteArray qba; qba.duplicate( getBlock(len) ); return qba; } @@ -459,16 +459,16 @@ int Buffer::length() const return (mBuffer.size() - mReadPos); } -QString Buffer::toString() const +TQString Buffer::toString() const { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = mBuffer.begin(); it != mBuffer.end(); ++it ) { i++; @@ -477,7 +477,7 @@ QString Buffer::toString() const if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -485,8 +485,8 @@ QString Buffer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -497,22 +497,22 @@ QString Buffer::toString() const return output; } -QString Buffer::peekBSTR() +TQString Buffer::peekBSTR() { int lastPos = mReadPos; - QByteArray qba = getBSTR(); + TQByteArray qba = getBSTR(); mReadPos = lastPos; - return QString( qba ); + return TQString( qba ); } -QString Buffer::peekBUIN() +TQString Buffer::peekBUIN() { int lastPos = mReadPos; - QByteArray qba = getBUIN(); + TQByteArray qba = getBUIN(); mReadPos = lastPos; - return QString( qba ); + return TQString( qba ); } -Buffer::operator QByteArray() const +Buffer::operator TQByteArray() const { return mBuffer; } diff --git a/kopete/protocols/oscar/liboscar/buffer.h b/kopete/protocols/oscar/liboscar/buffer.h index 900ddb50..b5035b52 100644 --- a/kopete/protocols/oscar/liboscar/buffer.h +++ b/kopete/protocols/oscar/liboscar/buffer.h @@ -22,8 +22,8 @@ #include "oscartypes.h" -#include -#include +#include +#include class QString; @@ -50,9 +50,9 @@ class Buffer /** * \brief Create a prefilled buffer * - * Constructor that creates a prefilled buffer from the QByteArray \p data + * Constructor that creates a prefilled buffer from the TQByteArray \p data */ - Buffer( const QByteArray& data ); + Buffer( const TQByteArray& data ); /** Default destructor */ @@ -72,8 +72,8 @@ class Buffer /** * adds the given string to the buffer (make sure it's NULL-terminated) */ - int addString(QByteArray); - int addString(QByteArray, DWORD); + int addString(TQByteArray); + int addString(TQByteArray, DWORD); int addString(const char*, DWORD); int addString(const unsigned char*, DWORD); @@ -141,9 +141,9 @@ class Buffer int addLETLV(WORD, WORD, const char *); /** - * Returns a QString representation of the buffer + * Returns a TQString representation of the buffer */ - QString toString() const; + TQString toString() const; /** * gets a DWord out of the buffer @@ -183,8 +183,8 @@ class Buffer /** * Allocates memory for and gets a block of buffer bytes */ - QByteArray getBlock(WORD len); - QByteArray getBBlock(WORD len); + TQByteArray getBlock(WORD len); + TQByteArray getBBlock(WORD len); /** * Allocates memory for and gets a block of buffer words @@ -194,14 +194,14 @@ class Buffer /** * Same as above but returning little-endian */ - QCString getLEBlock(WORD len); + TQCString getLEBlock(WORD len); /** * Convenience function that gets a LNTS (long null terminated string) * from the buffer. Otherwise you'd need a getWord() + getBlock() call :) */ - QCString getLNTS(); - QCString getLELNTS(); + TQCString getLNTS(); + TQCString getLELNTS(); /** * adds a 16-bit long TLV @@ -231,25 +231,25 @@ class Buffer /** * Gets a list of TLV's */ - QValueList getTLVList(); + TQValueList getTLVList(); /** * Creates a chat data segment for a tlv and calls addTLV with that data */ - int addChatTLV(const WORD, const WORD, const QString &, const WORD); + int addChatTLV(const WORD, const WORD, const TQString &, const WORD); /** * Similar to the LNTS functions but string is NOT null-terminated */ int addBSTR(const char * s); - QByteArray getBSTR(); - QString peekBSTR(); + TQByteArray getBSTR(); + TQString peekBSTR(); int addBUIN(const char * s); - QByteArray getBUIN(); - QString peekBUIN(); + TQByteArray getBUIN(); + TQString peekBUIN(); - operator QByteArray() const; + operator TQByteArray() const; private: /** @@ -258,7 +258,7 @@ class Buffer void expandBuffer(unsigned int inc); private: - QByteArray mBuffer; + TQByteArray mBuffer; unsigned int mReadPos; }; diff --git a/kopete/protocols/oscar/liboscar/bytestream.cpp b/kopete/protocols/oscar/liboscar/bytestream.cpp index 109dbbad..87603c76 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.cpp +++ b/kopete/protocols/oscar/liboscar/bytestream.cpp @@ -35,7 +35,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! QSocket. +//! TQSocket. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -59,13 +59,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -95,7 +95,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { return takeRead(bytes); } @@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { appendArray(&d->readBuf, block); } //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { appendArray(&d->writeBuf, block); } @@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { return takeArray(&d->readBuf, size, del); } @@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { return takeArray(&d->writeBuf, size, del); } //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { return d->writeBuf; } @@ -207,7 +207,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/oscar/liboscar/bytestream.h b/kopete/protocols/oscar/liboscar/bytestream.h index 1c2dfa15..a990a940 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.h +++ b/kopete/protocols/oscar/liboscar/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include -#include +#include +#include // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp index 5cb44720..7c6ff26a 100644 --- a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp +++ b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp @@ -18,7 +18,7 @@ #include "changevisibilitytask.h" -#include +#include #include #include "buffer.h" #include "client.h" @@ -64,13 +64,13 @@ bool ChangeVisibilityTask::take(Transfer* transfer) if ( forMe( transfer ) ) { setTransfer( transfer ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } else { - setError( 0, QString::null ); + setError( 0, TQString::null ); return false; } } @@ -82,7 +82,7 @@ void ChangeVisibilityTask::onGo() if ( !item ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Didn't find a visibility item" << endl; - setError( 0, QString::null ); + setError( 0, TQString::null ); return; } @@ -90,14 +90,14 @@ void ChangeVisibilityTask::onGo() BYTE visibleByte = m_visible ? 0x04 : 0x03; c8tlv.addByte( visibleByte ); - QValueList tList; + TQValueList tList; tList.append( TLV( 0x00CA, c8tlv.length(), c8tlv.buffer() ) ); Oscar::SSI newSSI(item); if ( Oscar::uptateTLVs( newSSI, tList ) == false ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Visibility didn't change, don't update" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -118,8 +118,8 @@ void ChangeVisibilityTask::onGo() b->addWord( newSSI.type() ); b->addWord( newSSI.tlvListLength() ); - QValueList::const_iterator it2 = newSSI.tlvList().begin(); - QValueList::const_iterator listEnd2 = newSSI.tlvList().end(); + TQValueList::const_iterator it2 = newSSI.tlvList().begin(); + TQValueList::const_iterator listEnd2 = newSSI.tlvList().end(); for( ; it2 != listEnd2; ++it2 ) b->addTLV( ( *it2 ) ); diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp index f661d1f4..914de496 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp @@ -45,7 +45,7 @@ ChatNavServiceTask::RequestType ChatNavServiceTask::requestType() return m_type; } -QValueList ChatNavServiceTask::exchangeList() const +TQValueList ChatNavServiceTask::exchangeList() const { return m_exchanges; } @@ -97,7 +97,7 @@ bool ChatNavServiceTask::take( Transfer* transfer ) } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; @@ -113,12 +113,12 @@ void ChatNavServiceTask::onGo() send( t ); } -void ChatNavServiceTask::createRoom( WORD exchange, const QString& name ) +void ChatNavServiceTask::createRoom( WORD exchange, const TQString& name ) { //most of this comes from gaim. thanks to them for figuring it out - QString cookie = "create"; //hardcoded, seems to be ignored by AOL - QString lang = "en"; - QString charset = "us-ascii"; + TQString cookie = "create"; //hardcoded, seems to be ignored by AOL + TQString lang = "en"; + TQString charset = "us-ascii"; FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x000D, 0x0008, 0x0000, client()->snacSequence() }; @@ -202,7 +202,7 @@ void ChatNavServiceTask::handleExchangeInfo( const TLV& t ) break; case 0xD3: { - QString eName( t.data ); + TQString eName( t.data ); kdDebug(OSCAR_RAW_DEBUG) << "exchange name: " << eName << endl; exchangeInfo.description = eName; break; @@ -227,16 +227,16 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "Parsing room info TLV" << t.length << endl; Buffer b(t.data); WORD exchange = b.getWord(); - QByteArray cookie( b.getBlock( b.getByte() ) ); + TQByteArray cookie( b.getBlock( b.getByte() ) ); WORD instance = b.getWord(); b.getByte(); //detail level, which i'm not sure we need WORD tlvCount = b.getWord(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "e: " << exchange << " c: " << cookie << " i: " << instance << endl; - QValueList tlvList = b.getTLVList(); - QValueList::iterator it, itEnd = tlvList.end(); - QString roomName; + TQValueList tlvList = b.getTLVList(); + TQValueList::iterator it, itEnd = tlvList.end(); + TQString roomName; for ( it = tlvList.begin(); it != itEnd; ++it ) { TLV t = ( *it ); @@ -255,7 +255,7 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "evil generated array" << endl; break; case 0x6A: - roomName = QString( t.data ); + roomName = TQString( t.data ); kdDebug(OSCAR_RAW_DEBUG) << "fully qualified name" << roomName << endl; break; case 0x6B: @@ -305,7 +305,7 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) Buffer b( t.data ); WORD exchange = b.getWord(); WORD cookieLength = b.getByte(); - QByteArray cookie( b.getBlock( cookieLength ) ); + TQByteArray cookie( b.getBlock( cookieLength ) ); WORD instance = b.getWord(); BYTE detailLevel = b.getByte(); @@ -316,16 +316,16 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) } WORD numberTlvs = b.getWord(); - QValueList roomTLVList = b.getTLVList(); - QValueList::iterator itEnd = roomTLVList.end(); - for ( QValueList::iterator it = roomTLVList.begin(); + TQValueList roomTLVList = b.getTLVList(); + TQValueList::iterator itEnd = roomTLVList.end(); + for ( TQValueList::iterator it = roomTLVList.begin(); it != itEnd; ++ it ) { switch( ( *it ).type ) { case 0x006A: { - QString fqcn = QString( ( *it ).data ); + TQString fqcn = TQString( ( *it ).data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "fqcn: " << fqcn << endl; break; } @@ -342,7 +342,7 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "max occupancy: " << t.data << endl; break; case 0x00D3: - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "name: " << QString( t.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "name: " << TQString( t.data ) << endl; break; case 0x00D5: kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "create perms: " << t.data << endl; diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.h b/kopete/protocols/oscar/liboscar/chatnavservicetask.h index 6b7d8764..8af63247 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.h @@ -19,7 +19,7 @@ #include "task.h" -#include +#include #include class Transfer; @@ -43,13 +43,13 @@ public: virtual bool forMe( const Transfer* transfer ) const; virtual bool take( Transfer* transfer ); virtual void onGo(); - void createRoom( WORD exchange, const QString& name ); //create a room. sends the packet as well + void createRoom( WORD exchange, const TQString& name ); //create a room. sends the packet as well - QValueList exchangeList() const; + TQValueList exchangeList() const; signals: - void haveChatExchanges( const QValueList& ); - void connectChat( WORD, QByteArray, WORD, const QString& ); + void haveChatExchanges( const TQValueList& ); + void connectChat( WORD, TQByteArray, WORD, const TQString& ); private: void handleExchangeInfo( const TLV& t ); @@ -57,7 +57,7 @@ private: void handleCreateRoomInfo( const TLV& t ); private: - QValueList m_exchanges; + TQValueList m_exchanges; RequestType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.cpp b/kopete/protocols/oscar/liboscar/chatservicetask.cpp index 9d07afe8..c8998495 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatservicetask.cpp @@ -20,17 +20,17 @@ #include "chatservicetask.h" -#include +#include #include #include -#include +#include #include "connection.h" #include "transfer.h" #include "buffer.h" #include "oscartypes.h" -ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room ) +ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ) : Task( parent ), m_encoding( "us-ascii" ) { m_exchange = exchange; @@ -47,7 +47,7 @@ void ChatServiceTask::setMessage( const Oscar::Message& msg ) m_message = msg; } -void ChatServiceTask::setEncoding( const QCString& enc ) +void ChatServiceTask::setEncoding( const TQCString& enc ) { m_encoding = enc; } @@ -56,7 +56,7 @@ void ChatServiceTask::onGo() { if ( !m_message ) { - setSuccess( true, QString::null ); + setSuccess( true, TQString::null ); return; } @@ -78,7 +78,7 @@ void ChatServiceTask::onGo() type3.type = 0x0003; type3.length = 0x0002; - type3.data = QCString( "en" ); //hardcode for right now. don't know that we can do others + type3.data = TQCString( "en" ); //hardcode for right now. don't know that we can do others type1.type = 0x0001; type1.length = m_message.textArray().size(); @@ -158,7 +158,7 @@ bool ChatServiceTask::take( Transfer* t ) break; }; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } @@ -170,7 +170,7 @@ void ChatServiceTask::parseRoomInfo() Buffer* b = transfer()->buffer(); m_exchange = b->getWord(); - QByteArray cookie( b->getBlock( b->getByte() ) ); + TQByteArray cookie( b->getBlock( b->getByte() ) ); instance = b->getWord(); detailLevel = b->getByte(); @@ -179,15 +179,15 @@ void ChatServiceTask::parseRoomInfo() //correctly anyways b->skipBytes( 2 ); - QValueList tlvList = b->getTLVList(); - QValueList::iterator it = tlvList.begin(); - QValueList::iterator itEnd = tlvList.end(); + TQValueList tlvList = b->getTLVList(); + TQValueList::iterator it = tlvList.begin(); + TQValueList::iterator itEnd = tlvList.end(); for ( ; it != itEnd; ++it ) { switch ( ( *it ).type ) { case 0x006A: - m_internalRoom = QString( ( *it ).data ); + m_internalRoom = TQString( ( *it ).data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "room name: " << m_room << endl; break; case 0x006F: @@ -221,7 +221,7 @@ void ChatServiceTask::parseJoinNotification() Buffer* b = transfer()->buffer(); while ( b->length() > 0 ) { - QString sender( b->getBUIN() ); + TQString sender( b->getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl; WORD warningLevel = b->getWord(); WORD numTLVs = b->getWord(); @@ -252,7 +252,7 @@ void ChatServiceTask::parseLeftNotification() Buffer* b = transfer()->buffer(); while ( b->length() > 0 ) { - QString sender( b->getBUIN() ); + TQString sender( b->getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl; WORD warningLevel = b->getWord(); WORD numTLVs = b->getWord(); @@ -281,12 +281,12 @@ void ChatServiceTask::parseChatMessage() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "have new chat room message" << endl; Buffer* b = transfer()->buffer(); bool whisper = true, reflection = false; - QByteArray language, encoding, message; - QString sender; - QByteArray icbmCookie( b->getBlock( 8 ) ); + TQByteArray language, encoding, message; + TQString sender; + TQByteArray icbmCookie( b->getBlock( 8 ) ); b->skipBytes( 2 ); //message channel always 0x03 - QValueList chatTLVs = b->getTLVList(); - QValueList::iterator it, itEnd = chatTLVs.end(); + TQValueList chatTLVs = b->getTLVList(); + TQValueList::iterator it, itEnd = chatTLVs.end(); for ( it = chatTLVs.begin(); it != itEnd; ++it ) { switch ( ( *it ).type ) @@ -326,7 +326,7 @@ void ChatServiceTask::parseChatMessage() case 0x0003: //user info { Buffer b( ( *it ).data ); - sender = QString( b.getBUIN() ); + sender = TQString( b.getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "got user info. sender is " << sender << endl; } break; @@ -334,14 +334,14 @@ void ChatServiceTask::parseChatMessage() } } - QTextCodec* codec = QTextCodec::codecForName( encoding ); + TQTextCodec* codec = TQTextCodec::codecForName( encoding ); if ( ! codec ) - codec = QTextCodec::codecForMib( 4 ); - QString msgText( codec->toUnicode( message ) ); + codec = TQTextCodec::codecForMib( 4 ); + TQString msgText( codec->toUnicode( message ) ); Oscar::Message omessage; omessage.setReceiver( client()->userId() ); omessage.setSender( sender ); - omessage.setTimestamp( QDateTime::currentDateTime() ); + omessage.setTimestamp( TQDateTime::currentDateTime() ); omessage.setText( Oscar::Message::UTF8, msgText ); omessage.setType( 0x03 ); omessage.setExchange( m_exchange ); diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.h b/kopete/protocols/oscar/liboscar/chatservicetask.h index 90e29300..5f19fcae 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatservicetask.h @@ -29,7 +29,7 @@ class ChatServiceTask : public Task { Q_OBJECT public: - ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room ); + ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ); ~ChatServiceTask(); void onGo(); @@ -44,11 +44,11 @@ public: void parseChatError(); void setMessage( const Oscar::Message& msg ); - void setEncoding( const QCString &enc ); + void setEncoding( const TQCString &enc ); signals: - void userJoinedChat( Oscar::WORD, const QString& r, const QString& u ); - void userLeftChat( Oscar::WORD, const QString& r, const QString& u ); + void userJoinedChat( Oscar::WORD, const TQString& r, const TQString& u ); + void userLeftChat( Oscar::WORD, const TQString& r, const TQString& u ); void newChatMessage( const Oscar::Message& msg ); protected: @@ -56,10 +56,10 @@ protected: private: WORD m_exchange; - QString m_room; - QString m_internalRoom; + TQString m_room; + TQString m_internalRoom; Oscar::Message m_message; - QCString m_encoding; + TQCString m_encoding; }; #endif diff --git a/kopete/protocols/oscar/liboscar/client.cpp b/kopete/protocols/oscar/liboscar/client.cpp index af967512..222d9d69 100644 --- a/kopete/protocols/oscar/liboscar/client.cpp +++ b/kopete/protocols/oscar/liboscar/client.cpp @@ -20,8 +20,8 @@ #include "client.h" -#include -#include +#include +#include #include //for kdDebug() #include @@ -66,13 +66,13 @@ namespace class DefaultCodecProvider : public Client::CodecProvider { public: - virtual QTextCodec* codecForContact( const QString& ) const + virtual TQTextCodec* codecForContact( const TQString& ) const { - return QTextCodec::codecForMib( 4 ); + return TQTextCodec::codecForMib( 4 ); } - virtual QTextCodec* codecForAccount() const + virtual TQTextCodec* codecForAccount() const { - return QTextCodec::codecForMib( 4 ); + return TQTextCodec::codecForMib( 4 ); } }; @@ -84,7 +84,7 @@ class Client::ClientPrivate public: ClientPrivate() {} - QString host, user, pass; + TQString host, user, pass; uint port; int tzoffset; bool active; @@ -95,11 +95,11 @@ public: //Protocol specific data bool isIcq; bool redirectRequested; - QValueList redirectionServices; + TQValueList redirectionServices; WORD currentRedirect; - QByteArray cookie; + TQByteArray cookie; DWORD connectAsStatus; // icq only - QString connectWithMessage; // icq only + TQString connectWithMessage; // icq only Oscar::Settings* settings; //Tasks @@ -120,25 +120,25 @@ public: UserDetails ourDetails; //Infos - QValueList exchanges; + TQValueList exchanges; - QString statusMessage; // for away-,DND-message etc... + TQString statusMessage; // for away-,DND-message etc... //away messages struct AwayMsgRequest { - QString contact; + TQString contact; ICQStatus contactStatus; }; - QValueList awayMsgRequestQueue; - QTimer* awayMsgRequestTimer; + TQValueList awayMsgRequestQueue; + TQTimer* awayMsgRequestTimer; CodecProvider* codecProvider; const Oscar::ClientVersion* version; }; -Client::Client( QObject* parent ) -:QObject( parent, "oscarclient" ) +Client::Client( TQObject* parent ) +:TQObject( parent, "oscarclient" ) { m_loginTask = 0L; m_loginTaskTwo = 0L; @@ -162,13 +162,13 @@ Client::Client( QObject* parent ) d->stage = ClientPrivate::StageOne; d->typingNotifyTask = 0L; d->ssiModifyTask = 0L; - d->awayMsgRequestTimer = new QTimer(); + d->awayMsgRequestTimer = new TQTimer(); d->codecProvider = &defaultCodecProvider; - connect( this, SIGNAL( redirectionFinished( WORD ) ), - this, SLOT( checkRedirectionQueue( WORD ) ) ); - connect( d->awayMsgRequestTimer, SIGNAL( timeout() ), - this, SLOT( nextICQAwayMessageRequest() ) ); + connect( this, TQT_SIGNAL( redirectionFinished( WORD ) ), + this, TQT_SLOT( checkRedirectionQueue( WORD ) ) ); + connect( d->awayMsgRequestTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( nextICQAwayMessageRequest() ) ); } Client::~Client() @@ -188,20 +188,20 @@ Oscar::Settings* Client::clientSettings() const return d->settings; } -void Client::connectToServer( Connection *c, const QString& server, bool auth ) +void Client::connectToServer( Connection *c, const TQString& server, bool auth ) { d->connections.append( c ); if ( auth == true ) { m_loginTask = new StageOneLoginTask( c->rootTask() ); - connect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + connect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); } - connect( c, SIGNAL( socketError( int, const QString& ) ), this, SLOT( determineDisconnection( int, const QString& ) ) ); + connect( c, TQT_SIGNAL( socketError( int, const TQString& ) ), this, TQT_SLOT( determineDisconnection( int, const TQString& ) ) ); c->connectToServer(server, auth); } -void Client::start( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { Q_UNUSED( host ); Q_UNUSED( port ); @@ -223,7 +223,7 @@ void Client::close() if ( d->stage == ClientPrivate::StageTwo ) { d->connectAsStatus = 0x0; - d->connectWithMessage = QString::null; + d->connectWithMessage = TQString::null; } d->exchanges.clear(); @@ -233,18 +233,18 @@ void Client::close() d->ssiManager->clear(); } -void Client::setStatus( AIMStatus status, const QString &_message ) +void Client::setStatus( AIMStatus status, const TQString &_message ) { // AIM: you're away exactly when your away message isn't empty. - // can't use QString::null as a message either; ProfileTask + // can't use TQString::null as a message either; ProfileTask // interprets null as "don't change". - QString message; + TQString message; if ( status == Online ) - message = QString::fromAscii(""); + message = TQString::fromAscii(""); else { if ( _message.isEmpty() ) - message = QString::fromAscii(" "); + message = TQString::fromAscii(" "); else message = _message; } @@ -257,7 +257,7 @@ void Client::setStatus( AIMStatus status, const QString &_message ) pt->go( true ); } -void Client::setStatus( DWORD status, const QString &message ) +void Client::setStatus( DWORD status, const TQString &message ) { // remember the message to reply with, when requested kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting status message to "<< message << endl; @@ -302,7 +302,7 @@ UserDetails Client::ourInfo() const return d->ourDetails; } -QString Client::host() +TQString Client::host() { return d->host; } @@ -343,7 +343,7 @@ void Client::lt_loginFinished() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage two done. setting up services" << endl; initializeStaticTasks(); ServiceSetupTask* ssTask = new ServiceSetupTask( d->connections.defaultConnection()->rootTask() ); - connect( ssTask, SIGNAL( finished() ), this, SLOT( serviceSetupFinished() ) ); + connect( ssTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( serviceSetupFinished() ) ); ssTask->go( true ); //fire and forget m_loginTaskTwo->deleteLater(); m_loginTaskTwo = 0; @@ -351,7 +351,7 @@ void Client::lt_loginFinished() else if ( d->stage == ClientPrivate::StageOne ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage one login done" << endl; - disconnect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + disconnect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); if ( m_loginTask->statusCode() == 0 ) //we can start stage two { @@ -362,7 +362,7 @@ void Client::lt_loginFinished() d->port = m_loginTask->bosPort().toUInt(); d->cookie = m_loginTask->loginCookie(); close(); - QTimer::singleShot( 100, this, SLOT(startStageTwo() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startStageTwo() ) ); } else { @@ -379,17 +379,17 @@ void Client::lt_loginFinished() void Client::startStageTwo() { //create a new connection and set it up - Connection* c = createConnection( d->host, QString::number( d->port ) ); + Connection* c = createConnection( d->host, TQString::number( d->port ) ); new CloseConnectionTask( c->rootTask() ); //create the new login task m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() ); m_loginTaskTwo->setCookie( d->cookie ); - QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); //connect - QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) ); + TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) ); connectToServer( c, d->host, false ) ; } @@ -411,8 +411,8 @@ void Client::serviceSetupFinished() return; OfflineMessagesTask *offlineMsgTask = new OfflineMessagesTask( c->rootTask() ); - connect( offlineMsgTask, SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ), - this, SIGNAL( messageReceived(const Oscar::Message& ) ) ); + connect( offlineMsgTask, TQT_SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ), + this, TQT_SIGNAL( messageReceived(const Oscar::Message& ) ) ); offlineMsgTask->go( true ); } @@ -420,7 +420,7 @@ void Client::serviceSetupFinished() emit loggedIn(); } -void Client::receivedIcqInfo( const QString& contact, unsigned int type ) +void Client::receivedIcqInfo( const TQString& contact, unsigned int type ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "received icq info for " << contact << " of type " << type << endl; @@ -437,7 +437,7 @@ void Client::receivedInfo( Q_UINT16 sequence ) emit receivedUserInfo( details.userId(), details ); } -void Client::offlineUser( const QString& user, const UserDetails& ) +void Client::offlineUser( const TQString& user, const UserDetails& ) { emit userIsOffline( user ); } @@ -462,27 +462,27 @@ void Client::setVersion( const Oscar::ClientVersion* version ) // INTERNALS // -QString Client::userId() const +TQString Client::userId() const { return d->user; } -QString Client::password() const +TQString Client::password() const { return d->pass; } -QString Client::statusMessage() const +TQString Client::statusMessage() const { return d->statusMessage; } -void Client::setStatusMessage( const QString &message ) +void Client::setStatusMessage( const TQString &message ) { d->statusMessage = message; } -QCString Client::ipAddress() const +TQCString Client::ipAddress() const { //!TODO determine ip address return "127.0.0.1"; @@ -493,7 +493,7 @@ void Client::notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal ) emit taskError( s, errCode, fatal ); } -void Client::notifySocketError( int errCode, const QString& msg ) +void Client::notifySocketError( int errCode, const TQString& msg ) { emit socketError( errCode, msg ); } @@ -538,13 +538,13 @@ void Client::receivedMessage( const Oscar::Message& msg ) Oscar::Message response ( msg ); if ( msg.hasProperty( Oscar::Message::StatusMessageRequest ) ) { - QTextCodec* codec = d->codecProvider->codecForContact( msg.sender() ); + TQTextCodec* codec = d->codecProvider->codecForContact( msg.sender() ); response.setText( Oscar::Message::UserDefined, statusMessage(), codec ); } else { response.setEncoding( Oscar::Message::UserDefined ); - response.setTextArray( QByteArray() ); + response.setTextArray( TQByteArray() ); } response.setReceiver( msg.sender() ); response.addProperty( Oscar::Message::AutoResponse ); @@ -557,7 +557,7 @@ void Client::receivedMessage( const Oscar::Message& msg ) if ( msg.hasProperty( Oscar::Message::AutoResponse ) ) { // we got a response to a status message request. - QString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) ); + TQString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received an away message: " << awayMessage << endl; emit receivedAwayMessage( msg.sender(), awayMessage ); } @@ -574,7 +574,7 @@ void Client::receivedMessage( const Oscar::Message& msg ) } } -void Client::requestAuth( const QString& contactid, const QString& reason ) +void Client::requestAuth( const TQString& contactid, const TQString& reason ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -582,7 +582,7 @@ void Client::requestAuth( const QString& contactid, const QString& reason ) d->ssiAuthTask->sendAuthRequest( contactid, reason ); } -void Client::sendAuth( const QString& contactid, const QString& reason, bool auth ) +void Client::sendAuth( const TQString& contactid, const TQString& reason, bool auth ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -605,7 +605,7 @@ void Client::setIsIcq( bool isIcq ) d->isIcq = isIcq; } -void Client::debug( const QString& str ) +void Client::debug( const TQString& str ) { Q_UNUSED(str); // qDebug( "CLIENT: %s", str.ascii() ); @@ -627,37 +627,37 @@ void Client::initializeStaticTasks() d->typingNotifyTask = new TypingNotifyTask( c->rootTask() ); d->ssiModifyTask = new SSIModifyTask( c->rootTask(), true ); - connect( d->onlineNotifier, SIGNAL( userIsOnline( const QString&, const UserDetails& ) ), - this, SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ) ); - connect( d->onlineNotifier, SIGNAL( userIsOffline( const QString&, const UserDetails& ) ), - this, SLOT( offlineUser( const QString&, const UserDetails & ) ) ); + connect( d->onlineNotifier, TQT_SIGNAL( userIsOnline( const TQString&, const UserDetails& ) ), + this, TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ) ); + connect( d->onlineNotifier, TQT_SIGNAL( userIsOffline( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( offlineUser( const TQString&, const UserDetails & ) ) ); - connect( d->ownStatusTask, SIGNAL( gotInfo() ), this, SLOT( haveOwnUserInfo() ) ); - connect( d->ownStatusTask, SIGNAL( buddyIconUploadRequested() ), this, - SIGNAL( iconNeedsUploading() ) ); + connect( d->ownStatusTask, TQT_SIGNAL( gotInfo() ), this, TQT_SLOT( haveOwnUserInfo() ) ); + connect( d->ownStatusTask, TQT_SIGNAL( buddyIconUploadRequested() ), this, + TQT_SIGNAL( iconNeedsUploading() ) ); - connect( d->messageReceiverTask, SIGNAL( receivedMessage( const Oscar::Message& ) ), - this, SLOT( receivedMessage( const Oscar::Message& ) ) ); + connect( d->messageReceiverTask, TQT_SIGNAL( receivedMessage( const Oscar::Message& ) ), + this, TQT_SLOT( receivedMessage( const Oscar::Message& ) ) ); - connect( d->ssiAuthTask, SIGNAL( authRequested( const QString&, const QString& ) ), - this, SIGNAL( authRequestReceived( const QString&, const QString& ) ) ); - connect( d->ssiAuthTask, SIGNAL( authReplied( const QString&, const QString&, bool ) ), - this, SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ) ); + connect( d->ssiAuthTask, TQT_SIGNAL( authRequested( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ) ); + connect( d->ssiAuthTask, TQT_SIGNAL( authReplied( const TQString&, const TQString&, bool ) ), + this, TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ) ); - connect( d->icqInfoTask, SIGNAL( receivedInfoFor( const QString&, unsigned int ) ), - this, SLOT( receivedIcqInfo( const QString&, unsigned int ) ) ); + connect( d->icqInfoTask, TQT_SIGNAL( receivedInfoFor( const TQString&, unsigned int ) ), + this, TQT_SLOT( receivedIcqInfo( const TQString&, unsigned int ) ) ); - connect( d->userInfoTask, SIGNAL( receivedProfile( const QString&, const QString& ) ), - this, SIGNAL( receivedProfile( const QString&, const QString& ) ) ); - connect( d->userInfoTask, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ) ); - connect( d->typingNotifyTask, SIGNAL( typingStarted( const QString& ) ), - this, SIGNAL( userStartedTyping( const QString& ) ) ); - connect( d->typingNotifyTask, SIGNAL( typingFinished( const QString& ) ), - this, SIGNAL( userStoppedTyping( const QString& ) ) ); + connect( d->userInfoTask, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ) ); + connect( d->userInfoTask, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ) ); + connect( d->typingNotifyTask, TQT_SIGNAL( typingStarted( const TQString& ) ), + this, TQT_SIGNAL( userStartedTyping( const TQString& ) ) ); + connect( d->typingNotifyTask, TQT_SIGNAL( typingFinished( const TQString& ) ), + this, TQT_SIGNAL( userStoppedTyping( const TQString& ) ) ); } -void Client::removeGroup( const QString& groupName ) +void Client::removeGroup( const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -671,7 +671,7 @@ void Client::removeGroup( const QString& groupName ) delete ssimt; } -void Client::addGroup( const QString& groupName ) +void Client::addGroup( const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -685,7 +685,7 @@ void Client::addGroup( const QString& groupName ) delete ssimt; } -void Client::addContact( const QString& contactName, const QString& groupName ) +void Client::addContact( const TQString& contactName, const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -699,7 +699,7 @@ void Client::addContact( const QString& contactName, const QString& groupName ) delete ssimt; } -void Client::removeContact( const QString& contactName ) +void Client::removeContact( const TQString& contactName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -713,7 +713,7 @@ void Client::removeContact( const QString& contactName ) delete ssimt; } -void Client::renameGroup( const QString & oldGroupName, const QString & newGroupName ) +void Client::renameGroup( const TQString & oldGroupName, const TQString & newGroupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -764,7 +764,7 @@ void Client::modifySSIItem( const Oscar::SSI& oldItem, const Oscar::SSI& newItem } } -void Client::changeContactGroup( const QString& contact, const QString& newGroupName ) +void Client::changeContactGroup( const TQString& contact, const TQString& newGroupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -779,7 +779,7 @@ void Client::changeContactGroup( const QString& contact, const QString& newGroup delete ssimt; } -void Client::requestFullInfo( const QString& contactId ) +void Client::requestFullInfo( const TQString& contactId ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) @@ -789,7 +789,7 @@ void Client::requestFullInfo( const QString& contactId ) d->icqInfoTask->go(); } -void Client::requestShortInfo( const QString& contactId ) +void Client::requestShortInfo( const TQString& contactId ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) @@ -799,7 +799,7 @@ void Client::requestShortInfo( const QString& contactId ) d->icqInfoTask->go(); } -void Client::sendWarning( const QString& contact, bool anonymous ) +void Client::sendWarning( const TQString& contact, bool anonymous ) { Connection* c = d->connections.connectionForFamily( 0x0004 ); if ( !c ) @@ -807,62 +807,62 @@ void Client::sendWarning( const QString& contact, bool anonymous ) WarningTask* warnTask = new WarningTask( c->rootTask() ); warnTask->setContact( contact ); warnTask->setAnonymous( anonymous ); - QObject::connect( warnTask, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ), - this, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), + this, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ) ); warnTask->go( true ); } -ICQGeneralUserInfo Client::getGeneralInfo( const QString& contact ) +ICQGeneralUserInfo Client::getGeneralInfo( const TQString& contact ) { return d->icqInfoTask->generalInfoFor( contact ); } -ICQWorkUserInfo Client::getWorkInfo( const QString& contact ) +ICQWorkUserInfo Client::getWorkInfo( const TQString& contact ) { return d->icqInfoTask->workInfoFor( contact ); } -ICQEmailInfo Client::getEmailInfo( const QString& contact ) +ICQEmailInfo Client::getEmailInfo( const TQString& contact ) { return d->icqInfoTask->emailInfoFor( contact ); } -ICQMoreUserInfo Client::getMoreInfo( const QString& contact ) +ICQMoreUserInfo Client::getMoreInfo( const TQString& contact ) { return d->icqInfoTask->moreInfoFor( contact ); } -ICQInterestInfo Client::getInterestInfo( const QString& contact ) +ICQInterestInfo Client::getInterestInfo( const TQString& contact ) { return d->icqInfoTask->interestInfoFor( contact ); } -ICQShortInfo Client::getShortInfo( const QString& contact ) +ICQShortInfo Client::getShortInfo( const TQString& contact ) { return d->icqInfoTask->shortInfoFor( contact ); } -QValueList Client::chatExchangeList() const +TQValueList Client::chatExchangeList() const { return d->exchanges; } -void Client::setChatExchangeList( const QValueList& exchanges ) +void Client::setChatExchangeList( const TQValueList& exchanges ) { d->exchanges = exchanges; } -void Client::requestAIMProfile( const QString& contact ) +void Client::requestAIMProfile( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::Profile ); } -void Client::requestAIMAwayMessage( const QString& contact ) +void Client::requestAIMAwayMessage( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::AwayMessage ); } -void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactStatus ) +void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting away message for " << contact << endl; Oscar::Message msg; @@ -894,7 +894,7 @@ void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactSta sendMessage( msg ); } -void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus ) +void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "adding away message request for " << contact << " to queue" << endl; @@ -909,12 +909,12 @@ void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contact d->awayMsgRequestTimer->start( 1000 ); } -void Client::removeICQAwayMessageRequest( const QString& contact ) +void Client::removeICQAwayMessageRequest( const TQString& contact ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "removing away message request for " << contact << " from queue" << endl; - QValueList::iterator it = d->awayMsgRequestQueue.begin(); + TQValueList::iterator it = d->awayMsgRequestQueue.begin(); while ( it != d->awayMsgRequestQueue.end() ) { if ( (*it).contact == contact ) @@ -962,7 +962,7 @@ void Client::nextICQAwayMessageRequest() requestICQAwayMessage( amr.contact, amr.contactStatus ); } -void Client::requestStatusInfo( const QString& contact ) +void Client::requestStatusInfo( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::General ); } @@ -973,27 +973,27 @@ void Client::whitePagesSearch( const ICQWPSearchInfo& info ) if ( !c ) return; UserSearchTask* ust = new UserSearchTask( c->rootTask() ); - connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ), - this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); - connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) ); + connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ), + this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); + connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) ); ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works ust->searchWhitePages( info ); } -void Client::uinSearch( const QString& uin ) +void Client::uinSearch( const TQString& uin ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) return; UserSearchTask* ust = new UserSearchTask( c->rootTask() ); - connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ), - this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); - connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) ); + connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ), + this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); + connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) ); ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works ust->searchUserByUIN( uin ); } -void Client::updateProfile( const QString& profile ) +void Client::updateProfile( const TQString& profile ) { Connection* c = d->connections.connectionForFamily( 0x0002 ); if ( !c ) @@ -1003,7 +1003,7 @@ void Client::updateProfile( const QString& profile ) pt->go(true); } -void Client::sendTyping( const QString & contact, bool typing ) +void Client::sendTyping( const TQString & contact, bool typing ) { Connection* c = d->connections.connectionForFamily( 0x0004 ); if ( !c ) @@ -1022,7 +1022,7 @@ void Client::connectToIconServer() return; } -void Client::setIgnore( const QString& user, bool ignore ) +void Client::setIgnore( const TQString& user, bool ignore ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_IGNORE ); if ( item && !ignore ) @@ -1033,12 +1033,12 @@ void Client::setIgnore( const QString& user, bool ignore ) else if ( !item && ignore ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to ignore list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, QValueList() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, TQValueList() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::setVisibleTo( const QString& user, bool visible ) +void Client::setVisibleTo( const TQString& user, bool visible ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_VISIBLE ); if ( item && !visible ) @@ -1049,12 +1049,12 @@ void Client::setVisibleTo( const QString& user, bool visible ) else if ( !item && visible ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to visible list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, QValueList() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, TQValueList() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::setInvisibleTo( const QString& user, bool invisible ) +void Client::setInvisibleTo( const TQString& user, bool invisible ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_INVISIBLE ); if ( item && !invisible ) @@ -1065,20 +1065,20 @@ void Client::setInvisibleTo( const QString& user, bool invisible ) else if ( !item && invisible ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to invisible list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, QValueList() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, TQValueList() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType ) +void Client::requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType ) { Connection* c = d->connections.connectionForFamily( 0x0010 ); if ( !c ) return; BuddyIconTask* bit = new BuddyIconTask( c->rootTask() ); - connect( bit, SIGNAL( haveIcon( const QString&, QByteArray ) ), - this, SIGNAL( haveIconForContact( const QString&, QByteArray ) ) ); + connect( bit, TQT_SIGNAL( haveIcon( const TQString&, TQByteArray ) ), + this, TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ) ); bit->requestIconFor( user ); bit->setHashType( hashType ); bit->setHash( hash ); @@ -1086,8 +1086,8 @@ void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE } void Client::requestServerRedirect( WORD family, WORD exchange, - QByteArray cookie, WORD instance, - const QString& room ) + TQByteArray cookie, WORD instance, + const TQString& room ) { //making the assumption that family 2 will always be the BOS connection //use it instead since we can't query for family 1 @@ -1116,21 +1116,21 @@ void Client::requestServerRedirect( WORD family, WORD exchange, srt->setChatRoom( room ); } - connect( srt, SIGNAL( haveServer( const QString&, const QByteArray&, WORD ) ), - this, SLOT( haveServerForRedirect( const QString&, const QByteArray&, WORD ) ) ); + connect( srt, TQT_SIGNAL( haveServer( const TQString&, const TQByteArray&, WORD ) ), + this, TQT_SLOT( haveServerForRedirect( const TQString&, const TQByteArray&, WORD ) ) ); srt->setService( family ); srt->go( true ); } -void Client::haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD ) +void Client::haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD ) { //nasty sender() usage to get the task with chat room info - QObject* o = const_cast( sender() ); + TQObject* o = const_cast( sender() ); ServerRedirectTask* srt = dynamic_cast( o ); //create a new connection and set it up int colonPos = host.find(':'); - QString realHost, realPort; + TQString realHost, realPort; if ( colonPos != -1 ) { realHost = host.left( colonPos ); @@ -1139,18 +1139,18 @@ void Client::haveServerForRedirect( const QString& host, const QByteArray& cooki else { realHost = host; - realPort = QString::fromLatin1("5190"); + realPort = TQString::fromLatin1("5190"); } Connection* c = createConnection( realHost, realPort ); //create the new login task m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() ); m_loginTaskTwo->setCookie( cookie ); - QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( serverRedirectFinished() ) ); + TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverRedirectFinished() ) ); //connect connectToServer( c, d->host, false ); - QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) ); + TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) ); if ( srt ) d->connections.addChatInfoForConnection( c, srt->chatExchange(), srt->chatRoomName() ); @@ -1176,8 +1176,8 @@ void Client::serverRedirectFinished() if ( d->currentRedirect == 0x000D ) { - connect( this, SIGNAL( chatNavigationConnected() ), - this, SLOT( requestChatNavLimits() ) ); + connect( this, TQT_SIGNAL( chatNavigationConnected() ), + this, TQT_SLOT( requestChatNavLimits() ) ); emit chatNavigationConnected(); } @@ -1192,18 +1192,18 @@ void Client::serverRedirectFinished() } Connection* c = m_loginTaskTwo->client(); - QString roomName = d->connections.chatRoomForConnection( c ); + TQString roomName = d->connections.chatRoomForConnection( c ); WORD exchange = d->connections.exchangeForConnection( c ); if ( c ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting up chat connection" << endl; ChatServiceTask* cst = new ChatServiceTask( c->rootTask(), exchange, roomName ); - connect( cst, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); - connect( cst, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); - connect( cst, SIGNAL( newChatMessage( const Oscar::Message& ) ), - this, SIGNAL( messageReceived( const Oscar::Message& ) ) ); + connect( cst, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); + connect( cst, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); + connect( cst, TQT_SIGNAL( newChatMessage( const Oscar::Message& ) ), + this, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ) ); } emit chatRoomConnected( exchange, roomName ); } @@ -1234,19 +1234,19 @@ void Client::requestChatNavLimits() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting chat nav service limits" << endl; ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() ); cnst->setRequestType( ChatNavServiceTask::Limits ); - QObject::connect( cnst, SIGNAL( haveChatExchanges( const QValueList& ) ), - this, SLOT( setChatExchangeList( const QValueList& ) ) ); + TQObject::connect( cnst, TQT_SIGNAL( haveChatExchanges( const TQValueList& ) ), + this, TQT_SLOT( setChatExchangeList( const TQValueList& ) ) ); cnst->go( true ); //autodelete } -void Client::determineDisconnection( int code, const QString& string ) +void Client::determineDisconnection( int code, const TQString& string ) { if ( !sender() ) return; //yay for the sender() hack! - QObject* obj = const_cast( sender() ); + TQObject* obj = const_cast( sender() ); Connection* c = dynamic_cast( obj ); if ( !c ) return; @@ -1262,7 +1262,7 @@ void Client::determineDisconnection( int code, const QString& string ) c = 0; } -void Client::sendBuddyIcon( const QByteArray& iconData ) +void Client::sendBuddyIcon( const TQByteArray& iconData ) { Connection* c = d->connections.connectionForFamily( 0x0010 ); if ( !c ) @@ -1274,7 +1274,7 @@ void Client::sendBuddyIcon( const QByteArray& iconData ) bit->go( true ); } -void Client::joinChatRoom( const QString& roomName, int exchange ) +void Client::joinChatRoom( const TQString& roomName, int exchange ) { Connection* c = d->connections.connectionForFamily( 0x000D ); if ( !c ) @@ -1283,21 +1283,21 @@ void Client::joinChatRoom( const QString& roomName, int exchange ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "joining the chat room '" << roomName << "' on exchange " << exchange << endl; ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() ); - connect( cnst, SIGNAL( connectChat( WORD, QByteArray, WORD, const QString& ) ), - this, SLOT( setupChatConnection( WORD, QByteArray, WORD, const QString& ) ) ); + connect( cnst, TQT_SIGNAL( connectChat( WORD, TQByteArray, WORD, const TQString& ) ), + this, TQT_SLOT( setupChatConnection( WORD, TQByteArray, WORD, const TQString& ) ) ); cnst->createRoom( exchange, roomName ); } -void Client::setupChatConnection( WORD exchange, QByteArray cookie, WORD instance, const QString& room ) +void Client::setupChatConnection( WORD exchange, TQByteArray cookie, WORD instance, const TQString& room ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "cookie is:" << cookie << endl; - QByteArray realCookie( cookie ); + TQByteArray realCookie( cookie ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "connection to chat room" << endl; requestServerRedirect( 0x000E, exchange, realCookie, instance, room ); } -void Client::disconnectChatRoom( WORD exchange, const QString& room ) +void Client::disconnectChatRoom( WORD exchange, const TQString& room ) { Connection* c = d->connections.connectionForChatRoom( exchange, room ); if ( !c ) @@ -1308,7 +1308,7 @@ void Client::disconnectChatRoom( WORD exchange, const QString& room ) } -Connection* Client::createConnection( const QString& host, const QString& port ) +Connection* Client::createConnection( const TQString& host, const TQString& port ) { KNetworkConnector* knc = new KNetworkConnector( 0 ); knc->setOptHostPort( host, port.toUInt() ); diff --git a/kopete/protocols/oscar/liboscar/client.h b/kopete/protocols/oscar/liboscar/client.h index f5dc531e..5c619c33 100644 --- a/kopete/protocols/oscar/liboscar/client.h +++ b/kopete/protocols/oscar/liboscar/client.h @@ -23,8 +23,8 @@ #ifndef LIBOSCAR_CLIENT_H #define LIBOSCAR_CLIENT_H -#include -#include +#include +#include #include "kopete_export.h" #include "rtf2html.h" #include "transfer.h" @@ -56,8 +56,8 @@ public: class CodecProvider { public: virtual ~CodecProvider() {} - virtual QTextCodec* codecForContact( const QString& contactName ) const = 0; - virtual QTextCodec* codecForAccount() const = 0; + virtual TQTextCodec* codecForContact( const TQString& contactName ) const = 0; + virtual TQTextCodec* codecForAccount() const = 0; }; enum ErrorCodes { @@ -74,7 +74,7 @@ public: EXTERNAL API *************/ - Client(QObject *parent=0); + Client(TQObject *parent=0); ~Client(); /** @@ -89,7 +89,7 @@ public: * @param server the server to connect to - but this is also set on the connector used to construct the clientstream?? * @param auth indicate whether we're connecting to the authorizer or the bos server */ - void connectToServer( Connection *c, const QString& server, bool auth = true ); + void connectToServer( Connection *c, const TQString& server, bool auth = true ); /** * Start the login process for Oscar @@ -97,14 +97,14 @@ public: * @param user The user name to log in as. * @param pass The password to use when logging in */ - void start( const QString &host, const uint port, const QString &userId, const QString &pass ); + void start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** Logout and disconnect */ void close(); /** Set our status for AIM */ - void setStatus( AIMStatus status, const QString &message = QString::null ); + void setStatus( AIMStatus status, const TQString &message = TQString::null ); /** Set our status for ICQ */ - void setStatus( DWORD status, const QString &message = QString::null ); + void setStatus( DWORD status, const TQString &message = TQString::null ); /** Retrieve our user info */ UserDetails ourInfo() const; @@ -114,35 +114,35 @@ public: * \param groupName the name of the group to remove * \return true if the group removal was successful */ - void removeGroup( const QString& groupName ); + void removeGroup( const TQString& groupName ); /** * Add a group from the contact list * \param groupName the name of the group to add * \return true if the group addition was successful */ - void addGroup( const QString& groupName ); + void addGroup( const TQString& groupName ); /** * Add a contact to the contact list * \param contactName the screen name of the new contact to add * \return true if the contact addition was successful */ - void addContact( const QString& contactName, const QString& groupName ); + void addContact( const TQString& contactName, const TQString& groupName ); /** * Remove a contact from the contact list * \param contactName the screen name of the contact to remove * \return true if the contact removal was successful */ - void removeContact( const QString &contactName ); + void removeContact( const TQString &contactName ); /** * Rename a group on the contact list * \param oldGroupName the old group name * \param newGroupName the new group name */ - void renameGroup( const QString& oldGroupName, const QString& newGroupName ); + void renameGroup( const TQString& oldGroupName, const TQString& newGroupName ); /** * Modify an SSI item on the SSI list @@ -155,7 +155,7 @@ public: * \param contact the contact to change * \param newGroup the new group to move the contact to */ - void changeContactGroup( const QString& contact, const QString& newGroupName ); + void changeContactGroup( const TQString& contact, const TQString& newGroupName ); /** * Send a message to a contact @@ -169,7 +169,7 @@ public: * \param contactid the id of the contact to request auth from * \param reason the reason for this authorization request */ - void requestAuth( const QString& contactid, const QString& reason ); + void requestAuth( const TQString& contactid, const TQString& reason ); /** * Grant or decline authorization to a contact @@ -177,128 +177,128 @@ public: * \param reason the reason to grant/decline authorization * \param auth grant or decline authorization */ - void sendAuth( const QString& contactid, const QString& reason, bool auth=true ); + void sendAuth( const TQString& contactid, const TQString& reason, bool auth=true ); /** * Request full user info from an ICQ contact * \param contactId the UIN of the contact to get info for */ - void requestFullInfo( const QString& contactId ); + void requestFullInfo( const TQString& contactId ); /** * Request short info for an ICQ contact * \param contactId the UIN of the contact to get info for */ - void requestShortInfo( const QString& contactId ); + void requestShortInfo( const TQString& contactId ); /** * Send a warning to the OSCAR servers about a contact * \param contact the contact to send the warning to * \param anon indicate whether to do it anonymously */ - void sendWarning( const QString& contact, bool anonymous ); + void sendWarning( const TQString& contact, bool anonymous ); /** * Get the general ICQ info for a client * \param contact the contact to get info for */ - ICQGeneralUserInfo getGeneralInfo( const QString& contact ); + ICQGeneralUserInfo getGeneralInfo( const TQString& contact ); /** * Get the work info for a contact * \param contact the contact to get info for */ - ICQWorkUserInfo getWorkInfo( const QString& contact ); + ICQWorkUserInfo getWorkInfo( const TQString& contact ); /** * Get the email info for a contact * \param contact the contact to get info for */ - ICQEmailInfo getEmailInfo( const QString& contact ); + ICQEmailInfo getEmailInfo( const TQString& contact ); /** * Get the additional info available for a contact * \param contact the contact to get info for */ - ICQMoreUserInfo getMoreInfo( const QString& contact ); + ICQMoreUserInfo getMoreInfo( const TQString& contact ); /** * Get the interest info available for a contact * \param contact the contact to get info for */ - ICQInterestInfo getInterestInfo( const QString& contact ); + ICQInterestInfo getInterestInfo( const TQString& contact ); /** * Get the short info available for an icq contact * \param contact the contact to get info for */ - ICQShortInfo getShortInfo( const QString& contact ); + ICQShortInfo getShortInfo( const TQString& contact ); /** * Get the list of chat room exchanges we have */ - QValueList chatExchangeList() const; + TQValueList chatExchangeList() const; /** * Request the aim profile * \param contact the contact to get info for */ - void requestAIMProfile( const QString& contact ); + void requestAIMProfile( const TQString& contact ); /** * Request the aim away message * \param contact the contact to get info for */ - void requestAIMAwayMessage( const QString& contact ); + void requestAIMAwayMessage( const TQString& contact ); /** * Add the icq away message request to queue * \param contact the contact to get info for */ - void addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus ); + void addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ); /** * Remove the icq away message request from queue * \param contact the contact to get info for */ - void removeICQAwayMessageRequest( const QString& contact ); + void removeICQAwayMessageRequest( const TQString& contact ); /** Request the extended status info */ - void requestStatusInfo( const QString& contact ); + void requestStatusInfo( const TQString& contact ); //! Run a whitepages search void whitePagesSearch( const ICQWPSearchInfo& info ); //! Run a UIN search - void uinSearch( const QString& uin ); + void uinSearch( const TQString& uin ); //! Update the user's AIM profile - void updateProfile( const QString& profile ); + void updateProfile( const TQString& profile ); //! Get buddy icon information for a person - void requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType ); + void requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType ); //! Start a server redirect for a different service - void requestServerRedirect( WORD family, WORD e = 0, QByteArray c = QByteArray(), - WORD instance = 0, const QString& room = QString::null ); + void requestServerRedirect( WORD family, WORD e = 0, TQByteArray c = TQByteArray(), + WORD instance = 0, const TQString& room = TQString::null ); //! Start uploading a buddy icon - void sendBuddyIcon( const QByteArray& imageData ); + void sendBuddyIcon( const TQByteArray& imageData ); - void joinChatRoom( const QString& roomName, int exchange ); + void joinChatRoom( const TQString& roomName, int exchange ); - void setIgnore( const QString& user, bool ignore ); + void setIgnore( const TQString& user, bool ignore ); - void setVisibleTo( const QString& user, bool visible ); + void setVisibleTo( const TQString& user, bool visible ); - void setInvisibleTo( const QString& user, bool invisible ); + void setInvisibleTo( const TQString& user, bool invisible ); /** Accessors needed for login */ - QString host(); + TQString host(); int port(); /** Send a typing notification */ - void sendTyping( const QString & contact, bool typing ); + void sendTyping( const TQString & contact, bool typing ); /** Make a connection to the icon server */ void connectToIconServer(); @@ -306,7 +306,7 @@ public: bool hasIconConnection() const; /** We've finished chatting in a chat room, disconnect from it */ - void disconnectChatRoom( WORD exchange, const QString& room ); + void disconnectChatRoom( WORD exchange, const TQString& room ); /** Set codec provider */ void setCodecProvider( CodecProvider* codecProvider ); @@ -320,7 +320,7 @@ public: /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** Have we logged in yet? */ bool isActive() const; @@ -332,29 +332,29 @@ public: const Oscar::ClientVersion* version() const; /** The current user's user ID */ - QString userId() const; + TQString userId() const; /** The current user's password */ - QString password() const; + TQString password() const; /** The current status message (a.k.a. away message) */ - QString statusMessage() const; + TQString statusMessage() const; /** Change the current status message w/o changing status */ - void setStatusMessage( const QString &message ); + void setStatusMessage( const TQString &message ); /** ICQ Settings */ bool isIcq() const; void setIsIcq( bool isIcq ); /** Host's IP address */ - QCString ipAddress() const; + TQCString ipAddress() const; /** Notify that a task error was received */ void notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal ); /** Notify that a socket error has occured */ - void notifySocketError( int errCode, const QString& msg ); + void notifySocketError( int errCode, const TQString& msg ); signals: /** CONNECTION EVENTS */ @@ -378,19 +378,19 @@ signals: void haveSSIList(); /** a user is online. */ - void userIsOnline( const QString& ); + void userIsOnline( const TQString& ); /** a user is offline. */ - void userIsOffline( const QString& ); + void userIsOffline( const TQString& ); /** we've received a message */ void messageReceived( const Oscar::Message& ); /** we've received an authorization request */ - void authRequestReceived( const QString& contact, const QString& reason ); + void authRequestReceived( const TQString& contact, const TQString& reason ); /** we've received an authorization reply */ - void authReplyReceived( const QString& contact, const QString& reason, bool auth ); + void authReplyReceived( const TQString& contact, const TQString& reason, bool auth ); /** * we've received an error from a task and need to notify somebody @@ -400,37 +400,37 @@ signals: /** * we've received a socket error and need to notify somebody */ - void socketError( int errCode, const QString& msg ); + void socketError( int errCode, const TQString& msg ); - void receivedIcqShortInfo( const QString& contact ); - void receivedIcqLongInfo( const QString& contact ); + void receivedIcqShortInfo( const TQString& contact ); + void receivedIcqLongInfo( const TQString& contact ); - void receivedProfile( const QString& contact, const QString& profile ); - void receivedAwayMessage( const QString& contact, const QString& message ); + void receivedProfile( const TQString& contact, const TQString& profile ); + void receivedAwayMessage( const TQString& contact, const TQString& message ); void receivedAwayMessage( const Oscar::Message& message ); - void receivedUserInfo( const QString& contact, const UserDetails& details ); + void receivedUserInfo( const TQString& contact, const UserDetails& details ); /** We warned a user */ - void userWarned( const QString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); + void userWarned( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); /** Search signals */ void gotSearchResults( const ICQSearchResult& ); void endOfSearch( int); /* Typing signals */ - void userStartedTyping( const QString& contact ); - void userStoppedTyping( const QString& contact ); + void userStartedTyping( const TQString& contact ); + void userStoppedTyping( const TQString& contact ); /* Buddy icons */ - void haveIconForContact( const QString&, QByteArray iconData ); + void haveIconForContact( const TQString&, TQByteArray iconData ); void iconServerConnected(); void iconNeedsUploading(); /* Chat rooms */ void chatNavigationConnected(); - void chatRoomConnected( WORD, const QString& ); - void userJoinedChat( Oscar::WORD, const QString& room, const QString& contact ); - void userLeftChat( Oscar::WORD, const QString& room, const QString& contact ); + void chatRoomConnected( WORD, const TQString& ); + void userJoinedChat( Oscar::WORD, const TQString& room, const TQString& contact ); + void userLeftChat( Oscar::WORD, const TQString& room, const TQString& contact ); /* service redirection */ void redirectionFinished( WORD ); @@ -459,7 +459,7 @@ protected slots: void serviceSetupFinished(); /** we have icq info for a contact */ - void receivedIcqInfo( const QString& contact, unsigned int type ); + void receivedIcqInfo( const TQString& contact, unsigned int type ); /** we have normal user info for a contact */ void receivedInfo( Q_UINT16 sequence ); @@ -467,9 +467,9 @@ protected slots: /** received a message of some kind */ void receivedMessage( const Oscar::Message& msg ); - void offlineUser( const QString&, const UserDetails& ); + void offlineUser( const TQString&, const UserDetails& ); - void haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD family ); + void haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD family ); void serverRedirectFinished(); void checkRedirectionQueue( WORD ); @@ -477,15 +477,15 @@ protected slots: /** * Set the list of chat room exchanges we have */ - void setChatExchangeList( const QValueList& exchanges ); + void setChatExchangeList( const TQValueList& exchanges ); /** * set up the connection to a chat room */ - void setupChatConnection( WORD, QByteArray, WORD, const QString& ); + void setupChatConnection( WORD, TQByteArray, WORD, const TQString& ); - void determineDisconnection( int, const QString& ); + void determineDisconnection( int, const TQString& ); void nextICQAwayMessageRequest(); @@ -497,14 +497,14 @@ private: /** Delete the static tasks */ void deleteStaticTasks(); - Connection* createConnection( const QString& host, const QString& port ); + Connection* createConnection( const TQString& host, const TQString& port ); /** * Request the icq away message * \param contact the contact to get info for */ //TODO only made a default for testing w/o frontend - void requestICQAwayMessage( const QString& contact, ICQStatus contactStatus = ICQAway ); + void requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus = ICQAway ); private: class ClientPrivate; diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.cpp b/kopete/protocols/oscar/liboscar/clientreadytask.cpp index 3338f7b3..d5b65069 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.cpp +++ b/kopete/protocols/oscar/liboscar/clientreadytask.cpp @@ -38,7 +38,7 @@ ClientReadyTask::~ClientReadyTask() { } -void ClientReadyTask::setFamilies( const QValueList& families ) +void ClientReadyTask::setFamilies( const TQValueList& families ) { m_familyList = families; } @@ -52,8 +52,8 @@ void ClientReadyTask::onGo() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Sending client ready, end of login" << endl; //nasty nasty nasty hack to get all the packets to work - QValueList::const_iterator rcEnd = m_familyList.constEnd(); - for ( QValueList::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it ) + TQValueList::const_iterator rcEnd = m_familyList.constEnd(); + for ( TQValueList::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it ) { //I have no idea what any of these values mean. I just copied them from oscarsocket int i = ( *it ); @@ -102,7 +102,7 @@ void ClientReadyTask::onGo() //with the hell that is oscar login. (just wait until you get a message) Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.h b/kopete/protocols/oscar/liboscar/clientreadytask.h index 4a9ea941..d632351f 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.h +++ b/kopete/protocols/oscar/liboscar/clientreadytask.h @@ -20,7 +20,7 @@ #include "task.h" #include "rateclass.h" -#include "qvaluelist.h" +#include "tqvaluelist.h" /** Fire and forget task to let the server know we're ready @@ -34,11 +34,11 @@ public: ~ClientReadyTask(); virtual void onGo(); - void setFamilies( const QValueList& families ); + void setFamilies( const TQValueList& families ); private: - QValueList m_classList; - QValueList m_familyList; + TQValueList m_classList; + TQValueList m_familyList; }; #endif diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp index 54926949..3b062b2a 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp @@ -18,8 +18,8 @@ #include "closeconnectiontask.h" -#include -#include +#include +#include #include #include #include "connection.h" @@ -38,24 +38,24 @@ CloseConnectionTask::~CloseConnectionTask() { } -const QByteArray& CloseConnectionTask::cookie() const +const TQByteArray& CloseConnectionTask::cookie() const { return m_cookie; } -const QString& CloseConnectionTask::bosHost() const +const TQString& CloseConnectionTask::bosHost() const { return m_bosHost; } -const QString& CloseConnectionTask::bosPort() const +const TQString& CloseConnectionTask::bosPort() const { return m_bosPort; } bool CloseConnectionTask::take( Transfer* transfer ) { - QString errorReason; + TQString errorReason; WORD errorNum = 0; if ( forMe( transfer ) ) { @@ -70,12 +70,12 @@ bool CloseConnectionTask::take( Transfer* transfer ) return false; } - QValueList tlvList = ft->buffer()->getTLVList(); + TQValueList tlvList = ft->buffer()->getTLVList(); TLV uin = findTLV( tlvList, 0x0001 ); if ( uin ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [UIN], uin=" << QString( uin.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [UIN], uin=" << TQString( uin.data ) << endl; } TLV err = findTLV( tlvList, 0x0008 ); @@ -96,8 +96,8 @@ bool CloseConnectionTask::take( Transfer* transfer ) TLV server = findTLV( tlvList, 0x0005 ); if ( server ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << QString( server.data ) << endl; - QString ip = server.data; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << TQString( server.data ) << endl; + TQString ip = server.data; int index = ip.find( ':' ); m_bosHost = ip.left( index ); ip.remove( 0 , index+1 ); //get rid of the colon and everything before it diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.h b/kopete/protocols/oscar/liboscar/closeconnectiontask.h index b241b07e..35c2ed18 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.h +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.h @@ -20,7 +20,7 @@ #define CLOSECONNECTIONTASK_H #include -#include +#include class Transfer; class QString; @@ -38,21 +38,21 @@ public: virtual bool take(Transfer* transfer); //Protocol specific stuff - const QByteArray& cookie() const; - const QString& bosHost() const; - const QString& bosPort() const; + const TQByteArray& cookie() const; + const TQString& bosHost() const; + const TQString& bosPort() const; protected: virtual bool forMe(const Transfer* transfer) const; private: - bool parseDisconnectCode( int error, QString& reason ); + bool parseDisconnectCode( int error, TQString& reason ); private: - QByteArray m_cookie; - QString m_bosHost; - QString m_bosPort; + TQByteArray m_cookie; + TQString m_bosHost; + TQString m_bosPort; }; diff --git a/kopete/protocols/oscar/liboscar/connection.cpp b/kopete/protocols/oscar/liboscar/connection.cpp index c7cbc0fe..a4bc4877 100644 --- a/kopete/protocols/oscar/liboscar/connection.cpp +++ b/kopete/protocols/oscar/liboscar/connection.cpp @@ -38,7 +38,7 @@ public: DWORD snacSequence; WORD flapSequence; - QValueList familyList; + TQValueList familyList; RateClassManager* rateClassManager; ClientStream* clientStream; @@ -51,7 +51,7 @@ public: Connection::Connection( Connector* connector, ClientStream* cs, const char* name ) -: QObject( 0, name ) +: TQObject( 0, name ) { d = new ConnectionPrivate(); d->clientStream = cs; @@ -77,14 +77,14 @@ Connection::~Connection() void Connection::setClient( Client* c ) { d->client = c; - connect( c, SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); + connect( c, TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loggedIn() ) ); } -void Connection::connectToServer( const QString& host, bool auth ) +void Connection::connectToServer( const TQString& host, bool auth ) { - connect( d->clientStream, SIGNAL( error( int ) ), this, SLOT( streamSocketError( int ) ) ); - connect( d->clientStream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); - connect( d->clientStream, SIGNAL( connected() ), this, SIGNAL( connected() ) ); + connect( d->clientStream, TQT_SIGNAL( error( int ) ), this, TQT_SLOT( streamSocketError( int ) ) ); + connect( d->clientStream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); + connect( d->clientStream, TQT_SIGNAL( connected() ), this, TQT_SIGNAL( connected() ) ); d->clientStream->connectToServer( host, auth ); } @@ -99,12 +99,12 @@ bool Connection::isSupported( int family ) const return ( d->familyList.findIndex( family ) != -1 ); } -QValueList Connection::supportedFamilies() const +TQValueList Connection::supportedFamilies() const { return d->familyList; } -void Connection::addToSupportedFamilies( const QValueList& familyList ) +void Connection::addToSupportedFamilies( const TQValueList& familyList ) { d->familyList += familyList; } @@ -144,12 +144,12 @@ Q_UINT32 Connection::snacSequence() return d->snacSequence; } -QString Connection::userId() const +TQString Connection::userId() const { return d->client->userId(); } -QString Connection::password() const +TQString Connection::password() const { return d->client->password(); } diff --git a/kopete/protocols/oscar/liboscar/connection.h b/kopete/protocols/oscar/liboscar/connection.h index 4170857e..f2c1da75 100644 --- a/kopete/protocols/oscar/liboscar/connection.h +++ b/kopete/protocols/oscar/liboscar/connection.h @@ -18,8 +18,8 @@ Kopete (c) 2002-2005 by the Kopete developers #ifndef CONNECTION_H #define CONNECTION_H -#include -#include +#include +#include #include "oscartypes.h" #include "rateclass.h" @@ -55,7 +55,7 @@ public: void setClient( Client* ); - void connectToServer( const QString& server, bool auth = true ); + void connectToServer( const TQString& server, bool auth = true ); /** * Close the connection and reset the connection data */ @@ -72,14 +72,14 @@ public: * Get the list of supported families * @return The list of families supported on this connection */ - QValueList supportedFamilies() const; + TQValueList supportedFamilies() const; /** * Add the SNAC families in \p familyList to the list of supported families for * this connection * \param familyList the list of families to add */ - void addToSupportedFamilies( const QValueList& familyList ); + void addToSupportedFamilies( const TQValueList& familyList ); /** * Add the SNAC family in \p family to the list of supported families for @@ -94,7 +94,7 @@ public: * need to be filtered on * \param rateClassList the list of rate classes to add */ - void addToRateClasses( const QValueList rateClassList ); + void addToRateClasses( const TQValueList rateClassList ); /** * Add the rate class in \p rc to the list of rate classes packets @@ -125,7 +125,7 @@ public: /** * Get the chat room name for this connection. - * @return the name of the room or QString::null if not connected to a room + * @return the name of the room or TQString::null if not connected to a room */ /** Get the user settings object */ @@ -138,10 +138,10 @@ public: Q_UINT32 snacSequence(); /** Get the cookie for this connection */ - QByteArray cookie() const; + TQByteArray cookie() const; - QString userId() const; - QString password() const; + TQString userId() const; + TQString password() const; bool isIcq() const; SSIManager* ssiManager() const; const Oscar::ClientVersion* version() const; @@ -176,7 +176,7 @@ signals: * \param errCode the error code from the operating system * \param errString the i18n'ed string that describes the error */ - void socketError( int errCode, const QString& errString ); + void socketError( int errCode, const TQString& errString ); private: diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.cpp b/kopete/protocols/oscar/liboscar/connectionhandler.cpp index bf5706ee..bd4df3c5 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.cpp +++ b/kopete/protocols/oscar/liboscar/connectionhandler.cpp @@ -17,7 +17,7 @@ */ #include "connectionhandler.h" -#include +#include #include #include "connection.h" #include "oscartypes.h" @@ -25,8 +25,8 @@ class ConnectionHandler::Private { public: - QValueList connections; - QMap chatRoomConnections; + TQValueList connections; + TQMap chatRoomConnections; }; ConnectionHandler::ConnectionHandler() @@ -57,8 +57,8 @@ void ConnectionHandler::remove( int family ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing all connections " << "supporting family " << family << endl; - QValueList::iterator it = d->connections.begin(); - QValueList::iterator itEnd = d->connections.end(); + TQValueList::iterator it = d->connections.begin(); + TQValueList::iterator itEnd = d->connections.end(); for ( ; it != itEnd; ++it ) { if ( ( *it )->isSupported( family ) ) @@ -84,8 +84,8 @@ void ConnectionHandler::clear() Connection* ConnectionHandler::connectionForFamily( int family ) const { - QValueList::iterator it = d->connections.begin(); - QValueList::iterator itEnd = d->connections.end(); + TQValueList::iterator it = d->connections.begin(); + TQValueList::iterator itEnd = d->connections.end(); int connectionCount = 0; Connection* lastConnection = 0; for ( ; it != itEnd; ++it ) @@ -110,7 +110,7 @@ Connection* ConnectionHandler::defaultConnection() const return d->connections.first(); } -void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const QString& room ) +void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ) { if ( d->connections.findIndex( c ) == -1 ) d->connections.append( c ); @@ -119,10 +119,10 @@ void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exc d->chatRoomConnections[c] = info; } -Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const QString& room ) +Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const TQString& room ) { ConnectionRoomInfo infoToFind = qMakePair( exchange, room ); - QMap::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.data() == infoToFind ) @@ -135,22 +135,22 @@ Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, cons return 0; } -QString ConnectionHandler::chatRoomForConnection( Connection* c ) +TQString ConnectionHandler::chatRoomForConnection( Connection* c ) { if ( d->connections.findIndex( c ) == -1 ) - return QString::null; + return TQString::null; - QMap::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.key() == c ) { - QString room = it.data().second; + TQString room = it.data().second; return room; } } - return QString::null; + return TQString::null; } Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) @@ -159,7 +159,7 @@ Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) if ( d->connections.findIndex( c ) == -1 ) return 0xFFFF; - QMap::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.key() == c ) diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.h b/kopete/protocols/oscar/liboscar/connectionhandler.h index 6094cab3..e8c50b12 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.h +++ b/kopete/protocols/oscar/liboscar/connectionhandler.h @@ -20,13 +20,13 @@ #define CONNECTIONHANDLER_H #include "oscartypes.h" -#include -#include +#include +#include class Connection; -typedef QPair ConnectionRoomInfo; +typedef QPair ConnectionRoomInfo; /** @author Kopete Developers @@ -84,7 +84,7 @@ public: * @param exchange the exchange the chat room is in * @param room the name of the chat room */ - void addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const QString& room ); + void addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ); /** * Get the connection for a particular room name and exchange number. @@ -92,15 +92,15 @@ public: * @param room the name of the chat room to find a connection for * @return a Connection for the chat room or 0L if no connection for that room */ - Connection* connectionForChatRoom( Oscar::WORD exchange, const QString& room ); + Connection* connectionForChatRoom( Oscar::WORD exchange, const TQString& room ); /** * Get the room name for the chat room based the connection * @return The name of the chat room that this connection is connected to * If the connection passed in by @p c is not a chat room connection then - * QString::null is returned. + * TQString::null is returned. */ - QString chatRoomForConnection( Connection* c ); + TQString chatRoomForConnection( Connection* c ); /** * Get the exchange number for the chat room based on the connection diff --git a/kopete/protocols/oscar/liboscar/connector.cpp b/kopete/protocols/oscar/liboscar/connector.cpp index 03a61882..c754e2d3 100644 --- a/kopete/protocols/oscar/liboscar/connector.cpp +++ b/kopete/protocols/oscar/liboscar/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setPeerAddressNone(); } @@ -35,7 +35,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -48,11 +48,11 @@ Q_UINT16 Connector::peerPort() const void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/oscar/liboscar/connector.h b/kopete/protocols/oscar/liboscar/connector.h index fd673163..3844ba49 100644 --- a/kopete/protocols/oscar/liboscar/connector.h +++ b/kopete/protocols/oscar/liboscar/connector.h @@ -22,8 +22,8 @@ #define LIBOSCAR_CONNECTOR_H -#include -#include "qhostaddress.h" +#include +#include "tqhostaddress.h" class ByteStream; @@ -31,15 +31,15 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -48,11 +48,11 @@ signals: protected: void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.cpp b/kopete/protocols/oscar/liboscar/coreprotocol.cpp index 4f114039..918b3751 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/coreprotocol.cpp @@ -24,9 +24,9 @@ #include "coreprotocol.h" -#include -#include -#include +#include +#include +#include #include #include @@ -36,16 +36,16 @@ #include "flapprotocol.h" #include "snacprotocol.h" -static QString toString( const QByteArray& buffer ) +static TQString toString( const TQByteArray& buffer ) { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = buffer.begin(); it != buffer.end(); ++it ) { i++; @@ -54,7 +54,7 @@ static QString toString( const QByteArray& buffer ) if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -62,8 +62,8 @@ static QString toString( const QByteArray& buffer ) { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -77,7 +77,7 @@ static QString toString( const QByteArray& buffer ) using namespace Oscar; -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_snacProtocol = new SnacProtocol( this, "snacprotocol" ); m_flapProtocol = new FlapProtocol( this, "flapprotocol" ); @@ -92,7 +92,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Received " << incomingBytes.count() << " bytes. " << endl; // store locally @@ -114,7 +114,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "more data in chunk!" << endl; // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -149,7 +149,7 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef OSCAR_COREPROTOCOL_DEBUG kdDebug(OSCAR_RAW_DEBUG) << "contains: " << bytes.count() << " bytes" << endl; @@ -174,7 +174,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) return; } -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { // processing incoming data and reassembling it into transfers // may be an event or a response @@ -194,13 +194,13 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) return bytesParsed; } - QDataStream din( wire, IO_ReadOnly ); + TQDataStream din( wire, IO_ReadOnly ); // look at first four bytes and decide what to do with the chunk if ( okToProceed( din ) ) { din >> flapStart; - QByteArray packet; + TQByteArray packet; packet.duplicate( wire ); if ( flapStart == 0x2A ) { @@ -264,12 +264,12 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -void CoreProtocol::slotOutgoingData( const QCString &out ) +void CoreProtocol::slotOutgoingData( const TQCString &out ) { kdDebug(OSCAR_RAW_DEBUG) << out.data() << endl; } -bool CoreProtocol::okToProceed( const QDataStream &din ) +bool CoreProtocol::okToProceed( const TQDataStream &din ) { if ( din.atEnd() ) { diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.h b/kopete/protocols/oscar/liboscar/coreprotocol.h index f49396af..bbc9b693 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.h +++ b/kopete/protocols/oscar/liboscar/coreprotocol.h @@ -21,9 +21,9 @@ #ifndef GW_CORE_PROTOCOL_H #define GW_CORE_PROTOCOL_H -#include -#include -#include +#include +#include +#include class FlapProtocol; class SnacProtocol; @@ -49,7 +49,7 @@ public: * This requires parsing out each FLAP, etc. from the incoming data * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -71,7 +71,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer @@ -81,21 +81,21 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QCString & ); + void slotOutgoingData( const TQCString & ); protected: /** * Check that there is data to read, and set the protocol's state if there isn't any. */ - bool okToProceed( const QDataStream &din ); + bool okToProceed( const TQDataStream &din ); /** * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received + TQByteArray m_in; // buffer containing unprocessed bytes we received int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.cpp b/kopete/protocols/oscar/liboscar/flapprotocol.cpp index c5dc04ed..f5e9fa03 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/flapprotocol.cpp @@ -19,16 +19,16 @@ #include "flapprotocol.h" -#include -#include -#include +#include +#include +#include #include #include "transfer.h" using namespace Oscar; -FlapProtocol::FlapProtocol(QObject *parent, const char *name) +FlapProtocol::FlapProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -37,9 +37,9 @@ FlapProtocol::~FlapProtocol() { } -Transfer* FlapProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* FlapProtocol::parse( const TQByteArray & packet, uint& bytes ) { - QDataStream* m_din = new QDataStream( packet, IO_ReadOnly ); + TQDataStream* m_din = new TQDataStream( packet, IO_ReadOnly ); BYTE b; WORD w; diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.h b/kopete/protocols/oscar/liboscar/flapprotocol.h index d61cf6c4..3d6de53b 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.h +++ b/kopete/protocols/oscar/liboscar/flapprotocol.h @@ -29,7 +29,7 @@ class FlapProtocol : public InputProtocolBase { Q_OBJECT public: - FlapProtocol( QObject *parent = 0, const char *name = 0 ); + FlapProtocol( TQObject *parent = 0, const char *name = 0 ); ~FlapProtocol(); /** @@ -39,7 +39,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an FlapTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; diff --git a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp index 960d4ee5..5b00a8fd 100644 --- a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp @@ -137,7 +137,7 @@ void ICBMParamsTask::sendMessageParams( int channel ) Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.cpp b/kopete/protocols/oscar/liboscar/icqlogintask.cpp index c9f5cd52..76feaf42 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/icqlogintask.cpp @@ -18,7 +18,7 @@ #include "icqlogintask.h" -#include +#include #include #include "transfer.h" #include "connection.h" @@ -54,7 +54,7 @@ void IcqLoginTask::onGo() DWORD flapVersion = 0x00000001; Buffer *outbuf = new Buffer(); - QString encodedPassword = encodePassword( client()->password() ); + TQString encodedPassword = encodePassword( client()->password() ); const Oscar::ClientVersion* version = client()->version(); outbuf->addDWord( flapVersion ); @@ -78,14 +78,14 @@ void IcqLoginTask::onGo() } -QString IcqLoginTask::encodePassword( const QString& loginPassword ) +TQString IcqLoginTask::encodePassword( const TQString& loginPassword ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Called." << endl; // TODO: check if latin1 is the right conversion const char *password = loginPassword.latin1(); unsigned int i = 0; - QString encodedPassword = QString::null; + TQString encodedPassword = TQString::null; //encoding table used in ICQ password XOR transformation unsigned char encoding_table[] = diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.h b/kopete/protocols/oscar/liboscar/icqlogintask.h index 45fb3eb6..3bce47f1 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.h +++ b/kopete/protocols/oscar/liboscar/icqlogintask.h @@ -40,7 +40,7 @@ protected: bool forMe( Transfer* transfer ) const; private: - QString encodePassword( const QString& pw ); + TQString encodePassword( const TQString& pw ); }; diff --git a/kopete/protocols/oscar/liboscar/icqtask.cpp b/kopete/protocols/oscar/liboscar/icqtask.cpp index a383922f..bb58a9c4 100644 --- a/kopete/protocols/oscar/liboscar/icqtask.cpp +++ b/kopete/protocols/oscar/liboscar/icqtask.cpp @@ -20,7 +20,7 @@ #include "buffer.h" #include "connection.h" -#include +#include #include @@ -69,8 +69,8 @@ void ICQTask::parseInitialData( Buffer buf ) m_requestSubType = 0xFFFF; /*kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "uin: " << m_icquin << " sequence: " << sequence - <<" request type: 0x" << QString::number( m_requestType, 16 ) - << " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl;*/ + <<" request type: 0x" << TQString::number( m_requestType, 16 ) + << " request sub type: 0x" << TQString::number( m_requestSubType, 16 ) << endl;*/ } Buffer* ICQTask::addInitialData( Buffer* buf ) const @@ -89,8 +89,8 @@ Buffer* ICQTask::addInitialData( Buffer* buf ) const tlvData->addLEWord( m_requestSubType ); /*kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "uin: " << m_icquin << " sequence: " << sequence - <<" request type: 0x" << QString::number( m_requestType, 16 ) - << " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl; */ + <<" request type: 0x" << TQString::number( m_requestType, 16 ) + << " request sub type: 0x" << TQString::number( m_requestSubType, 16 ) << endl; */ if ( buf != 0 ) tlvData->addString( buf->buffer(), buf->length() ); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.cpp b/kopete/protocols/oscar/liboscar/icquserinfo.cpp index f853c045..bc37d313 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfo.cpp @@ -132,9 +132,9 @@ void ICQMoreUserInfo::fill( Buffer* buffer ) // set birthday to NULL if at least one of the values in the buffer is 0 if ( year == 0 || month == 0 || day == 0 ) - birthday = QDate(); + birthday = TQDate(); else - birthday = QDate( year, month, day ); + birthday = TQDate( year, month, day ); lang1 = buffer->getByte(); lang2 = buffer->getByte(); @@ -158,7 +158,7 @@ void ICQEmailInfo::fill( Buffer* buffer ) if ( buffer->getByte() == 0x0A ) { int numEmails = buffer->getByte(); - QString email; + TQString email; for ( int i = 0; i < numEmails; i++ ) { if ( buffer->getByte() == 0x00 ) @@ -183,7 +183,7 @@ void ICQInterestInfo::fill( Buffer* buffer ) for ( int i = 0; i < len; i++ ) { int t=buffer->getLEWord(); - QCString d = buffer->getLELNTS(); + TQCString d = buffer->getLELNTS(); if (t>0) { //there is some topic if (count<4) { //i think this could not happen, i have never seen more topics[count]=t; @@ -213,22 +213,22 @@ void ICQSearchResult::fill( Buffer* buffer ) WORD datalength = buffer->getLEWord(); // data length WORD len = 0; uin = buffer->getLEDWord(); - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Found UIN " << QString::number( uin ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Found UIN " << TQString::number( uin ) << endl; len = buffer->getLEWord(); if ( len > 0 ) - nickName = QCString( buffer->getBlock( len ) ); + nickName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - firstName = QCString( buffer->getBlock( len ) ); + firstName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - lastName = QCString( buffer->getBlock( len ) ); + lastName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - email = QCString( buffer->getBlock( len ) ); + email = TQCString( buffer->getBlock( len ) ); auth = ( buffer->getByte() != 0x01 ); online = ( buffer->getLEWord() == 0x0001 ); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.h b/kopete/protocols/oscar/liboscar/icquserinfo.h index ac054721..3c3510f4 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.h +++ b/kopete/protocols/oscar/liboscar/icquserinfo.h @@ -19,9 +19,9 @@ #ifndef _ICQUSERINFO_H_ #define _ICQUSERINFO_H_ -#include -#include -#include +#include +#include +#include #include "kopete_export.h" class Buffer; @@ -56,10 +56,10 @@ public: public: unsigned long uin; - QCString nickname; - QCString firstName; - QCString lastName; - QCString email; + TQCString nickname; + TQCString firstName; + TQCString lastName; + TQCString email; bool needsAuth; unsigned int gender; // 0=offline, 1=online, 2=not webaware }; @@ -73,17 +73,17 @@ public: public: unsigned long uin; - QCString nickname; - QCString firstName; - QCString lastName; - QCString email; - QCString city; - QCString state; - QCString phoneNumber; - QCString faxNumber; - QCString address; - QCString cellNumber; - QCString zip; + TQCString nickname; + TQCString firstName; + TQCString lastName; + TQCString email; + TQCString city; + TQCString state; + TQCString phoneNumber; + TQCString faxNumber; + TQCString address; + TQCString cellNumber; + TQCString zip; int country; char timezone; bool publishEmail; @@ -99,18 +99,18 @@ public: void fill( Buffer* buffer ); public: - QCString city; - QCString state; - QCString phone; - QCString fax; - QCString address; - QCString zip; + TQCString city; + TQCString state; + TQCString phone; + TQCString fax; + TQCString address; + TQCString zip; int country; - QCString company; - QCString department; - QCString position; + TQCString company; + TQCString department; + TQCString position; int occupation; - QCString homepage; + TQCString homepage; }; class KOPETE_EXPORT ICQMoreUserInfo : public ICQInfoBase @@ -123,13 +123,13 @@ public: public: int age; unsigned int gender; - QCString homepage; - QDate birthday; + TQCString homepage; + TQDate birthday; unsigned int lang1; unsigned int lang2; unsigned int lang3; - QCString ocity; - QCString ostate; + TQCString ocity; + TQCString ostate; int ocountry; int marital; }; @@ -142,7 +142,7 @@ public: void fill( Buffer* buffer ); public: - QValueList emailList; + TQValueList emailList; }; class KOPETE_EXPORT ICQInterestInfo : public ICQInfoBase @@ -155,7 +155,7 @@ public: public: int count; int topics[4]; - QCString descriptions[4]; + TQCString descriptions[4]; }; @@ -165,10 +165,10 @@ public: ICQSearchResult(); void fill( Buffer* buffer ); Q_UINT32 uin; - QCString firstName; - QCString lastName; - QCString nickName; - QCString email; + TQCString firstName; + TQCString lastName; + TQCString nickName; + TQCString email; bool auth; bool online; char gender; @@ -180,19 +180,19 @@ class KOPETE_EXPORT ICQWPSearchInfo public: ICQWPSearchInfo(); - QCString firstName; - QCString lastName; - QCString nickName; - QCString email; + TQCString firstName; + TQCString lastName; + TQCString nickName; + TQCString email; int age; int gender; int language; - QCString city; - QCString state; + TQCString city; + TQCString state; int country; - QCString company; - QCString department; - QCString position; + TQCString company; + TQCString department; + TQCString position; int occupation; bool onlineOnly; }; @@ -202,11 +202,11 @@ class ICQInfoItem { public: int category; - QCString description; + TQCString description; }; -typedef QValueList ICQInfoItemList; +typedef TQValueList ICQInfoItemList; */ #endif diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp index 068ac273..3635bc71 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp @@ -89,7 +89,7 @@ bool ICQUserInfoRequestTask::take( Transfer* transfer ) buffer->skipBytes( 8 ); WORD seq = buffer->getLEWord(); // request sequence number buffer->getLEWord(); // request data sub type - QString contactId = m_contactSequenceMap[seq]; + TQString contactId = m_contactSequenceMap[seq]; switch ( requestSubType() ) { @@ -186,43 +186,43 @@ void ICQUserInfoRequestTask::onGo() send( t ); } -ICQGeneralUserInfo ICQUserInfoRequestTask::generalInfoFor( const QString& contact ) +ICQGeneralUserInfo ICQUserInfoRequestTask::generalInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_genInfoMap[seq]; } -ICQWorkUserInfo ICQUserInfoRequestTask::workInfoFor( const QString& contact ) +ICQWorkUserInfo ICQUserInfoRequestTask::workInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_workInfoMap[seq]; } -ICQMoreUserInfo ICQUserInfoRequestTask::moreInfoFor( const QString& contact ) +ICQMoreUserInfo ICQUserInfoRequestTask::moreInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_moreInfoMap[seq]; } -ICQEmailInfo ICQUserInfoRequestTask::emailInfoFor(const QString& contact ) +ICQEmailInfo ICQUserInfoRequestTask::emailInfoFor(const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_emailInfoMap[seq]; } -ICQShortInfo ICQUserInfoRequestTask::shortInfoFor( const QString& contact ) +ICQShortInfo ICQUserInfoRequestTask::shortInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_shortInfoMap[seq]; } -ICQInterestInfo ICQUserInfoRequestTask::interestInfoFor( const QString& contact ) +ICQInterestInfo ICQUserInfoRequestTask::interestInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_interestInfoMap[seq]; } -QString ICQUserInfoRequestTask::notesInfoFor( const QString& contact ) +TQString ICQUserInfoRequestTask::notesInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_notesInfoMap[seq]; diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.h b/kopete/protocols/oscar/liboscar/icquserinfotask.h index eba81b57..613608fd 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.h +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.h @@ -19,8 +19,8 @@ #ifndef ICQUSERINFOTASK_H #define ICQUSERINFOTASK_H -#include -#include +#include +#include #include "icqtask.h" #include "icquserinfo.h" @@ -39,37 +39,37 @@ public: enum { Long = 0, Short }; - void setUser( const QString& user ) { m_userToRequestFor = user; } + void setUser( const TQString& user ) { m_userToRequestFor = user; } void setType( unsigned int type ) { m_type = type; } void setInfoToRequest( unsigned int type ); - ICQGeneralUserInfo generalInfoFor( const QString& contact ); - ICQEmailInfo emailInfoFor( const QString& contact ); - ICQMoreUserInfo moreInfoFor( const QString& contact ); - ICQWorkUserInfo workInfoFor( const QString& contact ); - QString notesInfoFor( const QString& contact ); - ICQShortInfo shortInfoFor( const QString& contact ); - ICQInterestInfo interestInfoFor( const QString& contact ); + ICQGeneralUserInfo generalInfoFor( const TQString& contact ); + ICQEmailInfo emailInfoFor( const TQString& contact ); + ICQMoreUserInfo moreInfoFor( const TQString& contact ); + ICQWorkUserInfo workInfoFor( const TQString& contact ); + TQString notesInfoFor( const TQString& contact ); + ICQShortInfo shortInfoFor( const TQString& contact ); + ICQInterestInfo interestInfoFor( const TQString& contact ); virtual bool forMe( const Transfer* transfer ) const; virtual bool take( Transfer* transfer ); virtual void onGo(); signals: - void receivedInfoFor( const QString& contact, unsigned int type ); + void receivedInfoFor( const TQString& contact, unsigned int type ); private: - QMap m_genInfoMap; - QMap m_emailInfoMap; - QMap m_moreInfoMap; - QMap m_workInfoMap; - QMap m_shortInfoMap; - QMap m_interestInfoMap; - QMap m_notesInfoMap; - QMap m_contactSequenceMap; - QMap m_reverseContactMap; + TQMap m_genInfoMap; + TQMap m_emailInfoMap; + TQMap m_moreInfoMap; + TQMap m_workInfoMap; + TQMap m_shortInfoMap; + TQMap m_interestInfoMap; + TQMap m_notesInfoMap; + TQMap m_contactSequenceMap; + TQMap m_reverseContactMap; unsigned int m_type; - QString m_userToRequestFor; + TQString m_userToRequestFor; }; #endif diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp index abd34e53..b93ede3f 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp @@ -18,8 +18,8 @@ #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { m_state = NeedMore; m_bytes = 0; @@ -35,13 +35,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -61,7 +61,7 @@ bool InputProtocolBase::okToProceed() return false; } -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -72,7 +72,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > 1024 ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.h b/kopete/protocols/oscar/liboscar/inputprotocolbase.h index 7bea895f..94072e00 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.h +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include +#include class Transfer; /** @@ -32,7 +32,7 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Returns a value describing the state of the object. @@ -45,13 +45,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -61,12 +61,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream * m_din; + TQDataStream * m_din; }; #endif diff --git a/kopete/protocols/oscar/liboscar/locationrightstask.cpp b/kopete/protocols/oscar/liboscar/locationrightstask.cpp index 5aae9a5e..f019b961 100644 --- a/kopete/protocols/oscar/liboscar/locationrightstask.cpp +++ b/kopete/protocols/oscar/liboscar/locationrightstask.cpp @@ -80,7 +80,7 @@ void LocationRightsTask::sendLocationRightsRequest() void LocationRightsTask::handleLocationRightsResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring location rights response" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/logintask.cpp b/kopete/protocols/oscar/liboscar/logintask.cpp index 962b2e1a..a153f8f7 100644 --- a/kopete/protocols/oscar/liboscar/logintask.cpp +++ b/kopete/protocols/oscar/liboscar/logintask.cpp @@ -18,7 +18,7 @@ #include "logintask.h" -#include +#include #include #include @@ -63,7 +63,7 @@ bool StageOneLoginTask::take( Transfer* transfer ) m_closeTask = new CloseConnectionTask( client()->rootTask() ); //connect finished signal - connect( m_closeTask, SIGNAL( finished() ), this, SLOT( closeTaskFinished() ) ); + connect( m_closeTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeTaskFinished() ) ); m_icqTask->go( true ); } else @@ -80,7 +80,7 @@ bool StageOneLoginTask::take( Transfer* transfer ) send( ft ); m_aimTask = new AimLoginTask( client()->rootTask() ); - connect( m_aimTask, SIGNAL( finished() ), this, SLOT( aimTaskFinished() ) ); + connect( m_aimTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( aimTaskFinished() ) ); m_aimTask->go( true ); } return true; @@ -118,17 +118,17 @@ bool StageOneLoginTask::forMe( Transfer* transfer ) const return ( ft && ft->flapChannel() == 1 ); } -const QByteArray& StageOneLoginTask::loginCookie() const +const TQByteArray& StageOneLoginTask::loginCookie() const { return m_cookie; } -const QString& StageOneLoginTask::bosServer() const +const TQString& StageOneLoginTask::bosServer() const { return m_bosServer; } -const QString& StageOneLoginTask::bosPort() const +const TQString& StageOneLoginTask::bosPort() const { return m_bosPort; } @@ -145,8 +145,8 @@ StageTwoLoginTask::StageTwoLoginTask( Task* parent ) m_versionTask = new ServerVersionsTask( rootTask ); m_rateTask = new RateInfoTask( rootTask ); - QObject::connect( m_versionTask, SIGNAL( finished() ), this, SLOT( versionTaskFinished() ) ); - QObject::connect( m_rateTask, SIGNAL( finished() ), this, SLOT( rateTaskFinished() ) ); + TQObject::connect( m_versionTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( versionTaskFinished() ) ); + TQObject::connect( m_rateTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( rateTaskFinished() ) ); } StageTwoLoginTask::~StageTwoLoginTask() @@ -188,16 +188,16 @@ void StageTwoLoginTask::onGo() send( ft ); } else - setError( -1, QString::null ); + setError( -1, TQString::null ); return; } -void StageTwoLoginTask::setCookie( const QByteArray& newCookie ) +void StageTwoLoginTask::setCookie( const TQByteArray& newCookie ) { m_cookie.duplicate( newCookie ); } -const QByteArray& StageTwoLoginTask::cookie() +const TQByteArray& StageTwoLoginTask::cookie() { return m_cookie; } @@ -210,7 +210,7 @@ void StageTwoLoginTask::versionTaskFinished() void StageTwoLoginTask::rateTaskFinished() { - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "logintask.moc" diff --git a/kopete/protocols/oscar/liboscar/logintask.h b/kopete/protocols/oscar/liboscar/logintask.h index 12061821..83bc8fde 100644 --- a/kopete/protocols/oscar/liboscar/logintask.h +++ b/kopete/protocols/oscar/liboscar/logintask.h @@ -19,7 +19,7 @@ #ifndef _OSCAR_LOGINTASK_H_ #define _OSCAR_LOGINTASK_H_ -#include +#include #include "oscartypes.h" #include "task.h" @@ -52,19 +52,19 @@ public: //Protocol specific stuff //! Get the BOS cookie - const QByteArray& loginCookie() const; + const TQByteArray& loginCookie() const; //! Get the BOS server - const QString& bosServer() const; + const TQString& bosServer() const; //! Get the BOS port - const QString& bosPort() const; + const TQString& bosPort() const; //! Get the error code, if there is one int errorCode() const; //! Get the error reason so it can be displayed - const QString& errorReason() const; + const TQString& errorReason() const; public slots: @@ -82,9 +82,9 @@ private: CloseConnectionTask* m_closeTask; //Private data we get from the tasks - QByteArray m_cookie; - QString m_bosServer; - QString m_bosPort; + TQByteArray m_cookie; + TQString m_bosServer; + TQString m_bosPort; }; @@ -111,13 +111,13 @@ public: //protocol specifics //! Set the cookie to send to the server - void setCookie( const QByteArray& newCookie ); + void setCookie( const TQByteArray& newCookie ); //! Get the cookie to send to the server - const QByteArray& cookie(); + const TQByteArray& cookie(); - QString host() const; - QString port() const; + TQString host() const; + TQString port() const; public slots: @@ -131,8 +131,8 @@ protected: bool forMe( Transfer* transfer ) const; private: - QByteArray m_cookie; - QString m_host, m_port; + TQByteArray m_cookie; + TQString m_host, m_port; //tasks ServerVersionsTask* m_versionTask; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp index 2db05eb1..0dd26e3d 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp @@ -16,7 +16,7 @@ #include "messagereceivertask.h" -#include +#include #include #include "transfer.h" #include "buffer.h" @@ -109,7 +109,7 @@ bool MessageReceiverTask::take( Transfer* transfer ) else { int screenNameLength = b->getByte(); - m_fromUser = QString( b->getBlock( screenNameLength ) ); + m_fromUser = TQString( b->getBlock( screenNameLength ) ); setTransfer( transfer ); handleAutoResponse(); setTransfer( 0 ); @@ -122,7 +122,7 @@ bool MessageReceiverTask::take( Transfer* transfer ) void MessageReceiverTask::handleType1Message() { Oscar::Message msg; - QValueList messageTLVList = transfer()->buffer()->getTLVList(); + TQValueList messageTLVList = transfer()->buffer()->getTLVList(); TLV t = Oscar::findTLV( messageTLVList, 0x0002 ); if ( !t ) { @@ -130,8 +130,8 @@ void MessageReceiverTask::handleType1Message() return; } Buffer messageBuffer( t.data ); - QValueList innerTLVList = messageBuffer.getTLVList(); - QValueList::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end(); + TQValueList innerTLVList = messageBuffer.getTLVList(); + TQValueList::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end(); for ( ; (*it); ++it ) { switch ( ( *it ).type ) @@ -154,7 +154,7 @@ void MessageReceiverTask::handleType1Message() //message length is buffer length - length of ( charset + subcharset ) */ int msgLength = ( *it ).length - 4; - QByteArray msgArray( message.getBlock( msgLength ) ); + TQByteArray msgArray( message.getBlock( msgLength ) ); msg.setTextArray( msgArray ); break; @@ -176,7 +176,7 @@ void MessageReceiverTask::handleType1Message() msg.setSender( m_fromUser ); msg.setReceiver( client()->userId() ); - msg.setTimestamp( QDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::currentDateTime() ); msg.setType( 0x01 ); emit receivedMessage( msg ); @@ -187,7 +187,7 @@ void MessageReceiverTask::handleType2Message() kdDebug(14151) << k_funcinfo << "Received Type 2 message. Trying to handle it..." << endl; Oscar::Message msg; - QValueList messageTLVList = transfer()->buffer()->getTLVList(); + TQValueList messageTLVList = transfer()->buffer()->getTLVList(); TLV t = Oscar::findTLV( messageTLVList, 0x0005 ); if ( !t ) { @@ -280,7 +280,7 @@ void MessageReceiverTask::handleType4Message() Buffer tlv5buffer(tlv5.data, tlv5.length); DWORD uin = tlv5buffer.getLEDWord(); // little endian for no sane reason! - if ( QString::number(uin) != m_fromUser ) + if ( TQString::number(uin) != m_fromUser ) kdWarning(14151) << k_funcinfo << "message uin does not match uin found in packet header!" << endl; BYTE msgType = tlv5buffer.getByte(); @@ -291,7 +291,7 @@ void MessageReceiverTask::handleType4Message() //handle the special user types Oscar::Message msg; - QString msgSender; + TQString msgSender; switch ( msgType ) { case 0x0D: @@ -307,7 +307,7 @@ void MessageReceiverTask::handleType4Message() break; }; - QCString msgText = tlv5buffer.getLNTS(); + TQCString msgText = tlv5buffer.getLNTS(); int msgLength = msgText.size(); if ( msgType == 0x0D || msgType == 0x0E ) { @@ -332,7 +332,7 @@ void MessageReceiverTask::handleType4Message() } msg.setType( 0x04 ); - msg.setTimestamp( QDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::currentDateTime() ); msg.setSender( msgSender ); msg.setReceiver( client()->userId() ); msg.setEncoding( Oscar::Message::UserDefined ); @@ -404,7 +404,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Message type is: " << messageType << endl; - QCString msgText( b->getLELNTS() ); + TQCString msgText( b->getLELNTS() ); Oscar::Message::Encoding encoding = Oscar::Message::UserDefined; int fgcolor = 0x00000000; int bgcolor = 0x00ffffff; @@ -421,7 +421,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) if ( b->length() < capLength ) break; - QByteArray cap( b->getBlock( capLength ) ); + TQByteArray cap( b->getBlock( capLength ) ); if ( qstrncmp ( cap.data(), "{0946134E-4C7F-11D1-8222-444553540000}", capLength ) == 0 ) encoding = Oscar::Message::UTF8; } @@ -437,7 +437,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) msg->setSender( m_fromUser ); msg->setReceiver( client()->userId() ); - msg->setTimestamp( QDateTime::currentDateTime() ); + msg->setTimestamp( TQDateTime::currentDateTime() ); msg->setType( 0x02 ); msg->setIcbmCookie( m_icbmCookie ); msg->setProtocolVersion( protocolVersion ); @@ -451,7 +451,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) } } -QTextCodec* MessageReceiverTask::guessCodec( const QCString& string ) +TQTextCodec* MessageReceiverTask::guessCodec( const TQCString& string ) { Q_UNUSED( string ); return 0; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.h b/kopete/protocols/oscar/liboscar/messagereceivertask.h index b50a133f..4a129016 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.h +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.h @@ -17,8 +17,8 @@ #define MESSAGERECEIVERTASK_H #include "task.h" -#include -#include +#include +#include #include "oscarmessage.h" #include "oscartypeclasses.h" #include "oscarmessage.h" @@ -61,13 +61,13 @@ private: //!Parses Rendezvous data in Buffer and puts the information into Message void parseRendezvousData( Buffer* b, Oscar::Message* msg ); - QTextCodec* guessCodec( const QCString& string ); + TQTextCodec* guessCodec( const TQCString& string ); private: - QByteArray m_icbmCookie; + TQByteArray m_icbmCookie; int m_channel; - QString m_fromUser; + TQString m_fromUser; int m_currentSnacSubtype; int m_charSet; int m_subCharSet; diff --git a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp index d97da7a3..88d41a84 100644 --- a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp +++ b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp @@ -108,10 +108,10 @@ void OfflineMessagesTask::handleOfflineMessage() BYTE flags = buffer->getByte(); // msg flags WORD msgLength = buffer->getLEWord(); - QByteArray msg = buffer->getBlock( msgLength ); + TQByteArray msg = buffer->getBlock( msgLength ); - QDate date(year, month, day); - QTime time(hour,minute); + TQDate date(year, month, day); + TQTime time(hour,minute); #ifndef HAVE_TM_GMTOFF int tz = -( ::timezone ); #else @@ -125,10 +125,10 @@ void OfflineMessagesTask::handleOfflineMessage() #endif time = time.addSecs( tz ); - QDateTime hackyTime( date, time ); + TQDateTime hackyTime( date, time ); Oscar::Message message( Oscar::Message::UserDefined, msg, type, flags, hackyTime ); - message.setSender( QString::number( senderUin ) ); - message.setReceiver( QString::number( receiverUin ) ); + message.setSender( TQString::number( senderUin ) ); + message.setReceiver( TQString::number( receiverUin ) ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received offline message '" << msg.data() << "' from " << senderUin << endl; diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp index 785e23f7..6b6b3d05 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp @@ -80,7 +80,7 @@ void OnlineNotifierTask::userOnline() Buffer* buffer = transfer()->buffer(); UserDetails ud; ud.fill( buffer ); - QString user = ud.userId(); + TQString user = ud.userId(); //kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << user << " is now online" << endl; emit userIsOnline( user, ud ); } @@ -90,7 +90,7 @@ void OnlineNotifierTask::userOffline() Buffer* buffer = transfer()->buffer(); UserDetails ud; ud.fill( buffer ); - QString user = ud.userId(); + TQString user = ud.userId(); //kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << user << " is now offline" << endl; emit userIsOffline( user, ud ); } diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h index 2ec58e5a..18bcb5c1 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h @@ -46,8 +46,8 @@ protected: virtual bool forMe( const Transfer* transfer ) const; signals: - void userIsOnline( const QString& user, const UserDetails& ud ); - void userIsOffline( const QString& user, const UserDetails& ud ); + void userIsOnline( const TQString& user, const UserDetails& ud ); + void userIsOffline( const TQString& user, const UserDetails& ud ); private: void userOnline(); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp index ea090442..5f39d205 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp @@ -17,14 +17,14 @@ * * ***************************************************************************/ -#include +#include #include #include #include #include "oscarbytestream.h" -KNetworkByteStream::KNetworkByteStream( QObject *parent, const char */*name*/ ) +KNetworkByteStream::KNetworkByteStream( TQObject *parent, const char */*name*/ ) : ByteStream ( parent ) { kdDebug( 14151 ) << k_funcinfo << "Instantiating new KNetwork byte stream." << endl; @@ -38,14 +38,14 @@ KNetworkByteStream::KNetworkByteStream( QObject *parent, const char */*name*/ ) mSocket->enableRead( true ); // connect signals and slots - QObject::connect( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool KNetworkByteStream::connect( QString host, QString service ) +bool KNetworkByteStream::connect( TQString host, TQString service ) { kdDebug( 14151 ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl; @@ -71,7 +71,7 @@ void KNetworkByteStream::close () int KNetworkByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); #ifdef OSCAR_EXCESSIVE_DEBUG kdDebug(14151) << k_funcinfo << "writing " << writeData.size() << " bytes." << endl; #endif @@ -115,7 +115,7 @@ void KNetworkByteStream::slotConnectionClosed() void KNetworkByteStream::slotReadyRead() { // stuff all available data into our buffers - QByteArray readBuffer( socket()->bytesAvailable () ); + TQByteArray readBuffer( socket()->bytesAvailable () ); socket()->readBlock( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.h b/kopete/protocols/oscar/liboscar/oscarbytestream.h index bd618666..2ecd92d9 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.h +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.h @@ -37,11 +37,11 @@ class KNetworkByteStream : public ByteStream Q_OBJECT public: - KNetworkByteStream ( QObject *parent = 0, const char *name = 0 ); + KNetworkByteStream ( TQObject *parent = 0, const char *name = 0 ); ~KNetworkByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp index e607a24b..87da6020 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp @@ -20,10 +20,10 @@ #include "oscarclientstream.h" -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -36,7 +36,7 @@ #define LIBOSCAR_DEBUG 0 -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -59,9 +59,9 @@ public: bs = 0; connection = 0; - username = QString::null; - password = QString::null; - server = QString::null; + username = TQString::null; + password = TQString::null; + server = TQString::null; haveLocalAddr = false; doBinding = true; @@ -74,12 +74,12 @@ public: newTransfers = false; } - QString username; - QString password; - QString server; + TQString username; + TQString password; + TQString server; bool doAuth; //send the initial login sequences to get the cookie bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; bool doBinding; @@ -88,7 +88,7 @@ public: CoreProtocol client; Connection* connection; - QString defRealm; + TQString defRealm; int mode; int state; @@ -96,15 +96,15 @@ public: bool newTransfers; int errCond; - QString errText; + TQString errText; - QPtrQueue in; + TQPtrQueue in; - QTimer noopTimer; // used to send icq keepalive + TQTimer noopTimer; // used to send icq keepalive int noop_time; }; -ClientStream::ClientStream(Connector *conn, QObject *parent) +ClientStream::ClientStream(Connector *conn, TQObject *parent) :Stream(parent) { //qDebug("CLIENTSTREAM::ClientStream"); @@ -112,13 +112,13 @@ ClientStream::ClientStream(Connector *conn, QObject *parent) d = new Private; d->mode = ClientMode; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); } ClientStream::~ClientStream() @@ -151,7 +151,7 @@ void ClientStream::reset(bool all) d->in.clear(); } -void ClientStream::connectToServer(const QString& server, bool auth) +void ClientStream::connectToServer(const TQString& server, bool auth) { reset(true); d->state = Connecting; @@ -205,7 +205,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start( d->noop_time ); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -217,7 +217,7 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } @@ -263,7 +263,7 @@ void ClientStream::write( Transfer *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { #if 0 qDebug( "contains: %i bytes ", bytes.count() ); @@ -305,7 +305,7 @@ void cs_dump( const QByteArray &bytes ) Q_UNUSED( bytes ); } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { // take formatted bytes from CoreProtocol and put them on the wire d->bs->write( outgoingBytes ); @@ -329,19 +329,19 @@ void ClientStream::cp_incomingData() void ClientStream::cr_connected() { d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); d->state = Active; if ( d->noop_time ) d->noopTimer.start( d->noop_time ); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); - QGuardedPtr self = this; + TQGuardedPtr self = this; emit connected(); if(!self) return; @@ -372,12 +372,12 @@ void ClientStream::bs_error(int) void ClientStream::bs_readyRead() { - QByteArray a; + TQByteArray a; //qDebug( "size of storage for incoming data is %i bytes.", a.size() ); a = d->bs->read(); #if LIBOSCAR_DEBUG - QCString cs(a.data(), a.size()+1); + TQCString cs(a.data(), a.size()+1); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "recv: " << a.size() << "bytes" << endl; cs_dump( a ); #endif @@ -408,7 +408,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.h b/kopete/protocols/oscar/liboscar/oscarclientstream.h index f8b4d2b6..307c0616 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.h +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.h @@ -73,19 +73,19 @@ public: BindConflict // resource in-use }; - ClientStream(Connector *conn, QObject *parent=0); + ClientStream(Connector *conn, TQObject *parent=0); ~ClientStream(); - void connectToServer(const QString& server, bool auth=true); + void connectToServer(const TQString& server, bool auth=true); void accept(); // server bool isActive() const; bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -110,10 +110,10 @@ public: void write( Transfer* request ); int errorCondition() const; - QString errorText() const; + TQString errorText() const; // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -130,7 +130,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.cpp b/kopete/protocols/oscar/liboscar/oscarconnector.cpp index 6fcef197..ec649e08 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.cpp +++ b/kopete/protocols/oscar/liboscar/oscarconnector.cpp @@ -24,7 +24,7 @@ #include "oscarconnector.h" #include "oscarbytestream.h" -KNetworkConnector::KNetworkConnector( QObject *parent, const char */*name*/ ) +KNetworkConnector::KNetworkConnector( TQObject *parent, const char */*name*/ ) : Connector( parent ) { kdDebug( 14151 ) << k_funcinfo << "New KNetwork connector." << endl; @@ -33,8 +33,8 @@ KNetworkConnector::KNetworkConnector( QObject *parent, const char */*name*/ ) mByteStream = new KNetworkByteStream( this ); - connect( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); mPort = 0; } @@ -43,7 +43,7 @@ KNetworkConnector::~KNetworkConnector() delete mByteStream; } -void KNetworkConnector::connectToServer( const QString &server ) +void KNetworkConnector::connectToServer( const TQString &server ) { kdDebug( 14151 ) << k_funcinfo << "Initiating connection to " << mHost << endl; Q_ASSERT( !mHost.isNull() ); @@ -51,7 +51,7 @@ void KNetworkConnector::connectToServer( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect ( mHost, QString::number ( mPort ) ) ) + if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error(); @@ -65,7 +65,7 @@ void KNetworkConnector::slotConnected() // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); } @@ -94,7 +94,7 @@ void KNetworkConnector::done() mByteStream->close (); } -void KNetworkConnector::setOptHostPort( const QString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) { kdDebug ( 14151 ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.h b/kopete/protocols/oscar/liboscar/oscarconnector.h index d130f7da..39696a35 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.h +++ b/kopete/protocols/oscar/liboscar/oscarconnector.h @@ -39,15 +39,15 @@ class KNetworkConnector : public Connector Q_OBJECT public: - KNetworkConnector( QObject *parent = 0, const char *name = 0 ); + KNetworkConnector( TQObject *parent = 0, const char *name = 0 ); virtual ~KNetworkConnector(); - virtual void connectToServer( const QString &server ); + virtual void connectToServer( const TQString &server ); virtual ByteStream *stream() const; virtual void done(); - void setOptHostPort( const QString &host, Q_UINT16 port ); + void setOptHostPort( const TQString &host, Q_UINT16 port ); int errorCode(); @@ -56,7 +56,7 @@ private slots: void slotError( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.cpp b/kopete/protocols/oscar/liboscar/oscarmessage.cpp index f4f512d2..1f263be0 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.cpp +++ b/kopete/protocols/oscar/liboscar/oscarmessage.cpp @@ -19,8 +19,8 @@ #include "oscarmessage.h" -#include -#include +#include +#include Oscar::Message::Message() @@ -33,7 +33,7 @@ Oscar::Message::Message() { } -Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -45,7 +45,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText { } -Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -57,7 +57,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, setTextArray( messageText ); } -Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec ) +Oscar::Message::Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -68,50 +68,50 @@ Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, i setText( messageEncoding, messageText, codec ); } -QString Oscar::Message::sender() const +TQString Oscar::Message::sender() const { return m_sender; } -void Oscar::Message::setSender( const QString& sender ) +void Oscar::Message::setSender( const TQString& sender ) { m_sender = sender; } -QString Oscar::Message::receiver() const +TQString Oscar::Message::receiver() const { return m_receiver; } -void Oscar::Message::setReceiver( const QString& receiver ) +void Oscar::Message::setReceiver( const TQString& receiver ) { m_receiver = receiver; } -QByteArray Oscar::Message::textArray() const +TQByteArray Oscar::Message::textArray() const { return m_textArray; } -QString Oscar::Message::text( QTextCodec *codec ) const +TQString Oscar::Message::text( TQTextCodec *codec ) const { switch ( m_encoding ) { case Oscar::Message::UserDefined: return codec->toUnicode( m_textArray ); case Oscar::Message::UTF8: - return QString::fromUtf8( m_textArray.data(), m_textArray.size() ); + return TQString::fromUtf8( m_textArray.data(), m_textArray.size() ); case Oscar::Message::UCS2: { uint len = m_textArray.size() / 2; - QString result; + TQString result; result.setLength( len ); - QByteArray::ConstIterator p = m_textArray.begin(); + TQByteArray::ConstIterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { char row = *p++; char cell = *p++; - result[i] = QChar( cell, row ); + result[i] = TQChar( cell, row ); } //check if last character isn't null if ( result[len-1].isNull() ) @@ -122,22 +122,22 @@ QString Oscar::Message::text( QTextCodec *codec ) const default: break; // Should never happen. } - return QString::null; + return TQString::null; //FIXME: warn at least with kdWarning if an unrecognised encoding style was seen. } -void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QString& newText, QTextCodec* codec ) +void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const TQString& newText, TQTextCodec* codec ) { uint len; switch ( newEncoding ) { case Oscar::Message::UserDefined: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( codec->fromUnicode( newText ) ); break; case Oscar::Message::UTF8: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( newText.utf8() ); break; @@ -145,7 +145,7 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin { len = newText.length(); m_textArray.resize( len * 2 ); - QByteArray::Iterator p = m_textArray.begin(); + TQByteArray::Iterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { *p++ = newText[i].row(); @@ -159,12 +159,12 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin m_encoding = newEncoding; } -void Oscar::Message::setTextArray( const QByteArray& newTextArray ) +void Oscar::Message::setTextArray( const TQByteArray& newTextArray ) { m_textArray.duplicate( newTextArray ); } -void Oscar::Message::setTextArray( const QCString& newTextArray ) +void Oscar::Message::setTextArray( const TQCString& newTextArray ) { m_textArray.duplicate( newTextArray ); uint len = m_textArray.size(); @@ -212,22 +212,22 @@ void Oscar::Message::setType( int newType ) m_channel = newType; } -QDateTime Oscar::Message::timestamp() const +TQDateTime Oscar::Message::timestamp() const { return m_timestamp; } -void Oscar::Message::setTimestamp( QDateTime ts ) +void Oscar::Message::setTimestamp( TQDateTime ts ) { m_timestamp = ts; } -QByteArray Oscar::Message::icbmCookie() const +TQByteArray Oscar::Message::icbmCookie() const { return m_icbmCookie; } -void Oscar::Message::setIcbmCookie( const QByteArray& cookie ) +void Oscar::Message::setIcbmCookie( const TQByteArray& cookie ) { m_icbmCookie.duplicate( cookie ); } @@ -272,12 +272,12 @@ void Oscar::Message::setExchange( Oscar::WORD exchange ) m_exchange = exchange; } -QString Oscar::Message::chatRoom() const +TQString Oscar::Message::chatRoom() const { return m_chatRoom; } -void Oscar::Message::setChatRoom( const QString& room ) +void Oscar::Message::setChatRoom( const TQString& room ) { m_chatRoom = room; } diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.h b/kopete/protocols/oscar/liboscar/oscarmessage.h index 7f081054..f6f08fd9 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.h +++ b/kopete/protocols/oscar/liboscar/oscarmessage.h @@ -21,10 +21,10 @@ #ifndef _OSCARMESSAGE_H_ #define _OSCARMESSAGE_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include "kopete_export.h" #include "oscartypes.h" @@ -62,36 +62,36 @@ public: Message(); - Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ); - Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ); - Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec = 0 ); + Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ); + Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ); + Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec = 0 ); /** Get the sender of the message */ - QString sender() const; + TQString sender() const; /** Set the sender of the message */ - void setSender( const QString& sender ); + void setSender( const TQString& sender ); /** Get the receiver of the message */ - QString receiver() const; + TQString receiver() const; /** Set the receiver of the message */ - void setReceiver( const QString& receiver); + void setReceiver( const TQString& receiver); /** get the message text */ - QString text( QTextCodec* codec ) const; + TQString text( TQTextCodec* codec ) const; /** set the message text */ - void setText( Encoding newEncoding, const QString& newText, QTextCodec* codec = 0); + void setText( Encoding newEncoding, const TQString& newText, TQTextCodec* codec = 0); /** get the message text as a bytearray for decoding */ - QByteArray textArray() const; + TQByteArray textArray() const; /** set the message text as a bytearray for decoding */ - void setTextArray( const QByteArray& newTextArray ); + void setTextArray( const TQByteArray& newTextArray ); /** set the mesasge text as a bytearray for decoding */ - void setTextArray( const QCString& newTextArray ); + void setTextArray( const TQCString& newTextArray ); /** get the message properties */ int properties() const; @@ -109,16 +109,16 @@ public: void setType( int newType ); /** get the timestamp of the message */ - QDateTime timestamp() const; + TQDateTime timestamp() const; /** set the timestamp of the message */ - void setTimestamp( QDateTime ts ); + void setTimestamp( TQDateTime ts ); /** get the ICBM cookie of the message */ - QByteArray icbmCookie() const; + TQByteArray icbmCookie() const; /** set the ICBM cookie of the message */ - void setIcbmCookie( const QByteArray& cookie ); + void setIcbmCookie( const TQByteArray& cookie ); /** get the protocol version (channel 2 messages only) */ int protocolVersion() const; @@ -145,10 +145,10 @@ public: void setExchange( Oscar::WORD ); /** get the chat room that this message is for */ - QString chatRoom() const; + TQString chatRoom() const; /** set the chat room that this message is for */ - void setChatRoom( const QString& ); + void setChatRoom( const TQString& ); /** get the message encoding */ Encoding encoding() const; @@ -160,18 +160,18 @@ public: private: //TODO d-pointer - QString m_sender; - QString m_receiver; + TQString m_sender; + TQString m_receiver; int m_channel; int m_properties; int m_messageType; int m_protocolVersion; int m_channel2Counter; - QByteArray m_icbmCookie; - QByteArray m_textArray; - QDateTime m_timestamp; + TQByteArray m_icbmCookie; + TQByteArray m_textArray; + TQDateTime m_timestamp; Oscar::WORD m_exchange; - QString m_chatRoom; + TQString m_chatRoom; Encoding m_encoding; }; diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp index cd9e9619..be862872 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp @@ -17,8 +17,8 @@ */ #include "oscartypeclasses.h" -#include -#include +#include +#include #include #include "oscarutils.h" #include "buffer.h" @@ -40,7 +40,7 @@ Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, char* newData ) data.duplicate( newData, length ); } -Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const QByteArray& newData ) +Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const TQByteArray& newData ) { type = newType; length = newLength; @@ -70,7 +70,7 @@ Oscar::SSI::SSI() m_waitingAuth = false; } -Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueList &tlvlist, int tlvLength ) +Oscar::SSI::SSI( const TQString &name, int gid, int bid, int type, const TQValueList &tlvlist, int tlvLength ) { m_name = name; m_gid = gid; @@ -79,7 +79,7 @@ Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueLi m_tlvLength = tlvLength; //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList >( tlvlist ); + m_tlvList = TQDeepCopy< TQValueList >( tlvlist ); if ( m_tlvLength == 0 && !m_tlvList.isEmpty() ) refreshTLVLength(); @@ -98,7 +98,7 @@ Oscar::SSI::SSI( const Oscar::SSI& other ) m_waitingAuth = other.m_waitingAuth; //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList >( other.m_tlvList ); + m_tlvList = TQDeepCopy< TQValueList >( other.m_tlvList ); if ( m_tlvLength == 0 && !m_tlvList.isEmpty() ) refreshTLVLength(); @@ -109,7 +109,7 @@ bool Oscar::SSI::isValid() const return m_type != 0xFFFF; } -QString Oscar::SSI::name() const +TQString Oscar::SSI::name() const { return m_name; } @@ -129,7 +129,7 @@ Q_UINT16 Oscar::SSI::type() const return m_type; } -const QValueList& Oscar::SSI::tlvList() const +const TQValueList& Oscar::SSI::tlvList() const { return m_tlvList; } @@ -144,10 +144,10 @@ Q_UINT16 Oscar::SSI::tlvListLength() const return m_tlvLength; } -void Oscar::SSI::setTLVList( QValueList list ) +void Oscar::SSI::setTLVList( TQValueList list ) { //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList >( list ); + m_tlvList = TQDeepCopy< TQValueList >( list ); refreshTLVLength(); checkTLVs(); } @@ -155,7 +155,7 @@ void Oscar::SSI::setTLVList( QValueList list ) void Oscar::SSI::refreshTLVLength() { m_tlvLength = 0; - QValueList::iterator it = m_tlvList.begin(); + TQValueList::iterator it = m_tlvList.begin(); for( ; it != m_tlvList.end(); ++it ) { m_tlvLength += 4; @@ -179,7 +179,7 @@ void Oscar::SSI::checkTLVs() TLV aliasTLV = findTLV( m_tlvList, 0x0131 ); if ( aliasTLV ) { - m_alias = QString::fromUtf8( aliasTLV.data, aliasTLV.length ); + m_alias = TQString::fromUtf8( aliasTLV.data, aliasTLV.length ); kdDebug( 14151 ) << k_funcinfo << "Got an alias '" << m_alias << "' for contact '" << m_name << "'" << endl; } @@ -192,12 +192,12 @@ void Oscar::SSI::checkTLVs() kdDebug(14151) << k_funcinfo << "Found 'allow others to see...' options " << infoTLV.data << endl; } -QString Oscar::SSI::alias() const +TQString Oscar::SSI::alias() const { return m_alias; } -void Oscar::SSI::setAlias( const QString& newAlias ) +void Oscar::SSI::setAlias( const TQString& newAlias ) { m_alias = newAlias; } @@ -212,28 +212,28 @@ void Oscar::SSI::setWaitingAuth( bool waiting ) m_waitingAuth = waiting; } -void Oscar::SSI::setIconHash( QByteArray hash ) +void Oscar::SSI::setIconHash( TQByteArray hash ) { m_hash.duplicate( hash ); } -QByteArray Oscar::SSI::iconHash( ) const +TQByteArray Oscar::SSI::iconHash( ) const { return m_hash; } -QString Oscar::SSI::toString() const +TQString Oscar::SSI::toString() const { - QString ssiString = QString::fromLatin1( "name: " ); + TQString ssiString = TQString::fromLatin1( "name: " ); ssiString += m_name; ssiString += " gid: "; - ssiString += QString::number( m_gid ); + ssiString += TQString::number( m_gid ); ssiString += " bid: "; - ssiString += QString::number( m_bid ); + ssiString += TQString::number( m_bid ); ssiString += " type: "; - ssiString += QString::number( m_type ); + ssiString += TQString::number( m_type ); ssiString += " tlv length: "; - ssiString += QString::number( m_tlvLength ); + ssiString += TQString::number( m_tlvLength ); return ssiString; } @@ -250,26 +250,26 @@ Oscar::SSI::operator bool() const return isValid(); } -Oscar::SSI::operator QByteArray() const +Oscar::SSI::operator TQByteArray() const { Buffer b; - QCString name( m_name.utf8() ); + TQCString name( m_name.utf8() ); uint namelen = name.length(); const char *namedata = name; b.addWord( namelen ); // Using namedata instead of name because - // Buffer::addString(QByteArray, DWORD) ignores it's second argument, + // Buffer::addString(TQByteArray, DWORD) ignores it's second argument, // while Buffer::addString(const char*, DWORD) does not ignore it. // We must provide the explicit length argument to addString() because // we don't need trailing null byte to be added when automatic - // conversion from QCString to QByteArray is performed. + // conversion from TQCString to TQByteArray is performed. // This hack will not be needed with Qt 4. b.addString( namedata, namelen ); b.addWord( m_gid ); b.addWord( m_bid ); b.addWord( m_type ); b.addWord( m_tlvLength ); - QValueList::const_iterator it = m_tlvList.begin(); + TQValueList::const_iterator it = m_tlvList.begin(); for( ; it != m_tlvList.end(); ++it ) { b.addWord( (*it).type ); @@ -277,7 +277,7 @@ Oscar::SSI::operator QByteArray() const b.addString( (*it).data, (*it).data.size() ); } - return (QByteArray) b; + return (TQByteArray) b; } diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.h b/kopete/protocols/oscar/liboscar/oscartypeclasses.h index 94e0c910..e4ec6ded 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.h +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.h @@ -20,10 +20,10 @@ #ifndef _OSCARTYPECLASSES_H_ #define _OSCARTYPECLASSES_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include "kopete_export.h" namespace Oscar @@ -34,14 +34,14 @@ public: TLV(); TLV( Q_UINT16, Q_UINT16, char* data ); - TLV( Q_UINT16, Q_UINT16, const QByteArray& ); + TLV( Q_UINT16, Q_UINT16, const TQByteArray& ); TLV( const TLV& t ); operator bool() const; Q_UINT16 type; Q_UINT16 length; - QByteArray data; + TQByteArray data; }; @@ -49,7 +49,7 @@ class KOPETE_EXPORT SSI { public: SSI(); - SSI( const QString &name, int gid, int bid, int type, const QValueList& tlvlist, int tlvLength = 0 ); + SSI( const TQString &name, int gid, int bid, int type, const TQValueList& tlvlist, int tlvLength = 0 ); SSI( const SSI& other ); /** Get the validity of this item */ @@ -57,7 +57,7 @@ public: /** \brief The name of this SSI item. * This is usually the screenname, ICQ number, or group name. */ - QString name() const; + TQString name() const; /** \brief The group id of the SSI item */ Q_UINT16 gid() const; @@ -73,10 +73,10 @@ public: Q_UINT16 type() const; /** \brief the TLV list for the item */ - const QValueList& tlvList() const; + const TQValueList& tlvList() const; /** \brief Set the TLV list for the item */ - void setTLVList( QValueList ); + void setTLVList( TQValueList ); /** * \brief Set the length of the TLV list @@ -93,14 +93,14 @@ public: * Get the alias for the SSI item * This is TLV 0x0131 in an SSI item */ - QString alias() const; + TQString alias() const; /** * Set the alias for the SSI item * This should be done after a successful modification of the item * on the server */ - void setAlias( const QString& newAlias ); + void setAlias( const TQString& newAlias ); /** \brief Indicates we're awaiting authorization from this item */ bool waitingAuth() const; @@ -108,17 +108,17 @@ public: /** Set whether we are waiting authorization or not from this item */ void setWaitingAuth( bool waiting ); - void setIconHash( QByteArray hash ); + void setIconHash( TQByteArray hash ); - QByteArray iconHash() const; + TQByteArray iconHash() const; /** \brief String representation of our SSI object */ - QString toString() const; + TQString toString() const; bool operator==( const SSI& item ) const; operator bool() const; - operator QByteArray() const; + operator TQByteArray() const; void refreshTLVLength(); @@ -126,15 +126,15 @@ public: void checkTLVs(); private: - QString m_name; + TQString m_name; int m_gid; int m_bid; int m_type; - QValueList m_tlvList; + TQValueList m_tlvList; int m_tlvLength; bool m_waitingAuth; - QString m_alias; - QByteArray m_hash; + TQString m_alias; + TQByteArray m_hash; }; } diff --git a/kopete/protocols/oscar/liboscar/oscartypes.h b/kopete/protocols/oscar/liboscar/oscartypes.h index b7d4f55b..3819b555 100644 --- a/kopete/protocols/oscar/liboscar/oscartypes.h +++ b/kopete/protocols/oscar/liboscar/oscartypes.h @@ -20,9 +20,9 @@ #define _OSCARTYPES_H_ #include "oscartypeclasses.h" -#include -#include -#include +#include +#include +#include //! Debug Areas const int OSCAR_RAW_DEBUG = 14151; @@ -214,35 +214,35 @@ struct ChatExchangeInfo WORD maxRoomNameLength; WORD maxMsgLength; BYTE flags; - QString description; + TQString description; BYTE canCreate; - QString charset1; - QString charset2; - QString lang1; - QString lang2; + TQString charset1; + TQString charset2; + TQString lang1; + TQString lang2; }; struct ChatRoomInfo { WORD exchange; - QByteArray cookie; + TQByteArray cookie; WORD instance; - QString description; + TQString description; WORD maxMsgLength; - QString name; + TQString name; }; struct ClientVersion { - QString clientString; + TQString clientString; WORD clientId; WORD major; WORD minor; WORD point; WORD build; DWORD other; - QString country; - QString lang; + TQString country; + TQString lang; }; /* ICQ Version Characteristics */ diff --git a/kopete/protocols/oscar/liboscar/oscarutils.cpp b/kopete/protocols/oscar/liboscar/oscarutils.cpp index 13e28d9e..e07e0e12 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.cpp +++ b/kopete/protocols/oscar/liboscar/oscarutils.cpp @@ -17,16 +17,16 @@ */ #include "oscarutils.h" -#include +#include #include #include using namespace Oscar; -QString Oscar::normalize( const QString& contact ) +TQString Oscar::normalize( const TQString& contact ) { - QString normal = contact.lower(); + TQString normal = contact.lower(); normal.remove( ' ' ); return normal; } @@ -39,10 +39,10 @@ bool Oscar::operator==( TLV a, TLV b ) return false; } -TLV Oscar::findTLV( const QValueList& list, int type ) +TLV Oscar::findTLV( const TQValueList& list, int type ) { TLV t; - QValueList::const_iterator it; + TQValueList::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { if ( ( *it ).type == type ) @@ -52,12 +52,12 @@ TLV Oscar::findTLV( const QValueList& list, int type ) return t; } -bool Oscar::uptateTLVs( SSI& item, const QValueList& list ) +bool Oscar::uptateTLVs( SSI& item, const TQValueList& list ) { bool changed = false; - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); - QValueList::const_iterator it; + TQValueList::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { TLV t = Oscar::findTLV( tList, ( *it ).type ); @@ -92,9 +92,9 @@ int Oscar::parseCap( char* cap ) return capflag; } -const QString Oscar::capToString( char* cap ) +const TQString Oscar::capToString( char* cap ) { - QString dbg; + TQString dbg; dbg.sprintf( "{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}", cap[0], cap[1], cap[2], cap[3], cap[4], cap[5], cap[6], cap[7], cap[8], cap[9], @@ -103,17 +103,17 @@ const QString Oscar::capToString( char* cap ) return dbg; } -DWORD Oscar::parseCapabilities( Buffer &inbuf, QString &versionString ) +DWORD Oscar::parseCapabilities( Buffer &inbuf, TQString &versionString ) { // // FIXME: port capabilities array to some qt based list class, makes usage of memcmp obsolete // DWORD capflags = 0; - QString dbgCaps = "CAPS: "; + TQString dbgCaps = "CAPS: "; while(inbuf.length() >= 16) { - QByteArray cap; + TQByteArray cap; cap.duplicate( inbuf.getBlock(16) ); for (int i=0; i < CAP_LAST; i++) @@ -184,9 +184,9 @@ DWORD Oscar::parseCapabilities( Buffer &inbuf, QString &versionString ) return capflags; } -const QString Oscar::capName( int capNumber ) +const TQString Oscar::capName( int capNumber ) { - QString capString; + TQString capString; switch ( capNumber ) { @@ -279,18 +279,18 @@ const QString Oscar::capName( int capNumber ) return capString; } -DWORD Oscar::getNumericalIP(const QString &address) +DWORD Oscar::getNumericalIP(const TQString &address) { - QHostAddress addr; + TQHostAddress addr; if ( addr.setAddress( address ) == false ) return 0; return (DWORD)addr.toIPv4Address(); } -QString Oscar::getDottedDecimal( DWORD address ) +TQString Oscar::getDottedDecimal( DWORD address ) { - QHostAddress addr; + TQHostAddress addr; addr.setAddress((Q_UINT32)address); return addr.toString(); } diff --git a/kopete/protocols/oscar/liboscar/oscarutils.h b/kopete/protocols/oscar/liboscar/oscarutils.h index bf8b5aba..a9cd921c 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.h +++ b/kopete/protocols/oscar/liboscar/oscarutils.h @@ -19,9 +19,9 @@ #ifndef _OSCARUTILS_H_ #define _OSCARUTILS_H_ -#include -#include -#include +#include +#include +#include #include "oscartypes.h" #include "buffer.h" @@ -29,7 +29,7 @@ namespace Oscar { ///Normalize the contact name to all lowercase and no spaces -KOPETE_EXPORT QString normalize( const QString& ); +KOPETE_EXPORT TQString normalize( const TQString& ); ///compare TLVs for equality KOPETE_EXPORT bool operator==( TLV, TLV ); @@ -37,13 +37,13 @@ KOPETE_EXPORT bool operator==( TLV, TLV ); /** * Find the TLV corresponding to the type in the list */ -KOPETE_EXPORT TLV findTLV( const QValueList&, int type ); +KOPETE_EXPORT TLV findTLV( const TQValueList&, int type ); /** * Update TLVs of SSI item from TLV list if necessary * \return true if something was updated */ -KOPETE_EXPORT bool uptateTLVs( SSI& item, const QValueList& list ); +KOPETE_EXPORT bool uptateTLVs( SSI& item, const TQValueList& list ); /** * Get the value of the capability that corresponds to the value @@ -57,34 +57,34 @@ int parseCap( char* cap ); /** * Convert the capability to a string we can print */ -const QString capToString(char *cap); +const TQString capToString(char *cap); /** * Parse the character array for validness and a version string * \param buffer the buffer we'll be parsing for capabilities - * \param versionString a QString reference that will contain the - * version string of the detected client. Will be QString::null if + * \param versionString a TQString reference that will contain the + * version string of the detected client. Will be TQString::null if * no client is found * \return a DWORD containg a bit array of the capabilities we found */ -DWORD parseCapabilities(Buffer &inbuf, QString &versionString); +DWORD parseCapabilities(Buffer &inbuf, TQString &versionString); /** * Get the name of the capability from its number */ -const QString capName( int capNumber ); +const TQString capName( int capNumber ); /** * Convert an IP address in dotted decimal notation to a * numerical constant */ -DWORD getNumericalIP( const QString& address ); +DWORD getNumericalIP( const TQString& address ); /** * Convert a numerical constant that is an IP address to * dotted decimal format */ -QString getDottedDecimal( DWORD address ); +TQString getDottedDecimal( DWORD address ); } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp index a1baf073..2cf57d53 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ #include "ownuserinfotask.h" -#include +#include #include #include "buffer.h" #include "connection.h" @@ -70,7 +70,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) ud.fill( b ); m_details = ud; emit gotInfo(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } else @@ -83,7 +83,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) if ( flags == 0x41 ) //we need to do a buddy upload when bit 8 = 1 needUpload = true; - QByteArray qba; + TQByteArray qba; if ( b->length() != 0 ) { //buffer might be empty if flags bit 8 = 1 BYTE checksumLength = b->getByte(); @@ -104,11 +104,11 @@ bool OwnUserInfoTask::take( Transfer* transfer ) if ( infoType == 0x0002 ) { - QString availableMsg( b->getBSTR() ); + TQString availableMsg( b->getBSTR() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "self available message: " << endl; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.h b/kopete/protocols/oscar/liboscar/ownuserinfotask.h index 30a169db..35314df0 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.h +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.h @@ -44,9 +44,9 @@ signals: /** Emitted when user info is recieved. Needed because succeeded() is only emitted once. */ void gotInfo(); - void haveAvailableMessage( const QString& ); + void haveAvailableMessage( const TQString& ); - void haveIconChecksum( const QString& ); + void haveIconChecksum( const TQString& ); void buddyIconUploadRequested(); diff --git a/kopete/protocols/oscar/liboscar/prmparamstask.cpp b/kopete/protocols/oscar/liboscar/prmparamstask.cpp index 3668c73b..43580206 100644 --- a/kopete/protocols/oscar/liboscar/prmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/prmparamstask.cpp @@ -52,7 +52,7 @@ bool PRMParamsTask::take( Transfer* transfer ) if ( forMe( transfer ) ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring PRM Parameters. We don't use them" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } diff --git a/kopete/protocols/oscar/liboscar/profiletask.cpp b/kopete/protocols/oscar/liboscar/profiletask.cpp index d64d5dbe..4b0949ea 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.cpp +++ b/kopete/protocols/oscar/liboscar/profiletask.cpp @@ -18,7 +18,7 @@ #include "profiletask.h" -#include +#include #include #include "transfer.h" @@ -56,12 +56,12 @@ void ProfileTask::onGo() sendProfileUpdate(); } -void ProfileTask::setProfileText( const QString& text ) +void ProfileTask::setProfileText( const TQString& text ) { m_profileText = text; } -void ProfileTask::setAwayMessage( const QString& text ) +void ProfileTask::setAwayMessage( const TQString& text ) { m_awayMessage = text; } @@ -76,7 +76,7 @@ void ProfileTask::sendProfileUpdate() if ( !m_profileText.isNull() && !client()->isIcq() ) { - static const QString defencoding = "text/aolrtf; charset=\"us-ascii\""; + static const TQString defencoding = "text/aolrtf; charset=\"us-ascii\""; buffer->addTLV(0x0001, defencoding.length(), defencoding.latin1()); buffer->addTLV(0x0002, m_profileText.length(), m_profileText.local8Bit()); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting profile = " << m_profileText << endl; @@ -84,7 +84,7 @@ void ProfileTask::sendProfileUpdate() if ( !m_awayMessage.isNull() && !client()->isIcq() ) { - static const QString defencoding = "text/aolrtf; charset=\"us-ascii\""; + static const TQString defencoding = "text/aolrtf; charset=\"us-ascii\""; buffer->addTLV(0x0003, defencoding.length(), defencoding.latin1()); buffer->addTLV(0x0004, m_awayMessage.length(), m_awayMessage.local8Bit()); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting away message = " << m_awayMessage << endl; @@ -112,7 +112,7 @@ void ProfileTask::sendProfileUpdate() buffer->addTLV(0x0005, capBuf.length(), capBuf.buffer()); Transfer* st = createTransfer( f, s , buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/profiletask.h b/kopete/protocols/oscar/liboscar/profiletask.h index 23555105..a51075a5 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.h +++ b/kopete/protocols/oscar/liboscar/profiletask.h @@ -39,16 +39,16 @@ public: bool take( Transfer* transfer ); void onGo(); - void setProfileText( const QString& text ); - void setAwayMessage( const QString& text ); + void setProfileText( const TQString& text ); + void setAwayMessage( const TQString& text ); private: void sendProfileUpdate(); private: - QString m_profileText; - QString m_awayMessage; + TQString m_profileText; + TQString m_awayMessage; }; #endif diff --git a/kopete/protocols/oscar/liboscar/rateclass.cpp b/kopete/protocols/oscar/liboscar/rateclass.cpp index 7fee4239..d035c810 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.cpp +++ b/kopete/protocols/oscar/liboscar/rateclass.cpp @@ -16,14 +16,14 @@ */ #include "rateclass.h" -#include +#include #include #include "transfer.h" using namespace Oscar; -RateClass::RateClass( QObject* parent ) -: QObject( parent, 0 ) +RateClass::RateClass( TQObject* parent ) +: TQObject( parent, 0 ) { m_waitingToSend = false; m_packetTimer.start(); @@ -70,8 +70,8 @@ void RateClass::addMember( WORD family, WORD subtype ) bool RateClass::isMember(const SNAC &s) const { - QValueList::const_iterator it; - QValueList::const_iterator spEnd = m_members.constEnd(); + TQValueList::const_iterator it; + TQValueList::const_iterator spEnd = m_members.constEnd(); for ( it = m_members.constBegin(); it != spEnd; ++it ) { if ( ( *it ).family == s.family && ( *it ).subtype == s.subtype ) @@ -83,8 +83,8 @@ bool RateClass::isMember(const SNAC &s) const bool RateClass::isMember( WORD family, WORD subtype ) const { - QValueList::const_iterator it; - QValueList::const_iterator spEnd = m_members.constEnd(); + TQValueList::const_iterator it; + TQValueList::const_iterator spEnd = m_members.constEnd(); for ( it = m_members.constBegin(); it != spEnd; ++it ) { if ( ( *it ).family == family && ( *it ).subtype == subtype ) @@ -194,7 +194,7 @@ void RateClass::setupTimer() } else { - QTimer::singleShot( ttns, this, SLOT( slotSend() ) ); //or send later + TQTimer::singleShot( ttns, this, TQT_SLOT( slotSend() ) ); //or send later } } } @@ -232,7 +232,7 @@ void RateClass::updateRateInfo() void RateClass::dumpQueue() { - QValueList::iterator it = m_packetQueue.begin(); + TQValueList::iterator it = m_packetQueue.begin(); while ( it != m_packetQueue.end() && m_packetQueue.count() > 0 ) { Transfer* t = ( *it ); diff --git a/kopete/protocols/oscar/liboscar/rateclass.h b/kopete/protocols/oscar/liboscar/rateclass.h index 1bb86f03..78ad8917 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.h +++ b/kopete/protocols/oscar/liboscar/rateclass.h @@ -19,10 +19,10 @@ #define RATECLASS_H #include "oscartypes.h" -#include -#include -#include -#include +#include +#include +#include +#include const int RATE_SAFETY_TIME = 50; @@ -38,7 +38,7 @@ class RateClass : public QObject { Q_OBJECT public: - RateClass( QObject* parent = 0 ); + RateClass( TQObject* parent = 0 ); ~RateClass(); /** Accessor for classid */ @@ -119,11 +119,11 @@ private slots: private: Oscar::RateInfo m_rateInfo; - QValueList m_members; - QValueList m_packetQueue; - QTime m_packetTimer; + TQValueList m_members; + TQValueList m_packetQueue; + TQTime m_packetTimer; - // we are waiting for the QTimer::singleShot() to send + // we are waiting for the TQTimer::singleShot() to send bool m_waitingToSend; }; diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp index 8b306c0b..59ef735e 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include +#include #include @@ -30,12 +30,12 @@ class RateClassManagerPrivate { public: //! The list of rate classes owned by this manager - QValueList classList; + TQValueList classList; Connection* client; }; RateClassManager::RateClassManager( Connection* parent, const char* name ) -: QObject( parent, name ) +: TQObject( parent, name ) { d = new RateClassManagerPrivate(); d->client = parent; @@ -49,7 +49,7 @@ RateClassManager::~RateClassManager() void RateClassManager::reset() { - QValueList::iterator it = d->classList.begin(); + TQValueList::iterator it = d->classList.begin(); while ( it != d->classList.end() && d->classList.count() > 0) { RateClass* rc = ( *it ); @@ -60,7 +60,7 @@ void RateClassManager::reset() void RateClassManager::registerClass( RateClass* rc ) { - QObject::connect( rc, SIGNAL( dataReady( Transfer* ) ), this, SLOT( transferReady( Transfer* ) ) ); + TQObject::connect( rc, TQT_SIGNAL( dataReady( Transfer* ) ), this, TQT_SLOT( transferReady( Transfer* ) ) ); d->classList.append( rc ); } @@ -110,7 +110,7 @@ void RateClassManager::queue( Transfer* t ) transferReady( t ); } -QValueList RateClassManager::classList() const +TQValueList RateClassManager::classList() const { return d->classList; } @@ -133,8 +133,8 @@ RateClass* RateClassManager::findRateClass( SnacTransfer* st ) const SNAC s = st->snac(); //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Looking for SNAC " << s.family << ", " << s.subtype << endl; RateClass* rc = 0L; - QValueList::const_iterator it; - QValueList::const_iterator rcEnd = d->classList.constEnd(); + TQValueList::const_iterator it; + TQValueList::const_iterator rcEnd = d->classList.constEnd(); for ( it = d->classList.constBegin(); it != rcEnd; ++it ) { @@ -151,16 +151,16 @@ RateClass* RateClassManager::findRateClass( SnacTransfer* st ) const void RateClassManager::recalcRateLevels() { - QValueList::iterator it; - QValueList::iterator rcEnd = d->classList.end(); + TQValueList::iterator it; + TQValueList::iterator rcEnd = d->classList.end(); for ( it = d->classList.begin(); it != rcEnd; ++it ) ( *it )->updateRateInfo(); } int RateClassManager::timeToInitialLevel( SNAC s ) { - QValueList::const_iterator it; - QValueList::const_iterator rcEnd = d->classList.constEnd(); + TQValueList::const_iterator it; + TQValueList::const_iterator rcEnd = d->classList.constEnd(); for ( it = d->classList.constBegin(); it != rcEnd; ++it ) { diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.h b/kopete/protocols/oscar/liboscar/rateclassmanager.h index 4b972ede..b1240f07 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.h +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.h @@ -19,9 +19,9 @@ #ifndef RATECLASSMANAGER_H #define RATECLASSMANAGER_H -#include -#include -#include +#include +#include +#include #include "oscartypes.h" class Transfer; @@ -51,7 +51,7 @@ public: void queue( Transfer* t ); /** Get the list of rate classes */ - QValueList classList() const; + TQValueList classList() const; /** Recalculate the rate levels for all the classes */ void recalcRateLevels(); diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.cpp b/kopete/protocols/oscar/liboscar/rateinfotask.cpp index f19cf792..08002b8a 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/rateinfotask.cpp @@ -18,7 +18,7 @@ #include "rateinfotask.h" -#include +#include #include #include "rateclass.h" #include "rateclassmanager.h" @@ -32,7 +32,7 @@ using namespace Oscar; RateInfoTask::RateInfoTask( Task* parent ) : Task( parent ) { - connect( this, SIGNAL( gotRateLimits() ), this, SLOT( sendRateInfoAck() ) ); + connect( this, TQT_SIGNAL( gotRateLimits() ), this, TQT_SLOT( sendRateInfoAck() ) ); } @@ -80,7 +80,7 @@ void RateInfoTask::sendRateInfoRequest() void RateInfoTask::handleRateInfoResponse() { - QValueList rates; + TQValueList rates; Oscar::RateInfo ri; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "handling rate info response (SNAC 0x01, 0x07)" << endl; @@ -119,7 +119,7 @@ void RateInfoTask::handleRateInfoResponse() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding snac members to group " << groupNum << endl; RateClass* rc = 0L; - QValueList::iterator it = rates.begin(); + TQValueList::iterator it = rates.begin(); for ( ; it != rates.end(); ++it ) { if ( ( *it )->id() == groupNum ) @@ -139,8 +139,8 @@ void RateInfoTask::handleRateInfoResponse() } } - QValueList::iterator it = rates.begin(); - QValueList::iterator rcEnd = rates.end(); + TQValueList::iterator it = rates.begin(); + TQValueList::iterator rcEnd = rates.end(); for ( ; it != rcEnd; ++it ) client()->rateManager()->registerClass( ( *it ) ); @@ -154,8 +154,8 @@ void RateInfoTask::sendRateInfoAck() SNAC s = { 0x0001, 0x0008, 0x0000, client()->snacSequence() }; Buffer* buffer = new Buffer(); - QValueListConstIterator cit = m_rateGroups.begin(); - QValueListConstIterator end = m_rateGroups.end(); + TQValueListConstIterator cit = m_rateGroups.begin(); + TQValueListConstIterator end = m_rateGroups.end(); for ( cit = m_rateGroups.begin(); cit != end; ++cit ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding rate " << (*cit) << " to rate ack" << endl; @@ -164,7 +164,7 @@ void RateInfoTask::sendRateInfoAck() Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "rateinfotask.moc" diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.h b/kopete/protocols/oscar/liboscar/rateinfotask.h index 3964f0ea..013559f6 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.h +++ b/kopete/protocols/oscar/liboscar/rateinfotask.h @@ -20,7 +20,7 @@ #define RATEINFOTASK_H #include "task.h" -#include +#include using namespace Oscar; @@ -56,7 +56,7 @@ private slots: private: bool m_needRateAck; - QValueList m_rateGroups; + TQValueList m_rateGroups; }; //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/rtf.cc b/kopete/protocols/oscar/liboscar/rtf.cc index bb4d88ee..39c16bc4 100644 --- a/kopete/protocols/oscar/liboscar/rtf.cc +++ b/kopete/protocols/oscar/liboscar/rtf.cc @@ -1627,25 +1627,25 @@ void ParStyle::clearFormatting() // dir is not a formatting item. } -QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) +TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) { - QString str = _str; - str.replace(QRegExp("&"), "&"); - str.replace(QRegExp("<"), "<"); - str.replace(QRegExp(">"), ">"); - str.replace(QRegExp("\""), """); - str.replace(QRegExp("\r"), ""); + TQString str = _str; + str.replace(TQRegExp("&"), "&"); + str.replace(TQRegExp("<"), "<"); + str.replace(TQRegExp(">"), ">"); + str.replace(TQRegExp("\""), """); + str.replace(TQRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(QRegExp("\n"), "
\n"); + str.replace(TQRegExp("\n"), "
\n"); break; case quoteXML: - str.replace(QRegExp("\n"), "
\n"); + str.replace(TQRegExp("\n"), "
\n"); break; default: break; } - QRegExp re(" +"); + TQRegExp re(" +"); int len; int pos = 0; @@ -1654,7 +1654,7 @@ QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) if (len == 1) continue; - QString s = " "; + TQString s = " "; for (int i = 1; i < len; i++) s += " "; str.replace(pos, len, s); @@ -1690,7 +1690,7 @@ void RTF2HTML::FlushOutTags() // RTF colors are 1-based; colors[] is a 0-based array. if (t.param > colors.size() || t.param == 0) break; - QColor &c = colors[t.param-1]; + TQColor &c = colors[t.param-1]; PrintUnquoted("", c.red(), c.green(), c.blue()); } break; @@ -1707,7 +1707,7 @@ void RTF2HTML::FlushOutTags() case TAG_BG_COLOR:{ if (t.param > colors.size()) break; - QColor &c = colors[t.param]; + TQColor &c = colors[t.param]; PrintUnquoted("", c.red(), c.green(), c.blue()); break; } @@ -1878,7 +1878,7 @@ void RTF2HTML::PrintUnquoted(const char *str, ...) sParagraph += buff; } -void RTF2HTML::PrintQuoted(const QString &str) +void RTF2HTML::PrintQuoted(const TQString &str) { sParagraph += quoteString(str); } @@ -2110,7 +2110,7 @@ void Level::reset() resetTag(TAG_ALL); if (m_bColors){ if (m_bColorInit){ - QColor c(m_nRed, m_nGreen, m_nBlue); + TQColor c(m_nRed, m_nGreen, m_nBlue); p->colors.push_back(c); resetColors(); } @@ -2181,7 +2181,7 @@ void Level::flush() if (encoding == NULL) encoding = p->encoding; - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); */ //p->PrintQuoted(codec->toUnicode(text.c_str(), text.length())); p->PrintQuoted(text.c_str()); @@ -2245,7 +2245,7 @@ static char h2d(char c) return 0; } -QString RTF2HTML::Parse(const char *rtf, const char *_encoding) +TQString RTF2HTML::Parse(const char *rtf, const char *_encoding) { encoding = _encoding; YY_BUFFER_STATE yy_current_buffer = yy_scan_string(rtf); @@ -2313,7 +2313,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) break; case UNICODE_CHAR:{ cur_level.flush(); - sParagraph += QChar((unsigned short)(atol(yytext + 2))); + sParagraph += TQChar((unsigned short)(atol(yytext + 2))); break; } case HEX:{ @@ -2412,7 +2412,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) } /* -bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) +bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res) { char _RTF[] = "{\\rtf"; if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){ @@ -2420,7 +2420,7 @@ bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) res = p.Parse(rtf, encoding); return true; } - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); res = codec->toUnicode(rtf, strlen(rtf)); return false; } diff --git a/kopete/protocols/oscar/liboscar/rtf2html.h b/kopete/protocols/oscar/liboscar/rtf2html.h index a305b89d..5685e4a1 100644 --- a/kopete/protocols/oscar/liboscar/rtf2html.h +++ b/kopete/protocols/oscar/liboscar/rtf2html.h @@ -18,12 +18,12 @@ #ifndef RTF2HTML_H #define RTF2HTML_H -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include @@ -149,15 +149,15 @@ class RTF2HTML public: RTF2HTML(); - QString Parse(const char *rtf, const char *encoding); + TQString Parse(const char *rtf, const char *encoding); // Paragraph-specific functions: - QString quoteString(const QString &_str, quoteMode mode = quoteHTML); + TQString quoteString(const TQString &_str, quoteMode mode = quoteHTML); // Appends a string with formatting into the paragraph buffer. void PrintUnquoted(const char *str, ...); // Quotes and appends a string to the paragraph buffer. - void PrintQuoted(const QString &str); + void PrintQuoted(const TQString &str); // Writes down the tags from oTags into the paragraph buffer. void FlushOutTags(); // Retrieves the top not-yet-written tag. @@ -179,7 +179,7 @@ protected: // True if the paragraph was opened explicitly. bool bExplicitParagraph; // The paragraph's HTML buffer. - QString sParagraph; + TQString sParagraph; // Defines the paragraph's formatting. ParStyle parStyle; // Tags which weren't yet printed out. @@ -188,11 +188,11 @@ protected: // Document members // The document HTML buffer. - QString s; + TQString s; // Fonts table. vector fonts; // Colors table. - vector colors; + vector colors; // Stack of tags (across all levels, not just current level) stack tags; diff --git a/kopete/protocols/oscar/liboscar/safedelete.cpp b/kopete/protocols/oscar/liboscar/safedelete.cpp index 703e8ed3..5dde3725 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.cpp +++ b/kopete/protocols/oscar/liboscar/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include +#include //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,16 +54,16 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -116,7 +116,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -125,7 +125,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/oscar/liboscar/safedelete.h b/kopete/protocols/oscar/liboscar/safedelete.h index e8215c06..0d4150d9 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.h +++ b/kopete/protocols/oscar/liboscar/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include -#include +#include +#include class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp index af80e191..2b5dbbae 100644 --- a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp @@ -100,7 +100,7 @@ void SendDCInfoTask::onGo() Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp index f0601e22..ba753471 100644 --- a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp @@ -45,7 +45,7 @@ void SendIdleTimeTask::onGo() Transfer *t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp index 48509595..1b8cbfbc 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp @@ -344,13 +344,13 @@ void SendMessageTask::addRendezvousMessageData( Buffer* b ) /* Old oscarsocket code, which is here for reference in case this doesn't work -QTextCodec *codec = 0L; +TQTextCodec *codec = 0L; WORD charset = 0x0000; // default to ascii WORD charsubset = 0x0000; int length = message.length(); unsigned char *utfMessage = 0L; -codec=QTextCodec::codecForMib(3); // US-ASCII +codec=TQTextCodec::codecForMib(3); // US-ASCII if(codec) { @@ -360,7 +360,7 @@ if(codec) // We are forcing kopete to send messages using ISO-8859-1 // It's a hack and should be reimplemented in a better way charset=0x0003; - codec=QTextCodec::codecForMib(4); + codec=TQTextCodec::codecForMib(4); //kdDebug(14151) << k_funcinfo << "Now trying ISO-8859-1" << endl; } else @@ -388,7 +388,7 @@ if ( !codec && ( contact->hasCap(CAP_UTF8) || !contact->encoding() ) ) // no codec and no charset and per-contact encoding set if(!codec && charset != 0x0002 && contact->encoding() != 0) { - codec=QTextCodec::codecForMib(contact->encoding()); + codec=TQTextCodec::codecForMib(contact->encoding()); if(codec) charset=0x0003; //send as ISO-8859-1 } @@ -399,7 +399,7 @@ if(!codec && charset != 0x0002) // it's neither unicode nor did we find a codec "Couldn't find suitable encoding for outgoing message, " << "encoding using ISO-8859-1, prepare for receiver getting unreadable text :)" << endl; charset=0x0003; - codec=QTextCodec::codecForMib(4); // ISO-8859-1 + codec=TQTextCodec::codecForMib(4); // ISO-8859-1 } tlv2.addWord(0x0101); //add TLV(0x0101) also known as TLV(257) @@ -416,7 +416,7 @@ if(utfMessage) else { kdDebug(14151) << k_funcinfo << "Outgoing message encoded as '" << codec->name() << "'" << endl; - QCString outgoingMessage=codec->fromUnicode(message); + TQCString outgoingMessage=codec->fromUnicode(message); tlv2.addString(outgoingMessage, length); // the actual message } // ==================================================================================== diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.h b/kopete/protocols/oscar/liboscar/sendmessagetask.h index 0eaff13f..18e03c73 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.h +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.h @@ -18,7 +18,7 @@ #define SENDMESSAGETASK_H #include "task.h" -#include +#include #include "oscarmessage.h" /** @author Kopete Developers diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp index 32cb105f..5875e6a8 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp @@ -36,7 +36,7 @@ void ServerRedirectTask::setService( WORD family ) m_service = family; } -void ServerRedirectTask::setChatParams( WORD exchange, QByteArray cookie, WORD instance ) +void ServerRedirectTask::setChatParams( WORD exchange, TQByteArray cookie, WORD instance ) { m_chatExchange = exchange; m_chatCookie.duplicate( cookie ); @@ -44,7 +44,7 @@ void ServerRedirectTask::setChatParams( WORD exchange, QByteArray cookie, WORD i m_chatInstance = instance; } -void ServerRedirectTask::setChatRoom( const QString& roomName ) +void ServerRedirectTask::setChatRoom( const TQString& roomName ) { m_chatRoom = roomName; } @@ -75,7 +75,7 @@ bool ServerRedirectTask::take( Transfer* transfer ) setTransfer( transfer ); bool value = handleRedirect(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return value; } @@ -126,7 +126,7 @@ bool ServerRedirectTask::handleRedirect() return false; TLV server = b->getTLV(); - m_newHost = QString( server.data ); + m_newHost = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Host for service " << m_service << " is " << m_newHost << endl; if ( m_newHost.isEmpty() ) @@ -143,12 +143,12 @@ bool ServerRedirectTask::handleRedirect() return true; } -QByteArray ServerRedirectTask::cookie() const +TQByteArray ServerRedirectTask::cookie() const { return m_cookie; } -QString ServerRedirectTask::newHost() const +TQString ServerRedirectTask::newHost() const { return m_newHost; } @@ -163,7 +163,7 @@ WORD ServerRedirectTask::chatExchange() const return m_chatExchange; } -QString ServerRedirectTask::chatRoomName() const +TQString ServerRedirectTask::chatRoomName() const { return m_chatRoom; } diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.h b/kopete/protocols/oscar/liboscar/serverredirecttask.h index 785ac0df..972e28ce 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.h +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.h @@ -23,7 +23,7 @@ #include "task.h" -#include +#include #include "oscartypes.h" @@ -36,11 +36,11 @@ public: ServerRedirectTask( Task* parent ); void setService( WORD family ); - void setChatParams( WORD exchange, QByteArray cookie, WORD instance ); - void setChatRoom( const QString& roomName ); + void setChatParams( WORD exchange, TQByteArray cookie, WORD instance ); + void setChatRoom( const TQString& roomName ); WORD chatExchange() const; - QString chatRoomName() const; + TQString chatRoomName() const; //Task implementation void onGo(); @@ -50,22 +50,22 @@ public: void requestNewService(); bool handleRedirect(); - QByteArray cookie() const; - QString newHost() const; + TQByteArray cookie() const; + TQString newHost() const; WORD service() const; signals: - void haveServer( const QString&, const QByteArray&, WORD ); + void haveServer( const TQString&, const TQByteArray&, WORD ); private: WORD m_service; - QString m_newHost; - QByteArray m_cookie; + TQString m_newHost; + TQByteArray m_cookie; WORD m_chatExchange; - QByteArray m_chatCookie; + TQByteArray m_chatCookie; WORD m_chatInstance; - QString m_chatRoom; + TQString m_chatRoom; }; diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.cpp b/kopete/protocols/oscar/liboscar/serverversionstask.cpp index e4186f18..b2e7dfa6 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.cpp +++ b/kopete/protocols/oscar/liboscar/serverversionstask.cpp @@ -101,7 +101,7 @@ void ServerVersionsTask::handleFamilies() Buffer* outbuf = transfer()->buffer(); if ( outbuf->length() % 2 != 0 ) { - setError( -1, QString::null ); + setError( -1, TQString::null ); return; } @@ -163,7 +163,7 @@ void ServerVersionsTask::handleServerVersions() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "server version=" << buffer->getWord() << ", server family=" << buffer->getWord() << endl; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "serverversionstask.moc" diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.h b/kopete/protocols/oscar/liboscar/serverversionstask.h index a9c56f35..f3a72a38 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.h +++ b/kopete/protocols/oscar/liboscar/serverversionstask.h @@ -20,7 +20,7 @@ #define SERVERVERSIONSTASK_H #include "task.h" -#include +#include #include "oscartypes.h" class Transfer; @@ -52,7 +52,7 @@ private: void requestFamilyVersions(); private: - QValueList m_familiesList; + TQValueList m_familiesList; WORD m_family; }; diff --git a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp index 13e30101..61f53279 100644 --- a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp +++ b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp @@ -47,14 +47,14 @@ ServiceSetupTask::ServiceSetupTask( Task* parent ) m_ssiListTask = new SSIListTask( parent ); m_ssiActivateTask = new SSIActivateTask( parent ); - QObject::connect( m_ssiListTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_ssiParamTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_prmTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_icbmTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_blmLimitsTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_profileTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_locRightsTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_ssiActivateTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiListTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiParamTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_prmTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_icbmTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_blmLimitsTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_profileTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_locRightsTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiActivateTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); } @@ -95,7 +95,7 @@ void ServiceSetupTask::childTaskFinished() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Sending DC info and client ready" << endl; SendIdleTimeTask* sitt = new SendIdleTimeTask( client()->rootTask() ); - QValueList familyList; + TQValueList familyList; familyList.append( 0x0001 ); familyList.append( 0x0002 ); familyList.append( 0x0003 ); @@ -114,7 +114,7 @@ void ServiceSetupTask::childTaskFinished() if ( m_finishedTaskCount == 8 ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Service setup finished" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } } diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.cpp b/kopete/protocols/oscar/liboscar/snacprotocol.cpp index 3bf16bbc..3ec5c348 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/snacprotocol.cpp @@ -19,9 +19,9 @@ #include "snacprotocol.h" -#include -#include -#include +#include +#include +#include #include #include #include "transfer.h" @@ -29,7 +29,7 @@ using namespace Oscar; -SnacProtocol::SnacProtocol(QObject *parent, const char *name) +SnacProtocol::SnacProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -38,7 +38,7 @@ SnacProtocol::~SnacProtocol() { } -Transfer* SnacProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* SnacProtocol::parse( const TQByteArray & packet, uint& bytes ) { BYTE b; WORD w; @@ -47,7 +47,7 @@ Transfer* SnacProtocol::parse( const QByteArray & packet, uint& bytes ) FLAP f; SNAC s; SnacTransfer *st; - QDataStream* m_din = new QDataStream( packet, IO_ReadOnly ); + TQDataStream* m_din = new TQDataStream( packet, IO_ReadOnly ); //flap parsing *m_din >> b; //this should be the start byte diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.h b/kopete/protocols/oscar/liboscar/snacprotocol.h index eea5c032..18c6aaaa 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.h +++ b/kopete/protocols/oscar/liboscar/snacprotocol.h @@ -29,7 +29,7 @@ class SnacProtocol : public InputProtocolBase { Q_OBJECT public: - SnacProtocol( QObject *parent = 0, const char *name = 0 ); + SnacProtocol( TQObject *parent = 0, const char *name = 0 ); ~SnacProtocol(); /** @@ -39,7 +39,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; diff --git a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp index 1e7a17d6..795d9999 100644 --- a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp @@ -44,7 +44,7 @@ void SSIActivateTask::onGo() Buffer* buffer = new Buffer(); Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp index 59188d2b..bccb754e 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp @@ -86,7 +86,7 @@ bool SSIAuthTask::take( Transfer* t ) return false; } -void SSIAuthTask::grantFutureAuth( const QString& uin, const QString& reason ) +void SSIAuthTask::grantFutureAuth( const TQString& uin, const TQString& reason ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x0014, 0x0000, client()->snacSequence() }; @@ -100,7 +100,7 @@ void SSIAuthTask::grantFutureAuth( const QString& uin, const QString& reason ) send( t ); } -void SSIAuthTask::sendAuthRequest( const QString& uin, const QString& reason ) +void SSIAuthTask::sendAuthRequest( const TQString& uin, const TQString& reason ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x0018, 0x0000, client()->snacSequence() }; @@ -114,7 +114,7 @@ void SSIAuthTask::sendAuthRequest( const QString& uin, const QString& reason ) send( t ); } -void SSIAuthTask::sendAuthReply( const QString& uin, const QString& reason, bool auth ) +void SSIAuthTask::sendAuthReply( const TQString& uin, const TQString& reason, bool auth ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x001A, 0x0000, client()->snacSequence() }; @@ -132,38 +132,38 @@ void SSIAuthTask::handleFutureAuthGranted() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); - QByteArray reason = buf->getBSTR(); + TQString uin = Oscar::normalize( buf->getBUIN() ); + TQByteArray reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Future authorization granted from " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit futureAuthGranted( uin, QString::fromUtf8( reason.data(), reason.size() ) ); + emit futureAuthGranted( uin, TQString::fromUtf8( reason.data(), reason.size() ) ); } void SSIAuthTask::handleAuthRequested() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); - QByteArray reason = buf->getBSTR(); + TQString uin = Oscar::normalize( buf->getBUIN() ); + TQByteArray reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization requested from " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit authRequested( uin, QString::fromUtf8( reason.data(), reason.size() ) ); + emit authRequested( uin, TQString::fromUtf8( reason.data(), reason.size() ) ); } void SSIAuthTask::handleAuthReplied() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); + TQString uin = Oscar::normalize( buf->getBUIN() ); bool accepted = buf->getByte(); - QByteArray reason = buf->getBSTR(); + TQByteArray reason = buf->getBSTR(); if ( accepted ) kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization request accepted by " << uin << endl; @@ -171,14 +171,14 @@ void SSIAuthTask::handleAuthReplied() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization request declined by " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit authReplied( uin, QString::fromUtf8( reason.data(), reason.size() ), accepted ); + emit authReplied( uin, TQString::fromUtf8( reason.data(), reason.size() ), accepted ); } void SSIAuthTask::handleAddedMessage() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); + TQString uin = Oscar::normalize( buf->getBUIN() ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "User " << uin << " added you to the contact list" << endl; emit contactAddedYou( uin ); diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.h b/kopete/protocols/oscar/liboscar/ssiauthtask.h index d470cfe9..1760f344 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.h +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.h @@ -37,14 +37,14 @@ public: virtual bool forMe( const Transfer* t ) const; virtual bool take( Transfer* t ); - void grantFutureAuth( const QString& uin, const QString& reason ); - void sendAuthRequest( const QString& uin, const QString& reason ); - void sendAuthReply( const QString& uin, const QString& reason, bool auth ); + void grantFutureAuth( const TQString& uin, const TQString& reason ); + void sendAuthRequest( const TQString& uin, const TQString& reason ); + void sendAuthReply( const TQString& uin, const TQString& reason, bool auth ); signals: - void futureAuthGranted( const QString& uin, const QString& reason ); - void authRequested( const QString& uin, const QString& reason ); - void authReplied( const QString& uin, const QString& reason, bool auth ); - void contactAddedYou( const QString& uin ); + void futureAuthGranted( const TQString& uin, const TQString& reason ); + void authRequested( const TQString& uin, const TQString& reason ); + void authReplied( const TQString& uin, const TQString& reason, bool auth ); + void contactAddedYou( const TQString& uin ); private: void handleFutureAuthGranted(); void handleAuthRequested(); diff --git a/kopete/protocols/oscar/liboscar/ssilisttask.cpp b/kopete/protocols/oscar/liboscar/ssilisttask.cpp index fe2a981d..d52f7f4e 100644 --- a/kopete/protocols/oscar/liboscar/ssilisttask.cpp +++ b/kopete/protocols/oscar/liboscar/ssilisttask.cpp @@ -26,9 +26,9 @@ SSIListTask::SSIListTask( Task* parent ) : Task( parent ) { m_ssiManager = client()->ssiManager(); - QObject::connect( this, SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, SLOT( newContact( const Oscar::SSI& ) ) ); - QObject::connect( this, SIGNAL( newGroup( const Oscar::SSI& ) ), m_ssiManager, SLOT( newGroup( const Oscar::SSI& ) ) ); - QObject::connect( this, SIGNAL( newItem( const Oscar::SSI& ) ), m_ssiManager, SLOT( newItem( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newContact( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newGroup( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newGroup( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newItem( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newItem( const Oscar::SSI& ) ) ); } @@ -87,7 +87,7 @@ void SSIListTask::onGo() void SSIListTask::handleSSIListReply() { - QValueList tlvList; + TQValueList tlvList; Buffer* buffer = transfer()->buffer(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI Protocol version: " << buffer->getByte() << endl; @@ -98,7 +98,7 @@ void SSIListTask::handleSSIListReply() { tlvList.clear(); WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); @@ -136,7 +136,7 @@ void SSIListTask::handleSSIListReply() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI List complete" << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } else kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Awaiting another SSI packet" << endl; @@ -154,7 +154,7 @@ void SSIListTask::handleSSIUpToDate() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Number of items in SSI list: " << ssiItems << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void SSIListTask::checkSSITimestamp() diff --git a/kopete/protocols/oscar/liboscar/ssimanager.cpp b/kopete/protocols/oscar/liboscar/ssimanager.cpp index 066e93fa..1351c237 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.cpp +++ b/kopete/protocols/oscar/liboscar/ssimanager.cpp @@ -28,9 +28,9 @@ class SSIManagerPrivate { public: - QValueList SSIList; - QValueList groupIdList; - QValueList itemIdList; + TQValueList SSIList; + TQValueList groupIdList; + TQValueList itemIdList; bool complete; DWORD lastModTime; WORD maxContacts; @@ -42,8 +42,8 @@ public: WORD nextGroupId; }; -SSIManager::SSIManager( QObject *parent, const char *name ) - : QObject( parent, name ) +SSIManager::SSIManager( TQObject *parent, const char *name ) + : TQObject( parent, name ) { d = new SSIManagerPrivate; d->complete = false; @@ -70,7 +70,7 @@ void SSIManager::clear() if ( d->SSIList.count() > 0 ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Clearing the SSI list" << endl; - QValueList::iterator it = d->SSIList.begin(); + TQValueList::iterator it = d->SSIList.begin(); while ( it != d->SSIList.end() && d->SSIList.count() > 0 ) it = d->SSIList.remove( it ); @@ -141,7 +141,7 @@ void SSIManager::setParameters( WORD maxContacts, WORD maxGroups, WORD maxVisibl { //I'm not using k_funcinfo for these debug statements because of //the function's long signature - QString funcName = QString::fromLatin1( "[void SSIManager::setParameters] " ); + TQString funcName = TQString::fromLatin1( "[void SSIManager::setParameters] " ); kdDebug(OSCAR_RAW_DEBUG) << funcName << "Max number of contacts allowed in SSI: " << maxContacts << endl; kdDebug(OSCAR_RAW_DEBUG) << funcName << "Max number of groups allowed in SSI: " @@ -160,7 +160,7 @@ void SSIManager::setParameters( WORD maxContacts, WORD maxGroups, WORD maxVisibl d->maxIgnore = maxIgnore; } -void SSIManager::loadFromExisting( const QValueList& newList ) +void SSIManager::loadFromExisting( const TQValueList& newList ) { Q_UNUSED( newList ); //FIXME: NOT Implemented! @@ -168,7 +168,7 @@ void SSIManager::loadFromExisting( const QValueList& newList ) bool SSIManager::hasItem( const Oscar::SSI& item ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { @@ -180,9 +180,9 @@ bool SSIManager::hasItem( const Oscar::SSI& item ) const return false; } -Oscar::SSI SSIManager::findGroup( const QString &group ) const +Oscar::SSI SSIManager::findGroup( const TQString &group ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP && (*it ).name().lower() == group.lower() ) @@ -194,7 +194,7 @@ Oscar::SSI SSIManager::findGroup( const QString &group ) const Oscar::SSI SSIManager::findGroup( int groupId ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP && (*it ).gid() == groupId ) @@ -203,7 +203,7 @@ Oscar::SSI SSIManager::findGroup( int groupId ) const return m_dummyItem; } -Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group ) const +Oscar::SSI SSIManager::findContact( const TQString &contact, const TQString &group ) const { if ( contact.isNull() || group.isNull() ) @@ -222,7 +222,7 @@ Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group ", gr->bid= " << gr.bid() << ", gr->type= " << gr.type() << endl; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { @@ -243,10 +243,10 @@ Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group return m_dummyItem; } -Oscar::SSI SSIManager::findContact( const QString &contact ) const +Oscar::SSI SSIManager::findContact( const TQString &contact ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).name() == contact ) @@ -257,7 +257,7 @@ Oscar::SSI SSIManager::findContact( const QString &contact ) const Oscar::SSI SSIManager::findContact( int contactId ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && ( *it ).bid() == contactId ) @@ -266,9 +266,9 @@ Oscar::SSI SSIManager::findContact( int contactId ) const return m_dummyItem; } -Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const +Oscar::SSI SSIManager::findItemForIcon( TQByteArray iconHash ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) { @@ -278,7 +278,7 @@ Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const Buffer b(t.data); b.skipBytes(1); //don't care about flags BYTE iconSize = b.getByte(); - QByteArray hash( b.getBlock( iconSize ) ); + TQByteArray hash( b.getBlock( iconSize ) ); if ( hash == iconHash ) { Oscar::SSI s = ( *it ); @@ -291,7 +291,7 @@ Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const Oscar::SSI SSIManager::findItemForIconByRef( int ref ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) { @@ -307,9 +307,9 @@ Oscar::SSI SSIManager::findItemForIconByRef( int ref ) const return m_dummyItem; } -Oscar::SSI SSIManager::findItem( const QString &contact, int type ) const +Oscar::SSI SSIManager::findItem( const TQString &contact, int type ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) if ( ( *it ).type() == type && ( *it ).name() == contact ) @@ -318,11 +318,11 @@ Oscar::SSI SSIManager::findItem( const QString &contact, int type ) const return m_dummyItem; } -QValueList SSIManager::groupList() const +TQValueList SSIManager::groupList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP ) list.append( ( *it ) ); @@ -330,11 +330,11 @@ QValueList SSIManager::groupList() const return list; } -QValueList SSIManager::contactList() const +TQValueList SSIManager::contactList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT ) list.append( ( *it ) ); @@ -342,11 +342,11 @@ QValueList SSIManager::contactList() const return list; } -QValueList SSIManager::visibleList() const +TQValueList SSIManager::visibleList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_VISIBLE ) list.append( ( *it ) ); @@ -354,11 +354,11 @@ QValueList SSIManager::visibleList() const return list; } -QValueList SSIManager::invisibleList() const +TQValueList SSIManager::invisibleList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_INVISIBLE ) list.append( ( *it ) ); @@ -366,14 +366,14 @@ QValueList SSIManager::invisibleList() const return list; } -QValueList SSIManager::contactsFromGroup( const QString &group ) const +TQValueList SSIManager::contactsFromGroup( const TQString &group ) const { - QValueList list; + TQValueList list; Oscar::SSI gr = findGroup( group ); if ( gr.isValid() ) { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).gid() == gr.gid() ) list.append( ( *it ) ); @@ -381,11 +381,11 @@ QValueList SSIManager::contactsFromGroup( const QString &group ) con return list; } -QValueList SSIManager::contactsFromGroup( int groupId ) const +TQValueList SSIManager::contactsFromGroup( int groupId ) const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).gid() == groupId ) list.append( ( *it ) ); @@ -396,7 +396,7 @@ QValueList SSIManager::contactsFromGroup( int groupId ) const Oscar::SSI SSIManager::visibilityItem() const { Oscar::SSI item = m_dummyItem; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { if ( ( *it ).type() == 0x0004 ) @@ -423,7 +423,7 @@ bool SSIManager::listComplete() const bool SSIManager::newGroup( const Oscar::SSI& group ) { //trying to find the group by its ID - QValueList::iterator it, listEnd = d->SSIList.end(); + TQValueList::iterator it, listEnd = d->SSIList.end(); if ( findGroup( group.name() ).isValid() ) return false; @@ -465,7 +465,7 @@ bool SSIManager::updateGroup( const Oscar::SSI& group ) bool SSIManager::removeGroup( const Oscar::SSI& group ) { - QString groupName = group.name(); + TQString groupName = group.name(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing group " << group.name() << endl; int remcount = d->SSIList.remove( group ); removeID( group ); @@ -480,7 +480,7 @@ bool SSIManager::removeGroup( const Oscar::SSI& group ) return true; } -bool SSIManager::removeGroup( const QString &group ) +bool SSIManager::removeGroup( const TQString &group ) { Oscar::SSI gr = findGroup( group ); @@ -534,7 +534,7 @@ bool SSIManager::updateContact( const Oscar::SSI& contact ) bool SSIManager::removeContact( const Oscar::SSI& contact ) { - QString contactName = contact.name(); + TQString contactName = contact.name(); int remcount = d->SSIList.remove( contact ); removeID( contact ); @@ -548,7 +548,7 @@ bool SSIManager::removeContact( const Oscar::SSI& contact ) return true; } -bool SSIManager::removeContact( const QString &contact ) +bool SSIManager::removeContact( const TQString &contact ) { Oscar::SSI ct = findContact( contact ); @@ -642,7 +642,7 @@ void SSIManager::removeID( const Oscar::SSI& item ) } } -WORD SSIManager::findFreeId( const QValueList& idList, WORD fromId ) const +WORD SSIManager::findFreeId( const TQValueList& idList, WORD fromId ) const { for ( WORD id = fromId; id < 0x8000; id++ ) { diff --git a/kopete/protocols/oscar/liboscar/ssimanager.h b/kopete/protocols/oscar/liboscar/ssimanager.h index 24e87c6a..df39268c 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.h +++ b/kopete/protocols/oscar/liboscar/ssimanager.h @@ -22,8 +22,8 @@ #ifndef SSIMANAGER_H #define SSIMANAGER_H -#include -#include +#include +#include #include "oscartypes.h" #include "oscartypeclasses.h" @@ -42,7 +42,7 @@ class KOPETE_EXPORT SSIManager : public QObject { Q_OBJECT public: - SSIManager( QObject* parent = 0, const char* name = 0 ); + SSIManager( TQObject* parent = 0, const char* name = 0 ); ~SSIManager(); @@ -73,29 +73,29 @@ public: * The current SSI list will be overwritten and it's contents * replaced with the data from the new list */ - void loadFromExisting( const QValueList& newList ); + void loadFromExisting( const TQValueList& newList ); bool hasItem( const Oscar::SSI& item ) const; - Oscar::SSI findGroup( const QString& group ) const; + Oscar::SSI findGroup( const TQString& group ) const; Oscar::SSI findGroup( int groupId ) const; - Oscar::SSI findContact( const QString& contact, const QString& group ) const; - Oscar::SSI findContact( const QString& contact ) const; + Oscar::SSI findContact( const TQString& contact, const TQString& group ) const; + Oscar::SSI findContact( const TQString& contact ) const; Oscar::SSI findContact( int contactId ) const; - Oscar::SSI findItemForIcon( QByteArray iconHash ) const; + Oscar::SSI findItemForIcon( TQByteArray iconHash ) const; Oscar::SSI findItemForIconByRef( int ) const; - Oscar::SSI findItem( const QString &contact, int type ) const; + Oscar::SSI findItem( const TQString &contact, int type ) const; - QValueList groupList() const; - QValueList contactList() const; - QValueList visibleList() const; - QValueList invisibleList() const; - QValueList contactsFromGroup( const QString& group ) const; - QValueList contactsFromGroup( int groupId ) const; + TQValueList groupList() const; + TQValueList contactList() const; + TQValueList visibleList() const; + TQValueList invisibleList() const; + TQValueList contactsFromGroup( const TQString& group ) const; + TQValueList contactsFromGroup( int groupId ) const; Oscar::SSI visibilityItem() const; @@ -106,12 +106,12 @@ public slots: bool newGroup( const Oscar::SSI& group ); bool updateGroup( const Oscar::SSI& group ); bool removeGroup( const Oscar::SSI& group ); - bool removeGroup( const QString& group ); + bool removeGroup( const TQString& group ); bool newContact( const Oscar::SSI& contact ); bool updateContact( const Oscar::SSI& contact ); bool removeContact( const Oscar::SSI& contact ); - bool removeContact( const QString& contact ); + bool removeContact( const TQString& contact ); bool newItem( const Oscar::SSI& item ); bool updateItem( const Oscar::SSI& item ); @@ -129,7 +129,7 @@ signals: void contactUpdated( const Oscar::SSI& ); //! Emitted when we've removed a contact from the list - void contactRemoved( const QString& contactName ); + void contactRemoved( const TQString& contactName ); //! Emitted when we've added a new group to the list void groupAdded( const Oscar::SSI& ); @@ -138,12 +138,12 @@ signals: void groupUpdated( const Oscar::SSI& ); //! Emitted when we've removed a group from the ssi list - void groupRemoved( const QString& groupName ); + void groupRemoved( const TQString& groupName ); - void modifyError( const QString& error ); + void modifyError( const TQString& error ); private: - WORD findFreeId( const QValueList& idList, WORD fromId ) const; + WORD findFreeId( const TQValueList& idList, WORD fromId ) const; SSIManagerPrivate* d; Oscar::SSI m_dummyItem; diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp index 2091fca8..b4194b5e 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include "connection.h" #include "oscarutils.h" #include "transfer.h" @@ -73,12 +73,12 @@ bool SSIModifyTask::take( Transfer* transfer ) return false; } -bool SSIModifyTask::addContact( const QString& contact, const QString& group, bool requiresAuth ) +bool SSIModifyTask::addContact( const TQString& contact, const TQString& group, bool requiresAuth ) { m_opType = Add; m_opSubject = Contact; - QString newContact = Oscar::normalize( contact ); + TQString newContact = Oscar::normalize( contact ); Oscar::SSI oldItem = m_ssiManager->findContact( newContact ); Oscar::SSI groupItem = m_ssiManager->findGroup( group ); @@ -90,7 +90,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo } //create new SSI item and populate the TLV list - QValueList tlvList; + TQValueList tlvList; if ( requiresAuth ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "This contact requires auth. adding appropriate tlv" << endl; @@ -104,7 +104,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo return true; } -bool SSIModifyTask::removeContact( const QString& contact ) +bool SSIModifyTask::removeContact( const TQString& contact ) { m_opType = Remove; m_opSubject = Contact; @@ -113,7 +113,7 @@ bool SSIModifyTask::removeContact( const QString& contact ) return true; } -bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup ) +bool SSIModifyTask::changeGroup( const TQString& contact, const TQString& newGroup ) { m_opType = Change; m_opSubject = Group; @@ -144,19 +144,19 @@ bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup return true; } -bool SSIModifyTask::addGroup( const QString& groupName ) +bool SSIModifyTask::addGroup( const TQString& groupName ) { m_opType = Add; m_opSubject = Group; m_newItem = m_ssiManager->findGroup( groupName ); - QValueList dummy; + TQValueList dummy; Oscar::SSI newItem( groupName, m_ssiManager->nextGroupId(), 0, ROSTER_GROUP, dummy ); m_newItem = newItem; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding group '" << m_newItem.name() << "' to SSI" << endl; return true; } -bool SSIModifyTask::removeGroup( const QString& groupName ) +bool SSIModifyTask::removeGroup( const TQString& groupName ) { m_opType = Remove; m_opSubject = Group; @@ -165,7 +165,7 @@ bool SSIModifyTask::removeGroup( const QString& groupName ) return true; } -bool SSIModifyTask::renameGroup( const QString& oldName, const QString & newName ) +bool SSIModifyTask::renameGroup( const TQString& oldName, const TQString & newName ) { m_opType = Rename; m_opSubject = Group; @@ -254,36 +254,36 @@ void SSIModifyTask::handleSSIAck() break; case 0x0002: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item to modify not found in list" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x0003: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item already exists in SSI" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000A: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Error adding item ( invalid id, already in list, invalid data )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000C: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item. Limit exceeded." << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000D: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add ICQ item to AIM list ( and vice versa )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000E: { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item because contact requires authorization" << endl; Oscar::SSI groupItem = m_ssiManager->findGroup( m_newItem.gid() ); - QString groupName = groupItem.name(); + TQString groupName = groupItem.name(); addContact( m_newItem.name(), groupName, true ); go(); break; } default: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Unknown acknowledgement code" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; } }; @@ -391,7 +391,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the old group item to remove the bid we're //moving to a different group - QValueList list = oldGroupItem.tlvList(); + TQValueList list = oldGroupItem.tlvList(); TLV oldIds = Oscar::findTLV( list, 0x00C8 ); if ( oldIds.type == 0x00C8 ) { @@ -414,7 +414,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the new group item to add the bid we're //adding to this group - QValueList list2 = m_groupItem.tlvList(); + TQValueList list2 = m_groupItem.tlvList(); TLV oldIds2 = Oscar::findTLV( list2, 0x00C8 ); TLV newGroupTLV; if ( oldIds2.type == 0x00C8 ) @@ -466,7 +466,7 @@ void SSIModifyTask::updateSSIManager() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "and adding " << m_newItem.name() << " to SSI manager" << endl; m_ssiManager->newItem( m_newItem ); } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -479,7 +479,7 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->removeContact( m_oldItem.name() ); else if ( m_opSubject == NoSubject ) m_ssiManager->removeItem( m_oldItem ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -492,11 +492,11 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->newContact( m_newItem ); else if ( m_opSubject == NoSubject ) m_ssiManager->newItem( m_newItem ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void SSIModifyTask::freeIdOnError() @@ -550,18 +550,18 @@ void SSIModifyTask::addItemToBuffer( Oscar::SSI item, Buffer* buffer ) buffer->addWord( item.type() ); buffer->addWord( item.tlvListLength() ); - QValueList::const_iterator it = item.tlvList().begin(); - QValueList::const_iterator listEnd = item.tlvList().end(); + TQValueList::const_iterator it = item.tlvList().begin(); + TQValueList::const_iterator listEnd = item.tlvList().end(); for( ; it != listEnd; ++it ) buffer->addTLV( ( *it ) ); } Oscar::SSI SSIModifyTask::getItemFromBuffer( Buffer* buffer ) const { - QValueList tlvList; + TQValueList tlvList; WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.h b/kopete/protocols/oscar/liboscar/ssimodifytask.h index 2c32dda3..70486cbc 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.h +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.h @@ -63,29 +63,29 @@ public: //! Set up the stuff needed to add a contact. //! @return true if we can send the packet - bool addContact( const QString& contact, const QString& group, bool requiresAuth = false ); + bool addContact( const TQString& contact, const TQString& group, bool requiresAuth = false ); //! Set up the stuff needed to remove a contact. //! @return true if we can send the packet - bool removeContact( const QString& contact ); + bool removeContact( const TQString& contact ); //! Set up the stuff needed to change groups //! @return true if we can send the packet - bool changeGroup( const QString& contact, const QString& newGroup ); + bool changeGroup( const TQString& contact, const TQString& newGroup ); /* Group properties */ //! Add a new group to the SSI list //! @return true if we can send the packet - bool addGroup( const QString& groupName ); + bool addGroup( const TQString& groupName ); //! Remove a group from the SSI list //! @return true if we can send the packet - bool removeGroup( const QString& groupName ); + bool removeGroup( const TQString& groupName ); //! Rename a group on the SSI list //! @return true if we can send the packet - bool renameGroup( const QString& oldName, const QString& newName ); + bool renameGroup( const TQString& oldName, const TQString& newName ); //! Add an item to the SSI list //! Should be used for other items we don't have explicit functions for diff --git a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp index 0be172e8..d279061c 100644 --- a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp @@ -81,7 +81,7 @@ void SSIParamsTask::handleParamReply() //manually parse the TLV out of the packet, since we only want certain things if ( buf->getWord() != 0x0004 ) { - setError( -1, QString::null ); + setError( -1, TQString::null ); return; //no TLV of type 0x0004, bad packet. do nothing. } else @@ -95,7 +95,7 @@ void SSIParamsTask::handleParamReply() WORD maxIgnore = buf->getWord(); client()->ssiManager()->setParameters( maxContacts, maxGroups, maxVisible, maxInvisible, maxIgnore ); } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/stream.cpp b/kopete/protocols/oscar/liboscar/stream.cpp index 02967416..2fb302c1 100644 --- a/kopete/protocols/oscar/liboscar/stream.cpp +++ b/kopete/protocols/oscar/liboscar/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/oscar/liboscar/stream.h b/kopete/protocols/oscar/liboscar/stream.h index 9fbacbda..d5bfabad 100644 --- a/kopete/protocols/oscar/liboscar/stream.h +++ b/kopete/protocols/oscar/liboscar/stream.h @@ -18,7 +18,7 @@ ************************************************************************* */ -#include +#include #ifndef OSCAR_STREAM_H #define OSCAR_STREAM_H @@ -42,12 +42,12 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; + virtual TQString errorText() const=0; /** * Are there any messages waiting to be read diff --git a/kopete/protocols/oscar/liboscar/task.cpp b/kopete/protocols/oscar/liboscar/task.cpp index 2c7628d7..2ec342ac 100644 --- a/kopete/protocols/oscar/liboscar/task.cpp +++ b/kopete/protocols/oscar/liboscar/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include +#include #include "connection.h" #include "transfer.h" @@ -34,7 +34,7 @@ public: Q_UINT32 id; bool success; int statusCode; - QString statusString; + TQString statusString; Connection* client; bool insignificant, deleteme, autoDelete; bool done; @@ -42,19 +42,19 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->client = parent->client(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Connection* parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -77,7 +77,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Connection *Task::client() const @@ -110,7 +110,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -124,15 +124,15 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -173,7 +173,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -182,7 +182,7 @@ void Task::send( Transfer * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -192,7 +192,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -245,7 +245,7 @@ Transfer* Task::createTransfer( Buffer* buffer ) // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -257,7 +257,7 @@ Transfer* Task::createTransfer( Buffer* buffer ) // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -267,11 +267,11 @@ Transfer* Task::createTransfer( Buffer* buffer ) // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { //black hole Q_UNUSED( str ); - //client()->debug(QString("%1: ").arg(className()) + str); + //client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/oscar/liboscar/task.h b/kopete/protocols/oscar/liboscar/task.h index e48e02de..04513824 100644 --- a/kopete/protocols/oscar/liboscar/task.h +++ b/kopete/protocols/oscar/liboscar/task.h @@ -21,7 +21,7 @@ #ifndef OSCAR_TASK_H #define OSCAR_TASK_H -#include +#include #include "oscartypes.h" @@ -52,7 +52,7 @@ public: bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete = false ); @@ -76,10 +76,10 @@ protected: virtual void onDisconnect(); void setId( Q_UINT32 id ); void send( Transfer * request ); - void setSuccess( int code=0, const QString &str="" ); - void setError( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp index 59f392de..a7c16cea 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp @@ -2,7 +2,7 @@ #include "clientstream_test.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,12 +10,12 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myConnector->setOptHostPort( "login.oscar.aol.com", 5190 ); myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // notify and start sending - //connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + //connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -27,7 +27,7 @@ ClientStreamTest::~ClientStreamTest() void ClientStreamTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myTestObject->connectToServer( server, true ); // fine up to here... diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h index 32a0e3a9..47aeac86 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h @@ -10,9 +10,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include -#include -#include +#include +#include +#include #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp index 4f4e8df2..0f37f614 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp @@ -2,11 +2,11 @@ #include #include "ipaddrtest.h" -#include +#include using namespace std; IPAddrTest::IPAddrTest(int argc, char ** argv) -: QApplication( argc, argv ) +: TQApplication( argc, argv ) { } @@ -28,13 +28,13 @@ bool IPAddrTest::testAllZeroDotted() bool IPAddrTest::testNumericalIP() { - QString address = "65.93.151.168"; + TQString address = "65.93.151.168"; return ( Oscar::getNumericalIP( address ) == 1096652712 ); } bool IPAddrTest::testAllZeroNumerical() { - QString address = "0.0.0.0"; + TQString address = "0.0.0.0"; return ( Oscar::getNumericalIP( address ) == 0 ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h index 9452ad82..f2fa0fec 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h @@ -10,9 +10,9 @@ #ifndef IPADDRTEST_H #define IPADDRTEST_H -#include -#include -#include +#include +#include +#include #include "oscarutils.h" diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp index 9f7ba693..2181fda3 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp @@ -29,8 +29,8 @@ #include "tester.h" #include "chatnavtests.h" -#include -#include +#include +#include #include using namespace std; @@ -51,7 +51,7 @@ void KUnitTest::registerTests() KUnitTest::KUnitTest() { - QTimer::singleShot( 0, this, SLOT(checkRun()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(checkRun()) ); m_tests.setAutoDelete( TRUE ); // m_qtests.setAutoDelete( TRUE ); @@ -75,7 +75,7 @@ int KUnitTest::runTests() int globalSkipped = 0; cout << "# Running normal tests... #" << endl << endl; - QAsciiDictIterator it( m_tests ); + TQAsciiDictIterator it( m_tests ); for( ; it.current(); ++it ) { Tester* test = it.current(); @@ -109,29 +109,29 @@ int KUnitTest::runTests() if ( 0 < numXPass ) { cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl; - QStringList list = test->xpassList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->xpassList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < (numFail - numXFail) ) { cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl; - QStringList list = test->errorList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->errorList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < numXFail ) { cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl; - QStringList list = test->xfailList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->xfailList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < numSkip ) { cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl; - QStringList list = test->skipList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->skipList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } @@ -153,11 +153,11 @@ int KUnitTest::runTests() //void KUnitTest::addTester( QTester *test ) //{ // m_qtests.insert( test, test ); -// connect( test, SIGNAL(destroyed(QObject*)), -// SLOT(qtesterDone(QObject* )) ); +// connect( test, TQT_SIGNAL(destroyed(TQObject*)), +// TQT_SLOT(qtesterDone(TQObject* )) ); //} -void KUnitTest::qtesterDone( QObject *obj ) +void KUnitTest::qtesterDone( TQObject *obj ) { // m_qtests.remove( obj ); // if ( m_qtests.isEmpty() ) diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.h b/kopete/protocols/oscar/liboscar/tests/kunittest.h index 5148a82a..d2d6a04a 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.h +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.h @@ -29,9 +29,9 @@ #include "tester.h" -#include -#include -#include +#include +#include +#include #define ADD_TEST(x) addTester( #x, new x ) #define ADD_QTEST(x) addTester( new x ) @@ -51,15 +51,15 @@ public: // void addTester( QTester *test ); private slots: - void qtesterDone( QObject *obj ); + void qtesterDone( TQObject *obj ); void checkRun(); private: void registerTests(); private: - QAsciiDict m_tests; -// QPtrDict m_qtests; + TQAsciiDict m_tests; +// TQPtrDict m_qtests; int globalTests; int globalPasses; int globalFails; diff --git a/kopete/protocols/oscar/liboscar/tests/logintest.cpp b/kopete/protocols/oscar/liboscar/tests/logintest.cpp index 6dbc9646..1d3728aa 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/logintest.cpp @@ -2,7 +2,7 @@ #include "logintest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,7 +29,7 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); diff --git a/kopete/protocols/oscar/liboscar/tests/logintest.h b/kopete/protocols/oscar/liboscar/tests/logintest.h index 898a3d99..d97c336d 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.h +++ b/kopete/protocols/oscar/liboscar/tests/logintest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include -#include -#include +#include +#include +#include #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp b/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp index a220e13e..3086ca64 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp @@ -2,11 +2,11 @@ #include #include "redirecttest.h" -#include +#include using namespace std; RedirectTest::RedirectTest(int argc, char ** argv) -: QApplication( argc, argv ), +: TQApplication( argc, argv ), m_transfer(0), m_task(0) { @@ -73,7 +73,7 @@ bool RedirectTest::testCookieIsSet() return !m_task->cookie().isEmpty(); } -Buffer* RedirectTest::SetupBuffer(WORD Service, QString Cookie) +Buffer* RedirectTest::SetupBuffer(WORD Service, TQString Cookie) { Buffer* b = new Buffer; b->addTLV16(0x000D, Service); diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.h b/kopete/protocols/oscar/liboscar/tests/redirecttest.h index eda5d67a..785d61c8 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.h +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.h @@ -10,9 +10,9 @@ #ifndef RedirectTest_h #define RedirectTest_h -#include -#include -#include +#include +#include +#include #include "transfer.h" #include "oscartypes.h" @@ -39,7 +39,7 @@ public: private: //Helper functions - Buffer* SetupBuffer(WORD Service, QString Cookie); + Buffer* SetupBuffer(WORD Service, TQString Cookie); Task *m_root; SnacTransfer * m_transfer; diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp index a1a9e754..6ca733cc 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp @@ -2,7 +2,7 @@ #include "ssigrouptest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,14 +29,14 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myClient->setIsIcq( true ); myClient->start( server, 5190, "userid", "password" ); myClient->connectToServer( myConnection, server, true ); - QTimer::singleShot( 10000, this, SLOT(runAddGroupTest() ) ); + TQTimer::singleShot( 10000, this, TQT_SLOT(runAddGroupTest() ) ); connected = true; } @@ -57,15 +57,15 @@ int main(int argc, char ** argv) void LoginTest::runAddGroupTest() { qDebug( "running ssi group add test" ); - QString group = QString::fromLatin1( "dummygroup" ); + TQString group = TQString::fromLatin1( "dummygroup" ); myClient->addGroup( group ); - QTimer::singleShot( 5000, this, SLOT( runDelGroupTest() ) ); + TQTimer::singleShot( 5000, this, TQT_SLOT( runDelGroupTest() ) ); } void LoginTest::runDelGroupTest() { qDebug( "running ssi group del test" ); - QString group = QString::fromLatin1( "dummygroup" ); + TQString group = TQString::fromLatin1( "dummygroup" ); myClient->removeGroup( group ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h index 361c053b..291698ec 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include -#include -#include +#include +#include +#include #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp index d8e05b36..7669a945 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp @@ -2,9 +2,9 @@ #include "ssitest.h" -#include +#include -SSITest::SSITest(int argc, char ** argv) : QApplication( argc, argv ) +SSITest::SSITest(int argc, char ** argv) : TQApplication( argc, argv ) { m_manager = new SSIManager(this); @@ -19,7 +19,7 @@ SSITest::~SSITest() void SSITest::testIt() { - QPtrList tlvs; + TQPtrList tlvs; //add three groups SSI *ssi = new SSI( "FirstGroup", 1, 1, ROSTER_GROUP, tlvs); @@ -53,28 +53,28 @@ void SSITest::testIt() //try to find a group by name ssi = m_manager->findGroup("SecondGroup"); if ( ssi ) - qDebug( QString("Found group SecondGroup with gid=%1").arg( ssi->gid() ).latin1()); + qDebug( TQString("Found group SecondGroup with gid=%1").arg( ssi->gid() ).latin1()); else qDebug( "Oops, group SecondGroup not found" ); //try to find a group by gid ssi = m_manager->findGroup( 3 ); if ( ssi ) - qDebug( QString("Found group 3 with name=%1").arg( ssi->name() ).latin1() ); + qDebug( TQString("Found group 3 with name=%1").arg( ssi->name() ).latin1() ); else qDebug( "Oops, group 3 not found" ); //try to find a contact by name ssi = m_manager->findContact("ThirdContact"); if ( ssi ) - qDebug( QString( "Found contact ThirdContact with gid=%1" ).arg( ssi->gid() ).latin1() ); + qDebug( TQString( "Found contact ThirdContact with gid=%1" ).arg( ssi->gid() ).latin1() ); else qDebug( "Oops, contact ThirdContact not found" ); //try to find a contact using the name and the group name ssi = m_manager->findContact("FourthContact","SecondGroup"); if ( ssi ) - qDebug( QString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); + qDebug( TQString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); else qDebug( "Oops, contact FourthContact not found" ); @@ -85,17 +85,17 @@ void SSITest::testIt() qDebug( "Good! It has detected the group is invalid :)" ); //contacts from a group - QValueList list = m_manager->contactsFromGroup("FirstGroup"); - QValueList::iterator it; + TQValueList list = m_manager->contactsFromGroup("FirstGroup"); + TQValueList::iterator it; qDebug( "Contacts from group FirtsGroup:" ); for ( it = list.begin(); it != list.end(); ++it) - qDebug( QString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); //the group list - QValueList list2 = m_manager->groupList(); + TQValueList list2 = m_manager->groupList(); qDebug( "Group list:" ); for ( it = list2.begin(); it != list2.end(); ++it) - qDebug( QString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); //remove a group - this shouldn't report any debug line m_manager->removeGroup( "SecondGroup" ); diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.h b/kopete/protocols/oscar/liboscar/tests/ssitest.h index 19206465..fbdcf2fb 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.h @@ -10,9 +10,9 @@ #ifndef ssitest_h #define ssitest_h -#include -#include -#include +#include +#include +#include #include "ssimanager.h" diff --git a/kopete/protocols/oscar/liboscar/tests/tester.h b/kopete/protocols/oscar/liboscar/tests/tester.h index 2cb1f3af..162473dd 100644 --- a/kopete/protocols/oscar/liboscar/tests/tester.h +++ b/kopete/protocols/oscar/liboscar/tests/tester.h @@ -27,7 +27,7 @@ #ifndef TESTER_H #define TESTER_H -#include +#include #define CHECK( x, y ) check( __FILE__, __LINE__, #x, x, y, false ) #define XFAIL( x, y ) check( __FILE__, __LINE__, #x, x, y, true ) @@ -50,26 +50,26 @@ public: return m_tests; } - QStringList errorList() const { + TQStringList errorList() const { return m_errorList; } - QStringList xfailList() const { + TQStringList xfailList() const { return m_xfailList; } - QStringList xpassList() const { + TQStringList xpassList() const { return m_xpassList; } - QStringList skipList() const { + TQStringList skipList() const { return m_skipList; } - void skip( const char *file, int line, QString msg ) + void skip( const char *file, int line, TQString msg ) { - QString skipEntry; - QTextStream ts( &skipEntry, IO_WriteOnly ); + TQString skipEntry; + TQTextStream ts( &skipEntry, IO_WriteOnly ); ts << file << "["<< line <<"]: " << msg; m_skipList.append( skipEntry ); @@ -83,8 +83,8 @@ protected: bool expectedFailure ) { if ( result != expectedResult ) { - QString error; - QTextStream ts( &error, IO_WriteOnly ); + TQString error; + TQTextStream ts( &error, IO_WriteOnly ); ts << file << "["<< line <<"]:" <<" failed on \""<< str <<"\"" << "\n\t\t result = '" @@ -99,8 +99,8 @@ protected: // then the test passed, but we want to record it if // we were expecting a failure if (expectedFailure) { - QString error; - QTextStream ts( &error, IO_WriteOnly ); + TQString error; + TQTextStream ts( &error, IO_WriteOnly ); ts << file << "["<< line <<"]:" <<" unexpectedly passed on \"" << str <<"\""; @@ -111,10 +111,10 @@ protected: } private: - QStringList m_errorList; - QStringList m_xfailList; - QStringList m_xpassList; - QStringList m_skipList; + TQStringList m_errorList; + TQStringList m_xfailList; + TQStringList m_xpassList; + TQStringList m_skipList; int m_tests; }; diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp index 72ef5acb..fb346d26 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp @@ -2,7 +2,7 @@ #include "userinfotest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,15 +29,15 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myClient->setIsIcq( true ); myClient->start( server, 5190, "userid", "password" ); myClient->connectToServer( myConnection, server, true ); - //QObject::connect( myClient, SIGNAL( userIsOnline( const QString& ) ), this, SLOT( runUserInfoTest())); - //QTimer::singleShot( 6000, this, SLOT(runUserInfoTest() ) ); + //TQObject::connect( myClient, TQT_SIGNAL( userIsOnline( const TQString& ) ), this, TQT_SLOT( runUserInfoTest())); + //TQTimer::singleShot( 6000, this, TQT_SLOT(runUserInfoTest() ) ); connected = true; } @@ -58,7 +58,7 @@ int main(int argc, char ** argv) void LoginTest::runUserInfoTest() { qDebug( "running user info test" ); - QString contact = QString::fromLatin1( "userid" ); + TQString contact = TQString::fromLatin1( "userid" ); myClient->requestFullInfo( contact ); } diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.h b/kopete/protocols/oscar/liboscar/tests/userinfotest.h index 433a6c48..76450466 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.h +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include -#include -#include +#include +#include +#include #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/transfer.cpp b/kopete/protocols/oscar/liboscar/transfer.cpp index b442a97c..ac83ac06 100644 --- a/kopete/protocols/oscar/liboscar/transfer.cpp +++ b/kopete/protocols/oscar/liboscar/transfer.cpp @@ -19,7 +19,7 @@ #include "transfer.h" #include -#include +#include #include Transfer::Transfer() @@ -38,10 +38,10 @@ Transfer::TransferType Transfer::type() const return Transfer::RawTransfer; } -QByteArray Transfer::toWire() +TQByteArray Transfer::toWire() { m_wireFormat.duplicate( m_buffer->buffer(), m_buffer->length() ); - QByteArray wire = QDeepCopy( m_wireFormat ); + TQByteArray wire = TQDeepCopy( m_wireFormat ); return wire; } @@ -71,17 +71,17 @@ bool Transfer::dataValid() const return m_isBufferValid; } -QString Transfer::toString() const +TQString Transfer::toString() const { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; - QByteArray::ConstIterator end = m_wireFormat.end(); + TQByteArray::ConstIterator it; + TQByteArray::ConstIterator end = m_wireFormat.end(); for ( it = m_wireFormat.begin(); it != end; ++it ) { i++; @@ -90,7 +90,7 @@ QString Transfer::toString() const if(c < 0x10) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -98,8 +98,8 @@ QString Transfer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -110,7 +110,7 @@ QString Transfer::toString() const return output; } -void Transfer::populateWireBuffer( int offset, const QByteArray& buffer ) +void Transfer::populateWireBuffer( int offset, const TQByteArray& buffer ) { int j; for ( uint i = 0; i < buffer.size(); ++i ) @@ -159,13 +159,13 @@ FlapTransfer::~FlapTransfer() } -QByteArray FlapTransfer::toWire() +TQByteArray FlapTransfer::toWire() { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Buffer length is " << m_buffer.length() << endl; //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Buffer is " << m_buffer.toString() << endl; m_wireFormat.truncate( 0 ); - QByteArray useBuf; + TQByteArray useBuf; useBuf.duplicate( m_buffer->buffer(), m_buffer->length() ); m_flapLength = useBuf.size(); m_wireFormat.resize( 6 + m_flapLength ); @@ -178,7 +178,7 @@ QByteArray FlapTransfer::toWire() //deepcopy the high-level buffer to the wire format buffer populateWireBuffer( 6, useBuf ); - QByteArray wire = QDeepCopy( m_wireFormat ); + TQByteArray wire = TQDeepCopy( m_wireFormat ); return wire; } @@ -273,11 +273,11 @@ SnacTransfer::~SnacTransfer() } -QByteArray SnacTransfer::toWire() +TQByteArray SnacTransfer::toWire() { m_wireFormat.truncate( 0 ); - QByteArray useBuf; + TQByteArray useBuf; useBuf.duplicate( m_buffer->buffer(), m_buffer->length() ); setFlapLength( useBuf.size() + 10 ); m_wireFormat.resize( 16 + useBuf.size() ); @@ -304,7 +304,7 @@ QByteArray SnacTransfer::toWire() //deepcopy the high-level buffer to the wire format buffer populateWireBuffer( 16, useBuf ); - QByteArray wire = QDeepCopy( m_wireFormat ); + TQByteArray wire = TQDeepCopy( m_wireFormat ); return wire; } diff --git a/kopete/protocols/oscar/liboscar/transfer.h b/kopete/protocols/oscar/liboscar/transfer.h index f42b1e83..0ec4fc41 100644 --- a/kopete/protocols/oscar/liboscar/transfer.h +++ b/kopete/protocols/oscar/liboscar/transfer.h @@ -34,7 +34,7 @@ public: virtual TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the data buffer void setBuffer( Buffer* buffer ); @@ -47,13 +47,13 @@ public: //! Get the validity of the data after the flap header bool dataValid() const; - QString toString() const; + TQString toString() const; - void populateWireBuffer( int offset, const QByteArray& buffer ); + void populateWireBuffer( int offset, const TQByteArray& buffer ); protected: //! The wire-format representation of our buffer - QByteArray m_wireFormat; + TQByteArray m_wireFormat; //! The high-level representation of our data Buffer* m_buffer; @@ -75,7 +75,7 @@ public: virtual ~FlapTransfer(); virtual TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the FLAP channel @@ -123,7 +123,7 @@ public: virtual ~SnacTransfer(); TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the SNAC service diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp index 76503116..f3c34f96 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp @@ -16,7 +16,7 @@ #include "typingnotifytask.h" -#include +#include #include #include "transfer.h" #include "buffer.h" @@ -79,7 +79,7 @@ void TypingNotifyTask::onGo() Transfer* t = createTransfer( f, s, b ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void TypingNotifyTask::handleNotification() @@ -90,7 +90,7 @@ void TypingNotifyTask::handleNotification() //I don't care about the QWORD or the channel b->skipBytes( 10 ); - QString contact( b->getBUIN() ); + TQString contact( b->getBUIN() ); Q_UINT32 word = b->getWord(); switch ( word ) @@ -112,7 +112,7 @@ void TypingNotifyTask::handleNotification() } } -void TypingNotifyTask::setParams( const QString& contact, int notifyType ) +void TypingNotifyTask::setParams( const TQString& contact, int notifyType ) { m_contact = contact; m_notificationType = notifyType; diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.h b/kopete/protocols/oscar/liboscar/typingnotifytask.h index b2c9bfef..34c5d86a 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.h +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.h @@ -18,7 +18,7 @@ #define _TYPINGNOTIFYTASK_H_ #include "task.h" -#include +#include #include "oscartypeclasses.h" /** @@ -38,14 +38,14 @@ public: virtual bool take( Transfer* transfer ); virtual void onGo(); - void setParams( const QString & contact, int notifyType ); + void setParams( const TQString & contact, int notifyType ); signals: //! somebody started typing on the other end - void typingStarted( const QString& contact ); + void typingStarted( const TQString& contact ); //! somebody finished typing - void typingFinished( const QString& contact ); + void typingFinished( const TQString& contact ); private: @@ -54,7 +54,7 @@ private: private: WORD m_notificationType; - QString m_contact; + TQString m_contact; }; #endif diff --git a/kopete/protocols/oscar/liboscar/userdetails.cpp b/kopete/protocols/oscar/liboscar/userdetails.cpp index db7d4d1d..8a1b6c4e 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.cpp +++ b/kopete/protocols/oscar/liboscar/userdetails.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "oscarutils.h" #include "oscardebug.h" @@ -67,7 +67,7 @@ int UserDetails::warningLevel() const return m_warningLevel; } -QString UserDetails::userId() const +TQString UserDetails::userId() const { return m_userId; } @@ -92,12 +92,12 @@ DWORD UserDetails::dcPort() const return m_dcPort; } -QDateTime UserDetails::onlineSinceTime() const +TQDateTime UserDetails::onlineSinceTime() const { return m_onlineSince; } -QDateTime UserDetails::memberSinceTime() const +TQDateTime UserDetails::memberSinceTime() const { return m_memberSince; } @@ -117,12 +117,12 @@ BYTE UserDetails::iconCheckSumType() const return m_iconChecksumType; } -QByteArray UserDetails::buddyIconHash() const +TQByteArray UserDetails::buddyIconHash() const { return m_md5IconHash; } -QString UserDetails::clientName() const +TQString UserDetails::clientName() const { if ( !m_clientVersion.isEmpty() ) return i18n("Translators: client-name client-version", @@ -134,7 +134,7 @@ QString UserDetails::clientName() const void UserDetails::fill( Buffer * buffer ) { BYTE snLen = buffer->getByte(); - QString user = QString( buffer->getBlock( snLen ) ); + TQString user = TQString( buffer->getBlock( snLen ) ); if ( !user.isEmpty() ) m_userId = user; m_warningLevel = buffer->getWord(); @@ -186,7 +186,7 @@ void UserDetails::fill( Buffer * buffer ) m_extendedStatus = b.getDWord(); m_extendedStatusSpecified = true; #ifdef OSCAR_USERINFO_DEBUG - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << QString::number( m_extendedStatus, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << TQString::number( m_extendedStatus, 16 ) << endl; #endif break; case 0x000A: //external IP address @@ -270,7 +270,7 @@ void UserDetails::fill( Buffer * buffer ) case 0x0002: if ( length > 0 ) { - m_availableMessage = QString( b.getBSTR() ); + m_availableMessage = TQString( b.getBSTR() ); #ifdef OSCAR_USERINFO_DEBUG kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "available message:" << m_availableMessage << endl; #endif @@ -366,9 +366,9 @@ void UserDetails::detectClient() case 0xFFFFFFFFL: //gaim behaves like official AIM so we can't detect them, only look for miranda { if (m_dcLastExtStatusUpdateTime & 0x80000000) - m_clientName=QString::fromLatin1("Miranda alpha"); + m_clientName=TQString::fromLatin1("Miranda alpha"); else - m_clientName=QString::fromLatin1("Miranda"); + m_clientName=TQString::fromLatin1("Miranda"); DWORD version = (m_dcLastExtInfoUpdateTime & 0xFFFFFF); BYTE major1 = ((version >> 24) & 0xFF); @@ -391,25 +391,25 @@ void UserDetails::detectClient() } break; case 0xFFFFFF8FL: - m_clientName = QString::fromLatin1("StrICQ"); + m_clientName = TQString::fromLatin1("StrICQ"); break; case 0xFFFFFF42L: - m_clientName = QString::fromLatin1("mICQ"); + m_clientName = TQString::fromLatin1("mICQ"); break; case 0xFFFFFFBEL: - m_clientName = QString::fromLatin1("alicq"); + m_clientName = TQString::fromLatin1("alicq"); break; case 0xFFFFFF7FL: - m_clientName = QString::fromLatin1("&RQ"); + m_clientName = TQString::fromLatin1("&RQ"); break; case 0xFFFFFFABL: - m_clientName = QString::fromLatin1("YSM"); + m_clientName = TQString::fromLatin1("YSM"); break; case 0x3AA773EEL: if ((m_dcLastExtStatusUpdateTime == 0x3AA66380L) && (m_dcLastExtInfoUpdateTime == 0x3A877A42L)) { - m_clientName=QString::fromLatin1("libicq2000"); + m_clientName=TQString::fromLatin1("libicq2000"); } break; default: @@ -427,48 +427,48 @@ void UserDetails::detectClient() switch (m_dcProtoVersion) { case 10: - m_clientName=QString::fromLatin1("ICQ 2003b"); + m_clientName=TQString::fromLatin1("ICQ 2003b"); break; case 9: - m_clientName=QString::fromLatin1("ICQ Lite"); + m_clientName=TQString::fromLatin1("ICQ Lite"); break; case 8: - m_clientName=QString::fromLatin1("Miranda"); + m_clientName=TQString::fromLatin1("Miranda"); break; default: - m_clientName=QString::fromLatin1("ICQ2go"); + m_clientName=TQString::fromLatin1("ICQ2go"); } } else if (hasCap(CAP_BUDDYICON)) // only gaim seems to advertize this on ICQ { - m_clientName = QString::fromLatin1("Gaim"); + m_clientName = TQString::fromLatin1("Gaim"); } else if (hasCap(CAP_XTRAZ)) { - m_clientName = QString::fromLatin1("ICQ 4.0 Lite"); + m_clientName = TQString::fromLatin1("ICQ 4.0 Lite"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_IS_2001)) { - m_clientName = QString::fromLatin1( "ICQ 2001"); + m_clientName = TQString::fromLatin1( "ICQ 2001"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_STR_2002)) { - m_clientName = QString::fromLatin1("ICQ 2002"); + m_clientName = TQString::fromLatin1("ICQ 2002"); } else if (hasCap(CAP_RTFMSGS) && hasCap(CAP_UTF8) && hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName = QString::fromLatin1("ICQ 2003a"); + m_clientName = TQString::fromLatin1("ICQ 2003a"); } else if (hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName =QString::fromLatin1("ICQ 2001b"); + m_clientName =TQString::fromLatin1("ICQ 2001b"); } else if ((m_dcProtoVersion == 7) && hasCap(CAP_RTFMSGS)) { - m_clientName = QString::fromLatin1("GnomeICU"); + m_clientName = TQString::fromLatin1("GnomeICU"); } } diff --git a/kopete/protocols/oscar/liboscar/userdetails.h b/kopete/protocols/oscar/liboscar/userdetails.h index fad79172..8835f6f9 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.h +++ b/kopete/protocols/oscar/liboscar/userdetails.h @@ -35,19 +35,19 @@ public: UserDetails(); ~UserDetails(); - QString userId() const; //! User ID accessor + TQString userId() const; //! User ID accessor int warningLevel() const; //! Warning level accessor WORD idleTime() const; //! Idle time accessor KNetwork::KIpAddress dcInternalIp() const; //! DC local IP accessor KNetwork::KIpAddress dcExternalIp() const; //! DC outside IP accessor DWORD dcPort() const; //! DC port number - QDateTime onlineSinceTime() const; //! Online since accessor - QDateTime memberSinceTime() const; //! Member since accessor + TQDateTime onlineSinceTime() const; //! Online since accessor + TQDateTime memberSinceTime() const; //! Member since accessor int userClass() const; //! User class accessor DWORD extendedStatus() const; //!User status accessor BYTE iconCheckSumType() const; //!Buddy icon hash type - QByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor - QString clientName() const; //! Client name and version + TQByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor + TQString clientName() const; //! Client name and version bool hasCap( int capNumber ) const; //! Tell if we have this capability /** @@ -78,17 +78,17 @@ private: private: - QString m_userId; /// the screename/uin of the contact + TQString m_userId; /// the screename/uin of the contact int m_warningLevel; /// the warning level of the contact int m_userClass; /// the class of the user - TLV 0x01 - QDateTime m_memberSince; /// how long the user's been a member - TLV 0x05 - QDateTime m_onlineSince; /// how long the contact's been online - TLV 0x03 + TQDateTime m_memberSince; /// how long the user's been a member - TLV 0x05 + TQDateTime m_onlineSince; /// how long the contact's been online - TLV 0x03 DWORD m_numSecondsOnline; /// how long the contact's been online in seconds WORD m_idleTime; /// the idle time of the contact - TLV 0x0F DWORD m_extendedStatus; /// the extended status of the contact - TLV 0x06 DWORD m_capabilities; //TLV 0x05 - QString m_clientVersion; /// the version of client they're using - QString m_clientName; /// the name of the client they're using + TQString m_clientVersion; /// the version of client they're using + TQString m_clientName; /// the name of the client they're using KNetwork::KIpAddress m_dcOutsideIp; /// DC Real IP Address - TLV 0x0A KNetwork::KIpAddress m_dcInsideIp; /// DC Internal IP Address - TLV 0x0C DWORD m_dcPort; /// DC Port - TLV 0x0C @@ -101,8 +101,8 @@ private: DWORD m_dcLastExtInfoUpdateTime; /// DC last exteneded info update time - TLV 0x0C DWORD m_dcLastExtStatusUpdateTime; /// DC last extended status update time - TLV 0x0C BYTE m_iconChecksumType; /// The OSCAR checksum type for the buddy icon TLV 0x1D - QByteArray m_md5IconHash; /// Buddy Icon MD5 Hash - TLV 0x1D - QString m_availableMessage; /// Message a person can have when available - TLV 0x0D + TQByteArray m_md5IconHash; /// Buddy Icon MD5 Hash - TLV 0x1D + TQString m_availableMessage; /// Message a person can have when available - TLV 0x0D bool m_userClassSpecified; bool m_memberSinceSpecified; diff --git a/kopete/protocols/oscar/liboscar/userinfotask.cpp b/kopete/protocols/oscar/liboscar/userinfotask.cpp index a204c475..66197316 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/userinfotask.cpp @@ -75,28 +75,28 @@ bool UserInfoTask::take( Transfer * transfer ) m_sequenceInfoMap[seq] = ud; emit gotInfo( seq ); - QValueList list = b->getTLVList(); - QValueList::iterator it = list.begin(); - QString profile; - QString away; + TQValueList list = b->getTLVList(); + TQValueList::iterator it = list.begin(); + TQString profile; + TQString away; for ( ; ( *it ); ++it ) { switch( ( *it ).type ) { case 0x0001: //profile text encoding - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "text encoding is " << QString( ( *it ).data )<< endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "text encoding is " << TQString( ( *it ).data )<< endl; break; case 0x0002: //profile text - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "The profile is '" << QString( ( *it ).data ) << "'" << endl; - profile = QString( ( *it ).data ); // aim always seems to use us-ascii encoding + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "The profile is '" << TQString( ( *it ).data ) << "'" << endl; + profile = TQString( ( *it ).data ); // aim always seems to use us-ascii encoding emit receivedProfile( m_contactSequenceMap[seq], profile ); break; case 0x0003: //away message encoding - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message encoding is " << QString( ( *it ).data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message encoding is " << TQString( ( *it ).data ) << endl; break; case 0x0004: //away message - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message is '" << QString( ( *it ).data ) << "'" << endl; - away = QString( (*it ).data ); // aim always seems to use us-ascii encoding + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message is '" << TQString( ( *it ).data ) << "'" << endl; + away = TQString( (*it ).data ); // aim always seems to use us-ascii encoding emit receivedAwayMessage( m_contactSequenceMap[seq], away ); break; case 0x0005: //capabilities @@ -133,7 +133,7 @@ void UserInfoTask::onGo() send( t ); } -void UserInfoTask::requestInfoFor( const QString& contact, unsigned int types ) +void UserInfoTask::requestInfoFor( const TQString& contact, unsigned int types ) { Q_UINT16 seq = client()->snacSequence(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting sequence " << seq << " for contact " << contact << endl; diff --git a/kopete/protocols/oscar/liboscar/userinfotask.h b/kopete/protocols/oscar/liboscar/userinfotask.h index 063eedd7..4b973a04 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.h +++ b/kopete/protocols/oscar/liboscar/userinfotask.h @@ -20,7 +20,7 @@ #include "task.h" -#include +#include #include "userdetails.h" class Transfer; @@ -44,20 +44,20 @@ public: bool take( Transfer* transfer ); void onGo(); - void requestInfoFor( const QString& userId, unsigned int types ); + void requestInfoFor( const TQString& userId, unsigned int types ); UserDetails getInfoFor( Q_UINT16 sequence ) const; - QString contactForSequence( Q_UINT16 sequence ) const; + TQString contactForSequence( Q_UINT16 sequence ) const; signals: void gotInfo( Q_UINT16 seqNumber ); - void receivedProfile( const QString& contact, const QString& profile ); - void receivedAwayMessage( const QString& contact, const QString& message ); + void receivedProfile( const TQString& contact, const TQString& profile ); + void receivedAwayMessage( const TQString& contact, const TQString& message ); private: - QMap m_sequenceInfoMap; - QMap m_contactSequenceMap; - QMap m_typesSequenceMap; + TQMap m_sequenceInfoMap; + TQMap m_contactSequenceMap; + TQMap m_typesSequenceMap; Q_UINT16 m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.cpp b/kopete/protocols/oscar/liboscar/usersearchtask.cpp index 3fd31010..545706a5 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.cpp +++ b/kopete/protocols/oscar/liboscar/usersearchtask.cpp @@ -98,14 +98,14 @@ bool UserSearchTask::take( Transfer* t ) { int moreUsersCount = buffer->getLEDWord(); emit searchFinished( moreUsersCount ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } setTransfer( 0 ); } return true; } -void UserSearchTask::searchUserByUIN( const QString& uin ) +void UserSearchTask::searchUserByUIN( const TQString& uin ) { //create a new result list m_type = UINSearch; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.h b/kopete/protocols/oscar/liboscar/usersearchtask.h index 239efe36..781a311a 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.h +++ b/kopete/protocols/oscar/liboscar/usersearchtask.h @@ -20,7 +20,7 @@ #define USERSEARCHTASK_H #include "icqtask.h" -#include +#include #include "icquserinfo.h" /** @@ -43,7 +43,7 @@ public: virtual bool take( Transfer* t ); /** Search by UIN */ - void searchUserByUIN( const QString& uin ); + void searchUserByUIN( const TQString& uin ); void searchWhitePages( const ICQWPSearchInfo& info ); @@ -52,8 +52,8 @@ signals: void searchFinished( int ); private: - QValueList m_results; - QString m_uin; + TQValueList m_results; + TQString m_uin; Q_UINT16 m_seq; SearchType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/warningtask.cpp b/kopete/protocols/oscar/liboscar/warningtask.cpp index 56051dc8..7b895b5c 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.cpp +++ b/kopete/protocols/oscar/liboscar/warningtask.cpp @@ -18,7 +18,7 @@ #include "warningtask.h" -#include +#include #include #include "transfer.h" #include "connection.h" @@ -32,7 +32,7 @@ WarningTask::~WarningTask() { } -void WarningTask::setContact( const QString& contact ) +void WarningTask::setContact( const TQString& contact ) { m_contact = contact; } @@ -65,13 +65,13 @@ bool WarningTask::take( Transfer* transfer ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Warning level increased " << m_increase << " to " << m_newLevel << endl; emit userWarned( m_contact, m_increase, m_newLevel ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } else { - setError( 0, QString::null ); + setError( 0, TQString::null ); return false; } } diff --git a/kopete/protocols/oscar/liboscar/warningtask.h b/kopete/protocols/oscar/liboscar/warningtask.h index 1280fab9..af56968c 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.h +++ b/kopete/protocols/oscar/liboscar/warningtask.h @@ -20,7 +20,7 @@ #define WARNINGTASK_H #include "task.h" -#include +#include #include "oscartypes.h" /** @@ -33,7 +33,7 @@ public: WarningTask( Task* parent ); ~WarningTask(); - void setContact( const QString& contact ); + void setContact( const TQString& contact ); void setAnonymous( bool anon ); WORD levelIncrease(); @@ -44,10 +44,10 @@ public: virtual void onGo(); signals: - void userWarned( const QString&, Q_UINT16, Q_UINT16 ); + void userWarned( const TQString&, Q_UINT16, Q_UINT16 ); private: - QString m_contact; + TQString m_contact; bool m_sendAnon; WORD m_sequence; WORD m_increase; diff --git a/kopete/protocols/oscar/oscaraccount.cpp b/kopete/protocols/oscar/oscaraccount.cpp index 353e3201..2a9b4e82 100644 --- a/kopete/protocols/oscar/oscaraccount.cpp +++ b/kopete/protocols/oscar/oscaraccount.cpp @@ -32,14 +32,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -72,29 +72,29 @@ public: Q_UINT32 ssiLastModTime; //contacts waiting on SSI add ack and their metacontact - QMap addContactMap; + TQMap addContactMap; //contacts waiting on their group to be added - QMap contactAddQueue; - QMap contactChangeQueue; + TQMap contactAddQueue; + TQMap contactChangeQueue; OscarListNonServerContacts* olnscDialog; unsigned int versionUpdaterStamp; bool versionAlreadyUpdated; - virtual QTextCodec* codecForContact( const QString& contactName ) const + virtual TQTextCodec* codecForContact( const TQString& contactName ) const { return account.contactCodec( Oscar::normalize( contactName ) ); } - virtual QTextCodec* codecForAccount() const + virtual TQTextCodec* codecForAccount() const { return account.defaultCodec(); } }; -OscarAccount::OscarAccount(Kopete::Protocol *parent, const QString &accountID, const char *name, bool isICQ) +OscarAccount::OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name, bool isICQ) : Kopete::PasswordedAccount( parent, accountID, isICQ ? 8 : 16, name ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << " accountID='" << accountID << @@ -113,19 +113,19 @@ OscarAccount::OscarAccount(Kopete::Protocol *parent, const QString &accountID, c d->engine->setCodecProvider( d ); d->olnscDialog = 0L; - QObject::connect( d->engine, SIGNAL( loggedIn() ), this, SLOT( loginActions() ) ); - QObject::connect( d->engine, SIGNAL( messageReceived( const Oscar::Message& ) ), - this, SLOT( messageReceived(const Oscar::Message& ) ) ); - QObject::connect( d->engine, SIGNAL( socketError( int, const QString& ) ), - this, SLOT( slotSocketError( int, const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( taskError( const Oscar::SNAC&, int, bool ) ), - this, SLOT( slotTaskError( const Oscar::SNAC&, int, bool ) ) ); - QObject::connect( d->engine, SIGNAL( userStartedTyping( const QString& ) ), - this, SLOT( userStartedTyping( const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( userStoppedTyping( const QString& ) ), - this, SLOT( userStoppedTyping( const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( iconNeedsUploading() ), - this, SLOT( slotSendBuddyIcon() ) ); + TQObject::connect( d->engine, TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loginActions() ) ); + TQObject::connect( d->engine, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ), + this, TQT_SLOT( messageReceived(const Oscar::Message& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( socketError( int, const TQString& ) ), + this, TQT_SLOT( slotSocketError( int, const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( taskError( const Oscar::SNAC&, int, bool ) ), + this, TQT_SLOT( slotTaskError( const Oscar::SNAC&, int, bool ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( userStartedTyping( const TQString& ) ), + this, TQT_SLOT( userStartedTyping( const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( userStoppedTyping( const TQString& ) ), + this, TQT_SLOT( userStoppedTyping( const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( iconNeedsUploading() ), + this, TQT_SLOT( slotSendBuddyIcon() ) ); } OscarAccount::~OscarAccount() @@ -144,18 +144,18 @@ void OscarAccount::logOff( Kopete::Account::DisconnectReason reason ) kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "accountId='" << accountId() << "'" << endl; //disconnect the signals Kopete::ContactList* kcl = Kopete::ContactList::self(); - QObject::disconnect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::disconnect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( contactAdded( const Oscar::SSI& ) ), - this, SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( groupAdded( const Oscar::SSI& ) ), - this, SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( groupUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( contactUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( contactAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( groupAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( groupUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( contactUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); d->engine->close(); myself()->setOnlineStatus( Kopete::OnlineStatus::Offline ); @@ -198,19 +198,19 @@ void OscarAccount::processSSIList() { //disconnect signals so we don't attempt to add things to SSI! Kopete::ContactList* kcl = Kopete::ContactList::self(); - QObject::disconnect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::disconnect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; SSIManager* listManager = d->engine->ssiManager(); //first add groups - QValueList groupList = listManager->groupList(); - QValueList::const_iterator git = groupList.constBegin(); - QValueList::const_iterator listEnd = groupList.constEnd(); + TQValueList groupList = listManager->groupList(); + TQValueList::const_iterator git = groupList.constBegin(); + TQValueList::const_iterator listEnd = groupList.constEnd(); //the protocol dictates that there is at least one group that has contacts //so i don't have to check for an empty group list @@ -223,9 +223,9 @@ void OscarAccount::processSSIList() } //then add contacts - QValueList contactList = listManager->contactList(); - QValueList::const_iterator bit = contactList.constBegin(); - QValueList::const_iterator blistEnd = contactList.constEnd(); + TQValueList contactList = listManager->contactList(); + TQValueList::const_iterator bit = contactList.constBegin(); + TQValueList::const_iterator blistEnd = contactList.constEnd(); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Adding " << contactList.count() << " contacts to contact list" << endl; for ( ; bit != blistEnd; ++bit ) { @@ -245,26 +245,26 @@ void OscarAccount::processSSIList() oc->setSSIItem( item ); } else - addContact( ( *bit ).name(), QString::null, group, Kopete::Account::DontChangeKABC ); + addContact( ( *bit ).name(), TQString::null, group, Kopete::Account::DontChangeKABC ); } - QObject::connect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::connect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); - QObject::connect( listManager, SIGNAL( contactAdded( const Oscar::SSI& ) ), - this, SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( groupAdded( const Oscar::SSI& ) ), - this, SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( groupUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( contactUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); + TQObject::connect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::connect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( contactAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( groupAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( groupUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( contactUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); //TODO: check the kopete contact list and handle non server side contacts appropriately. - QDict nonServerContacts = contacts(); - QDictIterator it( nonServerContacts ); - QStringList nonServerContactList; + TQDict nonServerContacts = contacts(); + TQDictIterator it( nonServerContacts ); + TQStringList nonServerContactList; for ( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast( ( *it ) ); @@ -276,12 +276,12 @@ void OscarAccount::processSSIList() } kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "the following contacts are not on the server side list" << nonServerContactList << endl; - bool showMissingContactsDialog = configGroup()->readBoolEntry(QString::fromLatin1("ShowMissingContactsDialog"), true); + bool showMissingContactsDialog = configGroup()->readBoolEntry(TQString::fromLatin1("ShowMissingContactsDialog"), true); if ( !nonServerContactList.isEmpty() && showMissingContactsDialog ) { d->olnscDialog = new OscarListNonServerContacts( Kopete::UI::Global::mainWidget() ); - QObject::connect( d->olnscDialog, SIGNAL( closing() ), - this, SLOT( nonServerAddContactDialogClosed() ) ); + TQObject::connect( d->olnscDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( nonServerAddContactDialogClosed() ) ); d->olnscDialog->addContacts( nonServerContactList ); d->olnscDialog->show(); } @@ -292,15 +292,15 @@ void OscarAccount::nonServerAddContactDialogClosed() if ( !d->olnscDialog ) return; - if ( d->olnscDialog->result() == QDialog::Accepted ) + if ( d->olnscDialog->result() == TQDialog::Accepted ) { //start adding contacts kdDebug(OSCAR_GEN_DEBUG) << "adding non server contacts to the contact list" << endl; //get the contact list. get the OscarContact object, then the group //check if the group is on ssi, if not, add it //if so, add the contact. - QStringList offliners = d->olnscDialog->nonServerContactList(); - QStringList::iterator it, itEnd = offliners.end(); + TQStringList offliners = d->olnscDialog->nonServerContactList(); + TQStringList::iterator it, itEnd = offliners.end(); for ( it = offliners.begin(); it != itEnd; ++it ) { OscarContact* oc = dynamic_cast( contacts()[( *it )] ); @@ -334,7 +334,7 @@ void OscarAccount::nonServerAddContactDialogClosed() } bool showOnce = d->olnscDialog->onlyShowOnce(); - configGroup()->writeEntry( QString::fromLatin1("ShowMissingContactsDialog") , !showOnce); + configGroup()->writeEntry( TQString::fromLatin1("ShowMissingContactsDialog") , !showOnce); configGroup()->sync(); d->olnscDialog->delayedDestruct(); @@ -363,7 +363,7 @@ void OscarAccount::kopeteGroupAdded( Kopete::Group* group ) d->engine->addGroup( group->displayName() ); } -void OscarAccount::kopeteGroupRenamed( Kopete::Group* group, const QString& oldName ) +void OscarAccount::kopeteGroupRenamed( Kopete::Group* group, const TQString& oldName ) { if ( isConnected() ) d->engine->renameGroup( oldName, group->displayName() ); @@ -385,11 +385,11 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) * Get the sanitized message back * Append to the chat window */ - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); if ( !contacts()[sender] ) { kdDebug(OSCAR_RAW_DEBUG) << "Adding '" << sender << "' as temporary contact" << endl; - addContact( sender, QString::null, 0, Kopete::Account::Temporary ); + addContact( sender, TQString::null, 0, Kopete::Account::Temporary ); } OscarContact* ocSender = static_cast ( contacts()[sender] ); //should exist now @@ -413,10 +413,10 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) //decode message - QString realText( message.text( contactCodec( ocSender ) ) ); + TQString realText( message.text( contactCodec( ocSender ) ) ); //sanitize; - QString sanitizedMsg = sanitizedMessage( realText ); + TQString sanitizedMsg = sanitizedMessage( realText ); Kopete::ContactPtrList me; me.append( myself() ); @@ -427,25 +427,25 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) } -void OscarAccount::setServerAddress(const QString &server) +void OscarAccount::setServerAddress(const TQString &server) { - configGroup()->writeEntry( QString::fromLatin1( "Server" ), server ); + configGroup()->writeEntry( TQString::fromLatin1( "Server" ), server ); } void OscarAccount::setServerPort(int port) { if ( port > 0 ) - configGroup()->writeEntry( QString::fromLatin1( "Port" ), port ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), port ); else //set to default 5190 - configGroup()->writeEntry( QString::fromLatin1( "Port" ), 5190 ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), 5190 ); } -QTextCodec* OscarAccount::defaultCodec() const +TQTextCodec* OscarAccount::defaultCodec() const { - return QTextCodec::codecForMib( configGroup()->readNumEntry( "DefaultEncoding", 4 ) ); + return TQTextCodec::codecForMib( configGroup()->readNumEntry( "DefaultEncoding", 4 ) ); } -QTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const +TQTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const { if ( contact ) return contact->contactCodec(); @@ -453,7 +453,7 @@ QTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const return defaultCodec(); } -QTextCodec* OscarAccount::contactCodec( const QString& contactName ) const +TQTextCodec* OscarAccount::contactCodec( const TQString& contactName ) const { // XXX Need const_cast because Kopete::Account::contacts() // XXX method is not const for some strange reason. @@ -469,20 +469,20 @@ void OscarAccount::setBuddyIcon( KURL url ) } else { - QImage image( url.path() ); + TQImage image( url.path() ); if ( image.isNull() ) return; - const QSize size = ( d->engine->isIcq() ) ? QSize( 52, 64 ) : QSize( 48, 48 ); + const TQSize size = ( d->engine->isIcq() ) ? TQSize( 52, 64 ) : TQSize( 48, 48 ); - image = image.smoothScale( size, QImage::ScaleMax ); + image = image.smoothScale( size, TQImage::ScaleMax ); if( image.width() > size.width()) image = image.copy( ( image.width() - size.width() ) / 2, 0, size.width(), image.height() ); if( image.height() > size.height()) image = image.copy( 0, ( image.height() - size.height() ) / 2, image.width(), size.height() ); - QString newlocation( locateLocal( "appdata", "oscarpictures/"+ accountId() + ".jpg" ) ); + TQString newlocation( locateLocal( "appdata", "oscarpictures/"+ accountId() + ".jpg" ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Saving buddy icon: " << newlocation << endl; if ( !image.save( newlocation, "JPEG" ) ) @@ -494,7 +494,7 @@ void OscarAccount::setBuddyIcon( KURL url ) emit buddyIconChanged(); } -bool OscarAccount::addContactToSSI( const QString& contactName, const QString& groupName, bool autoAddGroup ) +bool OscarAccount::addContactToSSI( const TQString& contactName, const TQString& groupName, bool autoAddGroup ) { SSIManager* listManager = d->engine->ssiManager(); if ( !listManager->findGroup( groupName ) ) @@ -516,7 +516,7 @@ bool OscarAccount::addContactToSSI( const QString& contactName, const QString& g return true; } -bool OscarAccount::changeContactGroupInSSI( const QString& contact, const QString& newGroupName, bool autoAddGroup ) +bool OscarAccount::changeContactGroupInSSI( const TQString& contact, const TQString& newGroupName, bool autoAddGroup ) { SSIManager* listManager = d->engine->ssiManager(); if ( !listManager->findGroup( newGroupName ) ) @@ -538,7 +538,7 @@ bool OscarAccount::changeContactGroupInSSI( const QString& contact, const QStrin return true; } -Connection* OscarAccount::setupConnection( const QString& server, uint port ) +Connection* OscarAccount::setupConnection( const TQString& server, uint port ) { //set up the connector KNetworkConnector* knc = new KNetworkConnector( 0 ); @@ -554,7 +554,7 @@ Connection* OscarAccount::setupConnection( const QString& server, uint port ) } -bool OscarAccount::createContact(const QString &contactId, +bool OscarAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact) { /* We're not even online or connecting @@ -576,7 +576,7 @@ bool OscarAccount::createContact(const QString &contactId, 2.c. create kopete contact */ - QValueList dummyList; + TQValueList dummyList; if ( parentContact->isTemporary() ) { SSI tempItem( contactId, 0, 0, 0xFFFF, dummyList, 0 ); @@ -607,7 +607,7 @@ bool OscarAccount::createContact(const QString &contactId, kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Adding " << contactId << " to server side list" << endl; - QString groupName; + TQString groupName; Kopete::GroupList kopeteGroups = parentContact->groups(); //get the group list if ( kopeteGroups.isEmpty() || kopeteGroups.first() == Kopete::Group::topLevel() ) @@ -618,7 +618,7 @@ bool OscarAccount::createContact(const QString &contactId, else { //apparently kopeteGroups.first() can be invalid. Attempt to prevent - //crashes in SSIData::findGroup(const QString& name) + //crashes in SSIData::findGroup(const TQString& name) groupName = kopeteGroups.first() ? kopeteGroups.first()->displayName() : i18n("Buddies"); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Contact with group." << " No. of groups = " << kopeteGroups.count() << @@ -665,7 +665,7 @@ void OscarAccount::ssiGroupAdded( const Oscar::SSI& item ) //check the contact add queue for any contacts matching the //group name we just added kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Looking for contacts to be added in group " << item.name() << endl; - QMap::iterator it; + TQMap::iterator it; for ( it = d->contactAddQueue.begin(); it != d->contactAddQueue.end(); ++it ) { if ( Oscar::normalize( it.data() ) == Oscar::normalize( item.name() ) ) @@ -704,7 +704,7 @@ void OscarAccount::ssiContactUpdated( const Oscar::SSI& item ) } } -void OscarAccount::userStartedTyping( const QString & contact ) +void OscarAccount::userStartedTyping( const TQString & contact ) { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; if ( ct && contact != accountId() ) @@ -714,7 +714,7 @@ void OscarAccount::userStartedTyping( const QString & contact ) } } -void OscarAccount::userStoppedTyping( const QString & contact ) +void OscarAccount::userStoppedTyping( const TQString & contact ) { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; if ( ct && contact != accountId() ) @@ -724,7 +724,7 @@ void OscarAccount::userStoppedTyping( const QString & contact ) } } -void OscarAccount::slotSocketError( int errCode, const QString& errString ) +void OscarAccount::slotSocketError( int errCode, const TQString& errString ) { Q_UNUSED( errCode ); KPassivePopup::message( i18n( "account has been disconnected", "%1 disconnected" ).arg( accountId() ), @@ -740,7 +740,7 @@ void OscarAccount::slotTaskError( const Oscar::SNAC& s, int code, bool fatal ) kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "service: " << s.family << " subtype: " << s.subtype << " code: " << code << endl; - QString message; + TQString message; if ( s.family == 0 && s.subtype == 0 ) { message = getFLAPErrorMessage( code ); @@ -781,34 +781,34 @@ void OscarAccount::slotTaskError( const Oscar::SNAC& s, int code, bool fatal ) void OscarAccount::slotSendBuddyIcon() { //need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotSendBuddyIcon() ) ); - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotSendBuddyIcon() ) ); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); if ( photoPath.isEmpty() ) return; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << photoPath << endl; - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); if ( iconFile.open( IO_ReadOnly ) ) { if ( !engine()->hasIconConnection() ) { //will send icon when we connect to icon server - QObject::connect( engine(), SIGNAL( iconServerConnected() ), - this, SLOT( slotSendBuddyIcon() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( slotSendBuddyIcon() ) ); return; } - QByteArray imageData = iconFile.readAll(); + TQByteArray imageData = iconFile.readAll(); engine()->sendBuddyIcon( imageData ); } } -QString OscarAccount::getFLAPErrorMessage( int code ) +TQString OscarAccount::getFLAPErrorMessage( int code ) { bool isICQ = d->engine->isIcq(); - QString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); - QString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); - QString reason; + TQString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); + TQString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); + TQString reason; //FLAP errors are always fatal //negative codes are things added by liboscar developers //to indicate generic errors in the task diff --git a/kopete/protocols/oscar/oscaraccount.h b/kopete/protocols/oscar/oscaraccount.h index aa8e806d..d135df3a 100644 --- a/kopete/protocols/oscar/oscaraccount.h +++ b/kopete/protocols/oscar/oscaraccount.h @@ -18,9 +18,9 @@ #ifndef OSCARACCOUNT_H #define OSCARACCOUNT_H -#include -#include -#include +#include +#include +#include #include "kopetepasswordedaccount.h" #include "oscartypeclasses.h" @@ -44,7 +44,7 @@ class KDE_EXPORT OscarAccount : public Kopete::PasswordedAccount Q_OBJECT public: - OscarAccount(Kopete::Protocol *parent, const QString &accountID, const char *name=0L, bool isICQ=false); + OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name=0L, bool isICQ=false); virtual ~OscarAccount(); /** Provide the derived accounts and contacts with access to the backend */ @@ -67,7 +67,7 @@ public: /** * Sets the account away */ - virtual void setAway( bool away, const QString &awayMessage = QString::null ) = 0; + virtual void setAway( bool away, const TQString &awayMessage = TQString::null ) = 0; /** * Accessor method for the action menu @@ -75,25 +75,25 @@ public: virtual KActionMenu* actionMenu() = 0; /** Set the server address */ - void setServerAddress( const QString& server ); + void setServerAddress( const TQString& server ); /** Set the server port */ void setServerPort( int port ); /** Returns codec for account's default encoding */ - QTextCodec* defaultCodec() const; + TQTextCodec* defaultCodec() const; /** * Returns codec for given contact's encoding or default one * if contact has no encoding */ - QTextCodec* contactCodec( const OscarContact* contact ) const; + TQTextCodec* contactCodec( const OscarContact* contact ) const; /** * Returns codec for given contact's encoding or default one * if contact has no encoding */ - QTextCodec* contactCodec( const QString& contactName ) const; + TQTextCodec* contactCodec( const TQString& contactName ) const; /** * Sets buddy icon @@ -107,7 +107,7 @@ public: * \param autoAddGroup if the group doesn't exist add that group * \return true if the contact will be added */ - bool addContactToSSI( const QString& contactName, const QString& groupName, bool autoAddGroup ); + bool addContactToSSI( const TQString& contactName, const TQString& groupName, bool autoAddGroup ); /** * Change a contact's group on the server @@ -116,7 +116,7 @@ public: * \param autoAddGroup if the new group doesn't exist add that group * \return true if the contact will be added */ - bool changeContactGroupInSSI( const QString& contact, const QString& newGroupName, bool autoAddGroup ); + bool changeContactGroupInSSI( const TQString& contact, const TQString& newGroupName, bool autoAddGroup ); public slots: void slotGoOffline(); @@ -127,12 +127,12 @@ protected: /** * Setup a connection for a derived account based on the host and port */ - Connection* setupConnection( const QString& server, uint port ); + Connection* setupConnection( const TQString& server, uint port ); /** * Adds a contact to a meta contact */ - virtual bool createContact(const QString &contactId, + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact ); /** @@ -142,9 +142,9 @@ protected: * @param parentContact the parent metacontact * @return whether the creation succeeded or not */ - virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) = 0; + virtual OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) = 0; - virtual QString sanitizedMessage( const QString& message ) = 0; + virtual TQString sanitizedMessage( const TQString& message ) = 0; void updateVersionUpdaterStamp(); @@ -157,7 +157,7 @@ protected slots: void kopeteGroupRemoved( Kopete::Group* g ); void kopeteGroupAdded( Kopete::Group* g ); - void kopeteGroupRenamed( Kopete::Group* g, const QString& oldName ); + void kopeteGroupRenamed( Kopete::Group* g, const TQString& oldName ); virtual void messageReceived( const Oscar::Message& message ); @@ -169,8 +169,8 @@ protected slots: void ssiContactRemoved( const Oscar::SSI& ) {} /* slots for receiving typing notifications, and notify the appropriate OscarContact */ - void userStartedTyping( const QString & contact ); - void userStoppedTyping( const QString & contact ); + void userStartedTyping( const TQString & contact ); + void userStoppedTyping( const TQString & contact ); void nonServerAddContactDialogClosed(); @@ -181,11 +181,11 @@ signals: void buddyIconChanged(); private: - QString getFLAPErrorMessage( int code ); + TQString getFLAPErrorMessage( int code ); private slots: /** Handler from socket errors from a connection */ - void slotSocketError( int, const QString& ); + void slotSocketError( int, const TQString& ); /** Handle task errors from the client */ void slotTaskError( const Oscar::SNAC& s, int errCode, bool fatal ) ; diff --git a/kopete/protocols/oscar/oscarcontact.cpp b/kopete/protocols/oscar/oscarcontact.cpp index 660a82e6..cb9f06c6 100644 --- a/kopete/protocols/oscar/oscarcontact.cpp +++ b/kopete/protocols/oscar/oscarcontact.cpp @@ -18,8 +18,8 @@ #include -#include -#include +#include +#include #include #include @@ -43,30 +43,30 @@ #include -OscarContact::OscarContact( Kopete::Account* account, const QString& name, - Kopete::MetaContact* parent, const QString& icon, const SSI& ssiItem ) +OscarContact::OscarContact( Kopete::Account* account, const TQString& name, + Kopete::MetaContact* parent, const TQString& icon, const SSI& ssiItem ) : Kopete::Contact( account, name, parent, icon ) { mAccount = static_cast(account); mName = name; mMsgManager = 0L; m_ssiItem = ssiItem; - connect( this, SIGNAL( updatedSSI() ), this, SLOT( updateSSIItem() ) ); + connect( this, TQT_SIGNAL( updatedSSI() ), this, TQT_SLOT( updateSSIItem() ) ); } OscarContact::~OscarContact() { } -void OscarContact::serialize(QMap &serializedData, - QMap &/*addressBookData*/) +void OscarContact::serialize(TQMap &serializedData, + TQMap &/*addressBookData*/) { serializedData["ssi_name"] = m_ssiItem.name(); - serializedData["ssi_type"] = QString::number( m_ssiItem.type() ); - serializedData["ssi_gid"] = QString::number( m_ssiItem.gid() ); - serializedData["ssi_bid"] = QString::number( m_ssiItem.bid() ); + serializedData["ssi_type"] = TQString::number( m_ssiItem.type() ); + serializedData["ssi_gid"] = TQString::number( m_ssiItem.gid() ); + serializedData["ssi_bid"] = TQString::number( m_ssiItem.bid() ); serializedData["ssi_alias"] = m_ssiItem.alias(); - serializedData["ssi_waitingAuth"] = m_ssiItem.waitingAuth() ? QString::fromLatin1( "true" ) : QString::fromLatin1( "false" ); + serializedData["ssi_waitingAuth"] = m_ssiItem.waitingAuth() ? TQString::fromLatin1( "true" ) : TQString::fromLatin1( "false" ); } bool OscarContact::isOnServer() const @@ -99,21 +99,21 @@ Kopete::ChatSession* OscarContact::manager( CanCreateFlags canCreate ) /*kdDebug(14190) << k_funcinfo << "Creating new ChatSession for contact '" << displayName() << "'" << endl;*/ - QPtrList theContact; + TQPtrList theContact; theContact.append(this); mMsgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), theContact, protocol()); // This is for when the user types a message and presses send - connect(mMsgManager, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession * ) ), - this, SLOT( slotSendMsg( Kopete::Message&, Kopete::ChatSession * ) ) ); + connect(mMsgManager, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession * ) ), + this, TQT_SLOT( slotSendMsg( Kopete::Message&, Kopete::ChatSession * ) ) ); // For when the message manager is destroyed - connect(mMsgManager, SIGNAL( destroyed() ), - this, SLOT( chatSessionDestroyed() ) ); + connect(mMsgManager, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( chatSessionDestroyed() ) ); - connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), - this, SLOT( slotTyping( bool ) ) ); + connect(mMsgManager, TQT_SIGNAL( myselfTyping( bool ) ), + this, TQT_SLOT( slotTyping( bool ) ) ); } return mMsgManager; } @@ -160,7 +160,7 @@ void OscarContact::sync(unsigned int flags) return; } -void OscarContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void OscarContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { Q_UNUSED( contact ); setProperty( Kopete::Global::Properties::self()->onlineSince(), details.onlineSinceTime() ); @@ -168,7 +168,7 @@ void OscarContact::userInfoUpdated( const QString& contact, const UserDetails& d m_warningLevel = details.warningLevel(); m_details.merge( details ); - QStringList capList; + TQStringList capList; // Append client name and version in case we found one if ( m_details.userClass() & 0x0080 /* WIRELESS */ ) capList << i18n( "Mobile AIM Client" ); @@ -225,10 +225,10 @@ void OscarContact::slotTyping( bool typing ) account()->engine()->sendTyping( contactId(), typing ); } -QTextCodec* OscarContact::contactCodec() const +TQTextCodec* OscarContact::contactCodec() const { if ( hasProperty( "contactEncoding" ) ) - return QTextCodec::codecForMib( property( "contactEncoding" ).value().toInt() ); + return TQTextCodec::codecForMib( property( "contactEncoding" ).value().toInt() ); else return mAccount->defaultCodec(); } diff --git a/kopete/protocols/oscar/oscarcontact.h b/kopete/protocols/oscar/oscarcontact.h index 51c31dd2..659e649e 100644 --- a/kopete/protocols/oscar/oscarcontact.h +++ b/kopete/protocols/oscar/oscarcontact.h @@ -18,8 +18,8 @@ #ifndef OSCARCONTACT_H #define OSCARCONTACT_H -#include -#include +#include +#include #include "kopetecontact.h" #include "kopetemessage.h" #include "userdetails.h" @@ -62,16 +62,16 @@ class KDE_EXPORT OscarContact : public Kopete::Contact Q_OBJECT public: - OscarContact( Kopete::Account* account, const QString& name, - Kopete::MetaContact* parent, const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + OscarContact( Kopete::Account* account, const TQString& name, + Kopete::MetaContact* parent, const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~OscarContact(); - virtual void serialize(QMap&, QMap&); + virtual void serialize(TQMap&, TQMap&); virtual Kopete::ChatSession *manager( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CanCreate ); - const QString &contactName() const { return mName; }; + const TQString &contactName() const { return mName; }; OscarAccount *account() const { return mAccount; }; bool isOnServer() const; @@ -87,7 +87,7 @@ public: * Returns codec for contact's encoding or default one * if contact has no encoding */ - QTextCodec *contactCodec() const; + TQTextCodec *contactCodec() const; public slots: /** slot so that properties can be updated based on a new SSI item */ @@ -100,13 +100,13 @@ public slots: virtual void sync(unsigned int flags); /** our user info has been updated */ - virtual void userInfoUpdated( const QString& contact, const UserDetails& details ); + virtual void userInfoUpdated( const TQString& contact, const UserDetails& details ); /** a user is online */ - virtual void userOnline( const QString& ) = 0; + virtual void userOnline( const TQString& ) = 0; /** a user is offline */ - virtual void userOffline( const QString& ) = 0; + virtual void userOffline( const TQString& ) = 0; protected slots: void slotTyping( bool typing ); @@ -118,12 +118,12 @@ signals: protected: OscarAccount *mAccount; - QString mName; + TQString mName; Kopete::ChatSession *mMsgManager; UserDetails m_details; SSI m_ssiItem; int m_warningLevel; - QString m_clientFeatures; + TQString m_clientFeatures; private: void initActions(); diff --git a/kopete/protocols/oscar/oscarencodingselectiondialog.cpp b/kopete/protocols/oscar/oscarencodingselectiondialog.cpp index 72e9081a..7a1826cb 100644 --- a/kopete/protocols/oscar/oscarencodingselectiondialog.cpp +++ b/kopete/protocols/oscar/oscarencodingselectiondialog.cpp @@ -21,15 +21,15 @@ #include "oscarencodingselectiondialog.h" #include -#include +#include #include -OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( QWidget* parent, int initialEncoding ) +OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( TQWidget* parent, int initialEncoding ) : KDialogBase( parent, 0, false, i18n( "Select Encoding" ), Ok | Cancel ) { int initialEncodingIndex; - clearWFlags( QWidget::WDestructiveClose ); + clearWFlags( TQWidget::WDestructiveClose ); m_encodingUI = new OscarEncodingBaseUI( this ); //fill the encoding combo boxes m_encodings.insert(0, i18n("Default")); @@ -99,7 +99,7 @@ OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( QWidget* parent, int int OscarEncodingSelectionDialog::selectedEncoding() const { - QString encoding = m_encodingUI->encodingCombo->currentText(); + TQString encoding = m_encodingUI->encodingCombo->currentText(); int mib = m_encodings.keys()[ m_encodings.values().findIndex(encoding) ]; if( mib == -1 ) @@ -109,12 +109,12 @@ int OscarEncodingSelectionDialog::selectedEncoding() const void OscarEncodingSelectionDialog::slotOk() { - emit closing( QDialog::Accepted ); + emit closing( TQDialog::Accepted ); } void OscarEncodingSelectionDialog::slotCancel() { - emit closing( QDialog::Rejected ); + emit closing( TQDialog::Rejected ); } #include "oscarencodingselectiondialog.moc" diff --git a/kopete/protocols/oscar/oscarencodingselectiondialog.h b/kopete/protocols/oscar/oscarencodingselectiondialog.h index f99655e4..2ab8d529 100644 --- a/kopete/protocols/oscar/oscarencodingselectiondialog.h +++ b/kopete/protocols/oscar/oscarencodingselectiondialog.h @@ -28,7 +28,7 @@ class KOPETE_EXPORT OscarEncodingSelectionDialog : public KDialogBase { Q_OBJECT public: - OscarEncodingSelectionDialog( QWidget* parent = 0, int initialEncoding = 4); + OscarEncodingSelectionDialog( TQWidget* parent = 0, int initialEncoding = 4); ~OscarEncodingSelectionDialog() {} int selectedEncoding() const; @@ -42,7 +42,7 @@ protected slots: private: OscarEncodingBaseUI* m_encodingUI; - QMap m_encodings; + TQMap m_encodings; }; #endif diff --git a/kopete/protocols/oscar/oscarlistnonservercontacts.cpp b/kopete/protocols/oscar/oscarlistnonservercontacts.cpp index 804849a4..4529f562 100644 --- a/kopete/protocols/oscar/oscarlistnonservercontacts.cpp +++ b/kopete/protocols/oscar/oscarlistnonservercontacts.cpp @@ -20,11 +20,11 @@ #include "oscarlistnonservercontacts.h" #include "oscarlistcontactsbase.h" -#include -#include +#include +#include #include -OscarListNonServerContacts::OscarListNonServerContacts(QWidget* parent) +OscarListNonServerContacts::OscarListNonServerContacts(TQWidget* parent) : KDialogBase( parent, 0, false, i18n( "Add Contacts to Server List" ), Ok | Cancel ) { @@ -39,13 +39,13 @@ OscarListNonServerContacts::~OscarListNonServerContacts() } -void OscarListNonServerContacts::addContacts( const QStringList& contactList ) +void OscarListNonServerContacts::addContacts( const TQStringList& contactList ) { m_nonServerContacts = contactList; m_contactsList->notServerContacts->insertStringList( contactList ); } -QStringList OscarListNonServerContacts::nonServerContactList() const +TQStringList OscarListNonServerContacts::nonServerContactList() const { return m_nonServerContacts; } diff --git a/kopete/protocols/oscar/oscarlistnonservercontacts.h b/kopete/protocols/oscar/oscarlistnonservercontacts.h index 7f3fb4f8..e7db0848 100644 --- a/kopete/protocols/oscar/oscarlistnonservercontacts.h +++ b/kopete/protocols/oscar/oscarlistnonservercontacts.h @@ -29,11 +29,11 @@ class KOPETE_EXPORT OscarListNonServerContacts : public KDialogBase { Q_OBJECT public: - OscarListNonServerContacts( QWidget* parent ); + OscarListNonServerContacts( TQWidget* parent ); ~OscarListNonServerContacts(); - void addContacts( const QStringList& contactList ); - QStringList nonServerContactList() const; + void addContacts( const TQStringList& contactList ); + TQStringList nonServerContactList() const; bool onlyShowOnce(); @@ -46,7 +46,7 @@ signals: private: OscarListContactsBase* m_contactsList; - QStringList m_nonServerContacts; + TQStringList m_nonServerContacts; }; #endif diff --git a/kopete/protocols/oscar/oscarmyselfcontact.cpp b/kopete/protocols/oscar/oscarmyselfcontact.cpp index e234cf0f..28aeb8f2 100644 --- a/kopete/protocols/oscar/oscarmyselfcontact.cpp +++ b/kopete/protocols/oscar/oscarmyselfcontact.cpp @@ -27,7 +27,7 @@ OscarMyselfContact::OscarMyselfContact( OscarAccount* account ) : Kopete::Contact( account, account->accountId(), Kopete::ContactList::self()->myself() ) { - QObject::connect( account->engine(), SIGNAL( haveOwnInfo() ), this, SLOT( userInfoUpdated() ) ); + TQObject::connect( account->engine(), TQT_SIGNAL( haveOwnInfo() ), this, TQT_SLOT( userInfoUpdated() ) ); } OscarMyselfContact::~OscarMyselfContact() diff --git a/kopete/protocols/oscar/oscarversionupdater.cpp b/kopete/protocols/oscar/oscarversionupdater.cpp index 6e2cea09..75f38b74 100644 --- a/kopete/protocols/oscar/oscarversionupdater.cpp +++ b/kopete/protocols/oscar/oscarversionupdater.cpp @@ -16,8 +16,8 @@ #include "oscarversionupdater.h" -#include -#include +#include +#include #include #include @@ -25,7 +25,7 @@ #include -QMutex updateMutex; +TQMutex updateMutex; OscarVersionUpdater *OscarVersionUpdater::versionUpdaterStatic = 0L; OscarVersionUpdater::OscarVersionUpdater() @@ -67,14 +67,14 @@ bool OscarVersionUpdater::update( unsigned int stamp ) mVersionData.resize( 0 ); KConfigGroup config( KGlobal::config(), "Oscar" ); - QString url = config.readEntry( "NewVersionURL", "http://kopete.kde.org/oscarversions.xml" ); + TQString url = config.readEntry( "NewVersionURL", "http://kopete.kde.org/oscarversions.xml" ); mTransferJob = KIO::get ( url ); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Download version info from server."<< endl; - connect ( mTransferJob, SIGNAL ( result ( KIO::Job* ) ), - this, SLOT ( slotTransferResult ( KIO::Job* ) ) ); - connect ( mTransferJob, SIGNAL ( data ( KIO::Job*, const QByteArray& ) ), - this, SLOT ( slotTransferData ( KIO::Job*, const QByteArray& ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( result ( KIO::Job* ) ), + this, TQT_SLOT ( slotTransferResult ( KIO::Job* ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( data ( KIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT ( slotTransferData ( KIO::Job*, const TQByteArray& ) ) ); } return isUpdating; } @@ -121,30 +121,30 @@ void OscarVersionUpdater::printDebug() { kdDebug(OSCAR_RAW_DEBUG) << "*************** AIM VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mAIMVersion.clientString << endl; - kdDebug(OSCAR_RAW_DEBUG) << "client id: " << QString::number( mAIMVersion.clientId, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "major: " << QString::number( mAIMVersion.major, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "minor: " << QString::number( mAIMVersion.minor, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "point: " << QString::number( mAIMVersion.point, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "build: " << QString::number( mAIMVersion.build, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "other: " << QString::number( mAIMVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mAIMVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mAIMVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mAIMVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mAIMVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mAIMVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mAIMVersion.other, 16 ) << endl; kdDebug(OSCAR_RAW_DEBUG) << "country: " << mAIMVersion.country << endl; kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mAIMVersion.lang << endl; kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "*************** ICQ VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mICQVersion.clientString << endl; - kdDebug(OSCAR_RAW_DEBUG) << "client id: " << QString::number( mICQVersion.clientId, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "major: " << QString::number( mICQVersion.major, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "minor: " << QString::number( mICQVersion.minor, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "point: " << QString::number( mICQVersion.point, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "build: " << QString::number( mICQVersion.build, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "other: " << QString::number( mICQVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mICQVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mICQVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mICQVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mICQVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mICQVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mICQVersion.other, 16 ) << endl; kdDebug(OSCAR_RAW_DEBUG) << "country: " << mICQVersion.country << endl; kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mICQVersion.lang << endl; kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; } -void OscarVersionUpdater::slotTransferData ( KIO::Job */*job*/, const QByteArray &data ) +void OscarVersionUpdater::slotTransferData ( KIO::Job */*job*/, const TQByteArray &data ) { unsigned oldSize = mVersionData.size(); mVersionData.resize ( oldSize + data.size() ); @@ -165,7 +165,7 @@ void OscarVersionUpdater::slotTransferResult ( KIO::Job *job ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Updating version info" << endl; - QDomDocument doc; + TQDomDocument doc; if ( doc.setContent ( mVersionData ) ) { Oscar::ClientVersion tmpICQ = mICQVersion; @@ -198,15 +198,15 @@ void OscarVersionUpdater::slotTransferResult ( KIO::Job *job ) updateMutex.unlock(); } -void OscarVersionUpdater::parseDocument( QDomDocument& doc ) +void OscarVersionUpdater::parseDocument( TQDomDocument& doc ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; - QDomElement root = doc.documentElement(); + TQDomElement root = doc.documentElement(); if ( root.tagName() != "oscar" ) return; - QDomElement versionElement = root.firstChild().toElement(); + TQDomElement versionElement = root.firstChild().toElement(); while( !versionElement.isNull() ) { if ( versionElement.tagName() == "icq" ) @@ -218,22 +218,22 @@ void OscarVersionUpdater::parseDocument( QDomDocument& doc ) } } -bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, QDomElement& element ) +bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, TQDomElement& element ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; // clear structure - version.clientString = QString::null; + version.clientString = TQString::null; version.clientId = 0x0000; version.major = 0x0000; version.minor = 0x0000; version.point = 0x0000; version.build = 0x0000; version.other = 0x00000000; - version.country = QString::null; - version.lang = QString::null; + version.country = TQString::null; + version.lang = TQString::null; - QDomElement versionChild = element.firstChild().toElement(); + TQDomElement versionChild = element.firstChild().toElement(); while ( !versionChild.isNull() ) { if ( versionChild.tagName() == "client" ) @@ -261,7 +261,7 @@ bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, QDomEleme return true; } -void OscarVersionUpdater::storeVersionInfo( const QString& group, const Oscar::ClientVersion& version ) const +void OscarVersionUpdater::storeVersionInfo( const TQString& group, const Oscar::ClientVersion& version ) const { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Storing version info to group: " << group << endl; KConfigGroup config( KGlobal::config(), group ); diff --git a/kopete/protocols/oscar/oscarversionupdater.h b/kopete/protocols/oscar/oscarversionupdater.h index d6851f73..bb51cc9b 100644 --- a/kopete/protocols/oscar/oscarversionupdater.h +++ b/kopete/protocols/oscar/oscarversionupdater.h @@ -17,7 +17,7 @@ #ifndef OSCARVERSIONUPDATER_H #define OSCARVERSIONUPDATER_H -#include +#include #include @@ -84,19 +84,19 @@ public: void printDebug(); private slots: - void slotTransferData( KIO::Job *job, const QByteArray &data ); + void slotTransferData( KIO::Job *job, const TQByteArray &data ); void slotTransferResult( KIO::Job *job ); private: - void parseDocument( QDomDocument& doc ); - bool parseVersion( Oscar::ClientVersion& version, QDomElement& element ); + void parseDocument( TQDomDocument& doc ); + bool parseVersion( Oscar::ClientVersion& version, TQDomElement& element ); /** * Store version info structure to KConfigGroup * @param group is the group name. * @param version is version info structure. */ - void storeVersionInfo( const QString& group, const Oscar::ClientVersion& version ) const; + void storeVersionInfo( const TQString& group, const Oscar::ClientVersion& version ) const; /** * Compare two versions. @@ -111,7 +111,7 @@ private: Oscar::ClientVersion mAIMVersion; KIO::TransferJob *mTransferJob; - QByteArray mVersionData; + TQByteArray mVersionData; unsigned int mStamp; bool mUpdating; diff --git a/kopete/protocols/oscar/oscarvisibilitydialog.cpp b/kopete/protocols/oscar/oscarvisibilitydialog.cpp index 7958432c..77f3894a 100644 --- a/kopete/protocols/oscar/oscarvisibilitydialog.cpp +++ b/kopete/protocols/oscar/oscarvisibilitydialog.cpp @@ -16,8 +16,8 @@ #include "oscarvisibilitydialog.h" -#include -#include +#include +#include #include @@ -25,21 +25,21 @@ #include "client.h" -OscarVisibilityDialog::OscarVisibilityDialog( Client* client, QWidget* parent ) +OscarVisibilityDialog::OscarVisibilityDialog( Client* client, TQWidget* parent ) : KDialogBase( parent, 0, false, i18n( "Add Contacts to Visible or Invisible List" ), Ok | Cancel ), m_client( client ) { m_visibilityUI = new OscarVisibilityBase( this ); setMainWidget( m_visibilityUI ); - QObject::connect(m_visibilityUI->visibleAdd, SIGNAL(clicked()), - this, SLOT(slotAddToVisible())); - QObject::connect(m_visibilityUI->visibleRemove, SIGNAL(clicked()), - this, SLOT(slotRemoveFromVisible())); - QObject::connect(m_visibilityUI->invisibleAdd, SIGNAL(clicked()), - this, SLOT(slotAddToInvisible())); - QObject::connect(m_visibilityUI->invisibleRemove, SIGNAL(clicked()), - this, SLOT(slotRemoveFromInvisible())); + TQObject::connect(m_visibilityUI->visibleAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddToVisible())); + TQObject::connect(m_visibilityUI->visibleRemove, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveFromVisible())); + TQObject::connect(m_visibilityUI->invisibleAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddToInvisible())); + TQObject::connect(m_visibilityUI->invisibleRemove, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveFromInvisible())); } void OscarVisibilityDialog::addContacts( const ContactMap& contacts ) @@ -52,22 +52,22 @@ void OscarVisibilityDialog::addContacts( const ContactMap& contacts ) } -void OscarVisibilityDialog::addVisibleContacts( const QStringList& contactList ) +void OscarVisibilityDialog::addVisibleContacts( const TQStringList& contactList ) { m_visibilityUI->visibleContacts->insertStringList( contactList ); } -void OscarVisibilityDialog::addInvisibleContacts( const QStringList& contactList ) +void OscarVisibilityDialog::addInvisibleContacts( const TQStringList& contactList ) { m_visibilityUI->invisibleContacts->insertStringList( contactList ); } void OscarVisibilityDialog::slotAddToVisible() { - QListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_visibleListChangesMap[contactId] = Add; if ( !m_visibilityUI->visibleContacts->findItem( itm->text(), Qt::CaseSensitive | Qt::ExactMatch ) ) @@ -76,10 +76,10 @@ void OscarVisibilityDialog::slotAddToVisible() void OscarVisibilityDialog::slotRemoveFromVisible() { - QListBoxItem *itm = m_visibilityUI->visibleContacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->visibleContacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_visibleListChangesMap[contactId] = Remove; int visIdx = m_visibilityUI->visibleContacts->index( itm ); @@ -88,10 +88,10 @@ void OscarVisibilityDialog::slotRemoveFromVisible() void OscarVisibilityDialog::slotAddToInvisible() { - QListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_invisibleListChangesMap[contactId] = Add; if ( !m_visibilityUI->invisibleContacts->findItem( itm->text(), Qt::CaseSensitive | Qt::ExactMatch ) ) @@ -100,10 +100,10 @@ void OscarVisibilityDialog::slotAddToInvisible() void OscarVisibilityDialog::slotRemoveFromInvisible() { - QListBoxItem *itm = m_visibilityUI->invisibleContacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->invisibleContacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_invisibleListChangesMap[contactId] = Remove; int visIdx = m_visibilityUI->invisibleContacts->index( itm ); diff --git a/kopete/protocols/oscar/oscarvisibilitydialog.h b/kopete/protocols/oscar/oscarvisibilitydialog.h index fc45039f..719243d3 100644 --- a/kopete/protocols/oscar/oscarvisibilitydialog.h +++ b/kopete/protocols/oscar/oscarvisibilitydialog.h @@ -31,14 +31,14 @@ class KOPETE_EXPORT OscarVisibilityDialog : public KDialogBase { Q_OBJECT public: - typedef QMap ContactMap; + typedef TQMap ContactMap; - OscarVisibilityDialog( Client* client, QWidget* parent ); + OscarVisibilityDialog( Client* client, TQWidget* parent ); ~OscarVisibilityDialog() {} void addContacts( const ContactMap& contacts ); - void addVisibleContacts( const QStringList& contactList ); - void addInvisibleContacts( const QStringList& contactList ); + void addVisibleContacts( const TQStringList& contactList ); + void addInvisibleContacts( const TQStringList& contactList ); signals: void closing(); @@ -55,7 +55,7 @@ protected slots: private: enum Action{ Remove = 0, Add }; - typedef QMap ChangeMap; + typedef TQMap ChangeMap; //maps with changes that should be send to server ChangeMap m_visibleListChangesMap; diff --git a/kopete/protocols/sms/serviceloader.cpp b/kopete/protocols/sms/serviceloader.cpp index 8a64a6c0..0ebbe7fa 100644 --- a/kopete/protocols/sms/serviceloader.cpp +++ b/kopete/protocols/sms/serviceloader.cpp @@ -28,7 +28,7 @@ #endif #include "kopeteuiglobal.h" -SMSService* ServiceLoader::loadService(const QString& name, Kopete::Account* account) +SMSService* ServiceLoader::loadService(const TQString& name, Kopete::Account* account) { kdWarning( 14160 ) << k_funcinfo << endl; @@ -51,9 +51,9 @@ SMSService* ServiceLoader::loadService(const QString& name, Kopete::Account* acc return s; } -QStringList ServiceLoader::services() +TQStringList ServiceLoader::services() { - QStringList toReturn; + TQStringList toReturn; toReturn.append("SMSSend"); toReturn.append("SMSClient"); #ifdef INCLUDE_SMSGSM diff --git a/kopete/protocols/sms/serviceloader.h b/kopete/protocols/sms/serviceloader.h index fe29ebcc..b341a499 100644 --- a/kopete/protocols/sms/serviceloader.h +++ b/kopete/protocols/sms/serviceloader.h @@ -18,16 +18,16 @@ #define SERVICELOADER_H #include "smsservice.h" -#include -#include +#include +#include class SMSContact; class ServiceLoader { public: - static SMSService* loadService(const QString& name, Kopete::Account* account); - static QStringList services(); + static SMSService* loadService(const TQString& name, Kopete::Account* account); + static TQStringList services(); } ; #endif //SERVICELOADER_H diff --git a/kopete/protocols/sms/services/gsmlib.cpp b/kopete/protocols/sms/services/gsmlib.cpp index e9b0542b..7f129473 100644 --- a/kopete/protocols/sms/services/gsmlib.cpp +++ b/kopete/protocols/sms/services/gsmlib.cpp @@ -15,13 +15,13 @@ #include "config.h" #ifdef INCLUDE_SMSGSM -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -51,7 +51,7 @@ ///////////////////////////////////////////////////////////////////// #define GSMLIB_EVENT_ID 245 -GSMLibEvent::GSMLibEvent(SubType t) : QCustomEvent(QEvent::User+GSMLIB_EVENT_ID) +GSMLibEvent::GSMLibEvent(SubType t) : TQCustomEvent(TQEvent::User+GSMLIB_EVENT_ID) { setSubType(t); } @@ -67,7 +67,7 @@ void GSMLibEvent::setSubType(GSMLibEvent::SubType t) } ///////////////////////////////////////////////////////////////////// -GSMLibThread::GSMLibThread(QString dev, GSMLib* parent) +GSMLibThread::GSMLibThread(TQString dev, GSMLib* parent) { m_device = dev; m_parent = parent; @@ -100,7 +100,7 @@ void GSMLibThread::run() delete m_MeTa; m_MeTa = NULL; - QApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::DISCONNECTED)); + TQApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::DISCONNECTED)); kdDebug( 14160 ) << "GSMLibThread exited"<Reason = QString("GSMLib: Not Connected"); + e->Reason = TQString("GSMLib: Not Connected"); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } } @@ -144,7 +144,7 @@ bool GSMLibThread::doConnect() m_MeTa->setSMSRoutingToTA(true, false, false, true); m_MeTa->setEventHandler(this); - QApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::CONNECTED)); + TQApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::CONNECTED)); return true; } catch(gsmlib::GsmException &e) @@ -225,7 +225,7 @@ void GSMLibThread::pollForMessages( ) e->Text = m.Message->userData().c_str(); e->Number = m.Message->address().toString().c_str(); - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } m_newMessages.clear(); @@ -239,7 +239,7 @@ void GSMLibThread::pollForMessages( ) void GSMLibThread::sendMessageQueue() { - QMutexLocker _(&m_outMessagesMutex); + TQMutexLocker _(&m_outMessagesMutex); if(m_outMessages.size() == 0 ) return; @@ -252,18 +252,18 @@ void GSMLibThread::sendMessageQueue() void GSMLibThread::sendMessage(const Kopete::Message& msg) { - QString reason; + TQString reason; if (!m_MeTa) { GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT ); - e->Reason = QString("GSMLib: Not Connected"); + e->Reason = TQString("GSMLib: Not Connected"); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } - QString message = msg.plainBody(); - QString nr = msg.to().first()->contactId(); + TQString message = msg.plainBody(); + TQString nr = msg.to().first()->contactId(); // send SMS try @@ -275,14 +275,14 @@ void GSMLibThread::sendMessage(const Kopete::Message& msg) GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_SENT ); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } catch(gsmlib::GsmException &e) { GSMLibEvent* ev = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT ); - ev->Reason = QString("GSMLib: ") + e.what(); + ev->Reason = TQString("GSMLib: ") + e.what(); ev->Message = msg; - QApplication::postEvent(m_parent, ev); + TQApplication::postEvent(m_parent, ev); } } @@ -308,7 +308,7 @@ void GSMLib::saveConfig() { KConfigGroup* c = m_account->configGroup(); - c->writeEntry(QString("%1:%2").arg("GSMLib").arg("Device"), m_device); + c->writeEntry(TQString("%1:%2").arg("GSMLib").arg("Device"), m_device); } } @@ -317,11 +317,11 @@ void GSMLib::loadConfig() m_device = "/dev/bluetooth/rfcomm0"; if( m_account != NULL ) { - QString temp; + TQString temp; KConfigGroup* c = m_account->configGroup(); - temp = c->readEntry(QString("%1:%2").arg("GSMLib").arg("Device"), QString::null); - if( temp != QString::null ) + temp = c->readEntry(TQString("%1:%2").arg("GSMLib").arg("Device"), TQString::null); + if( temp != TQString::null ) m_device = temp; } } @@ -348,11 +348,11 @@ void GSMLib::disconnect() } -void GSMLib::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void GSMLib::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { m_parent = parent; m_layout = layout; - QWidget *configWidget = configureWidget(parent); + TQWidget *configWidget = configureWidget(parent); layout->addMultiCellWidget(configWidget, 0, 1, 0, 1); configWidget->show(); } @@ -362,7 +362,7 @@ void GSMLib::send(const Kopete::Message& msg) m_thread->send(msg); } -QWidget* GSMLib::configureWidget(QWidget* parent) +TQWidget* GSMLib::configureWidget(TQWidget* parent) { if (prefWidget == 0L) @@ -388,9 +388,9 @@ int GSMLib::maxSize() return 160; } -void GSMLib::customEvent(QCustomEvent* e) +void GSMLib::customEvent(TQCustomEvent* e) { - if( e->type() != QEvent::User+GSMLIB_EVENT_ID ) + if( e->type() != TQEvent::User+GSMLIB_EVENT_ID ) return; if( m_account == NULL ) @@ -415,8 +415,8 @@ void GSMLib::customEvent(QCustomEvent* e) break; case GSMLibEvent::NEW_MESSAGE: { - QString nr = ge->Number; - QString text = ge->Text; + TQString nr = ge->Number; + TQString text = ge->Text; // Locate a contact SMSContact* contact = static_cast( m_account->contacts().find( nr )); @@ -441,9 +441,9 @@ void GSMLib::customEvent(QCustomEvent* e) -const QString& GSMLib::description() +const TQString& GSMLib::description() { - QString url = "http://www.pxh.de/fs/gsmlib/"; + TQString url = "http://www.pxh.de/fs/gsmlib/"; m_description = i18n("GSMLib is a library (and utilities) for sending SMS via a GSM device. The program can be found on %1").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/gsmlib.h b/kopete/protocols/sms/services/gsmlib.h index fa9ef1d2..e4f7f8c8 100644 --- a/kopete/protocols/sms/services/gsmlib.h +++ b/kopete/protocols/sms/services/gsmlib.h @@ -30,12 +30,12 @@ #include "smsservice.h" #include "kopetemessage.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class GSMLibPrefsUI; class SMSContact; @@ -51,10 +51,10 @@ public: ~GSMLib(); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); @@ -64,18 +64,18 @@ public slots: //signals: // void messageSent(const Kopete::Message &); protected: - virtual void customEvent(QCustomEvent* e); + virtual void customEvent(TQCustomEvent* e); - QWidget* configureWidget(QWidget* parent); + TQWidget* configureWidget(TQWidget* parent); void saveConfig(); void loadConfig(); GSMLibPrefsUI* prefWidget; - QStringList output; + TQStringList output; - QString m_device; + TQString m_device; - QString m_description; + TQString m_description; GSMLibThread* m_thread; @@ -93,10 +93,10 @@ public: SubType subType(); void setSubType(SubType t); - QString Text; - QString Number; + TQString Text; + TQString Number; - QString Reason; + TQString Reason; Kopete::Message Message; protected: @@ -104,10 +104,10 @@ protected: }; /// Thread to deal with GsmLib's blocking -class GSMLibThread : public QThread, gsmlib::GsmEvent +class GSMLibThread : public TQThread, gsmlib::GsmEvent { public: - GSMLibThread(QString dev, GSMLib* parent); + GSMLibThread(TQString dev, GSMLib* parent); virtual ~GSMLibThread(); virtual void run(); @@ -122,7 +122,7 @@ protected: void SMSReceptionIndication(std::string storeName, unsigned int index, SMSMessageType messageType); GSMLib* m_parent; - QString m_device; + TQString m_device; gsmlib::MeTa* m_MeTa; @@ -131,7 +131,7 @@ protected: struct IncomingMessage { int Index; - QString StoreName; + TQString StoreName; gsmlib::SMSMessageRef Message; GsmEvent::SMSMessageType Type; @@ -139,12 +139,12 @@ protected: {} }; - typedef QValueList MessageList; + typedef TQValueList MessageList; MessageList m_newMessages; - typedef QValueList KopeteMessageList; + typedef TQValueList KopeteMessageList; KopeteMessageList m_outMessages; - QMutex m_outMessagesMutex; + TQMutex m_outMessagesMutex; }; #endif diff --git a/kopete/protocols/sms/services/kopete_unix_serial.cpp b/kopete/protocols/sms/services/kopete_unix_serial.cpp index b694ab22..c40f831b 100644 --- a/kopete/protocols/sms/services/kopete_unix_serial.cpp +++ b/kopete/protocols/sms/services/kopete_unix_serial.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include "kopete_unix_serial.h" @@ -304,8 +304,8 @@ KopeteUnixSerialPort::KopeteUnixSerialPort(string device, speed_t lineSpeed, if (s.find("OK") != string::npos || s.find("CABLE: GSM") != string::npos) { - _readNotifier = new QSocketNotifier(_fd, QSocketNotifier::Read); - connect( _readNotifier, SIGNAL(activated(int)), this, SIGNAL(activated())); + _readNotifier = new TQSocketNotifier(_fd, TQSocketNotifier::Read); + connect( _readNotifier, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated())); return; // found OK, return } } diff --git a/kopete/protocols/sms/services/kopete_unix_serial.h b/kopete/protocols/sms/services/kopete_unix_serial.h index 0248556b..beb0592a 100644 --- a/kopete/protocols/sms/services/kopete_unix_serial.h +++ b/kopete/protocols/sms/services/kopete_unix_serial.h @@ -24,13 +24,13 @@ #include #include -#include +#include class QSocketNotifier; namespace gsmlib { -class KopeteUnixSerialPort : public QObject, public Port +class KopeteUnixSerialPort : public TQObject, public Port { Q_OBJECT; @@ -39,7 +39,7 @@ protected: int _oldChar; // character set by putBack() (-1 == none) long int _timeoutVal; // timeout for getLine/readByte - QSocketNotifier* _readNotifier; + TQSocketNotifier* _readNotifier; // throw GsmException include UNIX errno void throwModemException(std::string message) throw(GsmException); diff --git a/kopete/protocols/sms/services/smsclient.cpp b/kopete/protocols/sms/services/smsclient.cpp index 96c04818..17a27066 100644 --- a/kopete/protocols/sms/services/smsclient.cpp +++ b/kopete/protocols/sms/services/smsclient.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -41,12 +41,12 @@ SMSClient::~SMSClient() { } -void SMSClient::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void SMSClient::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { kdWarning( 14160 ) << k_funcinfo << "ml: " << layout << ", " << "mp: " << parent << endl; m_parent = parent; m_layout = layout; - QWidget *configWidget = configureWidget(parent); + TQWidget *configWidget = configureWidget(parent); layout->addMultiCellWidget(configWidget, 0, 1, 0, 1); configWidget->show(); } @@ -59,7 +59,7 @@ void SMSClient::send(const Kopete::Message& msg) m_msg = msg; KConfigGroup* c = m_account->configGroup(); - QString provider = c->readEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"), QString::null); + TQString provider = c->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"), TQString::null); if (provider.isNull()) { @@ -67,27 +67,27 @@ void SMSClient::send(const Kopete::Message& msg) return; } - QString programName = c->readEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"). QString::null); + TQString programName = c->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"). TQString::null); if (programName.isNull()) programName = "/usr/bin/sms_client"; KProcess* p = new KProcess; - QString message = msg.plainBody(); - QString nr = msg.to().first()->contactId(); + TQString message = msg.plainBody(); + TQString nr = msg.to().first()->contactId(); *p << programName; *p << provider + ":" + nr; *p << message; - QObject::connect(p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess*))); - QObject::connect(p, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotReceivedOutput(KProcess*, char*, int))); - QObject::connect(p, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotReceivedOutput(KProcess*, char*, int))); + TQObject::connect(p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess*))); + TQObject::connect(p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int))); + TQObject::connect(p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int))); p->start(KProcess::Block, KProcess::AllOutput); } -QWidget* SMSClient::configureWidget(QWidget* parent) +TQWidget* SMSClient::configureWidget(TQWidget* parent) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero!!)" << endl; @@ -95,17 +95,17 @@ QWidget* SMSClient::configureWidget(QWidget* parent) prefWidget = new SMSClientPrefsUI(parent); prefWidget->configDir->setMode(KFile::Directory); - QString configDir; + TQString configDir; if (m_account) - configDir = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ConfigDir"), QString::null); + configDir = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ConfigDir"), TQString::null); if (configDir.isNull()) configDir = "/etc/sms"; prefWidget->configDir->setURL(configDir); - QString programName; + TQString programName; if (m_account) - programName = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"), - QString::null); + programName = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"), + TQString::null); if (programName.isNull()) programName = "/usr/bin/sms_client"; prefWidget->program->setURL(programName); @@ -114,7 +114,7 @@ QWidget* SMSClient::configureWidget(QWidget* parent) if (m_account) { - QString pName = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName")); + TQString pName = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName")); for (int i=0; i < prefWidget->provider->count(); i++) { if (prefWidget->provider->text(i) == pName) @@ -136,27 +136,27 @@ void SMSClient::savePreferences() { KConfigGroup* c = m_account->configGroup(); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"), prefWidget->program->url()); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ConfigDir"), prefWidget->configDir->url()); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"), prefWidget->provider->currentText()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"), prefWidget->program->url()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ConfigDir"), prefWidget->configDir->url()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"), prefWidget->provider->currentText()); } } -QStringList SMSClient::providers() +TQStringList SMSClient::providers() { - QStringList p; + TQStringList p; - QDir d; - d.setPath(QString("%1/services/").arg(prefWidget->configDir->url())); - p += d.entryList("*", QDir::Files); + TQDir d; + d.setPath(TQString("%1/services/").arg(prefWidget->configDir->url())); + p += d.entryList("*", TQDir::Files); return p; } void SMSClient::slotReceivedOutput(KProcess*, char *buffer, int buflen) { - QStringList lines = QStringList::split("\n", QString::fromLocal8Bit(buffer, buflen)); - for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) + TQStringList lines = TQStringList::split("\n", TQString::fromLocal8Bit(buffer, buflen)); + for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) output.append(*it); } @@ -173,9 +173,9 @@ int SMSClient::maxSize() return 160; } -const QString& SMSClient::description() +const TQString& SMSClient::description() { - QString url = "http://www.smsclient.org"; + TQString url = "http://www.smsclient.org"; m_description = i18n("SMSClient is a program for sending SMS with the modem. The program can be found on %1").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/smsclient.h b/kopete/protocols/sms/services/smsclient.h index bc260228..1f8bfdce 100644 --- a/kopete/protocols/sms/services/smsclient.h +++ b/kopete/protocols/sms/services/smsclient.h @@ -20,8 +20,8 @@ #include "smsservice.h" #include "kopetemessage.h" -#include -#include +#include +#include class SMSClientPrefsUI; class SMSContact; @@ -36,10 +36,10 @@ public: ~SMSClient(); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); @@ -51,15 +51,15 @@ signals: void messageSent(const Kopete::Message &); private: - QWidget* configureWidget(QWidget* parent); + TQWidget* configureWidget(TQWidget* parent); SMSClientPrefsUI* prefWidget; - QStringList providers(); - QStringList output; + TQStringList providers(); + TQStringList output; Kopete::Message m_msg; - QString m_description; + TQString m_description; } ; #endif //SMSCLIENT_H diff --git a/kopete/protocols/sms/services/smssend.cpp b/kopete/protocols/sms/services/smssend.cpp index f3ea258c..2e843dea 100644 --- a/kopete/protocols/sms/services/smssend.cpp +++ b/kopete/protocols/sms/services/smssend.cpp @@ -14,11 +14,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -50,7 +50,7 @@ SMSSend::~SMSSend() void SMSSend::send(const Kopete::Message& msg) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; - QString provider = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + TQString provider = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); if (provider.length() < 1) { @@ -58,7 +58,7 @@ void SMSSend::send(const Kopete::Message& msg) return; } - QString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + TQString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) { KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("No prefix set for SMSSend, please change it in the configuration dialog."), i18n("No Prefix")); @@ -67,13 +67,13 @@ void SMSSend::send(const Kopete::Message& msg) m_provider = new SMSSendProvider(provider, prefix, m_account, this); - QObject::connect( m_provider, SIGNAL(messageSent(const Kopete::Message &)), this, SIGNAL(messageSent(const Kopete::Message &))); - QObject::connect( m_provider, SIGNAL(messageNotSent(const Kopete::Message &, const QString &)), this, SIGNAL(messageNotSent(const Kopete::Message &, const QString &))); + TQObject::connect( m_provider, TQT_SIGNAL(messageSent(const Kopete::Message &)), this, TQT_SIGNAL(messageSent(const Kopete::Message &))); + TQObject::connect( m_provider, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &)), this, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &))); m_provider->send(msg); } -void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void SMSSend::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { kdWarning( 14160 ) << k_funcinfo << "ml: " << layout << ", " << "mp: " << parent << endl; m_parent = parent; @@ -86,13 +86,13 @@ void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) prefWidget->program->setMode(KFile::Directory); - QString prefix = QString::null; + TQString prefix = TQString::null; if (m_account) - prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) { - QDir d("/usr/share/smssend"); + TQDir d("/usr/share/smssend"); if (d.exists()) { prefix = "/usr"; @@ -108,13 +108,13 @@ void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) } } - QObject::connect (prefWidget->program, SIGNAL(textChanged(const QString &)), - this, SLOT(loadProviders(const QString&))); + TQObject::connect (prefWidget->program, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(loadProviders(const TQString&))); prefWidget->program->setURL(prefix); - QObject::connect(prefWidget->provider, SIGNAL(activated(const QString &)), - this, SLOT(setOptions(const QString &))); + TQObject::connect(prefWidget->provider, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(setOptions(const TQString &))); prefWidget->show(); } @@ -129,38 +129,38 @@ void SMSSend::savePreferences() } } -void SMSSend::loadProviders(const QString &prefix) +void SMSSend::loadProviders(const TQString &prefix) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero)" << endl; - QStringList p; + TQStringList p; prefWidget->provider->clear(); - QDir d(prefix + "/share/smssend"); + TQDir d(prefix + "/share/smssend"); if (!d.exists()) { - setOptions(QString::null); + setOptions(TQString::null); return; } p = d.entryList("*.sms"); - d = QDir::homeDirPath()+"/.smssend/"; + d = TQDir::homeDirPath()+"/.smssend/"; - QStringList tmp(d.entryList("*.sms")); + TQStringList tmp(d.entryList("*.sms")); - for (QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) + for (TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) p.prepend(*it); - for (QStringList::iterator it = p.begin(); it != p.end(); ++it) + for (TQStringList::iterator it = p.begin(); it != p.end(); ++it) (*it).truncate((*it).length()-4); prefWidget->provider->insertStringList(p); bool found = false; if (m_account) - { QString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + { TQString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); for (int i=0; i < prefWidget->provider->count(); i++) { if (prefWidget->provider->text(i) == pName) @@ -176,7 +176,7 @@ void SMSSend::loadProviders(const QString &prefix) setOptions(prefWidget->provider->currentText()); } -void SMSSend::setOptions(const QString& name) +void SMSSend::setOptions(const TQString& name) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero!!)" << endl; if(!prefWidget) return; // sanity check @@ -195,9 +195,9 @@ void SMSSend::setOptions(const QString& name) { if (!m_provider->name(i).isNull()) { - QLabel *l = new QLabel(m_parent); + TQLabel *l = new TQLabel(m_parent); l->setText("&" + m_provider->name(i) + ":"); - QToolTip::add(l, m_provider->description(i)); + TQToolTip::add(l, m_provider->description(i)); m_layout->addWidget(l, i+2, 0); KLineEdit *e = new KLineEdit(m_parent); e->setText(m_provider->value(i)); @@ -206,7 +206,7 @@ void SMSSend::setOptions(const QString& name) labels.append(l); l->setBuddy(e); if(m_provider->isHidden(i)) - e->setEchoMode(QLineEdit::Password); + e->setEchoMode(TQLineEdit::Password); e->show(); l->show(); } @@ -222,10 +222,10 @@ int SMSSend::maxSize() { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; - QString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + TQString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); if (pName.length() < 1) return 160; - QString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + TQString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) prefix = "/usr"; // quick sanity check @@ -234,9 +234,9 @@ int SMSSend::maxSize() return m_provider->maxSize(); } -const QString& SMSSend::description() +const TQString& SMSSend::description() { - QString url = "http://zekiller.skytech.org/smssend_en.php"; + TQString url = "http://zekiller.skytech.org/smssend_en.php"; m_description = i18n("SMSSend is a program for sending SMS through gateways on the web. It can be found on %2").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/smssend.h b/kopete/protocols/sms/services/smssend.h index 556a21ea..2eefb014 100644 --- a/kopete/protocols/sms/services/smssend.h +++ b/kopete/protocols/sms/services/smssend.h @@ -17,9 +17,9 @@ #ifndef SMSSEND_H #define SMSSEND_H -#include -#include -#include +#include +#include +#include #include @@ -40,27 +40,27 @@ public: virtual void setAccount(Kopete::Account* account); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); private slots: - void setOptions(const QString& name); - void loadProviders(const QString& prefix); + void setOptions(const TQString& name); + void loadProviders(const TQString& prefix); //signals: // void messageSent(const Kopete::Message&); private: - QGridLayout *settingsBoxLayout; + TQGridLayout *settingsBoxLayout; SMSSendProvider* m_provider; SMSSendPrefsUI* prefWidget; - QPtrList args; - QPtrList labels; - QString m_description; + TQPtrList args; + TQPtrList labels; + TQString m_description; } ; #endif //SMSSEND_H diff --git a/kopete/protocols/sms/services/smssendprovider.cpp b/kopete/protocols/sms/services/smssendprovider.cpp index 82827aab..5f0f37ee 100644 --- a/kopete/protocols/sms/services/smssendprovider.cpp +++ b/kopete/protocols/sms/services/smssendprovider.cpp @@ -14,9 +14,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -32,8 +32,8 @@ #include "smsprotocol.h" #include "smscontact.h" -SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent, const char *name) - : QObject( parent, name ), m_account(account) +SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent, const char *name) + : TQObject( parent, name ), m_account(account) { kdWarning( 14160 ) << k_funcinfo << "this = " << this << ", m_account = " << m_account << " (should be ok if zero!!)" << endl; @@ -44,14 +44,14 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre messagePos = -1; telPos = -1; - QString file = prefix + "/share/smssend/" + provider + ".sms"; - QFile f(file); + TQString file = prefix + "/share/smssend/" + provider + ".sms"; + TQFile f(file); if (f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString group = QString("SMSSend-%1").arg(provider); + TQTextStream t(&f); + TQString group = TQString("SMSSend-%1").arg(provider); bool exactNumberMatch = false; - QStringList numberWords; + TQStringList numberWords; numberWords.append("Tel"); numberWords.append("Number"); numberWords.append("number"); @@ -65,11 +65,11 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre while( !t.eof()) { - QString s = t.readLine(); + TQString s = t.readLine(); if( s[0] == '%') { - QStringList args = QStringList::split(':',s); - QStringList options = QStringList::split(' ', args[0]); + TQStringList args = TQStringList::split(':',s); + TQStringList options = TQStringList::split(' ', args[0]); names.append(options[0].replace(0,1,"")); @@ -87,8 +87,8 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre descriptions.append(args[1]); if (m_account) - values.append(m_account->configGroup()->readEntry(QString("%1:%2").arg(group).arg(names[names.count()-1]), - QString::null)); + values.append(m_account->configGroup()->readEntry(TQString("%1:%2").arg(group).arg(names[names.count()-1]), + TQString::null)); else values.append(""); @@ -100,7 +100,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre { if (options[i].contains("Size=")) { - QString option = options[i]; + TQString option = options[i]; option.replace(0,5,""); m_maxSize = option.toInt(); } @@ -109,7 +109,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre } else if (!exactNumberMatch) { - for (QStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it) + for (TQStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it) { if (args[0].contains(*it)) { @@ -147,20 +147,20 @@ void SMSSendProvider::setAccount(Kopete::Account *account) m_account = account; } -const QString& SMSSendProvider::name(int i) +const TQString& SMSSendProvider::name(int i) { if ( telPos == i || messagePos == i) - return QString::null; + return TQString::null; else return names[i]; } -const QString& SMSSendProvider::value(int i) +const TQString& SMSSendProvider::value(int i) { return values[i]; } -const QString& SMSSendProvider::description(int i) +const TQString& SMSSendProvider::description(int i) { return descriptions[i]; } @@ -170,12 +170,12 @@ const bool SMSSendProvider::isHidden(int i) return isHiddens[i]; } -void SMSSendProvider::save(QPtrList& args) +void SMSSendProvider::save(TQPtrList& args) { kdDebug( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; if (!m_account) return; // prevent crash in worst case - QString group = QString("SMSSend-%1").arg(provider); + TQString group = TQString("SMSSend-%1").arg(provider); int namesI=0; for (unsigned i=0; i < args.count(); i++) @@ -194,7 +194,7 @@ void SMSSendProvider::save(QPtrList& args) // kdDebug(14160) << k_funcinfo << "saving " << args.at(i) << " to " << names[namesI] << endl; if (!args.at(i)->text().isEmpty()) { values[namesI] = args.at(i)->text(); - m_account->configGroup()->writeEntry(QString("%1:%2").arg(group).arg(names[namesI]), values[namesI]); + m_account->configGroup()->writeEntry(TQString("%1:%2").arg(group).arg(names[namesI]), values[namesI]); } namesI++; } @@ -228,8 +228,8 @@ void SMSSendProvider::send(const Kopete::Message& msg) m_msg = msg; - QString message = msg.plainBody(); - QString nr = dynamic_cast(msg.to().first())->qualifiedNumber(); + TQString message = msg.plainBody(); + TQString nr = dynamic_cast(msg.to().first())->qualifiedNumber(); if (canSend = false) return; @@ -239,14 +239,14 @@ void SMSSendProvider::send(const Kopete::Message& msg) KProcess* p = new KProcess; - kdWarning( 14160 ) << "Executing " << QString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl; + kdWarning( 14160 ) << "Executing " << TQString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl; - *p << QString("%1/bin/smssend").arg(prefix) << provider << values; + *p << TQString("%1/bin/smssend").arg(prefix) << provider << values; output = ""; - connect( p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess *))); - connect( p, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int))); -// connect( p, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int))); + connect( p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess *))); + connect( p, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int))); +// connect( p, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int))); p->start(KProcess::NotifyOnExit, KProcess::AllOutput); } @@ -257,15 +257,15 @@ void SMSSendProvider::slotSendFinished(KProcess *p) if (p->exitStatus() == 0) emit messageSent(m_msg); else - emit messageNotSent(m_msg, QString().setLatin1(output)); + emit messageNotSent(m_msg, TQString().setLatin1(output)); p->deleteLater(); } void SMSSendProvider::slotReceivedOutput(KProcess *, char *buffer, int buflen) { -// QStringList lines = QStringList::split("\n", QString::fromLocal8Bit(buffer, buflen)); -// for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) +// TQStringList lines = TQStringList::split("\n", TQString::fromLocal8Bit(buffer, buflen)); +// for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) for(int i = 0; i < buflen; i++) output += buffer[i]; kdWarning( 14160 ) << k_funcinfo << " output now = " << output << endl; diff --git a/kopete/protocols/sms/services/smssendprovider.h b/kopete/protocols/sms/services/smssendprovider.h index 8560be15..bd046104 100644 --- a/kopete/protocols/sms/services/smssendprovider.h +++ b/kopete/protocols/sms/services/smssendprovider.h @@ -17,11 +17,11 @@ #ifndef SMSSENDPROVIDER_H #define SMSSENDPROVIDER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -37,18 +37,18 @@ class SMSSendProvider : public QObject { Q_OBJECT public: - SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent = 0, const char* name = 0); + SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent = 0, const char* name = 0); ~SMSSendProvider(); void setAccount(Kopete::Account *account); int count(); - const QString& name(int i); - const QString& value(int i); - const QString& description(int i); + const TQString& name(int i); + const TQString& value(int i); + const TQString& description(int i); const bool isHidden(int i); - void save(QPtrList& args); + void save(TQPtrList& args); void send(const Kopete::Message& msg); int maxSize(); @@ -56,18 +56,18 @@ private slots: void slotReceivedOutput(KProcess*, char *buffer, int buflen); void slotSendFinished(KProcess*); private: - QStringList names; - QStringList descriptions; - QStringList values; - QValueList isHiddens; + TQStringList names; + TQStringList descriptions; + TQStringList values; + TQValueList isHiddens; int messagePos; int telPos; int m_maxSize; - QString provider; - QString prefix; - QCString output; + TQString provider; + TQString prefix; + TQCString output; Kopete::Account* m_account; @@ -76,7 +76,7 @@ private: bool canSend; signals: void messageSent(const Kopete::Message& msg); - void messageNotSent(const Kopete::Message& msg, const QString &error); + void messageNotSent(const Kopete::Message& msg, const TQString &error); } ; #endif //SMSSENDPROVIDER_H diff --git a/kopete/protocols/sms/smsaccount.cpp b/kopete/protocols/sms/smsaccount.cpp index 5a13dca2..8fea6a12 100644 --- a/kopete/protocols/sms/smsaccount.cpp +++ b/kopete/protocols/sms/smsaccount.cpp @@ -34,24 +34,24 @@ #include "smsprotocol.h" #include "smscontact.h" -SMSAccount::SMSAccount( SMSProtocol *parent, const QString &accountID, const char *name ) +SMSAccount::SMSAccount( SMSProtocol *parent, const TQString &accountID, const char *name ) : Kopete::Account( parent, accountID, name ) { setMyself( new SMSContact(this, accountID, accountID, Kopete::ContactList::self()->myself()) ); loadConfig(); myself()->setOnlineStatus( SMSProtocol::protocol()->SMSOffline ); - QString sName = configGroup()->readEntry("ServiceName", QString::null); + TQString sName = configGroup()->readEntry("ServiceName", TQString::null); theService = ServiceLoader::loadService(sName, this); if( theService ) { - QObject::connect (theService, SIGNAL(messageSent(const Kopete::Message &)), - this, SLOT(slotSendingSuccess(const Kopete::Message &))); - QObject::connect (theService, SIGNAL(messageNotSent(const Kopete::Message &, const QString &)), - this, SLOT(slotSendingFailure(const Kopete::Message &, const QString &))); - QObject::connect (theService, SIGNAL(connected()), this, SLOT(slotConnected())); - QObject::connect (theService, SIGNAL(disconnected()), this, SLOT(slotDisconnected())); + TQObject::connect (theService, TQT_SIGNAL(messageSent(const Kopete::Message &)), + this, TQT_SLOT(slotSendingSuccess(const Kopete::Message &))); + TQObject::connect (theService, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &)), + this, TQT_SLOT(slotSendingFailure(const Kopete::Message &, const TQString &))); + TQObject::connect (theService, TQT_SIGNAL(connected()), this, TQT_SLOT(slotConnected())); + TQObject::connect (theService, TQT_SIGNAL(disconnected()), this, TQT_SLOT(slotDisconnected())); } } @@ -65,13 +65,13 @@ SMSAccount::~SMSAccount() void SMSAccount::loadConfig() { theSubEnable = configGroup()->readBoolEntry("SubEnable", false); - theSubCode = configGroup()->readEntry("SubCode", QString::null); + theSubCode = configGroup()->readEntry("SubCode", TQString::null); theLongMsgAction = (SMSMsgAction)configGroup()->readNumEntry("MsgAction", 0); } -void SMSAccount::translateNumber(QString &theNumber) +void SMSAccount::translateNumber(TQString &theNumber) { - if(theNumber[0] == QChar('0') && theSubEnable) + if(theNumber[0] == TQChar('0') && theSubEnable) theNumber.replace(0, 1, theSubCode); } @@ -90,7 +90,7 @@ const bool SMSAccount::splitNowMsgTooLong(int msgLength) return false; } -void SMSAccount::setAway( bool /*away*/, const QString &) +void SMSAccount::setAway( bool /*away*/, const TQString &) { } @@ -138,7 +138,7 @@ void SMSAccount::slotSendMessage(Kopete::Message &msg) { for (int i=0; i < msgLength / theService->maxSize() + 1; i++) { - QString text = msg.plainBody(); + TQString text = msg.plainBody(); text = text.mid( theService->maxSize() * i, theService->maxSize() ); Kopete::Message m( msg.from(), msg.to(), text, Kopete::Message::Outbound); @@ -162,14 +162,14 @@ void SMSAccount::slotSendingSuccess(const Kopete::Message &msg) c->slotSendingSuccess(msg); } -void SMSAccount::slotSendingFailure(const Kopete::Message &msg, const QString &error) +void SMSAccount::slotSendingFailure(const Kopete::Message &msg, const TQString &error) { SMSContact* c = dynamic_cast(msg.to().first()); if( c ) c->slotSendingFailure(msg, error); } -bool SMSAccount::createContact( const QString &contactId, +bool SMSAccount::createContact( const TQString &contactId, Kopete::MetaContact * parentContact ) { if (new SMSContact(this, contactId, parentContact->displayName(), parentContact)) @@ -184,7 +184,7 @@ KActionMenu* SMSAccount::actionMenu() return theActionMenu; } -void SMSAccount::setOnlineStatus( const Kopete::OnlineStatus & status , const QString &reason) +void SMSAccount::setOnlineStatus( const Kopete::OnlineStatus & status , const TQString &reason) { if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Online ) connect(); diff --git a/kopete/protocols/sms/smsaccount.h b/kopete/protocols/sms/smsaccount.h index 2547fe6c..1df8a63f 100644 --- a/kopete/protocols/sms/smsaccount.h +++ b/kopete/protocols/sms/smsaccount.h @@ -32,14 +32,14 @@ class SMSAccount : public Kopete::Account Q_OBJECT public: - SMSAccount( SMSProtocol *parent, const QString &accountID, const char *name = 0L ); + SMSAccount( SMSProtocol *parent, const TQString &accountID, const char *name = 0L ); ~SMSAccount(); virtual KActionMenu* actionMenu(); // Per-protocol actions for the systray and the status bar - virtual void setAway( bool away, const QString & ); + virtual void setAway( bool away, const TQString & ); - void translateNumber(QString &theNumber); + void translateNumber(TQString &theNumber); /** * Checks to see if the message should be split or not, in case it is too long. @@ -52,7 +52,7 @@ public: public slots: void loadConfig(); - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); public slots: virtual void connect(const Kopete::OnlineStatus& initial= Kopete::OnlineStatus()); @@ -61,17 +61,17 @@ public slots: protected slots: virtual void slotSendingSuccess(const Kopete::Message &msg); - virtual void slotSendingFailure(const Kopete::Message &msg, const QString &error); + virtual void slotSendingFailure(const Kopete::Message &msg, const TQString &error); virtual void slotConnected(); virtual void slotDisconnected(); protected: - bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); private: bool theSubEnable; - QString theSubCode; + TQString theSubCode; SMSMsgAction theLongMsgAction; SMSService* theService; }; diff --git a/kopete/protocols/sms/smsaddcontactpage.cpp b/kopete/protocols/sms/smsaddcontactpage.cpp index 55921b49..c18e5866 100644 --- a/kopete/protocols/sms/smsaddcontactpage.cpp +++ b/kopete/protocols/sms/smsaddcontactpage.cpp @@ -17,15 +17,15 @@ #include "smsaddcontactpage.h" #include "kopeteaccount.h" -#include -#include +#include +#include -SMSAddContactPage::SMSAddContactPage(QWidget *parent, const char *name ) +SMSAddContactPage::SMSAddContactPage(TQWidget *parent, const char *name ) : AddContactPage(parent,name) { - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); smsdata = new smsAddUI(this); } @@ -38,8 +38,8 @@ bool SMSAddContactPage::apply(Kopete::Account* a, Kopete::MetaContact* m) { if ( validateData() ) { - QString nr = smsdata->addNr->text(); - QString name = smsdata->addName->text(); + TQString nr = smsdata->addNr->text(); + TQString name = smsdata->addName->text(); return a->addContact( nr, m, Kopete::Account::ChangeKABC ); } diff --git a/kopete/protocols/sms/smsaddcontactpage.h b/kopete/protocols/sms/smsaddcontactpage.h index 37843bc9..6f6f4290 100644 --- a/kopete/protocols/sms/smsaddcontactpage.h +++ b/kopete/protocols/sms/smsaddcontactpage.h @@ -16,9 +16,9 @@ #ifndef SMSADDCONTACTPAGE_H #define SMSADDCONTACTPAGE_H -#include +#include #include -#include +#include class smsAddUI; class SMSProtocol; @@ -27,7 +27,7 @@ class SMSAddContactPage : public AddContactPage { Q_OBJECT public: - SMSAddContactPage(QWidget *parent=0, const char *name=0); + SMSAddContactPage(TQWidget *parent=0, const char *name=0); ~SMSAddContactPage(); smsAddUI *smsdata; virtual bool validateData(); diff --git a/kopete/protocols/sms/smscontact.cpp b/kopete/protocols/sms/smscontact.cpp index d220b380..f47a0b46 100644 --- a/kopete/protocols/sms/smscontact.cpp +++ b/kopete/protocols/sms/smscontact.cpp @@ -31,8 +31,8 @@ #include "smsaccount.h" #include "smsuserpreferences.h" -SMSContact::SMSContact( Kopete::Account* _account, const QString &phoneNumber, - const QString &displayName, Kopete::MetaContact *parent ) +SMSContact::SMSContact( Kopete::Account* _account, const TQString &phoneNumber, + const TQString &displayName, Kopete::MetaContact *parent ) : Kopete::Contact( _account, phoneNumber, parent ), m_phoneNumber( phoneNumber ) { // kdWarning( 14160 ) << k_funcinfo << " this = " << this << ", phone = " << phoneNumber << endl; @@ -51,7 +51,7 @@ void SMSContact::slotSendingSuccess(const Kopete::Message &msg) manager(Kopete::Contact::CanCreate)->appendMessage((Kopete::Message &)msg); } -void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const QString &error) +void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const TQString &error) { KMessageBox::detailedError(Kopete::UI::Global::mainWidget(), i18n("Something went wrong when sending message."), error, i18n("Could Not Send Message")); @@ -60,8 +60,8 @@ void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const QStrin manager(Kopete::Contact::CanCreate)->messageSucceeded(); } -void SMSContact::serialize( QMap &serializedData, - QMap & /* addressBookData */ ) +void SMSContact::serialize( TQMap &serializedData, + TQMap & /* addressBookData */ ) { // Contact id and display name are already set for us if (m_phoneNumber != contactId()) @@ -76,12 +76,12 @@ Kopete::ChatSession* SMSContact::manager( Kopete::Contact::CanCreateFlags canCre } else { - QPtrList contacts; + TQPtrList contacts; contacts.append(this); m_msgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), contacts, protocol()); - connect(m_msgManager, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), - account(), SLOT(slotSendMessage(Kopete::Message&))); - connect(m_msgManager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_msgManager, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), + account(), TQT_SLOT(slotSendMessage(Kopete::Message&))); + connect(m_msgManager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); return m_msgManager; } } @@ -101,29 +101,29 @@ void SMSContact::deleteContact() deleteLater(); } -const QString SMSContact::qualifiedNumber() +const TQString SMSContact::qualifiedNumber() { - QString number = m_phoneNumber; + TQString number = m_phoneNumber; dynamic_cast(account())->translateNumber(number); return number; } -const QString &SMSContact::phoneNumber() +const TQString &SMSContact::phoneNumber() { return m_phoneNumber; } -void SMSContact::setPhoneNumber( const QString phoneNumber ) +void SMSContact::setPhoneNumber( const TQString phoneNumber ) { deleteLater(); new SMSContact(account(), phoneNumber, nickName(), metaContact()); } -QPtrList* SMSContact::customContextMenuActions() +TQPtrList* SMSContact::customContextMenuActions() { - QPtrList *m_actionCollection = new QPtrList(); + TQPtrList *m_actionCollection = new TQPtrList(); if( !m_actionPrefs ) - m_actionPrefs = new KAction(i18n("&Contact Settings"), 0, this, SLOT(userPrefs()), this, "userPrefs"); + m_actionPrefs = new KAction(i18n("&Contact Settings"), 0, this, TQT_SLOT(userPrefs()), this, "userPrefs"); m_actionCollection->append( m_actionPrefs ); diff --git a/kopete/protocols/sms/smscontact.h b/kopete/protocols/sms/smscontact.h index b47d2bd9..548aa063 100644 --- a/kopete/protocols/sms/smscontact.h +++ b/kopete/protocols/sms/smscontact.h @@ -20,7 +20,7 @@ #include "kopetecontact.h" #include "kopetemessage.h" -#include +#include class SMSAccount; namespace Kopete { class ChatSession; } @@ -33,20 +33,20 @@ class SMSContact : public Kopete::Contact { Q_OBJECT public: - SMSContact( Kopete::Account* _account, const QString &phoneNumber, - const QString &displayName, Kopete::MetaContact *parent ); + SMSContact( Kopete::Account* _account, const TQString &phoneNumber, + const TQString &displayName, Kopete::MetaContact *parent ); - QPtrList* customContextMenuActions(); + TQPtrList* customContextMenuActions(); - const QString &phoneNumber(); - void setPhoneNumber( const QString phoneNumber ); - const QString qualifiedNumber(); + const TQString &phoneNumber(); + void setPhoneNumber( const TQString phoneNumber ); + const TQString qualifiedNumber(); /** * Serialize contact */ - virtual void serialize( QMap &serializedData, - QMap &addressBookData ); + virtual void serialize( TQMap &serializedData, + TQMap &addressBookData ); Kopete::ChatSession* manager( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CanCreate ); @@ -54,7 +54,7 @@ public slots: virtual void slotUserInfo(); virtual void deleteContact(); void slotSendingSuccess(const Kopete::Message &msg); - void slotSendingFailure(const Kopete::Message &msg, const QString &error); + void slotSendingFailure(const Kopete::Message &msg, const TQString &error); private slots: void userPrefs(); @@ -63,7 +63,7 @@ private slots: private: KAction* m_actionPrefs; - QString m_phoneNumber; + TQString m_phoneNumber; Kopete::ChatSession* m_msgManager; }; diff --git a/kopete/protocols/sms/smseditaccountwidget.cpp b/kopete/protocols/sms/smseditaccountwidget.cpp index b74c24f4..97379e75 100644 --- a/kopete/protocols/sms/smseditaccountwidget.cpp +++ b/kopete/protocols/sms/smseditaccountwidget.cpp @@ -14,13 +14,13 @@ ************************************************************************* */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -35,10 +35,10 @@ #include "smsprotocol.h" #include "smsaccount.h" -SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *account, QWidget *parent, const char */*name*/) - : QWidget(parent), KopeteEditAccountWidget(account) +SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *account, TQWidget *parent, const char */*name*/) + : TQWidget(parent), KopeteEditAccountWidget(account) { - QVBoxLayout *l = new QVBoxLayout(this, QBoxLayout::Down); + TQVBoxLayout *l = new TQVBoxLayout(this, TQBoxLayout::Down); preferencesDialog = new smsActPrefsUI(this); l->addWidget(preferencesDialog); @@ -48,25 +48,25 @@ SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Accoun m_protocol = protocol; - QString sName; + TQString sName; if (account) { preferencesDialog->accountId->setText(account->accountId()); //Disable changing the account ID for now //FIXME: Remove this when we can safely change the account ID (Matt) preferencesDialog->accountId->setDisabled(true); - sName = account->configGroup()->readEntry("ServiceName", QString::null); + sName = account->configGroup()->readEntry("ServiceName", TQString::null); preferencesDialog->subEnable->setChecked(account->configGroup()->readBoolEntry("SubEnable", false)); - preferencesDialog->subCode->setText(account->configGroup()->readEntry("SubCode", QString::null)); + preferencesDialog->subCode->setText(account->configGroup()->readEntry("SubCode", TQString::null)); preferencesDialog->ifMessageTooLong->setCurrentItem(SMSMsgAction(account->configGroup()->readNumEntry("MsgAction", 0))); } preferencesDialog->serviceName->insertStringList(ServiceLoader::services()); - connect (preferencesDialog->serviceName, SIGNAL(activated(const QString &)), - this, SLOT(setServicePreferences(const QString &))); - connect (preferencesDialog->descButton, SIGNAL(clicked()), - this, SLOT(showDescription())); + connect (preferencesDialog->serviceName, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(setServicePreferences(const TQString &))); + connect (preferencesDialog->descButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(showDescription())); for (int i=0; i < preferencesDialog->serviceName->count(); i++) @@ -108,7 +108,7 @@ Kopete::Account* SMSEditAccountWidget::apply() return account(); } -void SMSEditAccountWidget::setServicePreferences(const QString& serviceName) +void SMSEditAccountWidget::setServicePreferences(const TQString& serviceName) { delete service; delete configWidget; @@ -118,10 +118,10 @@ void SMSEditAccountWidget::setServicePreferences(const QString& serviceName) if (service == 0L) return; - connect (this, SIGNAL(saved()), service, SLOT(savePreferences())); + connect (this, TQT_SIGNAL(saved()), service, TQT_SLOT(savePreferences())); delete middleFrameLayout; - middleFrameLayout = new QGridLayout(preferencesDialog->middleFrame, 1, 2, 0, 6, "middleFrameLayout"); + middleFrameLayout = new TQGridLayout(preferencesDialog->middleFrame, 1, 2, 0, 6, "middleFrameLayout"); service->setWidgetContainer(preferencesDialog->middleFrame, middleFrameLayout); } @@ -129,7 +129,7 @@ void SMSEditAccountWidget::showDescription() { SMSService* s = ServiceLoader::loadService(preferencesDialog->serviceName->currentText(), 0L); - QString d = s->description(); + TQString d = s->description(); KMessageBox::information(Kopete::UI::Global::mainWidget(), d, i18n("Description")); } diff --git a/kopete/protocols/sms/smseditaccountwidget.h b/kopete/protocols/sms/smseditaccountwidget.h index eaf83d42..12d1bc68 100644 --- a/kopete/protocols/sms/smseditaccountwidget.h +++ b/kopete/protocols/sms/smseditaccountwidget.h @@ -17,7 +17,7 @@ #ifndef SMSEDITACCOUNTWIDGET_H #define SMSEDITACCOUNTWIDGET_H -#include +#include #include "editaccountwidget.h" class SMSProtocol; @@ -26,24 +26,24 @@ class smsActPrefsUI; namespace Kopete { class Account; } class QGridLayout; -class SMSEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class SMSEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: - SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *theAccount, QWidget *parent = 0, const char *name = 0); + SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent = 0, const char *name = 0); ~SMSEditAccountWidget(); bool validateData(); Kopete::Account* apply(); public slots: - void setServicePreferences(const QString& serviceName); + void setServicePreferences(const TQString& serviceName); void showDescription(); protected: smsActPrefsUI *preferencesDialog; - QWidget *configWidget; + TQWidget *configWidget; SMSService *service; SMSProtocol *m_protocol; - QGridLayout *middleFrameLayout; + TQGridLayout *middleFrameLayout; signals: void saved(); diff --git a/kopete/protocols/sms/smsprotocol.cpp b/kopete/protocols/sms/smsprotocol.cpp index 6b6cd838..361eba57 100644 --- a/kopete/protocols/sms/smsprotocol.cpp +++ b/kopete/protocols/sms/smsprotocol.cpp @@ -32,11 +32,11 @@ K_EXPORT_COMPONENT_FACTORY( kopete_sms, SMSProtocolFactory( "kopete_sms" ) ) SMSProtocol* SMSProtocol::s_protocol = 0L; -SMSProtocol::SMSProtocol(QObject *parent, const char *name, const QStringList &/*args*/) +SMSProtocol::SMSProtocol(TQObject *parent, const char *name, const TQStringList &/*args*/) : Kopete::Protocol( SMSProtocolFactory::instance(), parent, name ), - SMSOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online ), - SMSConnecting( Kopete::OnlineStatus::Connecting,2, this, 3, QString::null, i18n( "Connecting" ) ), - SMSOffline( Kopete::OnlineStatus::Offline, 0, this, 2, QString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ) + SMSOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online ), + SMSConnecting( Kopete::OnlineStatus::Connecting,2, this, 3, TQString::null, i18n( "Connecting" ) ), + SMSOffline( Kopete::OnlineStatus::Offline, 0, this, 2, TQString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ) { if (s_protocol) kdWarning( 14160 ) << k_funcinfo << "s_protocol already defined!" << endl; @@ -51,12 +51,12 @@ SMSProtocol::~SMSProtocol() s_protocol = 0L; } -AddContactPage *SMSProtocol::createAddContactWidget(QWidget *parent, Kopete::Account */*i*/) +AddContactPage *SMSProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account */*i*/) { return new SMSAddContactPage(parent); } -KopeteEditAccountWidget* SMSProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget* SMSProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new SMSEditAccountWidget(this, account, parent); } @@ -67,14 +67,14 @@ SMSProtocol* SMSProtocol::protocol() } Kopete::Contact *SMSProtocol::deserializeContact(Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &/* addressBookData */) + const TQMap &serializedData, + const TQMap &/* addressBookData */) { - QString contactId = serializedData["contactId"]; - QString accountId = serializedData["accountId"]; - QString displayName = serializedData["displayName"]; + TQString contactId = serializedData["contactId"]; + TQString accountId = serializedData["accountId"]; + TQString displayName = serializedData["displayName"]; - QDict accounts=Kopete::AccountManager::self()->accounts(this); + TQDict accounts=Kopete::AccountManager::self()->accounts(this); Kopete::Account *account = accounts[accountId]; if (!account) @@ -86,7 +86,7 @@ Kopete::Contact *SMSProtocol::deserializeContact(Kopete::MetaContact *metaContac return new SMSContact(account, contactId, displayName, metaContact); } -Kopete::Account* SMSProtocol::createNewAccount(const QString &accountId) +Kopete::Account* SMSProtocol::createNewAccount(const TQString &accountId) { return new SMSAccount(this, accountId); } diff --git a/kopete/protocols/sms/smsprotocol.h b/kopete/protocols/sms/smsprotocol.h index 1d4aaa40..411fa934 100644 --- a/kopete/protocols/sms/smsprotocol.h +++ b/kopete/protocols/sms/smsprotocol.h @@ -17,12 +17,12 @@ #ifndef SMSPROTOCOL_H #define SMSPROTOCOL_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kopeteprotocol.h" #include "kopeteonlinestatus.h" @@ -42,7 +42,7 @@ class SMSProtocol : public Kopete::Protocol Q_OBJECT public: - SMSProtocol(QObject *parent, const char *name, const QStringList &args); + SMSProtocol(TQObject *parent, const char *name, const TQStringList &args); ~SMSProtocol(); static SMSProtocol *protocol(); @@ -51,11 +51,11 @@ public: * Deserialize contact data */ virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, - const QMap &serializedData, const QMap &addressBookData ); + const TQMap &serializedData, const TQMap &addressBookData ); - virtual AddContactPage *createAddContactWidget(QWidget *parent , Kopete::Account *i); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget *parent , Kopete::Account *i); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); const Kopete::OnlineStatus SMSOnline; const Kopete::OnlineStatus SMSOffline; diff --git a/kopete/protocols/sms/smsservice.cpp b/kopete/protocols/sms/smsservice.cpp index 81b46533..5fe4bb1a 100644 --- a/kopete/protocols/sms/smsservice.cpp +++ b/kopete/protocols/sms/smsservice.cpp @@ -14,14 +14,14 @@ ************************************************************************* */ -#include +#include #include #include "smsservice.h" SMSService::SMSService(Kopete::Account* account) - : QObject(), m_account(account) + : TQObject(), m_account(account) { } diff --git a/kopete/protocols/sms/smsservice.h b/kopete/protocols/sms/smsservice.h index f1c04470..5a1b0561 100644 --- a/kopete/protocols/sms/smsservice.h +++ b/kopete/protocols/sms/smsservice.h @@ -17,9 +17,9 @@ #ifndef SMSSERVICE_H #define SMSSERVICE_H -#include -#include -#include +#include +#include +#include #include "kopetemessage.h" @@ -48,11 +48,11 @@ public: * settings widget's parent and @param layout is the 2xn grid layout it may * use. */ - virtual void setWidgetContainer(QWidget* parent, QGridLayout* layout) = 0; + virtual void setWidgetContainer(TQWidget* parent, TQGridLayout* layout) = 0; virtual void send(const Kopete::Message& msg) = 0; virtual int maxSize() = 0; - virtual const QString& description() = 0; + virtual const TQString& description() = 0; public slots: virtual void savePreferences() = 0; @@ -61,14 +61,14 @@ public slots: signals: void messageSent(const Kopete::Message &); - void messageNotSent(const Kopete::Message &, const QString &); + void messageNotSent(const Kopete::Message &, const TQString &); void connected(); void disconnected(); protected: Kopete::Account* m_account; - QGridLayout* m_layout; - QWidget* m_parent; + TQGridLayout* m_layout; + TQWidget* m_parent; }; #endif //SMSSERVICE_H diff --git a/kopete/protocols/sms/smsuserpreferences.cpp b/kopete/protocols/sms/smsuserpreferences.cpp index 89677080..7c3e799c 100644 --- a/kopete/protocols/sms/smsuserpreferences.cpp +++ b/kopete/protocols/sms/smsuserpreferences.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include #include diff --git a/kopete/protocols/sms/smsuserpreferences.h b/kopete/protocols/sms/smsuserpreferences.h index 29fb6dd2..7331c53a 100644 --- a/kopete/protocols/sms/smsuserpreferences.h +++ b/kopete/protocols/sms/smsuserpreferences.h @@ -18,7 +18,7 @@ #define SMSUSERPREFERENCES_H #include -#include +#include class SMSPreferencesBase; class SMSUserPrefsUI; @@ -33,7 +33,7 @@ public: private: SMSPreferencesBase* prefBase; SMSUserPrefsUI* userPrefs; - QVBox* topWidget; + TQVBox* topWidget; SMSContact* m_contact; public slots: diff --git a/kopete/protocols/testbed/testbedaccount.cpp b/kopete/protocols/testbed/testbedaccount.cpp index fbb3462a..cc906447 100644 --- a/kopete/protocols/testbed/testbedaccount.cpp +++ b/kopete/protocols/testbed/testbedaccount.cpp @@ -29,7 +29,7 @@ #include "testbedprotocol.h" -TestbedAccount::TestbedAccount( TestbedProtocol *parent, const QString& accountID, const char *name ) +TestbedAccount::TestbedAccount( TestbedProtocol *parent, const TQString& accountID, const char *name ) : Kopete::Account ( parent, accountID , name ) { // Init the myself contact @@ -51,20 +51,20 @@ KActionMenu* TestbedAccount::actionMenu() KAction *action; - action = new KAction (i18n ("Show my own video..."), "testbed_showvideo", 0, this, SLOT (slotShowVideo ()), this, "actionShowVideo"); + action = new KAction (i18n ("Show my own video..."), "testbed_showvideo", 0, this, TQT_SLOT (slotShowVideo ()), this, "actionShowVideo"); mActionMenu->insert(action); action->setEnabled( isConnected() ); return mActionMenu; } -bool TestbedAccount::createContact(const QString& contactId, Kopete::MetaContact* parentContact) +bool TestbedAccount::createContact(const TQString& contactId, Kopete::MetaContact* parentContact) { TestbedContact* newContact = new TestbedContact( this, contactId, TestbedContact::Echo, parentContact->displayName(), parentContact ); return newContact != 0L; } -void TestbedAccount::setAway( bool away, const QString & /* reason */ ) +void TestbedAccount::setAway( bool away, const TQString & /* reason */ ) { if ( away ) slotGoAway(); @@ -72,7 +72,7 @@ void TestbedAccount::setAway( bool away, const QString & /* reason */ ) slotGoOnline(); } -void TestbedAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const QString &reason ) +void TestbedAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const TQString &reason ) { if ( status.status() == Kopete::OnlineStatus::Online && myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline ) @@ -90,15 +90,15 @@ void TestbedAccount::connect( const Kopete::OnlineStatus& /* initialStatus */ ) { kdDebug ( 14210 ) << k_funcinfo << endl; myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedOnline ); - QObject::connect ( m_server, SIGNAL ( messageReceived( const QString & ) ), - this, SLOT ( receivedMessage( const QString & ) ) ); + TQObject::connect ( m_server, TQT_SIGNAL ( messageReceived( const TQString & ) ), + this, TQT_SLOT ( receivedMessage( const TQString & ) ) ); } void TestbedAccount::disconnect() { kdDebug ( 14210 ) << k_funcinfo << endl; myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedOffline ); - QObject::disconnect ( m_server, 0, 0, 0 ); + TQObject::disconnect ( m_server, 0, 0, 0 ); } TestbedFakeServer * TestbedAccount::server() @@ -147,10 +147,10 @@ void TestbedAccount::slotShowVideo () updateContactStatus(); } -void TestbedAccount::receivedMessage( const QString &message ) +void TestbedAccount::receivedMessage( const TQString &message ) { // Look up the contact the message is from - QString from; + TQString from; TestbedContact* messageSender; from = message.section( ':', 0, 0 ); @@ -167,7 +167,7 @@ void TestbedAccount::receivedMessage( const QString &message ) void TestbedAccount::updateContactStatus() { - QDictIterator itr( contacts() ); + TQDictIterator itr( contacts() ); for ( ; itr.current(); ++itr ) itr.current()->setOnlineStatus( myself()->onlineStatus() ); } diff --git a/kopete/protocols/testbed/testbedaccount.h b/kopete/protocols/testbed/testbedaccount.h index 34429300..52261cb7 100644 --- a/kopete/protocols/testbed/testbedaccount.h +++ b/kopete/protocols/testbed/testbedaccount.h @@ -36,7 +36,7 @@ class TestbedAccount : public Kopete::Account { Q_OBJECT public: - TestbedAccount( TestbedProtocol *parent, const QString& accountID, const char *name = 0 ); + TestbedAccount( TestbedProtocol *parent, const TQString& accountID, const char *name = 0 ); ~TestbedAccount(); /** * Construct the context menu used for the status bar icon @@ -47,15 +47,15 @@ public: * Creates a protocol specific Kopete::Contact subclass and adds it to the supplie * Kopete::MetaContact */ - virtual bool createContact(const QString& contactId, Kopete::MetaContact* parentContact); + virtual bool createContact(const TQString& contactId, Kopete::MetaContact* parentContact); /** * Called when Kopete is set globally away */ - virtual void setAway(bool away, const QString& reason); + virtual void setAway(bool away, const TQString& reason); /** * Called when Kopete status is changed globally */ - virtual void setOnlineStatus(const Kopete::OnlineStatus& status , const QString &reason = QString::null); + virtual void setOnlineStatus(const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); /** * 'Connect' to the testbed server. Only sets myself() online. */ @@ -73,7 +73,7 @@ public slots: * Called by the server when it has a message for us. * This identifies the sending Kopete::Contact and passes it a Kopete::Message */ - void receivedMessage( const QString &message ); + void receivedMessage( const TQString &message ); protected: /** diff --git a/kopete/protocols/testbed/testbedaddcontactpage.cpp b/kopete/protocols/testbed/testbedaddcontactpage.cpp index 5327b5b4..bb016453 100644 --- a/kopete/protocols/testbed/testbedaddcontactpage.cpp +++ b/kopete/protocols/testbed/testbedaddcontactpage.cpp @@ -16,9 +16,9 @@ #include "testbedaddcontactpage.h" -#include -#include -#include +#include +#include +#include #include #include "kopeteaccount.h" @@ -26,11 +26,11 @@ #include "testbedaddui.h" -TestbedAddContactPage::TestbedAddContactPage( QWidget* parent, const char* name ) +TestbedAddContactPage::TestbedAddContactPage( TQWidget* parent, const char* name ) : AddContactPage(parent, name) { kdDebug(14210) << k_funcinfo << endl; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); m_testbedAddUI = new TestbedAddUI( this ); } @@ -43,12 +43,12 @@ bool TestbedAddContactPage::apply( Kopete::Account* a, Kopete::MetaContact* m ) if ( validateData() ) { bool ok = false; - QString type; - QString name; + TQString type; + TQString name; if ( m_testbedAddUI->m_rbEcho->isOn() ) { type = m_testbedAddUI->m_uniqueName->text(); - name = QString::fromLatin1( "Echo Contact" ); + name = TQString::fromLatin1( "Echo Contact" ); ok = true; } if ( ok ) diff --git a/kopete/protocols/testbed/testbedaddcontactpage.h b/kopete/protocols/testbed/testbedaddcontactpage.h index fd7642f3..f430f559 100644 --- a/kopete/protocols/testbed/testbedaddcontactpage.h +++ b/kopete/protocols/testbed/testbedaddcontactpage.h @@ -31,7 +31,7 @@ class TestbedAddContactPage : public AddContactPage { Q_OBJECT public: - TestbedAddContactPage( QWidget* parent = 0, const char* name = 0 ); + TestbedAddContactPage( TQWidget* parent = 0, const char* name = 0 ); ~TestbedAddContactPage(); /** diff --git a/kopete/protocols/testbed/testbedcontact.cpp b/kopete/protocols/testbed/testbedcontact.cpp index b5fc1c2c..bf110872 100644 --- a/kopete/protocols/testbed/testbedcontact.cpp +++ b/kopete/protocols/testbed/testbedcontact.cpp @@ -28,8 +28,8 @@ #include "testbedfakeserver.h" #include "testbedprotocol.h" -TestbedContact::TestbedContact( Kopete::Account* _account, const QString &uniqueName, - const TestbedContactType type, const QString &displayName, Kopete::MetaContact *parent ) +TestbedContact::TestbedContact( Kopete::Account* _account, const TQString &uniqueName, + const TestbedContactType type, const TQString &displayName, Kopete::MetaContact *parent ) : Kopete::Contact( _account, uniqueName, parent ) { kdDebug( 14210 ) << k_funcinfo << " uniqueName: " << uniqueName << ", displayName: " << displayName << endl; @@ -49,9 +49,9 @@ bool TestbedContact::isReachable() return true; } -void TestbedContact::serialize( QMap< QString, QString > &serializedData, QMap< QString, QString > & /* addressBookData */ ) +void TestbedContact::serialize( TQMap< TQString, TQString > &serializedData, TQMap< TQString, TQString > & /* addressBookData */ ) { - QString value; + TQString value; switch ( m_type ) { case Null: @@ -71,23 +71,23 @@ Kopete::ChatSession* TestbedContact::manager( CanCreateFlags ) } else { - QPtrList contacts; + TQPtrList contacts; contacts.append(this); m_msgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), contacts, protocol()); - connect(m_msgManager, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), - this, SLOT( sendMessage( Kopete::Message& ) ) ); - connect(m_msgManager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_msgManager, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), + this, TQT_SLOT( sendMessage( Kopete::Message& ) ) ); + connect(m_msgManager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); return m_msgManager; } } -QPtrList *TestbedContact::customContextMenuActions() //OBSOLETE +TQPtrList *TestbedContact::customContextMenuActions() //OBSOLETE { //FIXME!!! this function is obsolete, we should use XMLGUI instead /*m_actionCollection = new KActionCollection( this, "userColl" ); m_actionPrefs = new KAction(i18n( "&Contact Settings" ), 0, this, - SLOT( showContactSettings( )), m_actionCollection, "contactSettings" ); + TQT_SLOT( showContactSettings( )), m_actionCollection, "contactSettings" ); return m_actionCollection;*/ return 0L; @@ -114,7 +114,7 @@ void TestbedContact::sendMessage( Kopete::Message &message ) manager()->messageSucceeded(); } -void TestbedContact::receivedMessage( const QString &message ) +void TestbedContact::receivedMessage( const TQString &message ) { // Create a Kopete::Message Kopete::Message *newMessage; diff --git a/kopete/protocols/testbed/testbedcontact.h b/kopete/protocols/testbed/testbedcontact.h index 7f7c168a..f6efa7ee 100644 --- a/kopete/protocols/testbed/testbedcontact.h +++ b/kopete/protocols/testbed/testbedcontact.h @@ -17,7 +17,7 @@ #ifndef TESTBEDCONTACT_H #define TESTBEDCONTACT_H -#include +#include #include "kopetecontact.h" #include "kopetemessage.h" @@ -39,8 +39,8 @@ public: */ enum TestbedContactType { Null, Echo }; - TestbedContact( Kopete::Account* _account, const QString &uniqueName, - const TestbedContact::TestbedContactType type, const QString &displayName, + TestbedContact( Kopete::Account* _account, const TQString &uniqueName, + const TestbedContact::TestbedContactType type, const TQString &displayName, Kopete::MetaContact *parent ); ~TestbedContact(); @@ -50,12 +50,12 @@ public: * Serialize the contact's data into a key-value map * suitable for writing to a file */ - virtual void serialize(QMap< QString, QString >& serializedData, - QMap< QString, QString >& addressBookData); + virtual void serialize(TQMap< TQString, TQString >& serializedData, + TQMap< TQString, TQString >& addressBookData); /** * Return the actions for this contact */ - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); /** * Returns a Kopete::ChatSession associated with this contact */ @@ -72,7 +72,7 @@ public slots: * Called when an incoming message arrived * This displays it in the chatwindow */ - void receivedMessage( const QString &message ); + void receivedMessage( const TQString &message ); protected slots: /** diff --git a/kopete/protocols/testbed/testbededitaccountwidget.cpp b/kopete/protocols/testbed/testbededitaccountwidget.cpp index 270b887a..98a52dfc 100644 --- a/kopete/protocols/testbed/testbededitaccountwidget.cpp +++ b/kopete/protocols/testbed/testbededitaccountwidget.cpp @@ -16,18 +16,18 @@ #include "testbededitaccountwidget.h" -#include -#include +#include +#include #include #include "kopeteaccount.h" #include "testbedaccountpreferences.h" #include "testbedaccount.h" #include "testbedprotocol.h" -TestbedEditAccountWidget::TestbedEditAccountWidget( QWidget* parent, Kopete::Account* account) -: QWidget( parent ), KopeteEditAccountWidget( account ) +TestbedEditAccountWidget::TestbedEditAccountWidget( TQWidget* parent, Kopete::Account* account) +: TQWidget( parent ), KopeteEditAccountWidget( account ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); kdDebug(14210) << k_funcinfo << endl; m_preferencesWidget = new TestbedAccountPreferences( this ); } @@ -38,7 +38,7 @@ TestbedEditAccountWidget::~TestbedEditAccountWidget() Kopete::Account* TestbedEditAccountWidget::apply() { - QString accountName; + TQString accountName; if ( m_preferencesWidget->m_acctName->text().isEmpty() ) accountName = "Testbed Account"; else diff --git a/kopete/protocols/testbed/testbededitaccountwidget.h b/kopete/protocols/testbed/testbededitaccountwidget.h index 9d2e6089..cbd0722a 100644 --- a/kopete/protocols/testbed/testbededitaccountwidget.h +++ b/kopete/protocols/testbed/testbededitaccountwidget.h @@ -17,7 +17,7 @@ #ifndef TESTBEDEDITACCOUNTWIDGET_H #define TESTBEDEDITACCOUNTWIDGET_H -#include +#include #include class QVBoxLayout; @@ -28,11 +28,11 @@ class TestbedAccountPreferences; * A widget for editing this protocol's accounts * @author Will Stephenson */ -class TestbedEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class TestbedEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: - TestbedEditAccountWidget( QWidget* parent, Kopete::Account* account); + TestbedEditAccountWidget( TQWidget* parent, Kopete::Account* account); ~TestbedEditAccountWidget(); diff --git a/kopete/protocols/testbed/testbedfakeserver.cpp b/kopete/protocols/testbed/testbedfakeserver.cpp index b1bb3e1e..9a4116ca 100644 --- a/kopete/protocols/testbed/testbedfakeserver.cpp +++ b/kopete/protocols/testbed/testbedfakeserver.cpp @@ -15,7 +15,7 @@ */ #include "testbedfakeserver.h" -#include +#include #include #include "testbedincomingmessage.h" @@ -29,24 +29,24 @@ TestbedFakeServer::~TestbedFakeServer() { } -void TestbedFakeServer::sendMessage( QString contactId, QString message ) +void TestbedFakeServer::sendMessage( TQString contactId, TQString message ) { // see what contact the message is for // if it's for Echo, respond immediately kdDebug( 14210 ) << k_funcinfo << "Message for: " << contactId << ", is: " << message << endl; kdDebug( 14210 ) << "recipient is echo, coming back at you." << endl; // put the message in a map and start a timer to tell it to deliver itself. - //emit messageReceived( QString::fromLatin1( "echo: " ) + message ); - QString messageId = contactId + QString::fromLatin1(": "); + //emit messageReceived( TQString::fromLatin1( "echo: " ) + message ); + TQString messageId = contactId + TQString::fromLatin1(": "); TestbedIncomingMessage* msg = new TestbedIncomingMessage( this, messageId + message ); m_incomingMessages.append( msg ); - QTimer::singleShot( 1000, msg, SLOT( deliver() ) ); + TQTimer::singleShot( 1000, msg, TQT_SLOT( deliver() ) ); // This removes any delivered messages purgeMessages(); } -void TestbedFakeServer::incomingMessage( QString message ) +void TestbedFakeServer::incomingMessage( TQString message ) { emit messageReceived( message ); } diff --git a/kopete/protocols/testbed/testbedfakeserver.h b/kopete/protocols/testbed/testbedfakeserver.h index c5daabe4..1e58031a 100644 --- a/kopete/protocols/testbed/testbedfakeserver.h +++ b/kopete/protocols/testbed/testbedfakeserver.h @@ -17,8 +17,8 @@ #ifndef TESTBEDFAKESERVER_H #define TESTBEDFAKESERVER_H -#include "qobject.h" -#include +#include "tqobject.h" +#include class TestbedIncomingMessage; @@ -35,7 +35,7 @@ public: /** * Called to simulate sending a message to a remote contact */ - void sendMessage( QString contactId, QString message ); + void sendMessage( TQString contactId, TQString message ); public slots: /** @@ -43,13 +43,13 @@ public slots: * In reality, a message on the incoming message list * connects to this slot when it's time to 'arrive' */ - void incomingMessage( QString message ); + void incomingMessage( TQString message ); signals: /** * Tells the account that a message arrived */ - void messageReceived( const QString &message ); + void messageReceived( const TQString &message ); protected: /** @@ -60,7 +60,7 @@ protected: /** * List of incoming messages */ - QPtrList m_incomingMessages; + TQPtrList m_incomingMessages; }; #endif diff --git a/kopete/protocols/testbed/testbedincomingmessage.cpp b/kopete/protocols/testbed/testbedincomingmessage.cpp index fbbd4c83..576e6c12 100644 --- a/kopete/protocols/testbed/testbedincomingmessage.cpp +++ b/kopete/protocols/testbed/testbedincomingmessage.cpp @@ -16,7 +16,7 @@ #include "testbedincomingmessage.h" -TestbedIncomingMessage::TestbedIncomingMessage( TestbedFakeServer* const server , QString message ) +TestbedIncomingMessage::TestbedIncomingMessage( TestbedFakeServer* const server , TQString message ) { m_server = server; m_message = message; diff --git a/kopete/protocols/testbed/testbedincomingmessage.h b/kopete/protocols/testbed/testbedincomingmessage.h index 226368d9..3f27510a 100644 --- a/kopete/protocols/testbed/testbedincomingmessage.h +++ b/kopete/protocols/testbed/testbedincomingmessage.h @@ -17,7 +17,7 @@ #ifndef TESTBEDINCOMINGMESSAGE_H #define TESTBEDINCOMINGMESSAGE_H -#include +#include #include "testbedfakeserver.h" /** @@ -34,7 +34,7 @@ public: * @param server The simulated Kopete side 'client' of the IM system where the message will arrive when 'delivered' * @param message The simulated message */ - TestbedIncomingMessage( TestbedFakeServer* const server , QString message ); + TestbedIncomingMessage( TestbedFakeServer* const server , TQString message ); virtual ~TestbedIncomingMessage(); /** * Has this message already been delivered? @@ -47,7 +47,7 @@ public slots: */ void deliver(); protected: - QString m_message; + TQString m_message; TestbedFakeServer* m_server; bool m_delivered; }; diff --git a/kopete/protocols/testbed/testbedprotocol.cpp b/kopete/protocols/testbed/testbedprotocol.cpp index 838a74b4..97ecaf02 100644 --- a/kopete/protocols/testbed/testbedprotocol.cpp +++ b/kopete/protocols/testbed/testbedprotocol.cpp @@ -29,11 +29,11 @@ K_EXPORT_COMPONENT_FACTORY( kopete_testbed, TestbedProtocolFactory( "kopete_test TestbedProtocol *TestbedProtocol::s_protocol = 0L; -TestbedProtocol::TestbedProtocol( QObject* parent, const char *name, const QStringList &/*args*/ ) +TestbedProtocol::TestbedProtocol( TQObject* parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Protocol( TestbedProtocolFactory::instance(), parent, name ), - testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "O&nline" ) ), + testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "O&nline" ) ), testbedAway( Kopete::OnlineStatus::Away, 25, this, 1, "msn_away", i18n( "Away" ), i18n( "&Away" ) ), - testbedOffline( Kopete::OnlineStatus::Offline, 25, this, 2, QString::null, i18n( "Offline" ), i18n( "O&ffline" ) ) + testbedOffline( Kopete::OnlineStatus::Offline, 25, this, 2, TQString::null, i18n( "Offline" ), i18n( "O&ffline" ) ) { kdDebug( 14210 ) << k_funcinfo << endl; @@ -46,23 +46,23 @@ TestbedProtocol::~TestbedProtocol() } Kopete::Contact *TestbedProtocol::deserializeContact( - Kopete::MetaContact *metaContact, const QMap &serializedData, - const QMap &/* addressBookData */) + Kopete::MetaContact *metaContact, const TQMap &serializedData, + const TQMap &/* addressBookData */) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; - QString displayName = serializedData[ "displayName" ]; - QString type = serializedData[ "contactType" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; + TQString displayName = serializedData[ "displayName" ]; + TQString type = serializedData[ "contactType" ]; TestbedContact::TestbedContactType tbcType; - if ( type == QString::fromLatin1( "echo" ) ) + if ( type == TQString::fromLatin1( "echo" ) ) tbcType = TestbedContact::Echo; - if ( type == QString::fromLatin1( "null" ) ) + if ( type == TQString::fromLatin1( "null" ) ) tbcType = TestbedContact::Null; else tbcType = TestbedContact::Null; - QDict accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[ accountId ]; if ( !account ) @@ -74,19 +74,19 @@ Kopete::Contact *TestbedProtocol::deserializeContact( return new TestbedContact(account, contactId, tbcType, displayName, metaContact); } -AddContactPage * TestbedProtocol::createAddContactWidget( QWidget *parent, Kopete::Account * /* account */ ) +AddContactPage * TestbedProtocol::createAddContactWidget( TQWidget *parent, Kopete::Account * /* account */ ) { kdDebug( 14210 ) << "Creating Add Contact Page" << endl; return new TestbedAddContactPage( parent ); } -KopeteEditAccountWidget * TestbedProtocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget * TestbedProtocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { kdDebug(14210) << "Creating Edit Account Page" << endl; return new TestbedEditAccountWidget( parent, account ); } -Kopete::Account *TestbedProtocol::createNewAccount( const QString &accountId ) +Kopete::Account *TestbedProtocol::createNewAccount( const TQString &accountId ) { return new TestbedAccount( this, accountId ); } diff --git a/kopete/protocols/testbed/testbedprotocol.h b/kopete/protocols/testbed/testbedprotocol.h index 7ee04b7d..d688e130 100644 --- a/kopete/protocols/testbed/testbedprotocol.h +++ b/kopete/protocols/testbed/testbedprotocol.h @@ -28,7 +28,7 @@ class TestbedProtocol : public Kopete::Protocol { Q_OBJECT public: - TestbedProtocol(QObject *parent, const char *name, const QStringList &args); + TestbedProtocol(TQObject *parent, const char *name, const TQStringList &args); ~TestbedProtocol(); /** * Convert the serialised data back into a TestbedContact and add this @@ -36,21 +36,21 @@ public: */ virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap< QString, QString > & serializedData, - const QMap< QString, QString > & addressBookData + const TQMap< TQString, TQString > & serializedData, + const TQMap< TQString, TQString > & addressBookData ); /** * Generate the widget needed to add TestbedContacts */ - virtual AddContactPage * createAddContactWidget( QWidget *parent, Kopete::Account *account ); + virtual AddContactPage * createAddContactWidget( TQWidget *parent, Kopete::Account *account ); /** * Generate the widget needed to add/edit accounts for this protocol */ - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); /** * Generate a TestbedAccount */ - virtual Kopete::Account * createNewAccount( const QString &accountId ); + virtual Kopete::Account * createNewAccount( const TQString &accountId ); /** * Access the instance of this protocol */ diff --git a/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp b/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp index 22884036..b6a5a3b6 100644 --- a/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp +++ b/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp @@ -18,32 +18,32 @@ #include #include "avdevice/videodevicepool.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include -TestbedWebcamDialog::TestbedWebcamDialog( const QString &contactId, QWidget * parent, const char * name ) +TestbedWebcamDialog::TestbedWebcamDialog( const TQString &contactId, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::Plain, Qt::WDestructiveClose, parent, name, false, i18n( "Webcam for %1" ).arg( contactId ), KDialogBase::Close, KDialogBase::Close, true /*seperator*/ ) { - setInitialSize( QSize(320,290), false ); + setInitialSize( TQSize(320,290), false ); setEscapeButton( KDialogBase::Close ); -// QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) ); +// TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) ); - QWidget *page = plainPage(); + TQWidget *page = plainPage(); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); mImageContainer = new Kopete::WebcamWidget( page ); mImageContainer->setMinimumSize(320,240); mImageContainer->setText( i18n( "No webcam image received" ) ); - mImageContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + mImageContainer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); topLayout->add( mImageContainer ); show(); @@ -56,10 +56,10 @@ TestbedWebcamDialog::TestbedWebcamDialog( const QString &contactId, QWidget * pa mVideoDevicePool->getImage(&mImage); kdDebug() << "Just captured 1st frame" << endl; - mPixmap=QPixmap(320,240,-1, QPixmap::DefaultOptim); + mPixmap=TQPixmap(320,240,-1, TQPixmap::DefaultOptim); if (mPixmap.convertFromImage(mImage,0) == true) mImageContainer->updatePixmap(mPixmap); - connect(&qtimer, SIGNAL(timeout()), this, SLOT(slotUpdateImage()) ); + connect(&qtimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateImage()) ); qtimer.start(0,FALSE); } @@ -73,7 +73,7 @@ void TestbedWebcamDialog::slotUpdateImage() { mVideoDevicePool->getFrame(); mVideoDevicePool->getImage(&mImage); - mImageContainer->updatePixmap( QPixmap( mImage ) ); + mImageContainer->updatePixmap( TQPixmap( mImage ) ); } diff --git a/kopete/protocols/testbed/ui/testbedwebcamdialog.h b/kopete/protocols/testbed/ui/testbedwebcamdialog.h index 59f43e68..4f7e85ab 100644 --- a/kopete/protocols/testbed/ui/testbedwebcamdialog.h +++ b/kopete/protocols/testbed/ui/testbedwebcamdialog.h @@ -17,10 +17,10 @@ #ifndef TESTBEDWEBCAMDIALOG_H #define TESTBEDWEBCAMDIALOG_H -#include -#include -#include -#include +#include +#include +#include +#include #include /** @@ -41,7 +41,7 @@ class TestbedWebcamDialog : public KDialogBase { Q_OBJECT public: - TestbedWebcamDialog( const QString &, QWidget* parent = 0, const char* name = 0 ); + TestbedWebcamDialog( const TQString &, TQWidget* parent = 0, const char* name = 0 ); ~TestbedWebcamDialog(); public slots: @@ -51,9 +51,9 @@ public slots: private: Kopete::WebcamWidget *mImageContainer; - QImage mImage; - QTimer qtimer; - QPixmap mPixmap; + TQImage mImage; + TQTimer qtimer; + TQPixmap mPixmap; Kopete::AV::VideoDevicePool *mVideoDevicePool; }; diff --git a/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp b/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp index d26e461c..9bdbee27 100644 --- a/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp +++ b/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // QT Includes -#include -#include -#include +#include +#include +#include // KDE Includes #include @@ -33,13 +33,13 @@ // Local Includes #include "libwinpopup.h" -WinPopupLib::WinPopupLib(const QString &smbClient,int groupFreq) +WinPopupLib::WinPopupLib(const TQString &smbClient,int groupFreq) : smbClientBin(smbClient), groupCheckFreq(groupFreq) { - connect(&updateGroupDataTimer, SIGNAL(timeout()), this, SLOT(slotUpdateGroupData())); + connect(&updateGroupDataTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateGroupData())); updateGroupDataTimer.start(1, true); - QTimer::singleShot(1, this, SLOT(slotStartDirLister())); + TQTimer::singleShot(1, this, TQT_SLOT(slotStartDirLister())); } WinPopupLib::~WinPopupLib() @@ -51,8 +51,8 @@ void WinPopupLib::slotStartDirLister() if (checkMessageDir()) { dirLister = new KDirLister(); dirLister->setAutoUpdate(true); - connect(dirLister, SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewMessages(const KFileItemList &))); - connect(dirLister, SIGNAL(completed()), this, SLOT(slotListCompleted())); + connect(dirLister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewMessages(const KFileItemList &))); + connect(dirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotListCompleted())); dirLister->openURL(KURL::fromPathOrURL(WP_POPUP_DIR)); } } @@ -60,11 +60,11 @@ void WinPopupLib::slotStartDirLister() /** * return the group list */ -const QStringList WinPopupLib::getGroups() +const TQStringList WinPopupLib::getGroups() { - QStringList ret; - QMap::ConstIterator end = theGroups.end(); - for(QMap::ConstIterator i = theGroups.begin(); i != end; i++) + TQStringList ret; + TQMap::ConstIterator end = theGroups.end(); + for(TQMap::ConstIterator i = theGroups.begin(); i != end; i++) ret += i.key(); return ret; @@ -73,7 +73,7 @@ const QStringList WinPopupLib::getGroups() /** * return the host list */ -const QStringList WinPopupLib::getHosts(const QString &Group) +const TQStringList WinPopupLib::getHosts(const TQString &Group) { return theGroups[Group].Hosts(); } @@ -81,13 +81,13 @@ const QStringList WinPopupLib::getHosts(const QString &Group) /** * return if a host is in the host list */ -bool WinPopupLib::checkHost(const QString &Name) +bool WinPopupLib::checkHost(const TQString &Name) { // kdDebug() << "WP checkHost: " << Name << endl; bool ret = false; - QMap::Iterator end = theGroups.end(); - for(QMap::Iterator i = theGroups.begin(); i != end && !ret; i++) { + TQMap::Iterator end = theGroups.end(); + for(TQMap::Iterator i = theGroups.begin(); i != end && !ret; i++) { if ((*i).Hosts().contains(Name.upper())) { ret = true; break; @@ -100,7 +100,7 @@ bool WinPopupLib::checkHost(const QString &Name) bool WinPopupLib::checkMessageDir() { - QDir dir(WP_POPUP_DIR); + TQDir dir(WP_POPUP_DIR); if (! dir.exists()) { int tmpYesNo = KMessageBox::warningYesNo(Kopete::UI::Global::mainWidget(), i18n("Working directory %1 does not exist.\n" @@ -108,9 +108,9 @@ bool WinPopupLib::checkMessageDir() "Install Into Samba (Configure... -> Account -> Edit) information\n" "on how to do this.\n" "Should the directory be created? (May need root password)").arg(WP_POPUP_DIR), - QString::fromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create")); + TQString::fromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c mkdir -p -m 0777 " + WP_POPUP_DIR)); + TQStringList kdesuArgs = TQStringList(TQString("-c mkdir -p -m 0777 " + WP_POPUP_DIR)); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) return true; } } else { @@ -127,9 +127,9 @@ bool WinPopupLib::checkMessageDir() "You will not receive messages if you say no.\n" "You can also correct it manually (chmod 0777 %1) and restart kopete.\n" "Fix? (May need root password)").arg(WP_POPUP_DIR), - QString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); + TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c chmod 0777 " + WP_POPUP_DIR)); + TQStringList kdesuArgs = TQStringList(TQString("-c chmod 0777 " + WP_POPUP_DIR)); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) return true; } } else { @@ -148,22 +148,22 @@ void WinPopupLib::slotUpdateGroupData() passedInitialHost = false; todo.clear(); currentGroupsMap.clear(); - currentHost = QString::fromLatin1("LOCALHOST"); + currentHost = TQString::fromLatin1("LOCALHOST"); startReadProcess(currentHost); } -void WinPopupLib::startReadProcess(const QString &Host) +void WinPopupLib::startReadProcess(const TQString &Host) { currentHosts.clear(); currentGroups.clear(); - currentGroup = QString(); + currentGroup = TQString(); // for Samba 3 KProcIO *reader = new KProcIO; *reader << smbClientBin << "-N" << "-E" << "-g" << "-L" << Host << "-"; - connect(reader, SIGNAL(readReady(KProcIO *)), this, SLOT(slotReadProcessReady(KProcIO *))); - connect(reader, SIGNAL(processExited(KProcess *)), this, SLOT(slotReadProcessExited(KProcess *))); + connect(reader, TQT_SIGNAL(readReady(KProcIO *)), this, TQT_SLOT(slotReadProcessReady(KProcIO *))); + connect(reader, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotReadProcessExited(KProcess *))); if (!reader->start(KProcess::NotifyOnExit, true)) { // still to come @@ -173,8 +173,8 @@ void WinPopupLib::startReadProcess(const QString &Host) void WinPopupLib::slotReadProcessReady(KProcIO *r) { - QString tmpLine = QString::null; - QRegExp group("^Workgroup\\|(.*)\\|(.*)$"), host("^Server\\|(.*)\\|(.*)$"), + TQString tmpLine = TQString::null; + TQRegExp group("^Workgroup\\|(.*)\\|(.*)$"), host("^Server\\|(.*)\\|(.*)$"), info("^Domain=\\[([^\\]]+)\\] OS=\\[([^\\]]+)\\] Server=\\[([^\\]]+)\\]"), error("Connection.*failed"); @@ -184,7 +184,7 @@ void WinPopupLib::slotReadProcessReady(KProcIO *r) if (group.search(tmpLine) != -1) currentGroups[group.cap(1)] = group.cap(2); if (error.search(tmpLine) != -1) { kdDebug(14170) << "Connection to " << currentHost << " failed!" << endl; - if (currentHost == QString::fromLatin1("LOCALHOST")) currentHost = QString::fromLatin1("failed"); // to be sure + if (currentHost == TQString::fromLatin1("LOCALHOST")) currentHost = TQString::fromLatin1("failed"); // to be sure } } } @@ -203,11 +203,11 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) done += currentHost; if (!currentGroups.isEmpty()) { - QMap newGroups; + TQMap newGroups; //loop through the read groups and check for new ones - QMap::ConstIterator end = currentGroups.end(); - for (QMap::ConstIterator i = currentGroups.begin(); i != end; i++) { - QString groupMaster = i.data(); + TQMap::ConstIterator end = currentGroups.end(); + for (TQMap::ConstIterator i = currentGroups.begin(); i != end; i++) { + TQString groupMaster = i.data(); if (!done.contains(groupMaster)) todo += groupMaster; } } @@ -223,17 +223,17 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) } else { passedInitialHost = true; if (!currentGroups.isEmpty()) { - QMap::ConstIterator end = currentGroups.end(); - for (QMap::ConstIterator i = currentGroups.begin(); i != end; i++) { - QString groupMaster = i.data(); + TQMap::ConstIterator end = currentGroups.end(); + for (TQMap::ConstIterator i = currentGroups.begin(); i != end; i++) { + TQString groupMaster = i.data(); todo += groupMaster; } } else { - if (currentHost == QString::fromLatin1("failed")) + if (currentHost == TQString::fromLatin1("failed")) KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Connection to localhost failed!\n" "Is your samba server running?"), - QString::fromLatin1("Winpopup")); + TQString::fromLatin1("Winpopup")); } } @@ -250,7 +250,7 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) void WinPopupLib::slotListCompleted() { /// only to check received messages during start up, then we use newItems. GF - disconnect(dirLister, SIGNAL(completed()), this, SLOT(slotListCompleted())); + disconnect(dirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotListCompleted())); readMessages(dirLister->items()); } @@ -264,25 +264,25 @@ void WinPopupLib::slotNewMessages(const KFileItemList &items) */ void WinPopupLib::readMessages(const KFileItemList &items) { - QPtrListIterator it(items); + TQPtrListIterator it(items); KFileItem *tmpItem; while ((tmpItem = it.current()) != 0) { if (tmpItem->isFile()) { - QFile messageFile(tmpItem->url().path()); + TQFile messageFile(tmpItem->url().path()); if (messageFile.open(IO_ReadOnly)) { - QTextStream stream(&messageFile); - QString sender; - QDateTime time; - QString text; + TQTextStream stream(&messageFile); + TQString sender; + TQDateTime time; + TQString text; // first line is sender, can this really be empty? GF sender = stream.readLine(); sender = sender.upper(); // second line is time - QString tmpTime = stream.readLine(); - time = QDateTime::fromString(tmpTime, Qt::ISODate); + TQString tmpTime = stream.readLine(); + time = TQDateTime::fromString(tmpTime, Qt::ISODate); while (!stream.atEnd()) { text.append(stream.readLine()); @@ -296,16 +296,16 @@ void WinPopupLib::readMessages(const KFileItemList &items) // delete file if (!messageFile.remove()) { - // QFile::remove() seems to be very persistent, it removes even files with 0444 owned by root + // TQFile::remove() seems to be very persistent, it removes even files with 0444 owned by root // if the directory permissions are 0777 - so this is just for safety. GF kdDebug(14170) << "Message file not removed - how that?" << endl; int tmpYesNo = KMessageBox::warningYesNo(Kopete::UI::Global::mainWidget(), i18n("A message file could not be removed; " "maybe the permissions are wrong.\n" "Fix? (May need root password)"), - QString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); + TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c chmod 0666 " + tmpItem->url().path())); + TQStringList kdesuArgs = TQStringList(TQString("-c chmod 0666 " + tmpItem->url().path())); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) { if (!messageFile.remove()) KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Still cannot remove it; please fix manually.")); @@ -325,13 +325,13 @@ void WinPopupLib::readMessages(const KFileItemList &items) /** * send a message */ -void WinPopupLib::sendMessage(const QString &Body, const QString &Destination) +void WinPopupLib::sendMessage(const TQString &Body, const TQString &Destination) { KProcess *sender = new KProcess(this); *sender << smbClientBin << "-M" << Destination; *sender << "-N" << "-"; - connect(sender, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendProcessExited(KProcess *))); + connect(sender, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendProcessExited(KProcess *))); if (sender->start(KProcess::NotifyOnExit, KProcess::Stdin)) { sender->writeStdin(Body.local8Bit(), Body.local8Bit().length()); @@ -349,7 +349,7 @@ void WinPopupLib::slotSendProcessExited(KProcess *p) delete p; } -void WinPopupLib::settingsChanged(const QString &smbClient, int groupFreq) +void WinPopupLib::settingsChanged(const TQString &smbClient, int groupFreq) { smbClientBin = smbClient; groupCheckFreq = groupFreq; diff --git a/kopete/protocols/winpopup/libwinpopup/libwinpopup.h b/kopete/protocols/winpopup/libwinpopup/libwinpopup.h index 77f8b8a6..0e594932 100644 --- a/kopete/protocols/winpopup/libwinpopup/libwinpopup.h +++ b/kopete/protocols/winpopup/libwinpopup/libwinpopup.h @@ -19,29 +19,29 @@ #define LIBWINPOPUP_H //QT includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // KDE Includes #include #include -const QString WP_POPUP_DIR = QString::fromLatin1("/var/lib/winpopup"); +const TQString WP_POPUP_DIR = TQString::fromLatin1("/var/lib/winpopup"); class KDirLister; -typedef QMap stringMap; +typedef TQMap stringMap; class WorkGroup { - QStringList groupHosts; + TQStringList groupHosts; public: - const QStringList &Hosts() { return groupHosts; } - void addHosts(const QStringList &newHosts) { groupHosts = newHosts; } + const TQStringList &Hosts() { return groupHosts; } + void addHosts(const TQStringList &newHosts) { groupHosts = newHosts; } }; class WinPopupLib : public QObject @@ -49,23 +49,23 @@ class WinPopupLib : public QObject Q_OBJECT public: - WinPopupLib(const QString &smbClient,int groupFreq); + WinPopupLib(const TQString &smbClient,int groupFreq); ~WinPopupLib(); - const QStringList getGroups(); - const QStringList getHosts(const QString &Group); - bool checkHost(const QString &Name); - void settingsChanged(const QString &smbClient, int groupFreq); - void sendMessage(const QString &Body, const QString &Destination); + const TQStringList getGroups(); + const TQStringList getHosts(const TQString &Group); + bool checkHost(const TQString &Name); + void settingsChanged(const TQString &smbClient, int groupFreq); + void sendMessage(const TQString &Body, const TQString &Destination); private: bool passedInitialHost; - QMap theGroups, currentGroupsMap; - QString currentGroup, currentHost; - QStringList todo, done, currentHosts; + TQMap theGroups, currentGroupsMap; + TQString currentGroup, currentHost; + TQStringList todo, done, currentHosts; stringMap currentGroups; - QTimer updateGroupDataTimer; - QString smbClientBin; + TQTimer updateGroupDataTimer; + TQString smbClientBin; int groupCheckFreq; KDirLister *dirLister; @@ -74,7 +74,7 @@ private: private slots: void slotUpdateGroupData(); - void startReadProcess(const QString &Host); + void startReadProcess(const TQString &Host); void slotReadProcessReady(KProcIO *r); void slotReadProcessExited(KProcess *r); void slotSendProcessExited(KProcess *p); @@ -83,7 +83,7 @@ private slots: void slotNewMessages(const KFileItemList &items); signals: - void signalNewMessage(const QString &, const QDateTime &, const QString &); + void signalNewMessage(const TQString &, const TQDateTime &, const TQString &); }; #endif diff --git a/kopete/protocols/winpopup/wpaccount.cpp b/kopete/protocols/winpopup/wpaccount.cpp index 4b1342ff..d7439628 100644 --- a/kopete/protocols/winpopup/wpaccount.cpp +++ b/kopete/protocols/winpopup/wpaccount.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ // QT Includes -#include +#include // KDE Includes #include @@ -34,7 +34,7 @@ class KPopupMenu; -WPAccount::WPAccount(WPProtocol *parent, const QString &accountID, const char *name) +WPAccount::WPAccount(WPProtocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { // kdDebug(14170) << "WPAccount::WPAccount()" << endl; @@ -53,20 +53,20 @@ WPAccount::~WPAccount() { } -const QStringList WPAccount::getGroups() +const TQStringList WPAccount::getGroups() { return mProtocol->getGroups(); } -const QStringList WPAccount::getHosts(const QString &Group) +const TQStringList WPAccount::getHosts(const TQString &Group) { return mProtocol->getHosts(Group); } -bool WPAccount::checkHost(const QString &Name) +bool WPAccount::checkHost(const TQString &Name) { // kdDebug() << "WPAccount::checkHost: " << Name << endl; - if (Name.upper() == QString::fromLatin1("LOCALHOST")) { + if (Name.upper() == TQString::fromLatin1("LOCALHOST")) { // Assume localhost is always there, but it will not appear in the samba output. // Should never happen as localhost is now forbidden as contact, just for safety. GF return true; @@ -75,7 +75,7 @@ bool WPAccount::checkHost(const QString &Name) } } -bool WPAccount::createContact(const QString &contactId, Kopete::MetaContact *parentContact ) +bool WPAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact ) { // kdDebug(14170) << "[WPAccount::createContact] contactId: " << contactId << endl; @@ -89,7 +89,7 @@ bool WPAccount::createContact(const QString &contactId, Kopete::MetaContact *par return false; } -void WPAccount::slotGotNewMessage(const QString &Body, const QDateTime &Arrival, const QString &From) +void WPAccount::slotGotNewMessage(const TQString &Body, const TQDateTime &Arrival, const TQString &From) { // kdDebug(14170) << "WPAccount::slotGotNewMessage(" << Body << ", " << Arrival.toString() << ", " << From << ")" << endl; @@ -97,7 +97,7 @@ void WPAccount::slotGotNewMessage(const QString &Body, const QDateTime &Arrival, // IPs can not be matched to an account anyway. // This should happen rarely but they make kopete crash. // The reason for this seems to be in ChatSessionManager? GF - QRegExp ip("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); + TQRegExp ip("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); // kdDebug(14170) << "ip.search: " << From << " match: " << ip.search(From) << endl; @@ -142,7 +142,7 @@ void WPAccount::updateAccountId() myself() = new WPContact(this, accountId(), accountId(), 0); }*/ -void WPAccount::setAway(bool status, const QString &awayMessage) +void WPAccount::setAway(bool status, const TQString &awayMessage) { // kdDebug(14170) << "WPAccount::setAway()" << endl; @@ -164,13 +164,13 @@ KActionMenu* WPAccount::actionMenu() if (mProtocol) { - KAction *goOnline = new KAction("Online", QIconSet(mProtocol->WPOnline.iconFor(this)), 0, - this, SLOT(connect()), theActionMenu, "actionGoAvailable"); + KAction *goOnline = new KAction("Online", TQIconSet(mProtocol->WPOnline.iconFor(this)), 0, + this, TQT_SLOT(connect()), theActionMenu, "actionGoAvailable"); goOnline->setEnabled(isConnected() && isAway()); theActionMenu->insert(goOnline); - KAction *goAway = new KAction("Away", QIconSet(mProtocol->WPAway.iconFor(this)), 0, - this, SLOT(goAway()), theActionMenu, "actionGoAway"); + KAction *goAway = new KAction("Away", TQIconSet(mProtocol->WPAway.iconFor(this)), 0, + this, TQT_SLOT(goAway()), theActionMenu, "actionGoAway"); goAway->setEnabled(isConnected() && !isAway()); theActionMenu->insert(goAway); @@ -178,14 +178,14 @@ KActionMenu* WPAccount::actionMenu() theActionMenu->popupMenu()->insertSeparator(); theActionMenu->insert(new KAction(i18n("Properties"), 0, - this, SLOT(editAccount()), theActionMenu, "actionAccountProperties")); + this, TQT_SLOT(editAccount()), theActionMenu, "actionAccountProperties")); } return theActionMenu; } -void WPAccount::slotSendMessage(const QString &Body, const QString &Destination) +void WPAccount::slotSendMessage(const TQString &Body, const TQString &Destination) { kdDebug(14170) << "WPAccount::slotSendMessage(" << Body << ", " << Destination << ")" << endl; @@ -193,7 +193,7 @@ void WPAccount::slotSendMessage(const QString &Body, const QString &Destination) mProtocol->sendMessage(Body, Destination); } -void WPAccount::setOnlineStatus(const Kopete::OnlineStatus &status, const QString &reason) +void WPAccount::setOnlineStatus(const Kopete::OnlineStatus &status, const TQString &reason) { if (myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Online) connect( status ); diff --git a/kopete/protocols/winpopup/wpaccount.h b/kopete/protocols/winpopup/wpaccount.h index f916ca86..ae3744de 100644 --- a/kopete/protocols/winpopup/wpaccount.h +++ b/kopete/protocols/winpopup/wpaccount.h @@ -23,7 +23,7 @@ // QT Includes -#include +#include // KDE Includes @@ -51,54 +51,54 @@ class WPAccount : public Kopete::Account // Kopete::Account overloading public: - WPAccount(WPProtocol *parent, const QString& accountID, const char *name = 0); + WPAccount(WPProtocol *parent, const TQString& accountID, const char *name = 0); ~WPAccount(); virtual KActionMenu* actionMenu(); // Per-protocol actions for the systray and the status bar - virtual void setAway(bool status, const QString &); // Set user away + virtual void setAway(bool status, const TQString &); // Set user away public slots: virtual void connect(const Kopete::OnlineStatus &); // Connect to server virtual void disconnect(); // Disconnect from server - void goAvailable() { setAway(false, QString::null); } // Two convenience slots - void goAway() { setAway(true, QString::null); } // for available and away + void goAvailable() { setAway(false, TQString::null); } // Two convenience slots + void goAway() { setAway(true, TQString::null); } // for available and away // Stuff used internally & by colleague classes public: - const QStringList getGroups(); - const QStringList getHosts(const QString &Group); + const TQStringList getGroups(); + const TQStringList getHosts(const TQString &Group); // Stuff used by WPContact public: /** * Returns whether or not the named host is online. */ - bool checkHost(const QString &Name); + bool checkHost(const TQString &Name); public slots: /** * Dispatches said message to the destination. */ - void slotSendMessage(const QString &Body, const QString &Destination); + void slotSendMessage(const TQString &Body, const TQString &Destination); /** * Called when a new message arrives with the message's data. */ - void slotGotNewMessage(const QString &Body, const QDateTime &Arrival, const QString &From); + void slotGotNewMessage(const TQString &Body, const TQDateTime &Arrival, const TQString &From); /* Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus &status , const TQString &reason = TQString::null); protected: - virtual bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); private slots: // void updateAccountId(); private: WPProtocol *mProtocol; - QString theAwayMessage; // The message to give when the user is away + TQString theAwayMessage; // The message to give when the user is away }; #endif diff --git a/kopete/protocols/winpopup/wpaddcontact.cpp b/kopete/protocols/winpopup/wpaddcontact.cpp index 6187c644..e5912c14 100644 --- a/kopete/protocols/winpopup/wpaddcontact.cpp +++ b/kopete/protocols/winpopup/wpaddcontact.cpp @@ -18,7 +18,7 @@ * * ***************************************************************************/ // QT Includes -#include +#include // KDE Includes #include @@ -36,14 +36,14 @@ #include "wpaccount.h" #include "wpaddcontact.h" -WPAddContact::WPAddContact(QWidget *parent, WPAccount *newAccount, const char *name) : AddContactPage(parent, name) +WPAddContact::WPAddContact(TQWidget *parent, WPAccount *newAccount, const char *name) : AddContactPage(parent, name) { // kdDebug(14170) << "WPAddContact::WPAddContact(, " << newAccount << ", , " << name << ")" << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); theDialog = new WPAddContactBase(this); - connect(theDialog->mHostGroup, SIGNAL(activated(const QString &)), this, SLOT(slotSelected(const QString &))); - connect(theDialog->mRefresh, SIGNAL(clicked()), this, SLOT(slotUpdateGroups())); + connect(theDialog->mHostGroup, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSelected(const TQString &))); + connect(theDialog->mRefresh, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdateGroups())); theDialog->show(); theAccount = newAccount; @@ -61,22 +61,22 @@ void WPAddContact::slotUpdateGroups() kdDebug(14170) << "WPAddContact::slotUpdateGroups()" << endl; theDialog->mHostGroup->clear(); - QStringList Groups = theAccount->getGroups(); - QStringList::ConstIterator end = Groups.end(); - for (QStringList::ConstIterator i = Groups.begin(); i != end; i++) + TQStringList Groups = theAccount->getGroups(); + TQStringList::ConstIterator end = Groups.end(); + for (TQStringList::ConstIterator i = Groups.begin(); i != end; i++) theDialog->mHostGroup->insertItem(SmallIcon("network"), *i); slotSelected(theDialog->mHostGroup->currentText()); } -void WPAddContact::slotSelected(const QString &Group) +void WPAddContact::slotSelected(const TQString &Group) { kdDebug(14170) << "WPAddContact::slotSelected(" << Group << ")" << endl; theDialog->mHostName->clear(); - QStringList Hosts = theAccount->getHosts(Group); - QString ownHost = theAccount->myself()->contactId(); - QStringList::ConstIterator end = Hosts.end(); - for (QStringList::ConstIterator i = Hosts.begin(); i != end; i++) + TQStringList Hosts = theAccount->getHosts(Group); + TQString ownHost = theAccount->myself()->contactId(); + TQStringList::ConstIterator end = Hosts.end(); + for (TQStringList::ConstIterator i = Hosts.begin(); i != end; i++) if (*i != ownHost) theDialog->mHostName->insertItem(SmallIcon("personal"), *i); } @@ -84,7 +84,7 @@ bool WPAddContact::validateData() { kdDebug(14170) << "WPAddContact::validateData()" << endl; - QString tmpHostName = theDialog->mHostName->currentText(); + TQString tmpHostName = theDialog->mHostName->currentText(); if (tmpHostName.isEmpty()) { KMessageBox::sorry(this, i18n("You must enter a valid hostname."), i18n("WinPopup")); @@ -93,7 +93,7 @@ bool WPAddContact::validateData() // If our own host is not allowed as contact localhost should be forbidden as well, // additionally somehow localhost as contact crashes when receiving a message from it?? GF - if (tmpHostName.upper() == QString::fromLatin1("LOCALHOST")) { + if (tmpHostName.upper() == TQString::fromLatin1("LOCALHOST")) { KMessageBox::sorry(this, i18n("LOCALHOST is not allowed as contact."), i18n("WinPopup")); return false; } diff --git a/kopete/protocols/winpopup/wpaddcontact.h b/kopete/protocols/winpopup/wpaddcontact.h index 4d593cba..156e7db9 100644 --- a/kopete/protocols/winpopup/wpaddcontact.h +++ b/kopete/protocols/winpopup/wpaddcontact.h @@ -40,7 +40,7 @@ private: WPAddContactBase *theDialog; public: - WPAddContact(QWidget *parent, WPAccount *newAccount, const char *name = 0); + WPAddContact(TQWidget *parent, WPAccount *newAccount, const char *name = 0); ~WPAddContact(); virtual bool validateData(); @@ -48,7 +48,7 @@ public: public slots: virtual bool apply(Kopete::Account *theAccount, Kopete::MetaContact *theMetaContact); - void slotSelected(const QString &Group); + void slotSelected(const TQString &Group); void slotUpdateGroups(); }; diff --git a/kopete/protocols/winpopup/wpcontact.cpp b/kopete/protocols/winpopup/wpcontact.cpp index 7cf2529c..801b9865 100644 --- a/kopete/protocols/winpopup/wpcontact.cpp +++ b/kopete/protocols/winpopup/wpcontact.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ // Qt Includes -#include +#include // KDE Includes #include @@ -27,13 +27,13 @@ #include "wpcontact.h" #include "wpaccount.h" -WPContact::WPContact(Kopete::Account *account, const QString &newHostName, const QString &nickName, Kopete::MetaContact *metaContact) +WPContact::WPContact(Kopete::Account *account, const TQString &newHostName, const TQString &nickName, Kopete::MetaContact *metaContact) : Kopete::Contact(account, newHostName, metaContact) { // kdDebug(14170) << "WPContact::WPContact(, " << newHostName << ", " << nickName << ", )" << endl; kdDebug(14170) << "WPContact::WPContact: " << this << endl; - QString theNickName = nickName; + TQString theNickName = nickName; if (theNickName.isEmpty()) { // Construct nickname from hostname with first letter to upper. GF @@ -51,17 +51,17 @@ WPContact::WPContact(Kopete::Account *account, const QString &newHostName, const // Initialise and start the periodical checking for contact's status setOnlineStatus(static_cast(protocol())->WPOffline); - connect(&checkStatus, SIGNAL(timeout()), this, SLOT(slotCheckStatus())); + connect(&checkStatus, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus())); checkStatus.start(1000, false); } -QPtrList * WPContact::customContextMenuActions() +TQPtrList * WPContact::customContextMenuActions() { //myActionCollection = new KActionCollection(parent); return 0; } -void WPContact::serialize(QMap &serializedData, QMap &addressBookData) +void WPContact::serialize(TQMap &serializedData, TQMap &addressBookData) { // kdDebug(14170) << "WP::serialize(...)" << endl; @@ -72,14 +72,14 @@ Kopete::ChatSession* WPContact::manager( Kopete::Contact::CanCreateFlags /*canCr { if (m_manager == 0) { // Set up the message managers - QPtrList singleContact; + TQPtrList singleContact; singleContact.append(this); m_manager = Kopete::ChatSessionManager::self()->create( account()->myself(), singleContact, protocol() ); - connect(m_manager, SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), this, SLOT(slotSendMessage(Kopete::Message &))); - connect(m_manager, SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), m_manager, SLOT(appendMessage(Kopete::Message &))); - connect(m_manager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_manager, TQT_SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), this, TQT_SLOT(slotSendMessage(Kopete::Message &))); + connect(m_manager, TQT_SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), m_manager, TQT_SLOT(appendMessage(Kopete::Message &))); + connect(m_manager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); } return m_manager; @@ -111,7 +111,7 @@ void WPContact::slotUserInfo() if (!m_infoDialog) { m_infoDialog = new WPUserInfo( this, static_cast( account() ) ); if (!m_infoDialog) return; - connect( m_infoDialog, SIGNAL( closing() ), this, SLOT( slotCloseUserInfoDialog() ) ); + connect( m_infoDialog, TQT_SIGNAL( closing() ), this, TQT_SLOT( slotCloseUserInfoDialog() ) ); m_infoDialog->show(); } else { m_infoDialog->raise(); @@ -149,14 +149,14 @@ void WPContact::slotCheckStatus() } } -void WPContact::slotNewMessage(const QString &Body, const QDateTime &Arrival) +void WPContact::slotNewMessage(const TQString &Body, const TQDateTime &Arrival) { kdDebug(14170) << "WPContact::slotNewMessage(" << Body << ", " << Arrival.toString() << ")" << endl; - QPtrList contactList; + TQPtrList contactList; contactList.append(account()->myself()); - QRegExp subj("^Subject: ([^\n]*)\n(.*)$"); + TQRegExp subj("^Subject: ([^\n]*)\n(.*)$"); Kopete::Message msg; if(subj.search(Body) == -1) { @@ -174,7 +174,7 @@ void WPContact::slotSendMessage( Kopete::Message& message ) // Warning: this could crash kdDebug(14170) << message.to().first() << " is " << dynamic_cast( message.to().first() )->contactId() << endl; - QString Message = (!message.subject().isEmpty() ? "Subject: " + message.subject() + "\n" : QString("")) + message.plainBody(); + TQString Message = (!message.subject().isEmpty() ? "Subject: " + message.subject() + "\n" : TQString("")) + message.plainBody(); WPAccount *acct = dynamic_cast(account()); WPContact *contact = dynamic_cast( message.to().first() ); if (acct && contact) { diff --git a/kopete/protocols/winpopup/wpcontact.h b/kopete/protocols/winpopup/wpcontact.h index 343e07f7..d3e13251 100644 --- a/kopete/protocols/winpopup/wpcontact.h +++ b/kopete/protocols/winpopup/wpcontact.h @@ -22,11 +22,11 @@ #include // Qt Includes -//#include -#include -#include -#include -#include +//#include +#include +#include +#include +#include // Kopete Includes #include "kopetecontact.h" @@ -51,18 +51,18 @@ class WPContact: public Kopete::Contact Q_OBJECT public: - WPContact(Kopete::Account *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact); + WPContact(Kopete::Account *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact); // virtual bool isOnline() const; virtual bool isReachable(); - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate); - virtual void serialize(QMap &serializedData, QMap &addressBookData); + virtual void serialize(TQMap &serializedData, TQMap &addressBookData); public slots: virtual void slotUserInfo(); void slotCheckStatus(); // the call back for the checkStatus timer - void slotNewMessage(const QString &Body, const QDateTime &Arrival); + void slotNewMessage(const TQString &Body, const TQDateTime &Arrival); private slots: void slotChatSessionDestroyed(); @@ -72,7 +72,7 @@ private slots: private: bool myWasConnected; // true if protocol connected at last check - QTimer checkStatus; // checks the status of this contact every second or so + TQTimer checkStatus; // checks the status of this contact every second or so // KActionCollection *myActionCollection; // holds all the protocol specific actions (not many!) Kopete::ChatSession *m_manager; diff --git a/kopete/protocols/winpopup/wpeditaccount.cpp b/kopete/protocols/winpopup/wpeditaccount.cpp index 454f5d6f..6e1d1aba 100644 --- a/kopete/protocols/winpopup/wpeditaccount.cpp +++ b/kopete/protocols/winpopup/wpeditaccount.cpp @@ -22,8 +22,8 @@ #include // QT Includes -#include -#include +#include +#include // KDE Includes #include @@ -45,14 +45,14 @@ #include "wpeditaccount.h" #include "wpprotocol.h" -WPEditAccount::WPEditAccount(QWidget *parent, Kopete::Account *theAccount) +WPEditAccount::WPEditAccount(TQWidget *parent, Kopete::Account *theAccount) : WPEditAccountBase(parent), KopeteEditAccountWidget(theAccount) { kdDebug(14170) << "WPEditAccount::WPEditAccount(, )"; mProtocol = WPProtocol::protocol(); - QString tmpSmbcPath = KStandardDirs::findExe("smbclient"); + TQString tmpSmbcPath = KStandardDirs::findExe("smbclient"); if(account()) { mHostName->setText(account()->accountId()); @@ -65,7 +65,7 @@ WPEditAccount::WPEditAccount(QWidget *parent, Kopete::Account *theAccount) } else { // no QT/KDE function? GF - QString theHostName = QString::null; + TQString theHostName = TQString::null; char *tmp = new char[255]; if (tmp != 0) { @@ -101,7 +101,7 @@ bool WPEditAccount::validateData() return false; } - QFile smbc(mSmbcPath->url()); + TQFile smbc(mSmbcPath->url()); if (!smbc.exists()) { KMessageBox::sorry(this, i18n("You must enter a valid smbclient path."), i18n("WinPopup")); return false; diff --git a/kopete/protocols/winpopup/wpeditaccount.h b/kopete/protocols/winpopup/wpeditaccount.h index afa521a7..4714e197 100644 --- a/kopete/protocols/winpopup/wpeditaccount.h +++ b/kopete/protocols/winpopup/wpeditaccount.h @@ -41,7 +41,7 @@ private: WPAccount *mAccount; public: - WPEditAccount(QWidget *parent, Kopete::Account *theAccount); + WPEditAccount(TQWidget *parent, Kopete::Account *theAccount); virtual bool validateData(); void writeConfig(); diff --git a/kopete/protocols/winpopup/wpprotocol.cpp b/kopete/protocols/winpopup/wpprotocol.cpp index b765438c..71d4a76a 100644 --- a/kopete/protocols/winpopup/wpprotocol.cpp +++ b/kopete/protocols/winpopup/wpprotocol.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ // QT Includes -#include -#include +#include +#include // KDE Includes #include @@ -48,11 +48,11 @@ typedef KGenericFactory WPProtocolFactory; K_EXPORT_COMPONENT_FACTORY( kopete_wp, WPProtocolFactory( "kopete_wp" ) ) // WP Protocol -WPProtocol::WPProtocol( QObject *parent, const char *name, const QStringList & /* args */ ) +WPProtocol::WPProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Protocol( WPProtocolFactory::instance(), parent, name ), - WPOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n("Online"), i18n("Online")), + WPOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n("Online"), i18n("Online")), WPAway( Kopete::OnlineStatus::Away, 20, this, 1, "wp_away", i18n("Away"), i18n("Away")), - WPOffline( Kopete::OnlineStatus::Offline, 0, this, 2, QString::null, i18n("Offline"), i18n("Offline")) + WPOffline( Kopete::OnlineStatus::Offline, 0, this, 2, TQString::null, i18n("Offline"), i18n("Offline")) { // kdDebug(14170) << "WPProtocol::WPProtocol()" << endl; @@ -67,8 +67,8 @@ WPProtocol::WPProtocol( QObject *parent, const char *name, const QStringList & / readConfig(); popupClient = new WinPopupLib(smbClientBin, groupCheckFreq); - QObject::connect(popupClient, SIGNAL(signalNewMessage(const QString &, const QDateTime &, const QString &)), - this, SLOT(slotReceivedMessage(const QString &, const QDateTime &, const QString &))); + TQObject::connect(popupClient, TQT_SIGNAL(signalNewMessage(const TQString &, const TQDateTime &, const TQString &)), + this, TQT_SLOT(slotReceivedMessage(const TQString &, const TQDateTime &, const TQString &))); } // Destructor @@ -79,7 +79,7 @@ WPProtocol::~WPProtocol() sProtocol = 0; } -AddContactPage *WPProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *theAccount) +AddContactPage *WPProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *theAccount) { // kdDebug(14170) << "WPProtocol::createAddContactWidget(, " << theAccount << ")" << endl; @@ -87,11 +87,11 @@ AddContactPage *WPProtocol::createAddContactWidget(QWidget *parent, Kopete::Acco } Kopete::Contact *WPProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap & /* addressBookData */ ) + const TQMap &serializedData, + const TQMap & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; WPAccount *theAccount = static_cast(Kopete::AccountManager::self()->findAccount(protocol()->pluginId(), accountId)); if(!theAccount) { @@ -108,12 +108,12 @@ Kopete::Contact *WPProtocol::deserializeContact( Kopete::MetaContact *metaContac return theAccount->contacts()[contactId]; } -KopeteEditAccountWidget *WPProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *WPProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new WPEditAccount(parent, account); } -Kopete::Account *WPProtocol::createNewAccount(const QString &accountId) +Kopete::Account *WPProtocol::createNewAccount(const TQString &accountId) { return new WPAccount(this, accountId); } @@ -137,7 +137,7 @@ void WPProtocol::installSamba() { // kdDebug(14170) << "WPProtocol::installSamba()" endl; - QStringList args; + TQStringList args; args += KStandardDirs::findExe("winpopup-install.sh"); args += KStandardDirs::findExe("winpopup-send.sh"); if (KApplication::kdeinitExecWait("kdesu", args) == 0) @@ -149,13 +149,13 @@ void WPProtocol::installSamba() /** * search the contact for the new message and give it to its account */ -void WPProtocol::slotReceivedMessage(const QString &Body, const QDateTime &Time, const QString &From) +void WPProtocol::slotReceivedMessage(const TQString &Body, const TQDateTime &Time, const TQString &From) { bool foundContact = false; - QString accountKey = QString::null; - QDict Accounts = Kopete::AccountManager::self()->accounts(protocol()); - for (QDictIterator it(Accounts); it.current(); ++it) { - QDict Contacts = it.current()->contacts(); + TQString accountKey = TQString::null; + TQDict Accounts = Kopete::AccountManager::self()->accounts(protocol()); + for (TQDictIterator it(Accounts); it.current(); ++it) { + TQDict Contacts = it.current()->contacts(); Kopete::Contact *theContact = Contacts[From]; if (theContact != 0) { foundContact = true; @@ -176,7 +176,7 @@ void WPProtocol::slotReceivedMessage(const QString &Body, const QDateTime &Time, } } -void WPProtocol::sendMessage(const QString &Body, const QString &Destination) +void WPProtocol::sendMessage(const TQString &Body, const TQString &Destination) { popupClient->sendMessage(Body, Destination); } diff --git a/kopete/protocols/winpopup/wpprotocol.h b/kopete/protocols/winpopup/wpprotocol.h index 92a9e434..b54f4972 100644 --- a/kopete/protocols/winpopup/wpprotocol.h +++ b/kopete/protocols/winpopup/wpprotocol.h @@ -22,9 +22,9 @@ #define WPPROTOCOL_H // QT Includes -#include -#include -#include +#include +#include +#include // Kopete Includes #include "kopetemetacontact.h" @@ -51,20 +51,20 @@ class WPProtocol : public Kopete::Protocol // Kopete::Protocol overloading public: - WPProtocol( QObject *parent, const char *name, const QStringList &args ); + WPProtocol( TQObject *parent, const char *name, const TQStringList &args ); ~WPProtocol(); - virtual AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *theAccount); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *theAccount); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); - const QStringList getGroups() {return popupClient->getGroups(); } - const QStringList getHosts(const QString &Group) { return popupClient->getHosts(Group); } - bool checkHost(const QString &Name) { return popupClient->checkHost(Name); } + const TQStringList getGroups() {return popupClient->getGroups(); } + const TQStringList getHosts(const TQString &Group) { return popupClient->getHosts(Group); } + bool checkHost(const TQString &Name) { return popupClient->checkHost(Name); } // Kopete::Plugin overloading public: - virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, const QMap &serializedData, const QMap &addressBookData); + virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, const TQMap &serializedData, const TQMap &addressBookData); // Stuff used internally & by colleague classes public: @@ -73,15 +73,15 @@ public: const Kopete::OnlineStatus WPOnline; const Kopete::OnlineStatus WPAway; const Kopete::OnlineStatus WPOffline; - void sendMessage(const QString &Body, const QString &Destination); + void sendMessage(const TQString &Body, const TQString &Destination); void settingsChanged(void); // Callback when settings changed public slots: void installSamba(); // Modify smb.conf to use winpopup-send.sh script - void slotReceivedMessage(const QString &Body, const QDateTime &Time, const QString &From); + void slotReceivedMessage(const TQString &Body, const TQDateTime &Time, const TQString &From); private: - QString smbClientBin; + TQString smbClientBin; int groupCheckFreq; void readConfig(); WinPopupLib *popupClient; diff --git a/kopete/protocols/winpopup/wpuserinfo.cpp b/kopete/protocols/winpopup/wpuserinfo.cpp index 7e4348d4..e50805f5 100644 --- a/kopete/protocols/winpopup/wpuserinfo.cpp +++ b/kopete/protocols/winpopup/wpuserinfo.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ // QT Includes -#include +#include // KDE Includes #include @@ -32,8 +32,8 @@ #include "wpaccount.h" #include "wpcontact.h" -WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, QWidget *parent, const char* name ) - : KDialogBase( parent, name, false, QString::null, Close, Close, false ), m_contact(contact), +WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, TQWidget *parent, const char* name ) + : KDialogBase( parent, name, false, TQString::null, Close, Close, false ), m_contact(contact), Comment(i18n("N/A")), Workgroup(i18n("N/A")), OS(i18n("N/A")), Software(i18n("N/A")) { // kdDebug( 14170 ) << k_funcinfo << endl; @@ -50,23 +50,23 @@ WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, QWidget *par m_mainWidget->sOS->setText(i18n("Looking")); m_mainWidget->sServer->setText(i18n("Looking")); - connect( this, SIGNAL( closeClicked() ), this, SLOT( slotCloseClicked() ) ); + connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( slotCloseClicked() ) ); startDetailsProcess(m_contact->contactId()); } // I decided to do this direct here to avoid "Handstände" with signals and stuff // if we would do this in libwinpopup. GF -void WPUserInfo::startDetailsProcess(const QString &host) +void WPUserInfo::startDetailsProcess(const TQString &host) { KGlobal::config()->setGroup("WinPopup"); - QString theSMBClientPath = KGlobal::config()->readEntry("SMBClientPath", "/usr/bin/smbclient"); + TQString theSMBClientPath = KGlobal::config()->readEntry("SMBClientPath", "/usr/bin/smbclient"); KProcIO *details = new KProcIO; *details << theSMBClientPath << "-N" << "-E" << "-g" << "-L" << host << "-"; - connect(details, SIGNAL(readReady(KProcIO *)), this, SLOT(slotDetailsProcessReady(KProcIO *))); - connect(details, SIGNAL(processExited(KProcess *)), this, SLOT(slotDetailsProcessExited(KProcess *))); + connect(details, TQT_SIGNAL(readReady(KProcIO *)), this, TQT_SLOT(slotDetailsProcessReady(KProcIO *))); + connect(details, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotDetailsProcessExited(KProcess *))); if (!details->start(KProcess::NotifyOnExit, KProcess::Stderr)) { slotDetailsProcessExited(details); @@ -76,8 +76,8 @@ void WPUserInfo::startDetailsProcess(const QString &host) void WPUserInfo::slotDetailsProcessReady(KProcIO *d) { - QString tmpLine = QString::null; - QRegExp info("^Domain=\\[(.*)\\]\\sOS=\\[(.*)\\]\\sServer=\\[(.*)\\]$"), host("^Server\\|(.*)\\|(.*)$"); + TQString tmpLine = TQString::null; + TQRegExp info("^Domain=\\[(.*)\\]\\sOS=\\[(.*)\\]\\sServer=\\[(.*)\\]$"), host("^Server\\|(.*)\\|(.*)$"); while (d->readln(tmpLine) > -1) { if (info.search(tmpLine) != -1) { diff --git a/kopete/protocols/winpopup/wpuserinfo.h b/kopete/protocols/winpopup/wpuserinfo.h index 1c4ce0e9..2059ba2c 100644 --- a/kopete/protocols/winpopup/wpuserinfo.h +++ b/kopete/protocols/winpopup/wpuserinfo.h @@ -36,9 +36,9 @@ class WPUserInfo : public KDialogBase Q_OBJECT public: - WPUserInfo( WPContact *, WPAccount *, QWidget *parent = 0, const char* name = "WPUserInfo" ); + WPUserInfo( WPContact *, WPAccount *, TQWidget *parent = 0, const char* name = "WPUserInfo" ); - void startDetailsProcess(const QString &host); + void startDetailsProcess(const TQString &host); private slots: void slotDetailsProcessReady(KProcIO *d); @@ -52,7 +52,7 @@ class WPUserInfo : public KDialogBase WPContact *m_contact; WPUserInfoWidget *m_mainWidget; - QString Comment, Workgroup, OS, Software; + TQString Comment, Workgroup, OS, Software; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/bytestream.cpp b/kopete/protocols/yahoo/libkyahoo/bytestream.cpp index ad299bf8..8ca3a4cd 100644 --- a/kopete/protocols/yahoo/libkyahoo/bytestream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/bytestream.cpp @@ -36,7 +36,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! QSocket. +//! TQSocket. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -60,13 +60,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { // kdDebug(14181) << k_funcinfo << endl; d = new Private; @@ -97,7 +97,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { // kdDebug(14181) << k_funcinfo << "[data size: " << a.size() << "]" << endl; @@ -115,7 +115,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { // kdDebug(14181) << k_funcinfo << " " << bytes <<" [bytes]"<< endl; return takeRead(bytes); @@ -138,11 +138,11 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { // kdDebug(14181) << k_funcinfo << "[data size: " << cs.length() << "]" << endl; - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -163,7 +163,7 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { // kdDebug(14181) << k_funcinfo << endl; appendArray(&d->readBuf, block); @@ -171,7 +171,7 @@ void ByteStream::appendRead(const QByteArray &block) //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { // kdDebug(14181) << k_funcinfo << "[data size: " << block.size() << "]" << endl; @@ -182,7 +182,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { // kdDebug(14181) << k_funcinfo << "[data size: " << size << "][ delete :" << del << " ]" << endl; return takeArray(&d->readBuf, size, del); @@ -192,7 +192,7 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { // kdDebug(14181) << k_funcinfo << "[data size: " << size << "][ delete :" << del << " ]" << endl; return takeArray(&d->writeBuf, size, del); @@ -200,14 +200,14 @@ QByteArray ByteStream::takeWrite(int size, bool del) //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { // kdDebug(14181) << k_funcinfo << endl; return d->writeBuf; @@ -224,7 +224,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { // kdDebug(14181) << k_funcinfo << endl; int oldsize = a->size(); @@ -236,11 +236,11 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { // kdDebug(14181) << k_funcinfo << "[int size] : " << size << " [bool del] " << del << endl; - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/yahoo/libkyahoo/bytestream.h b/kopete/protocols/yahoo/libkyahoo/bytestream.h index 1c2dfa15..a990a940 100644 --- a/kopete/protocols/yahoo/libkyahoo/bytestream.h +++ b/kopete/protocols/yahoo/libkyahoo/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include -#include +#include +#include // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp b/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp index 3d73920c..1943aa6b 100644 --- a/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp @@ -69,7 +69,7 @@ void ChangeStatusTask::sendVisibility( Visibility visible ) send( t ); } -void ChangeStatusTask::setMessage( const QString &msg ) +void ChangeStatusTask::setMessage( const TQString &msg ) { m_message = msg; } diff --git a/kopete/protocols/yahoo/libkyahoo/changestatustask.h b/kopete/protocols/yahoo/libkyahoo/changestatustask.h index 22c48031..a70007df 100644 --- a/kopete/protocols/yahoo/libkyahoo/changestatustask.h +++ b/kopete/protocols/yahoo/libkyahoo/changestatustask.h @@ -35,12 +35,12 @@ public: virtual void onGo(); - void setMessage( const QString &msg ); + void setMessage( const TQString &msg ); void setStatus( Yahoo::Status status ); void setType( Yahoo::StatusType type ); private: enum Visibility { Visible = 1, Invisible = 2 }; - QString m_message; + TQString m_message; Yahoo::Status m_status; Yahoo::StatusType m_type; diff --git a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp index cacd7f80..3be83a79 100644 --- a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp @@ -21,7 +21,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include ChatSessionTask::ChatSessionTask(Task* parent) : Task(parent) @@ -55,7 +55,7 @@ void ChatSessionTask::onGo() setSuccess(); } -void ChatSessionTask::setTarget( const QString &to ) +void ChatSessionTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h index 964ff411..fc5e02ce 100644 --- a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h +++ b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h @@ -35,10 +35,10 @@ public: virtual void onGo(); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setType( Type type ); private: - QString m_target; + TQString m_target; Type m_type; }; diff --git a/kopete/protocols/yahoo/libkyahoo/client.cpp b/kopete/protocols/yahoo/libkyahoo/client.cpp index 710da771..d2a4b8dd 100644 --- a/kopete/protocols/yahoo/libkyahoo/client.cpp +++ b/kopete/protocols/yahoo/libkyahoo/client.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -67,13 +67,13 @@ public: ClientStream *stream; int id_seed; Task *root; - QString host, user, pass; + TQString host, user, pass; uint port; bool active; YahooBuddyIconLoader *iconLoader; int error; - QString errorString; - QString errorInformation; + TQString errorString; + TQString errorInformation; // tasks bool tasksInitialized; @@ -92,19 +92,19 @@ public: // Connection data uint sessionID; - QString yCookie; - QString tCookie; - QString cCookie; + TQString yCookie; + TQString tCookie; + TQString cCookie; Yahoo::Status status; Yahoo::Status statusOnConnect; - QString statusMessageOnConnect; + TQString statusMessageOnConnect; Yahoo::PictureStatus pictureFlag; int pictureChecksum; bool buddyListReady; - QStringList pictureRequestQueue; + TQStringList pictureRequestQueue; }; -Client::Client(QObject *par) :QObject(par, "yahooclient") +Client::Client(TQObject *par) :TQObject(par, "yahooclient") { d = new ClientPrivate; /* d->tzoffset = 0;*/ @@ -122,18 +122,18 @@ Client::Client(QObject *par) :QObject(par, "yahooclient") d->buddyListReady = false; m_connector = 0L; - m_pingTimer = new QTimer( this ); - QObject::connect( m_pingTimer, SIGNAL( timeout() ), this, SLOT( sendPing() ) ); + m_pingTimer = new TQTimer( this ); + TQObject::connect( m_pingTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( sendPing() ) ); - QObject::connect( d->loginTask, SIGNAL( haveSessionID( uint ) ), SLOT( lt_gotSessionID( uint ) ) ); - QObject::connect( d->loginTask, SIGNAL( buddyListReady() ), SLOT( processPictureQueue() ) ); - QObject::connect( d->loginTask, SIGNAL( loginResponse( int, const QString& ) ), - SLOT( slotLoginResponse( int, const QString& ) ) ); - QObject::connect( d->loginTask, SIGNAL( haveCookies() ), SLOT( slotGotCookies() ) ); - QObject::connect( d->listTask, SIGNAL( gotBuddy(const QString &, const QString &, const QString &) ), - SIGNAL( gotBuddy(const QString &, const QString &, const QString &) ) ); - QObject::connect( d->listTask, SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ), - SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( haveSessionID( uint ) ), TQT_SLOT( lt_gotSessionID( uint ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( buddyListReady() ), TQT_SLOT( processPictureQueue() ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( loginResponse( int, const TQString& ) ), + TQT_SLOT( slotLoginResponse( int, const TQString& ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( haveCookies() ), TQT_SLOT( slotGotCookies() ) ); + TQObject::connect( d->listTask, TQT_SIGNAL( gotBuddy(const TQString &, const TQString &, const TQString &) ), + TQT_SIGNAL( gotBuddy(const TQString &, const TQString &, const TQString &) ) ); + TQObject::connect( d->listTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ), + TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ) ); } Client::~Client() @@ -144,7 +144,7 @@ Client::~Client() delete d; } -void Client::connect( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::connect( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; d->host = host; @@ -156,10 +156,10 @@ void Client::connect( const QString &host, const uint port, const QString &userI m_connector = new KNetworkConnector; m_connector->setOptHostPort( host, port ); d->stream = new ClientStream( m_connector, this ); - QObject::connect( d->stream, SIGNAL( connected() ), this, SLOT( cs_connected() ) ); - QObject::connect( d->stream, SIGNAL( error(int) ), this, SLOT( streamError(int) ) ); - QObject::connect( d->stream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); - QObject::connect( d->stream, SIGNAL( connectionClosed() ), this, SLOT( streamDisconnected() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( connected() ), this, TQT_SLOT( cs_connected() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( error(int) ), this, TQT_SLOT( streamError(int) ) ); + TQObject::connect( d->stream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( connectionClosed() ), this, TQT_SLOT( streamDisconnected() ) ); d->stream->connectToServer( host, false ); } @@ -193,7 +193,7 @@ void Client::close() deleteTasks(); d->loginTask->reset(); if( d->stream ) { - QObject::disconnect( d->stream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); + TQObject::disconnect( d->stream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); d->stream->deleteLater(); } d->stream = 0L; @@ -209,12 +209,12 @@ int Client::error() return d->error; } -QString Client::errorString() +TQString Client::errorString() { return d->errorString; } -QString Client::errorInformation() +TQString Client::errorInformation() { return d->errorInformation; } @@ -223,7 +223,7 @@ QString Client::errorInformation() void Client::streamError( int error ) { kdDebug(YAHOO_RAW_DEBUG) << "CLIENT ERROR (Error " << error << ")" << endl; - QString msg; + TQString msg; d->active = false; @@ -265,7 +265,7 @@ void Client::lt_loginFinished() slotLoginResponse( d->loginTask->statusCode(), d->loginTask->statusString() ); } -void Client::slotLoginResponse( int response, const QString &msg ) +void Client::slotLoginResponse( int response, const TQString &msg ) { if( response == Yahoo::LoginOk ) { @@ -273,7 +273,7 @@ void Client::slotLoginResponse( int response, const QString &msg ) d->statusOnConnect == Yahoo::StatusInvisible) || !d->statusMessageOnConnect.isEmpty() ) changeStatus( d->statusOnConnect, d->statusMessageOnConnect, Yahoo::StatusTypeAway ); - d->statusMessageOnConnect = QString::null; + d->statusMessageOnConnect = TQString::null; setStatus( d->statusOnConnect ); /* only send a ping every hour. we get disconnected otherwise */ m_pingTimer->start( 60 * 60 * 1000 ); @@ -306,7 +306,7 @@ void Client::slotGotCookies() // INTERNALS // // ***** Messaging handling ***** -void Client::sendTyping( const QString &who, bool typing ) +void Client::sendTyping( const TQString &who, bool typing ) { SendNotifyTask *snt = new SendNotifyTask( d->root ); snt->setTarget( who ); @@ -315,7 +315,7 @@ void Client::sendTyping( const QString &who, bool typing ) snt->go( true ); } -void Client::sendWebcamInvite( const QString &who ) +void Client::sendWebcamInvite( const TQString &who ) { if( !d->webcamTask->transmitting() ) d->webcamTask->registerWebcam(); @@ -323,7 +323,7 @@ void Client::sendWebcamInvite( const QString &who ) d->webcamTask->addPendingInvitation( who ); } -void Client::sendMessage( const QString &to, const QString &msg ) +void Client::sendMessage( const TQString &to, const TQString &msg ) { SendMessageTask *smt = new SendMessageTask( d->root ); smt->setTarget( to ); @@ -332,7 +332,7 @@ void Client::sendMessage( const QString &to, const QString &msg ) smt->go( true ); } -void Client::setChatSessionState( const QString &to, bool close ) +void Client::setChatSessionState( const TQString &to, bool close ) { ChatSessionTask *cst = new ChatSessionTask( d->root ); cst->setTarget( to ); @@ -340,24 +340,24 @@ void Client::setChatSessionState( const QString &to, bool close ) cst->go( true ); } -void Client::sendBuzz( const QString &to ) +void Client::sendBuzz( const TQString &to ) { SendMessageTask *smt = new SendMessageTask( d->root ); smt->setTarget( to ); - smt->setText( QString::fromLatin1( "" ) ); + smt->setText( TQString::fromLatin1( "" ) ); smt->setPicureFlag( pictureFlag() ); smt->go( true ); } -void Client::sendFile( unsigned int transferId, const QString &to, const QString &msg, KURL url ) +void Client::sendFile( unsigned int transferId, const TQString &to, const TQString &msg, KURL url ) { SendFileTask *sft = new SendFileTask( d->root ); - QObject::connect( sft, SIGNAL(complete(unsigned int)), SIGNAL(fileTransferComplete(unsigned int)) ); - QObject::connect( sft, SIGNAL(bytesProcessed(unsigned int, unsigned int)), SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); - QObject::connect( sft, SIGNAL(error(unsigned int, int, const QString &)), SIGNAL(fileTransferError(unsigned int, int, const QString &)) ); + TQObject::connect( sft, TQT_SIGNAL(complete(unsigned int)), TQT_SIGNAL(fileTransferComplete(unsigned int)) ); + TQObject::connect( sft, TQT_SIGNAL(bytesProcessed(unsigned int, unsigned int)), TQT_SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); + TQObject::connect( sft, TQT_SIGNAL(error(unsigned int, int, const TQString &)), TQT_SIGNAL(fileTransferError(unsigned int, int, const TQString &)) ); - QObject::connect( this, SIGNAL(fileTransferCanceled( unsigned int )), sft, SLOT(canceled( unsigned int )) ); + TQObject::connect( this, TQT_SIGNAL(fileTransferCanceled( unsigned int )), sft, TQT_SLOT(canceled( unsigned int )) ); sft->setTarget( to ); sft->setMessage( msg ); @@ -366,14 +366,14 @@ void Client::sendFile( unsigned int transferId, const QString &to, const QString sft->go( true ); } -void Client::receiveFile( unsigned int transferId, const QString &userId, KURL remoteURL, KURL localURL ) +void Client::receiveFile( unsigned int transferId, const TQString &userId, KURL remoteURL, KURL localURL ) { ReceiveFileTask *rft = new ReceiveFileTask( d->root ); - QObject::connect( rft, SIGNAL(complete(unsigned int)), SIGNAL(fileTransferComplete(unsigned int)) ); - QObject::connect( rft, SIGNAL(bytesProcessed(unsigned int, unsigned int)), SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); - QObject::connect( rft, SIGNAL(error(unsigned int, int, const QString &)), SIGNAL(fileTransferError(unsigned int, int, const QString &)) ); - QObject::connect( this, SIGNAL(fileTransferCanceled( unsigned int )), rft, SLOT(canceled( unsigned int )) ); + TQObject::connect( rft, TQT_SIGNAL(complete(unsigned int)), TQT_SIGNAL(fileTransferComplete(unsigned int)) ); + TQObject::connect( rft, TQT_SIGNAL(bytesProcessed(unsigned int, unsigned int)), TQT_SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); + TQObject::connect( rft, TQT_SIGNAL(error(unsigned int, int, const TQString &)), TQT_SIGNAL(fileTransferError(unsigned int, int, const TQString &)) ); + TQObject::connect( this, TQT_SIGNAL(fileTransferCanceled( unsigned int )), rft, TQT_SLOT(canceled( unsigned int )) ); rft->setRemoteUrl( remoteURL ); rft->setLocalUrl( localURL ); @@ -386,7 +386,7 @@ void Client::receiveFile( unsigned int transferId, const QString &userId, KURL r rft->go( true ); } -void Client::rejectFile( const QString &userId, KURL remoteURL ) +void Client::rejectFile( const TQString &userId, KURL remoteURL ) { if( remoteURL.url().startsWith( "http://" ) ) return; @@ -404,7 +404,7 @@ void Client::cancelFileTransfer( unsigned int transferId ) emit fileTransferCanceled( transferId ); } -void Client::changeStatus( Yahoo::Status status, const QString &message, Yahoo::StatusType type ) +void Client::changeStatus( Yahoo::Status status, const TQString &message, Yahoo::StatusType type ) { kdDebug(YAHOO_RAW_DEBUG) << "status: " << status << " message: " << message @@ -416,12 +416,12 @@ void Client::changeStatus( Yahoo::Status status, const QString &message, Yahoo:: cst->go( true ); if( status == Yahoo::StatusInvisible ) - stealthContact( QString(), Yahoo::StealthOnline, Yahoo::StealthClear ); + stealthContact( TQString(), Yahoo::StealthOnline, Yahoo::StealthClear ); setStatus( status ); } -void Client::sendAuthReply( const QString &userId, bool accept, const QString &msg ) +void Client::sendAuthReply( const TQString &userId, bool accept, const TQString &msg ) { SendAuthRespTask *sarp = new SendAuthRespTask( d->root ); sarp->setGranted( accept ); @@ -444,7 +444,7 @@ void Client::sendPing() // ***** Contactlist handling ***** -void Client::stealthContact(QString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state) +void Client::stealthContact(TQString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state) { StealthTask *st = new StealthTask( d->root ); st->setTarget( userId ); @@ -453,12 +453,12 @@ void Client::stealthContact(QString const &userId, Yahoo::StealthMode mode, Yaho st->go( true ); } -void Client::addBuddy( const QString &userId, const QString &group, const QString &message ) +void Client::addBuddy( const TQString &userId, const TQString &group, const TQString &message ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyAddResult( const QString &, const QString &, bool )), - SIGNAL(buddyAddResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyAddResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyAddResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::AddBuddy ); mbt->setTarget( userId ); @@ -467,12 +467,12 @@ void Client::addBuddy( const QString &userId, const QString &group, const QStrin mbt->go( true ); } -void Client::removeBuddy( const QString &userId, const QString &group ) +void Client::removeBuddy( const TQString &userId, const TQString &group ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyRemoveResult( const QString &, const QString &, bool )), - SIGNAL(buddyRemoveResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyRemoveResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyRemoveResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::RemoveBuddy ); mbt->setTarget( userId ); @@ -480,12 +480,12 @@ void Client::removeBuddy( const QString &userId, const QString &group ) mbt->go( true ); } -void Client::moveBuddy( const QString &userId, const QString &oldGroup, const QString &newGroup ) +void Client::moveBuddy( const TQString &userId, const TQString &oldGroup, const TQString &newGroup ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyChangeGroupResult( const QString &, const QString &, bool )), - SIGNAL(buddyChangeGroupResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyChangeGroupResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyChangeGroupResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::MoveBuddy ); mbt->setTarget( userId ); @@ -511,11 +511,11 @@ void Client::processPictureQueue() if( !d->pictureRequestQueue.isEmpty() ) { - QTimer::singleShot( 1000, this, SLOT(processPictureQueue()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(processPictureQueue()) ); } } -void Client::requestPicture( const QString &userId ) +void Client::requestPicture( const TQString &userId ) { if( !d->buddyListReady ) { @@ -528,16 +528,16 @@ void Client::requestPicture( const QString &userId ) rpt->go( true ); } -void Client::downloadPicture( const QString &userId, KURL url, int checksum ) +void Client::downloadPicture( const TQString &userId, KURL url, int checksum ) { if( !d->iconLoader ) { d->iconLoader = new YahooBuddyIconLoader( this ); - QObject::connect( d->iconLoader, SIGNAL(fetchedBuddyIcon(const QString&, const QByteArray &, int )), - SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int ) ) ); + TQObject::connect( d->iconLoader, TQT_SIGNAL(fetchedBuddyIcon(const TQString&, const TQByteArray &, int )), + TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int ) ) ); } - d->iconLoader->fetchBuddyIcon( QString(userId), KURL(url), checksum ); + d->iconLoader->fetchBuddyIcon( TQString(userId), KURL(url), checksum ); } void Client::uploadPicture( KURL url ) @@ -553,7 +553,7 @@ void Client::uploadPicture( KURL url ) spt->go( true ); } -void Client::sendPictureChecksum( const QString &userId, int checksum ) +void Client::sendPictureChecksum( const TQString &userId, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << "checksum: " << checksum << endl; SendPictureTask *spt = new SendPictureTask( d->root ); @@ -564,7 +564,7 @@ void Client::sendPictureChecksum( const QString &userId, int checksum ) spt->go( true ); } -void Client::sendPictureInformation( const QString &userId, const QString &url, int checksum ) +void Client::sendPictureInformation( const TQString &userId, const TQString &url, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << "checksum: " << checksum << endl; SendPictureTask *spt = new SendPictureTask( d->root ); @@ -590,17 +590,17 @@ void Client::setPictureStatus( Yahoo::PictureStatus status ) // ***** Webcam handling ***** -void Client::requestWebcam( const QString &userId ) +void Client::requestWebcam( const TQString &userId ) { d->webcamTask->requestWebcam( userId ); } -void Client::closeWebcam( const QString &userId ) +void Client::closeWebcam( const TQString &userId ) { d->webcamTask->closeWebcam( userId ); } -void Client::sendWebcamImage( const QByteArray &ar ) +void Client::sendWebcamImage( const TQByteArray &ar ) { d->webcamTask->sendWebcamImage( ar ); } @@ -611,38 +611,38 @@ void Client::closeOutgoingWebcam() } -void Client::grantWebcamAccess( const QString &userId ) +void Client::grantWebcamAccess( const TQString &userId ) { d->webcamTask->grantAccess( userId ); } // ***** Conferences ***** -void Client::inviteConference( const QString &room, const QStringList &members, const QString &msg ) +void Client::inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->inviteConference( room, members, msg ); } -void Client::addInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void Client::addInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { d->conferenceTask->addInvite( room, who, members, msg ); } -void Client::joinConference( const QString &room, const QStringList &members ) +void Client::joinConference( const TQString &room, const TQStringList &members ) { d->conferenceTask->joinConference( room, members ); } -void Client::declineConference( const QString &room, const QStringList &members, const QString &msg ) +void Client::declineConference( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->declineConference( room, members, msg ); } -void Client::leaveConference( const QString &room, const QStringList &members ) +void Client::leaveConference( const TQString &room, const TQStringList &members ) { d->conferenceTask->leaveConference( room, members ); } -void Client::sendConferenceMessage( const QString &room, const QStringList &members, const QString &msg ) +void Client::sendConferenceMessage( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->sendMessage( room, members, msg ); } @@ -658,8 +658,8 @@ void Client::saveYABEntry( YABEntry &entry ) ModifyYABTask *myt = new ModifyYABTask( d->root ); myt->setAction( ModifyYABTask::EditEntry ); myt->setEntry( entry ); - QObject::connect( myt, SIGNAL(gotEntry( YABEntry * )), this, SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( myt, SIGNAL(error( YABEntry *, const QString &)), this, SIGNAL(modifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect( myt, TQT_SIGNAL(gotEntry( YABEntry * )), this, TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( myt, TQT_SIGNAL(error( YABEntry *, const TQString &)), this, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & ))); myt->go(true); } @@ -668,8 +668,8 @@ void Client::addYABEntry( YABEntry &entry ) ModifyYABTask *myt = new ModifyYABTask( d->root ); myt->setAction( ModifyYABTask::AddEntry ); myt->setEntry( entry ); - QObject::connect( myt, SIGNAL(gotEntry( YABEntry * )), this, SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( myt, SIGNAL(error( YABEntry *, const QString &)), this, SIGNAL(modifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect( myt, TQT_SIGNAL(gotEntry( YABEntry * )), this, TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( myt, TQT_SIGNAL(error( YABEntry *, const TQString &)), this, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & ))); myt->go(true); } @@ -697,7 +697,7 @@ void Client::joinYahooChatRoom( const Yahoo::ChatRoom &room ) d->yahooChatTask->joinRoom( room ); } -void Client::sendYahooChatMessage( const QString &msg, const QString &handle ) +void Client::sendYahooChatMessage( const TQString &msg, const TQString &handle ) { d->yahooChatTask->sendYahooChatMessage( msg, handle ); } @@ -708,21 +708,21 @@ void Client::leaveChat() } // ***** other ***** -void Client::notifyError( const QString &info, const QString & errorString, LogLevel level ) +void Client::notifyError( const TQString &info, const TQString & errorString, LogLevel level ) { - kdDebug(YAHOO_RAW_DEBUG) << QString::fromLatin1("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3") + kdDebug(YAHOO_RAW_DEBUG) << TQString::fromLatin1("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3") .arg(info).arg(errorString).arg(level) << endl; d->errorString = errorString; d->errorInformation = info; emit error( level ); } -QString Client::userId() +TQString Client::userId() { return d->user; } -void Client::setUserId( const QString & userId ) +void Client::setUserId( const TQString & userId ) { d->user = userId; } @@ -743,22 +743,22 @@ void Client::setStatusOnConnect( Yahoo::Status status ) d->statusOnConnect = status; } -void Client::setStatusMessageOnConnect( const QString &msg ) +void Client::setStatusMessageOnConnect( const TQString &msg ) { d->statusMessageOnConnect = msg; } -void Client::setVerificationWord( const QString &word ) +void Client::setVerificationWord( const TQString &word ) { d->loginTask->setVerificationWord( word ); } -QString Client::password() +TQString Client::password() { return d->pass; } -QString Client::host() +TQString Client::host() { return d->host; } @@ -788,17 +788,17 @@ void Client::setPictureChecksum( int cs ) d->pictureChecksum = cs; } -QString Client::yCookie() +TQString Client::yCookie() { return d->yCookie; } -QString Client::tCookie() +TQString Client::tCookie() { return d->tCookie; } -QString Client::cCookie() +TQString Client::cCookie() { return d->cCookie; } @@ -823,7 +823,7 @@ void Client::send( Transfer* request ) d->stream->write( request ); } -void Client::debug(const QString &str) +void Client::debug(const TQString &str) { qDebug( "CLIENT: %s", str.ascii() ); } @@ -839,104 +839,104 @@ void Client::initTasks() return; d->statusTask = new StatusNotifierTask( d->root ); - QObject::connect( d->statusTask, SIGNAL( statusChanged(const QString&,int,const QString&,int,int,int) ), - SIGNAL( statusChanged(const QString&,int,const QString&,int,int,int) ) ); - QObject::connect( d->statusTask, SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ), - SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) ); - QObject::connect( d->statusTask, SIGNAL( loginResponse( int, const QString& ) ), - SLOT( slotLoginResponse( int, const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( authorizationRejected( const QString&, const QString& ) ), - SIGNAL( authorizationRejected( const QString&, const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( authorizationAccepted( const QString& ) ), - SIGNAL( authorizationAccepted( const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( gotAuthorizationRequest( const QString &, const QString &, const QString & ) ), - SIGNAL( gotAuthorizationRequest( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( statusChanged(const TQString&,int,const TQString&,int,int,int) ), + TQT_SIGNAL( statusChanged(const TQString&,int,const TQString&,int,int,int) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ), + TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( loginResponse( int, const TQString& ) ), + TQT_SLOT( slotLoginResponse( int, const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( authorizationRejected( const TQString&, const TQString& ) ), + TQT_SIGNAL( authorizationRejected( const TQString&, const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( authorizationAccepted( const TQString& ) ), + TQT_SIGNAL( authorizationAccepted( const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ) ) ); d->mailTask = new MailNotifierTask( d->root ); - QObject::connect( d->mailTask, SIGNAL( mailNotify(const QString&, const QString&, int) ), - SIGNAL( mailNotify(const QString&, const QString&, int) ) ); + TQObject::connect( d->mailTask, TQT_SIGNAL( mailNotify(const TQString&, const TQString&, int) ), + TQT_SIGNAL( mailNotify(const TQString&, const TQString&, int) ) ); d->messageReceiverTask = new MessageReceiverTask( d->root ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotIm(const QString&, const QString&, long, int) ), - SIGNAL( gotIm(const QString&, const QString&, long, int) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( systemMessage(const QString&) ), - SIGNAL( systemMessage(const QString&) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotTypingNotify(const QString &, int) ), - SIGNAL( typingNotify(const QString &, int) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotBuzz( const QString &, long ) ), - SIGNAL( gotBuzz( const QString &, long ) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotWebcamInvite(const QString &) ), - SIGNAL( gotWebcamInvite(const QString &) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotIm(const TQString&, const TQString&, long, int) ), + TQT_SIGNAL( gotIm(const TQString&, const TQString&, long, int) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( systemMessage(const TQString&) ), + TQT_SIGNAL( systemMessage(const TQString&) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotTypingNotify(const TQString &, int) ), + TQT_SIGNAL( typingNotify(const TQString &, int) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotBuzz( const TQString &, long ) ), + TQT_SIGNAL( gotBuzz( const TQString &, long ) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotWebcamInvite(const TQString &) ), + TQT_SIGNAL( gotWebcamInvite(const TQString &) ) ); d->pictureNotifierTask = new PictureNotifierTask( d->root ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureStatusNotify( const QString &, int ) ), - SIGNAL( pictureStatusNotify( const QString &, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureChecksumNotify( const QString &, int ) ), - SIGNAL( pictureChecksumNotify( const QString &, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureInfoNotify( const QString &, KURL, int ) ), - SIGNAL( pictureInfoNotify( const QString &, KURL, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureRequest( const QString & ) ), - SIGNAL( pictureRequest( const QString & ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureUploaded( const QString &, int ) ), - SIGNAL( pictureUploaded( const QString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureStatusNotify( const TQString &, int ) ), + TQT_SIGNAL( pictureStatusNotify( const TQString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureChecksumNotify( const TQString &, int ) ), + TQT_SIGNAL( pictureChecksumNotify( const TQString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureInfoNotify( const TQString &, KURL, int ) ), + TQT_SIGNAL( pictureInfoNotify( const TQString &, KURL, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureRequest( const TQString & ) ), + TQT_SIGNAL( pictureRequest( const TQString & ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureUploaded( const TQString &, int ) ), + TQT_SIGNAL( pictureUploaded( const TQString &, int ) ) ); d->webcamTask = new WebcamTask( d->root ); - QObject::connect( d->webcamTask, SIGNAL( webcamImageReceived( const QString &, const QPixmap &) ), - SIGNAL( webcamImageReceived( const QString &, const QPixmap &) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamNotAvailable( const QString & ) ), - SIGNAL( webcamNotAvailable( const QString & ) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamClosed( const QString &, int ) ), - SIGNAL( webcamClosed( const QString &, int ) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamPaused(const QString&) ), - SIGNAL( webcamPaused(const QString&) ) ); - QObject::connect( d->webcamTask, SIGNAL( readyForTransmission() ), - SIGNAL( webcamReadyForTransmission() ) ); - QObject::connect( d->webcamTask, SIGNAL( stopTransmission() ), - SIGNAL( webcamStopTransmission() ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerJoined( const QString &) ), - SIGNAL( webcamViewerJoined( const QString &) ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerLeft( const QString &) ), - SIGNAL( webcamViewerLeft( const QString &) ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerRequest( const QString &) ), - SIGNAL( webcamViewerRequest( const QString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamImageReceived( const TQString &, const TQPixmap &) ), + TQT_SIGNAL( webcamImageReceived( const TQString &, const TQPixmap &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamNotAvailable( const TQString & ) ), + TQT_SIGNAL( webcamNotAvailable( const TQString & ) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamClosed( const TQString &, int ) ), + TQT_SIGNAL( webcamClosed( const TQString &, int ) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamPaused(const TQString&) ), + TQT_SIGNAL( webcamPaused(const TQString&) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( readyForTransmission() ), + TQT_SIGNAL( webcamReadyForTransmission() ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( stopTransmission() ), + TQT_SIGNAL( webcamStopTransmission() ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerJoined( const TQString &) ), + TQT_SIGNAL( webcamViewerJoined( const TQString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerLeft( const TQString &) ), + TQT_SIGNAL( webcamViewerLeft( const TQString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerRequest( const TQString &) ), + TQT_SIGNAL( webcamViewerRequest( const TQString &) ) ); d->conferenceTask = new ConferenceTask( d->root ); - QObject::connect( d->conferenceTask, SIGNAL( gotInvite( const QString &, const QString &, const QString &, const QStringList & ) ), - SIGNAL( gotConferenceInvite( const QString &, const QString &, const QString &, const QStringList & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( gotMessage( const QString &, const QString &, const QString & ) ), - SIGNAL( gotConferenceMessage( const QString &, const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userJoined( const QString &, const QString & ) ), - SIGNAL( confUserJoined( const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userLeft( const QString &, const QString & ) ), - SIGNAL( confUserLeft( const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userDeclined( const QString &, const QString &, const QString & ) ), - SIGNAL( confUserDeclined( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( gotInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ) ), + TQT_SIGNAL( gotConferenceInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( gotMessage( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( gotConferenceMessage( const TQString &, const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userJoined( const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserJoined( const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userLeft( const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserLeft( const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userDeclined( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserDeclined( const TQString &, const TQString &, const TQString & ) ) ); d->yabTask = new YABTask( d->root ); - QObject::connect( d->yabTask, SIGNAL( gotEntry( YABEntry * ) ), - SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( d->yabTask, SIGNAL( gotRevision( long, bool ) ), - SIGNAL( gotYABRevision( long, bool ) ) ); + TQObject::connect( d->yabTask, TQT_SIGNAL( gotEntry( YABEntry * ) ), + TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( d->yabTask, TQT_SIGNAL( gotRevision( long, bool ) ), + TQT_SIGNAL( gotYABRevision( long, bool ) ) ); d->fileTransferTask = new FileTransferNotifierTask( d->root ); - QObject::connect( d->fileTransferTask, SIGNAL(incomingFileTransfer( const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap & )), - SIGNAL(incomingFileTransfer( const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap & )) ); + TQObject::connect( d->fileTransferTask, TQT_SIGNAL(incomingFileTransfer( const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap & )), + TQT_SIGNAL(incomingFileTransfer( const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap & )) ); d->yahooChatTask = new YahooChatTask( d->root ); - QObject::connect( d->yahooChatTask, SIGNAL(gotYahooChatCategories( const QDomDocument & )), - SIGNAL(gotYahooChatCategories( const QDomDocument & )) ); - QObject::connect( d->yahooChatTask, SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )), - SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatRoomJoined( int , int , const QString &, const QString & ) ), - SIGNAL(chatRoomJoined( int , int , const QString &, const QString & ) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatBuddyHasJoined( const QString &, const QString &, bool ) ), - SIGNAL(chatBuddyHasJoined( const QString &, const QString &, bool ) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatBuddyHasLeft(QString,QString) ), - SIGNAL(chatBuddyHasLeft(QString,QString) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatMessageReceived( const QString &, const QString &, const QString & ) ), - SIGNAL(chatMessageReceived( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )), + TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )), + TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatRoomJoined( int , int , const TQString &, const TQString & ) ), + TQT_SIGNAL(chatRoomJoined( int , int , const TQString &, const TQString & ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatBuddyHasJoined( const TQString &, const TQString &, bool ) ), + TQT_SIGNAL(chatBuddyHasJoined( const TQString &, const TQString &, bool ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString) ), + TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatMessageReceived( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL(chatMessageReceived( const TQString &, const TQString &, const TQString & ) ) ); } void Client::deleteTasks() diff --git a/kopete/protocols/yahoo/libkyahoo/client.h b/kopete/protocols/yahoo/libkyahoo/client.h index f4a3fef5..662c81ff 100644 --- a/kopete/protocols/yahoo/libkyahoo/client.h +++ b/kopete/protocols/yahoo/libkyahoo/client.h @@ -22,7 +22,7 @@ #ifndef LIBYAHOO_CLIENT_H #define LIBYAHOO_CLIENT_H -#include +#include #include #include "transfer.h" @@ -52,14 +52,14 @@ Q_OBJECT enum LogLevel { Debug, Info, Notice, Warning, Error, Critical }; - Client(QObject *parent=0); + Client(TQObject *parent=0); ~Client(); /** * Set the Yahoo Id of the account * @param username The Yahoo Id */ - void setUserId( const QString& userName ); + void setUserId( const TQString& userName ); /** * Set the picture checksum @@ -76,7 +76,7 @@ Q_OBJECT * @param userId The yahoo ID that will be connected. * @param pass The password. */ - void connect( const QString &host, const uint port, const QString &userId, const QString &pass ); + void connect( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** Cancel active login attemps */ void cancelConnect(); @@ -88,10 +88,10 @@ Q_OBJECT int error(); /** Returns a description of the error */ - QString errorString(); + TQString errorString(); /** Returns information about what went wrong */ - QString errorInformation(); + TQString errorInformation(); /** * Specifies the status we connect with. @@ -107,10 +107,10 @@ Q_OBJECT * will change the status message after the login. * @param msg the status message to connect with */ - void setStatusMessageOnConnect( const QString &msg ); + void setStatusMessageOnConnect( const TQString &msg ); /** Accessors needed for login */ - QString host(); + TQString host(); int port(); /** @@ -118,27 +118,27 @@ Q_OBJECT * @param to the buddy that should be notified * @param typing true if there is typing activity, false if not */ - void sendTyping( const QString &to, bool typing ); + void sendTyping( const TQString &to, bool typing ); /** * Send a Message * @param to the buddy that should receive the message * @param msg the message */ - void sendMessage( const QString &to, const QString &msg ); + void sendMessage( const TQString &to, const TQString &msg ); /** * Register / Unregister a chatsession * @param to the buddy, the chatsession belongs to * @param close if true, the chatsession will be closed, if false, it will be opened */ - void setChatSessionState( const QString &to, bool close ); + void setChatSessionState( const TQString &to, bool close ); /** * Send a Buzz * @param to the buddy that should receive the buzz */ - void sendBuzz( const QString &to ); + void sendBuzz( const TQString &to ); /** * Change our status @@ -146,14 +146,14 @@ Q_OBJECT * @param message the status message that will be set * @param type Yahoo::StatusTypeAvailable means that the user is available, Yahoo::StatusTypeAway means that the user is away from the keyboard */ - void changeStatus(Yahoo::Status status, const QString &message, Yahoo::StatusType type); + void changeStatus(Yahoo::Status status, const TQString &message, Yahoo::StatusType type); /** * Set the verification word that is needed for a account verification after * too many wrong login attempts. * @param word the verification word */ - void setVerificationWord( const QString &word ); + void setVerificationWord( const TQString &word ); /** * Add a buddy to the contact list @@ -161,14 +161,14 @@ Q_OBJECT * @param group the group where the buddy will be placed * @param message the message that will be sent to the buddy along the authorization request */ - void addBuddy( const QString &userId, const QString &group, const QString &message = QString::fromLatin1("Please add me") ); + void addBuddy( const TQString &userId, const TQString &group, const TQString &message = TQString::fromLatin1("Please add me") ); /** * Remove a buddy from the contact list * @param userId the yahoo ID of the buddy that should be removed * @param group the group where the buddy belongs to */ - void removeBuddy( const QString &userId, const QString &group ); + void removeBuddy( const TQString &userId, const TQString &group ); /** * Move a buddy into another group @@ -176,7 +176,7 @@ Q_OBJECT * @param oldGroup the group where the buddy belongs to * @param newGroup the group where the buddy will be placed */ - void moveBuddy( const QString &userId, const QString &oldGroup, const QString &newGroup ); + void moveBuddy( const TQString &userId, const TQString &oldGroup, const TQString &newGroup ); /** * Change the stealth status of a buddy @@ -184,13 +184,13 @@ Q_OBJECT * @param mode defines the Stealth mode that is changed. That can be "Appear Offline", "Appear Online" or "Apper permanently offline" * @param state the status of the specified Stealth mode. Active, Not Active or Clear */ - void stealthContact( QString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state ); + void stealthContact( TQString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state ); /** * Request the buddy's picture * @param userId the yahoo ID of the buddy */ - void requestPicture( const QString &userId ); + void requestPicture( const TQString &userId ); /** * Download the buddy's picture @@ -198,7 +198,7 @@ Q_OBJECT * @param url the url of the picture * @param checksum the checksum of the picture */ - void downloadPicture( const QString &userId, KURL url, int checksum ); + void downloadPicture( const TQString &userId, KURL url, int checksum ); /** * Send our picture @@ -211,7 +211,7 @@ Q_OBJECT * @param userId the yahoo ID of the buddy. Can be a null string if the picture has changed. * @param checksum the checksum of the picture */ - void sendPictureChecksum( const QString &userId, int checksum ); + void sendPictureChecksum( const TQString &userId, int checksum ); /** * Send information about our picture @@ -219,7 +219,7 @@ Q_OBJECT * @param url the url of our picture * @param checksum the checksum of the picture */ - void sendPictureInformation( const QString &userId, const QString &url, int checksum ); + void sendPictureInformation( const TQString &userId, const TQString &url, int checksum ); /** * Notify the buddies about our new status @@ -231,25 +231,25 @@ Q_OBJECT * Send a response to the webcam invite ( Accept / Decline ) * @param userId the yahoo ID of the sender */ - void requestWebcam( const QString &userId ); + void requestWebcam( const TQString &userId ); /** * Stop receiving of webcam * @param userId the yahoo ID of the sender */ - void closeWebcam( const QString &userId ); + void closeWebcam( const TQString &userId ); /** * Invite the user to view your Webcam * @param userId the yahoo ID of the receiver */ - void sendWebcamInvite( const QString &userId ); + void sendWebcamInvite( const TQString &userId ); /** * transmit a new image to the watchers * @param image the image data */ - void sendWebcamImage( const QByteArray &image ); + void sendWebcamImage( const TQByteArray &image ); /** Stop the webcam transmission */ void closeOutgoingWebcam(); @@ -258,7 +258,7 @@ Q_OBJECT * Allow a buddy to watch the cam * @param userId the yahoo ID of the receiver */ - void grantWebcamAccess( const QString &userId ); + void grantWebcamAccess( const TQString &userId ); /** * Invite buddies to a conference @@ -266,7 +266,7 @@ Q_OBJECT * @param members a list of members that are invited to the conference * @param msg the invite message */ - void inviteConference( const QString &room, const QStringList &members, const QString &msg ); + void inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Invite buddies to a already existing conference @@ -275,14 +275,14 @@ Q_OBJECT * @param members a list of members that are already in the conference * @param msg the invite message */ - void addInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); + void addInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); /** * Join a conference * @param room the name of the conference * @param members a list of members that are already in the conference */ - void joinConference( const QString &room, const QStringList &members ); + void joinConference( const TQString &room, const TQStringList &members ); /** * Decline to join a conference @@ -290,14 +290,14 @@ Q_OBJECT * @param members a list of members that are in the conference * @param msg the reason why we don't want to join */ - void declineConference( const QString &room, const QStringList &members, const QString &msg ); + void declineConference( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Leave the conference * @param room the name of the conference * @param members a list of members that are in the conference */ - void leaveConference( const QString &room, const QStringList &members ); + void leaveConference( const TQString &room, const TQStringList &members ); /** * Send a message to the conference @@ -305,7 +305,7 @@ Q_OBJECT * @param members a list of members that are in the conference * @param msg the message */ - void sendConferenceMessage( const QString &room, const QStringList &members, const QString &msg ); + void sendConferenceMessage( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Send a authorization request response @@ -313,7 +313,7 @@ Q_OBJECT * @param accept true, if the user is allowed to see our status, false if not * @param msg the reason for our decision */ - void sendAuthReply( const QString &userId, bool accept, const QString &msg ); + void sendAuthReply( const TQString &userId, bool accept, const TQString &msg ); /** * Fetches all entries of the YAB @@ -347,7 +347,7 @@ Q_OBJECT * @param msg a description of the file to be sent * @param url the location of the file to be sent */ - void sendFile( unsigned int transferId, const QString &userId, const QString &msg, KURL url ); + void sendFile( unsigned int transferId, const TQString &userId, const TQString &msg, KURL url ); /** * Receive a file from a buddy @@ -356,14 +356,14 @@ Q_OBJECT * @param remoteURL the url of the file * @param localURL the location where the file should be stored */ - void receiveFile( unsigned int transferId, const QString &userId, KURL remoteURL, KURL localURL ); + void receiveFile( unsigned int transferId, const TQString &userId, KURL remoteURL, KURL localURL ); /** * Reject a file offered by a buddy * @param userId yahoo ID of the sender * @param remoteURL the url of the file */ - void rejectFile( const QString &userId, KURL remoteURL ); + void rejectFile( const TQString &userId, KURL remoteURL ); /** * Canceled a filetransfer @@ -394,7 +394,7 @@ Q_OBJECT /** * Send a chat message */ - void sendYahooChatMessage( const QString &msg, const QString &handle ); + void sendYahooChatMessage( const TQString &msg, const TQString &handle ); /************* INTERNAL (FOR USE BY TASKS) METHODS @@ -408,13 +408,13 @@ Q_OBJECT /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** The current user's user ID */ - QString userId(); + TQString userId(); /** The current user's password */ - QString password(); + TQString password(); /** current Session ID */ uint sessionID(); @@ -445,20 +445,20 @@ Q_OBJECT /** * Accessors to the cookies */ - QString yCookie(); - QString tCookie(); - QString cCookie(); + TQString yCookie(); + TQString tCookie(); + TQString cCookie(); /** * Error */ - void notifyError( const QString &info, const QString &errorString, LogLevel level ); + void notifyError( const TQString &info, const TQString &errorString, LogLevel level ); signals: /** CONNECTION EVENTS */ /** * Notifies that the login process has succeeded. */ - void loggedIn( int, const QString& ); + void loggedIn( int, const TQString& ); /** * Notifies that the login process has failed @@ -482,91 +482,91 @@ Q_OBJECT /** * Notifies about our buddies and groups */ - void gotBuddy( const QString &, const QString &, const QString & ); + void gotBuddy( const TQString &, const TQString &, const TQString & ); /** * Notifies about adding buddies */ - void buddyAddResult( const QString &, const QString &, bool ); + void buddyAddResult( const TQString &, const TQString &, bool ); /** * Notifies about removing buddies */ - void buddyRemoveResult( const QString &, const QString &, bool ); + void buddyRemoveResult( const TQString &, const TQString &, bool ); /** * Notifies about buddies changing groups */ - void buddyChangeGroupResult( const QString &, const QString &, bool ); + void buddyChangeGroupResult( const TQString &, const TQString &, bool ); /** * Notifies about the status of online buddies */ - void statusChanged( const QString&, int, const QString&, int, int, int ); + void statusChanged( const TQString&, int, const TQString&, int, int, int ); /** * Notifies about the stealth status of buddies */ - void stealthStatusChanged( const QString &, Yahoo::StealthStatus ); + void stealthStatusChanged( const TQString &, Yahoo::StealthStatus ); /** * Notifies about mails */ - void mailNotify( const QString&, const QString&, int ); + void mailNotify( const TQString&, const TQString&, int ); /** * We got a new message */ - void gotIm( const QString&, const QString&, long, int ); + void gotIm( const TQString&, const TQString&, long, int ); /** * We got a new system message */ - void systemMessage( const QString& ); + void systemMessage( const TQString& ); /** * The buddy is typing a message */ - void typingNotify( const QString &, int ); + void typingNotify( const TQString &, int ); /** * The buddy has invited us to view his webcam */ - void gotWebcamInvite(const QString &); + void gotWebcamInvite(const TQString &); /** * Notifies about a BUZZ notification */ - void gotBuzz( const QString &, long ); + void gotBuzz( const TQString &, long ); /** * Notifies about a changed picture status */ - void pictureStatusNotify( const QString &, int ); + void pictureStatusNotify( const TQString &, int ); /** * Notifies about a picture checksum */ - void pictureChecksumNotify( const QString &, int ); + void pictureChecksumNotify( const TQString &, int ); /** * Notifies about a picture */ - void pictureInfoNotify( const QString &, KURL, int ); + void pictureInfoNotify( const TQString &, KURL, int ); /** * The iconLoader has successfully downloaded a picutre */ - void pictureDownloaded( const QString &, const QByteArray &, int ); + void pictureDownloaded( const TQString &, const TQByteArray &, int ); /** * A Buddy asks for our picture */ - void pictureRequest( const QString & ); + void pictureRequest( const TQString & ); /** * Information about the picture upload */ - void pictureUploaded( const QString &, int ); + void pictureUploaded( const TQString &, int ); /** * We've received a webcam image from a buddy */ - void webcamImageReceived( const QString &, const QPixmap &); + void webcamImageReceived( const TQString &, const TQPixmap &); /** * The requested Webcam is not available */ - void webcamNotAvailable( const QString & ); + void webcamNotAvailable( const TQString & ); /** * The connection to the webcam was closed */ - void webcamClosed( const QString &, int ); + void webcamClosed( const TQString &, int ); /** * The webcamtransmission is paused */ - void webcamPaused(const QString&); + void webcamPaused(const TQString&); /** * The webcam connection is ready for transmission */ @@ -578,47 +578,47 @@ Q_OBJECT /** * A new buddy watches the cam */ - void webcamViewerJoined( const QString & ); + void webcamViewerJoined( const TQString & ); /** * A buddy no longer watches the cam */ - void webcamViewerLeft( const QString & ); + void webcamViewerLeft( const TQString & ); /** * A buddy wants to watch the cam */ - void webcamViewerRequest( const QString & ); + void webcamViewerRequest( const TQString & ); /** * A buddy invited us to a conference */ - void gotConferenceInvite( const QString &, const QString &, const QString &, const QStringList & ); + void gotConferenceInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ); /** * A conference message was received */ - void gotConferenceMessage( const QString &, const QString &, const QString & ); + void gotConferenceMessage( const TQString &, const TQString &, const TQString & ); /** * A buddy joined the conference */ - void confUserJoined( const QString &, const QString & ); + void confUserJoined( const TQString &, const TQString & ); /** * A buddy left the conference */ - void confUserLeft( const QString &, const QString & ); + void confUserLeft( const TQString &, const TQString & ); /** * A buddy declined to join the conference */ - void confUserDeclined( const QString &, const QString &, const QString & ); + void confUserDeclined( const TQString &, const TQString &, const TQString & ); /** * A buddy accepted our authorization request */ - void authorizationAccepted( const QString & ); + void authorizationAccepted( const TQString & ); /** * A buddy rejected our authorization request */ - void authorizationRejected( const QString &, const QString & ); + void authorizationRejected( const TQString &, const TQString & ); /** * A buddy requests authorization */ - void gotAuthorizationRequest( const QString &, const QString &, const QString & ); + void gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); /** * A revision of the Yahoo Addressbook was received */ @@ -630,7 +630,7 @@ Q_OBJECT /** * An error occurred while saving a Yahoo Addressbook entry */ - void modifyYABEntryError( YABEntry *, const QString & ); + void modifyYABEntryError( YABEntry *, const TQString & ); /** * number of Bytes transferred for FileTransfer id */ @@ -642,7 +642,7 @@ Q_OBJECT /** * An error occurred during the filetransfer */ - void fileTransferError( unsigned int, int, const QString & ); + void fileTransferError( unsigned int, int, const TQString & ); /** * filetransfer canceled */ @@ -650,32 +650,32 @@ Q_OBJECT /** * A buddy is trying to send us a file */ - void incomingFileTransfer( const QString &, const QString &, long, const QString &, - const QString &, unsigned long, const QPixmap & ); + void incomingFileTransfer( const TQString &, const TQString &, long, const TQString &, + const TQString &, unsigned long, const TQPixmap & ); /** * We have received the list of yahoo chat categories */ - void gotYahooChatCategories( const QDomDocument & ); + void gotYahooChatCategories( const TQDomDocument & ); /** * We have received the list of chatrooms for the categories */ - void gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & ); + void gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & ); /** * We have joined a chatroom */ - void chatRoomJoined( int, int, const QString &, const QString & ); + void chatRoomJoined( int, int, const TQString &, const TQString & ); /** * A buddy has joined a chatroom */ - void chatBuddyHasJoined( const QString &, const QString &, bool ); + void chatBuddyHasJoined( const TQString &, const TQString &, bool ); /** * A buddy has left a chatroom */ - void chatBuddyHasLeft( const QString &, const QString & ); + void chatBuddyHasLeft( const TQString &, const TQString & ); /** * We have received a message in a chatroom */ - void chatMessageReceived( const QString &, const QString &, const QString & ); + void chatMessageReceived( const TQString &, const TQString &, const TQString & ); protected slots: // INTERNAL, FOR USE BY TASKS' finished() SIGNALS // void lt_loginFinished(); @@ -687,7 +687,7 @@ Q_OBJECT /** * Used by tasks to identify a response to a login attempt */ - void slotLoginResponse( int, const QString& ); + void slotLoginResponse( int, const TQString& ); /** * Used by the client stream to notify errors to upper layers. @@ -726,7 +726,7 @@ Q_OBJECT ClientPrivate* d; KNetworkConnector *m_connector; - QTimer *m_pingTimer; + TQTimer *m_pingTimer; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp b/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp index 9ab0d4c1..59d3b3fa 100644 --- a/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include ConferenceTask::ConferenceTask(Task* parent) : Task(parent) @@ -78,16 +78,16 @@ void ConferenceTask::parseInvitation( YMSGTransfer *t ) kdDebug(YAHOO_RAW_DEBUG) ; int i = 0; - QString who = t->firstParam( 50 ); - QString room = t->firstParam( 57 ); - bool utf = QString( t->firstParam( 97 ) ).toInt() == 1; - QString msg; + TQString who = t->firstParam( 50 ); + TQString room = t->firstParam( 57 ); + bool utf = TQString( t->firstParam( 97 ) ).toInt() == 1; + TQString msg; if( utf ) - msg = QString::fromUtf8( t->firstParam( 58 ) ); + msg = TQString::fromUtf8( t->firstParam( 58 ) ); else msg = t->firstParam( 58 ); - QStringList members; + TQStringList members; for( i = 0; i < t->paramCount( 52 ); ++i ) members.append( t->nthParam( 52, i ) ); for( i = 0; i < t->paramCount( 53 ); ++i ) @@ -103,12 +103,12 @@ void ConferenceTask::parseMessage( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString from = t->firstParam( 3 ); - bool utf = QString( t->firstParam( 97 ) ).toInt() == 1; - QString msg; + TQString room = t->firstParam( 57 ); + TQString from = t->firstParam( 3 ); + bool utf = TQString( t->firstParam( 97 ) ).toInt() == 1; + TQString msg; if( utf ) - msg = QString::fromUtf8( t->firstParam( 14 ) ); + msg = TQString::fromUtf8( t->firstParam( 14 ) ); else msg = t->firstParam( 14 ); @@ -120,8 +120,8 @@ void ConferenceTask::parseUserJoined( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 53 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 53 ); if( !who.isEmpty() && !room.isEmpty() ) emit userJoined( who, room ); @@ -131,8 +131,8 @@ void ConferenceTask::parseUserLeft( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 56 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 56 ); if( !who.isEmpty() && !room.isEmpty() ) emit userLeft( who, room ); @@ -142,15 +142,15 @@ void ConferenceTask::parseUserDeclined( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 54 ); - QString msg = t->firstParam( 14 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 54 ); + TQString msg = t->firstParam( 14 ); if( !who.isEmpty() && !room.isEmpty() ) emit userDeclined( who, room, msg ); } -void ConferenceTask::inviteConference( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -161,14 +161,14 @@ void ConferenceTask::inviteConference( const QString &room, const QStringList &m t->setParam( 57, room.local8Bit() ); t->setParam( 58, msg.local8Bit() ); t->setParam( 97, 1 ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 52, (*it).local8Bit() ); t->setParam( 13, "0" ); send( t ); } -void ConferenceTask::addInvite( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void ConferenceTask::addInvite( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -176,15 +176,15 @@ void ConferenceTask::addInvite( const QString &room, const QStringList &who, con t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - QString whoList = who.first(); + TQString whoList = who.first(); for( int i = 1; i < who.size(); i++ ) - whoList += QString(",%1").arg( who[i] ); + whoList += TQString(",%1").arg( who[i] ); t->setParam( 51, whoList.local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 58, msg.local8Bit() ); t->setParam( 97, 1 ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) { t->setParam( 52, (*it).local8Bit() ); t->setParam( 53, (*it).local8Bit() ); // Note: this field should only be set if the buddy has already joined the conference, but no harm is done this way @@ -194,28 +194,28 @@ void ConferenceTask::addInvite( const QString &room, const QStringList &who, con send( t ); } -void ConferenceTask::joinConference( const QString &room, const QStringList &members ) +void ConferenceTask::joinConference( const TQString &room, const TQStringList &members ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogon); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); send( t ); } -void ConferenceTask::declineConference( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::declineConference( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfDecline); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 14, msg.utf8() ); @@ -223,28 +223,28 @@ void ConferenceTask::declineConference( const QString &room, const QStringList & send( t ); } -void ConferenceTask::leaveConference( const QString &room, const QStringList &members ) +void ConferenceTask::leaveConference( const TQString &room, const TQStringList &members ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogoff); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); send( t ); } -void ConferenceTask::sendMessage( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::sendMessage( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfMsg); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 53, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 14, msg.utf8() ); diff --git a/kopete/protocols/yahoo/libkyahoo/conferencetask.h b/kopete/protocols/yahoo/libkyahoo/conferencetask.h index f8a101c5..5f027c0f 100644 --- a/kopete/protocols/yahoo/libkyahoo/conferencetask.h +++ b/kopete/protocols/yahoo/libkyahoo/conferencetask.h @@ -34,18 +34,18 @@ public: bool take(Transfer *transfer); bool forMe( const Transfer* transfer ) const; - void joinConference( const QString &room, const QStringList &members ); - void declineConference( const QString &room, const QStringList &members, const QString &msg ); - void leaveConference( const QString &room, const QStringList &members ); - void sendMessage( const QString &room, const QStringList &members, const QString &msg ); - void inviteConference( const QString &room, const QStringList &members, const QString &msg ); - void addInvite( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); + void joinConference( const TQString &room, const TQStringList &members ); + void declineConference( const TQString &room, const TQStringList &members, const TQString &msg ); + void leaveConference( const TQString &room, const TQStringList &members ); + void sendMessage( const TQString &room, const TQStringList &members, const TQString &msg ); + void inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ); + void addInvite( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); signals: - void gotInvite( const QString &who, const QString &room, const QString &msg, const QStringList &members); - void gotMessage( const QString &who, const QString &room, const QString &msg ); - void userJoined( const QString &who, const QString &room ); - void userLeft( const QString &who, const QString &room ); - void userDeclined( const QString &who, const QString &room, const QString &msg ); + void gotInvite( const TQString &who, const TQString &room, const TQString &msg, const TQStringList &members); + void gotMessage( const TQString &who, const TQString &room, const TQString &msg ); + void userJoined( const TQString &who, const TQString &room ); + void userLeft( const TQString &who, const TQString &room ); + void userDeclined( const TQString &who, const TQString &room, const TQString &msg ); private: void parseInvitation( YMSGTransfer *transfer ); void parseMessage( YMSGTransfer *transfer ); diff --git a/kopete/protocols/yahoo/libkyahoo/connector.cpp b/kopete/protocols/yahoo/libkyahoo/connector.cpp index 773f8757..cc7dcfa3 100644 --- a/kopete/protocols/yahoo/libkyahoo/connector.cpp +++ b/kopete/protocols/yahoo/libkyahoo/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setPeerAddressNone(); } @@ -35,7 +35,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -48,11 +48,11 @@ Q_UINT16 Connector::peerPort() const void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/yahoo/libkyahoo/connector.h b/kopete/protocols/yahoo/libkyahoo/connector.h index dea818fb..02b47019 100644 --- a/kopete/protocols/yahoo/libkyahoo/connector.h +++ b/kopete/protocols/yahoo/libkyahoo/connector.h @@ -22,8 +22,8 @@ #define LIBKYAHOO_CONNECTOR_H -#include -#include "qhostaddress.h" +#include +#include "tqhostaddress.h" class ByteStream; @@ -31,15 +31,15 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -48,11 +48,11 @@ signals: protected: void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp b/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp index 2c73ef2b..573c5ccf 100644 --- a/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp +++ b/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp @@ -22,9 +22,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -33,7 +33,7 @@ #include "ymsgprotocol.h" #include "ymsgtransfer.h" -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_YMSGProtocol = new YMSGProtocol( this, "ymsgprotocol" ); } @@ -47,7 +47,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { // store locally int oldsize = m_in.size(); @@ -75,7 +75,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) //m_in.remove( 0, parsedBytes ); // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -112,7 +112,7 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef YAHOO_COREPROTOCOL_DEBUG kdDebug(YAHOO_RAW_DEBUG) << " contains " << bytes.count() << " bytes" << endl; @@ -133,11 +133,11 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) { kdDebug(YAHOO_RAW_DEBUG) << " got YMSGTransfer" << endl; YMSGTransfer *yt = (YMSGTransfer *) outgoing; - QByteArray bytesOut = yt->serialize(); + TQByteArray bytesOut = yt->serialize(); - //QTextStream dout( bytesOut, QIODevice::WriteOnly ); - //dout.setEncoding( QTextStream::Latin1 ); - //dout.setByteOrder( QDataStream::LittleEndian ); + //TQTextStream dout( bytesOut, TQIODevice::WriteOnly ); + //dout.setEncoding( TQTextStream::Latin1 ); + //dout.setByteOrder( TQDataStream::LittleEndian ); //dout << bytesOut; //kdDebug(YAHOO_RAW_DEBUG) << " " << bytesOut; emit outgoingData( bytesOut ); @@ -149,7 +149,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; // processing incoming data and reassembling it into transfers @@ -163,8 +163,8 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) return bytesParsed; } - QByteArray tempWire = wire; - QDataStream din( tempWire, IO_ReadOnly ); + TQByteArray tempWire = wire; + TQDataStream din( tempWire, IO_ReadOnly ); // look at first four bytes and decide what to do with the chunk if ( okToProceed( din ) ) @@ -194,8 +194,8 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) else { kdDebug(YAHOO_RAW_DEBUG) << " - not a valid YMSG packet. Trying to recover." << endl; - QTextStream s( wire, IO_ReadOnly ); - QString remaining = s.read(); + TQTextStream s( wire, IO_ReadOnly ); + TQString remaining = s.read(); int pos = remaining.find( "YMSG", bytesParsed ); if( pos >= 0 ) { @@ -217,12 +217,12 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -void CoreProtocol::slotOutgoingData( const QByteArray &out ) +void CoreProtocol::slotOutgoingData( const TQByteArray &out ) { qDebug( "%s", out.data() ); } -bool CoreProtocol::okToProceed( QDataStream &din) +bool CoreProtocol::okToProceed( TQDataStream &din) { if ( din.atEnd() ) { diff --git a/kopete/protocols/yahoo/libkyahoo/coreprotocol.h b/kopete/protocols/yahoo/libkyahoo/coreprotocol.h index 6432093c..c1c05d89 100644 --- a/kopete/protocols/yahoo/libkyahoo/coreprotocol.h +++ b/kopete/protocols/yahoo/libkyahoo/coreprotocol.h @@ -22,7 +22,7 @@ #ifndef YAHOO_CORE_PROTOCOL_H #define YAHOO_CORE_PROTOCOL_H -#include +#include class Transfer; class YMSGProtocol; @@ -47,7 +47,7 @@ public: * This requires parsing out each FLAP, etc. from the incoming data * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -69,7 +69,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer @@ -79,21 +79,21 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QByteArray & ); + void slotOutgoingData( const TQByteArray & ); protected: /** * Check that there is data to read, and set the protocol's state if there isn't any. */ - bool okToProceed( QDataStream & ); + bool okToProceed( TQDataStream & ); /** * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received + TQByteArray m_in; // buffer containing unprocessed bytes we received int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp index e011dfeb..fd9657f7 100644 --- a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp @@ -20,8 +20,8 @@ #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include //#include @@ -76,12 +76,12 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 4 */ - QString to; /* key = 5 */ - QString url; /* key = 20 */ + TQString from; /* key = 4 */ + TQString to; /* key = 5 */ + TQString url; /* key = 20 */ long expires; /* key = 38 */ - QString msg; /* key = 14 */ - QString filename; /* key = 27 */ + TQString msg; /* key = 14 */ + TQString filename; /* key = 27 */ unsigned long size; /* key = 28 */ from = t->firstParam( 4 ); @@ -108,22 +108,22 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t ) unsigned int right = url.findRev( '?' ); filename = url.mid( left, right - left ); - emit incomingFileTransfer( from, url, expires, msg, filename, size, QPixmap() ); + emit incomingFileTransfer( from, url, expires, msg, filename, size, TQPixmap() ); } void FileTransferNotifierTask::parseFileTransfer7( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 4 */ - QString to; /* key = 5 */ - QString url; /* key = 20 */ + TQString from; /* key = 4 */ + TQString to; /* key = 5 */ + TQString url; /* key = 20 */ long expires; /* key = 38 */ - QString msg; /* key = 14 */ - QString filename; /* key = 27 */ + TQString msg; /* key = 14 */ + TQString filename; /* key = 27 */ unsigned long size; /* key = 28 */ - QByteArray preview; /* key = 267 */ - QPixmap previewPixmap; + TQByteArray preview; /* key = 267 */ + TQPixmap previewPixmap; if( t->firstParam( 222 ).toInt() == 2 ) return; // user cancelled the file transfer @@ -137,7 +137,7 @@ void FileTransferNotifierTask::parseFileTransfer7( YMSGTransfer *t ) size = t->firstParam( 28 ).toULong(); // FIXME (same) - //preview = QByteArray::fromBase64( t->firstParam( 267 ) ); + //preview = TQByteArray::fromBase64( t->firstParam( 267 ) ); if( preview.size() > 0 ) { diff --git a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h index 24b684f4..d5f6c7f2 100644 --- a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h @@ -39,8 +39,8 @@ public: protected: virtual bool forMe( const Transfer *transfer ) const; signals: - void incomingFileTransfer( const QString &who, const QString &url, long expires, const QString &msg , - const QString &fname, unsigned long size, const QPixmap &preview ); + void incomingFileTransfer( const TQString &who, const TQString &url, long expires, const TQString &msg , + const TQString &fname, unsigned long size, const TQPixmap &preview ); private: void parseFileTransfer( YMSGTransfer *transfer ); void parseFileTransfer7( YMSGTransfer *transfer ); diff --git a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp index eca3318a..15c3b078 100644 --- a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp +++ b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp @@ -19,8 +19,8 @@ #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { } @@ -34,13 +34,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -61,7 +61,7 @@ bool InputProtocolBase::okToProceed() } // FIXME: need to be checked -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -72,7 +72,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > 1024 ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) diff --git a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h index 18a3dab3..e236bc68 100644 --- a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h +++ b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include +#include class Transfer; /** @@ -32,7 +32,7 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Returns a value describing the state of the object. @@ -45,13 +45,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -61,12 +61,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream *m_din; + TQDataStream *m_din; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/listtask.cpp b/kopete/protocols/yahoo/libkyahoo/listtask.cpp index b1e35940..d299f963 100644 --- a/kopete/protocols/yahoo/libkyahoo/listtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/listtask.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include "listtask.h" #include "transfer.h" @@ -64,8 +64,8 @@ void ListTask::parseBuddyList( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString group; - QString buddy; + TQString group; + TQString buddy; // We need some low-level parsing here // FIXME same: need to check @@ -90,7 +90,7 @@ void ListTask::parseBuddyList( YMSGTransfer *t ) case 301: if( p.second == "319"){ kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Parsed buddy: " << buddy << " in group " << group << endl; - emit gotBuddy( buddy, QString(), group ); + emit gotBuddy( buddy, TQString(), group ); } } } @@ -100,11 +100,11 @@ void ListTask::parseStealthList( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString raw; + TQString raw; raw = t->firstParam( 185 ); - const QStringList buddies = QStringList::split( ',', raw ); - for ( QStringList::ConstIterator it = buddies.begin(); it != buddies.end(); ++it ) + const TQStringList buddies = TQStringList::split( ',', raw ); + for ( TQStringList::ConstIterator it = buddies.begin(); it != buddies.end(); ++it ) { emit stealthStatusChanged( *it, Yahoo::StealthActive ); } diff --git a/kopete/protocols/yahoo/libkyahoo/listtask.h b/kopete/protocols/yahoo/libkyahoo/listtask.h index cc058004..514df17e 100644 --- a/kopete/protocols/yahoo/libkyahoo/listtask.h +++ b/kopete/protocols/yahoo/libkyahoo/listtask.h @@ -39,8 +39,8 @@ protected: void parseBuddyList( YMSGTransfer *transfer ); void parseStealthList( YMSGTransfer *transfer ); signals: - void gotBuddy(const QString&, const QString&, const QString&); - void stealthStatusChanged( const QString&, Yahoo::StealthStatus ); + void gotBuddy(const TQString&, const TQString&, const TQString&); + void stealthStatusChanged( const TQString&, Yahoo::StealthStatus ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/logintask.cpp b/kopete/protocols/yahoo/libkyahoo/logintask.cpp index d3b5be7b..3c3127b2 100644 --- a/kopete/protocols/yahoo/libkyahoo/logintask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/logintask.cpp @@ -25,7 +25,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include #include @@ -179,10 +179,10 @@ void LoginTask::sendAuthResp(YMSGTransfer* t) { kdDebug(YAHOO_RAW_DEBUG) ; - QString sn = t->firstParam( 1 ); - QString seed = t->firstParam( 94 ); + TQString sn = t->firstParam( 1 ); + TQString seed = t->firstParam( 94 ); m_challengeString = seed; - QString version_s = t->firstParam( 13 ); + TQString version_s = t->firstParam( 13 ); m_sessionID = t->id(); int version = version_s.toInt(); @@ -205,23 +205,23 @@ void LoginTask::sendAuthResp(YMSGTransfer* t) emit haveSessionID( m_sessionID ); } -void LoginTask::sendAuthSixteenStage1(const QString& sn, const QString& seed) +void LoginTask::sendAuthSixteenStage1(const TQString& sn, const TQString& seed) { - const QString YahooTokenUrl = "https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%1&passwd=%2&chal=%3"; + const TQString YahooTokenUrl = "https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%1&passwd=%2&chal=%3"; kdDebug(YAHOO_RAW_DEBUG) << "seed:" << seed << endl; - m_stage1Data= QString::null; + m_stage1Data= TQString::null; /* construct a URL from the seed and request tokens */ - QByteArray encodedUrl; - QString fullUrl = YahooTokenUrl.arg(sn, client()->password(), seed); + TQByteArray encodedUrl; + TQString fullUrl = YahooTokenUrl.arg(sn, client()->password(), seed); KURL tokenUrl(fullUrl); KIO::Job* job = KIO::get(tokenUrl, true, false); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(handleAuthSixteenStage1Data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(handleAuthSixteenStage1Result(KIO::Job*))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(handleAuthSixteenStage1Data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(handleAuthSixteenStage1Result(KIO::Job*))); } -void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const QByteArray& data) +void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) << "data:" << data << endl; m_stage1Data.append(data); @@ -230,12 +230,12 @@ void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const QByteArray& dat void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) { int responseNumber = -1; - QString token; + TQString token; int error = job->error(); kdDebug(YAHOO_RAW_DEBUG) << "error:" << error << endl; if (error == 0) { - QStringList responses = QStringList::split("\r\n", m_stage1Data); + TQStringList responses = TQStringList::split("\r\n", m_stage1Data); responseNumber = responses[0].toInt(); if (responses.count() >= 3) { @@ -250,26 +250,26 @@ void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) { case -1: /* error in the received stream */ - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "unknown error logging in" << endl; break; case 1212: /* password incorrect */ - emit loginResponse(Yahoo::LoginPasswd, QString()); + emit loginResponse(Yahoo::LoginPasswd, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "password incorrect" << endl; break; case 1213: /* security lock */ - emit loginResponse(Yahoo::LoginLock, QString()); + emit loginResponse(Yahoo::LoginLock, TQString()); break; case 1235: /* username does not exist */ - emit loginResponse(Yahoo::LoginUname, QString()); + emit loginResponse(Yahoo::LoginUname, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "user does not exist" << endl; break; case 1214: case 1236: - emit loginResponse(Yahoo::LoginVerify, QString()); + emit loginResponse(Yahoo::LoginVerify, TQString()); break; case 100: /* username or password missing */ /*FIXME handle this */ @@ -287,21 +287,21 @@ void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) } } -void LoginTask::sendAuthSixteenStage2(const QString& token) +void LoginTask::sendAuthSixteenStage2(const TQString& token) { - const QString YahooLoginUrl = "https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%1"; + const TQString YahooLoginUrl = "https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%1"; kdDebug(YAHOO_RAW_DEBUG) << "token:" << token << endl; - m_stage2Data = QString::null; - QString fullUrl = YahooLoginUrl.arg(token); + m_stage2Data = TQString::null; + TQString fullUrl = YahooLoginUrl.arg(token); KURL loginUrl(fullUrl); KIO::Job* job = KIO::get(loginUrl, true, false); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(handleAuthSixteenStage2Data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(handleAuthSixteenStage2Result(KIO::Job*))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(handleAuthSixteenStage2Result(KIO::Job*))); } -void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data) +void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) << "data:" << data << endl; m_stage2Data.append(data); @@ -309,13 +309,13 @@ void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data) void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) { - QString crumb; + TQString crumb; int responseNumber = -1; int error = job->error(); kdDebug(YAHOO_RAW_DEBUG) << "error:" << error << endl; if (error == 0) { - QStringList responses = QStringList::split("\r\n", m_stage2Data); + TQStringList responses = TQStringList::split("\r\n", m_stage2Data); kdDebug(YAHOO_RAW_DEBUG) << responses << endl; responseNumber = responses[0].toInt(); if (responseNumber == 0) @@ -331,10 +331,10 @@ void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) switch(responseNumber) { case -1: - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); break; case 100: - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); break; default: /* try to login anyways */ break; @@ -342,22 +342,22 @@ void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) } else { - QString cryptString = crumb; + TQString cryptString = crumb; cryptString.append(m_challengeString); sendAuthSixteenStage3(cryptString); } } } -void LoginTask::sendAuthSixteenStage3(const QString& cryptString) +void LoginTask::sendAuthSixteenStage3(const TQString& cryptString) { kdDebug(YAHOO_RAW_DEBUG) << " with crypt string" << cryptString << endl; - //QByteArray cryptStringHash = QCryptographicHash::hash( cryptString.toAscii(), + //TQByteArray cryptStringHash = QCryptographicHash::hash( cryptString.toAscii(), // QCryptographicHash::Md5 ); //cryptStringHash = cryptStringHash.toBase64(); - QString cryptStringHash = KMD5( cryptString.ascii() ).base64Digest(); + TQString cryptStringHash = KMD5( cryptString.ascii() ).base64Digest(); cryptStringHash = cryptStringHash.replace('+', '.'); cryptStringHash = cryptStringHash.replace('/', '_'); @@ -379,7 +379,7 @@ void LoginTask::sendAuthSixteenStage3(const QString& cryptString) } -void LoginTask::sendAuthResp_pre_0x0b(const QString &/*sn*/, const QString &/*seed*/) +void LoginTask::sendAuthResp_pre_0x0b(const TQString &/*sn*/, const TQString &/*seed*/) { kdDebug(YAHOO_RAW_DEBUG) ; } @@ -392,7 +392,7 @@ void LoginTask::handleAuthResp(YMSGTransfer *t) { case( Yahoo::ServiceList ): kdDebug(YAHOO_RAW_DEBUG) << "Emitting Signal" << endl; - emit loginResponse( Yahoo::LoginOk, QString() ); + emit loginResponse( Yahoo::LoginOk, TQString() ); break; case( Yahoo::ServiceAuthResp ): kdDebug(YAHOO_RAW_DEBUG) << "Emitting Signal" << endl; @@ -415,7 +415,7 @@ void LoginTask::parseCookies( YMSGTransfer *t ) for( int i = 0; i < t->paramCount( 59 ); ++i) { - QString cookie; + TQString cookie; cookie = t->nthParam( 59, i ); if( cookie.startsWith( "Y" ) ) { @@ -435,27 +435,27 @@ void LoginTask::parseCookies( YMSGTransfer *t ) emit haveCookies(); } -void LoginTask::setVerificationWord( const QString &word ) +void LoginTask::setVerificationWord( const TQString &word ) { m_verificationWord = word; } -const QString& LoginTask::yCookie() +const TQString& LoginTask::yCookie() { return m_yCookie; } -const QString& LoginTask::tCookie() +const TQString& LoginTask::tCookie() { return m_tCookie; } -const QString& LoginTask::cCookie() +const TQString& LoginTask::cCookie() { return m_cCookie; } -const QString& LoginTask::loginCookie() +const TQString& LoginTask::loginCookie() { return m_loginCookie; } diff --git a/kopete/protocols/yahoo/libkyahoo/logintask.h b/kopete/protocols/yahoo/libkyahoo/logintask.h index a3701692..563cd3a4 100644 --- a/kopete/protocols/yahoo/libkyahoo/logintask.h +++ b/kopete/protocols/yahoo/libkyahoo/logintask.h @@ -47,47 +47,47 @@ public: void reset(); void setStateOnConnect( Yahoo::Status status ); - void setVerificationWord( const QString &word ); + void setVerificationWord( const TQString &word ); - const QString &yCookie(); - const QString &cCookie(); - const QString &tCookie(); - const QString &loginCookie(); + const TQString &yCookie(); + const TQString &cCookie(); + const TQString &tCookie(); + const TQString &loginCookie(); protected: virtual bool forMe( const Transfer* transfer ) const; enum State { InitialState, SentVerify, GotVerifyACK, SentAuth, GotAuthACK, SentAuthResp }; void sendVerify(); void sendAuth(YMSGTransfer* transfer); void sendAuthResp(YMSGTransfer* transfer); - void sendAuthResp_0x0b(const QString &sn, const QString &seed, uint sessionID); - void sendAuthResp_pre_0x0b(const QString &sn, const QString &seed); + void sendAuthResp_0x0b(const TQString &sn, const TQString &seed, uint sessionID); + void sendAuthResp_pre_0x0b(const TQString &sn, const TQString &seed); void handleAuthResp(YMSGTransfer *transfer); void parseCookies( YMSGTransfer *transfer ); - void sendAuthSixteenStage1(const QString& sn, const QString& seed); - void sendAuthSixteenStage2(const QString& token); - void sendAuthSixteenStage3(const QString& cryptString); + void sendAuthSixteenStage1(const TQString& sn, const TQString& seed); + void sendAuthSixteenStage2(const TQString& token); + void sendAuthSixteenStage3(const TQString& cryptString); protected slots: - void handleAuthSixteenStage1Data(KIO::Job*, const QByteArray& data); + void handleAuthSixteenStage1Data(KIO::Job*, const TQByteArray& data); void handleAuthSixteenStage1Result(KIO::Job*); - void handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data); + void handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray& data); void handleAuthSixteenStage2Result(KIO::Job*); signals: void haveSessionID( uint ); void haveCookies(); - void loginResponse( int, const QString& ); + void loginResponse( int, const TQString& ); void buddyListReady(); private: State mState; Yahoo::Status m_stateOnConnect; - QString m_yCookie; - QString m_tCookie; - QString m_cCookie; - QString m_loginCookie; - QString m_verificationWord; - QString m_stage1Data; - QString m_stage2Data; - QString m_challengeString; + TQString m_yCookie; + TQString m_tCookie; + TQString m_cCookie; + TQString m_loginCookie; + TQString m_verificationWord; + TQString m_stage1Data; + TQString m_stage2Data; + TQString m_challengeString; uint m_sessionID; }; diff --git a/kopete/protocols/yahoo/libkyahoo/logofftask.cpp b/kopete/protocols/yahoo/libkyahoo/logofftask.cpp index 0531283b..4816ba44 100644 --- a/kopete/protocols/yahoo/libkyahoo/logofftask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/logofftask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include LogoffTask::LogoffTask(Task* parent) : Task(parent) diff --git a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp index 1d637877..de6a1080 100644 --- a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include "mailnotifiertask.h" #include "transfer.h" @@ -62,15 +62,15 @@ void MailNotifierTask::parseMail( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString count = t->firstParam( 9 ); - QString mail = t->firstParam( 42 ); - QString from = t->firstParam( 43 ); - QString subject = t->firstParam( 18 ); + TQString count = t->firstParam( 9 ); + TQString mail = t->firstParam( 42 ); + TQString from = t->firstParam( 43 ); + TQString subject = t->firstParam( 18 ); if( !mail.isEmpty() && !from.isEmpty() && !subject.isEmpty() ) - emit mailNotify( QString::fromLatin1( "%1 <%2>").arg( from, mail ), subject, count.toInt() ); + emit mailNotify( TQString::fromLatin1( "%1 <%2>").arg( from, mail ), subject, count.toInt() ); else - emit mailNotify( QString(), QString(), count.toInt()); + emit mailNotify( TQString(), TQString(), count.toInt()); } #include "mailnotifiertask.moc" diff --git a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h index 1564eb16..d2c03bdd 100644 --- a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h @@ -38,7 +38,7 @@ protected: virtual bool forMe( const Transfer *transfer ) const; void parseMail( YMSGTransfer *transfer ); signals: - void mailNotify(const QString&, const QString&, int); + void mailNotify(const TQString&, const TQString&, int); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp index 698552a3..769b4abe 100644 --- a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include "messagereceivertask.h" #include "transfer.h" @@ -73,12 +73,12 @@ void MessageReceiverTask::parseMessage( YMSGTransfer *t ) int cnt = t->paramCount( 5 ); for( int i = 0; i < cnt; ++i ) { - QString to = t->nthParam( 5, i ); - QString timestamp = t->nthParamSeparated( 15, i, 4 ); - QString utf8 = t->nthParamSeparated( 97, i, 4 ); - QString from = t->nthParamSeparated( 1, i, 4 ).isEmpty() ? t->nthParam( 4, i ) : t->nthParamSeparated( 1, i, 4 ); - QString msg = t->nthParamSeparated( 14, i, 4 ); - QString sysmsg = t->nthParamSeparated( 16, i, 4 ); + TQString to = t->nthParam( 5, i ); + TQString timestamp = t->nthParamSeparated( 15, i, 4 ); + TQString utf8 = t->nthParamSeparated( 97, i, 4 ); + TQString from = t->nthParamSeparated( 1, i, 4 ).isEmpty() ? t->nthParam( 4, i ) : t->nthParamSeparated( 1, i, 4 ); + TQString msg = t->nthParamSeparated( 14, i, 4 ); + TQString sysmsg = t->nthParamSeparated( 16, i, 4 ); // The arrangement of the key->value pairs is different when there is only one message in the packet. // Separating by key "5" (sender) doesn't work in that case, because the "1" and "4" keys are sent before the "5" key @@ -98,7 +98,7 @@ void MessageReceiverTask::parseMessage( YMSGTransfer *t ) } if( utf8.startsWith( "1" ) ) - msg = QString::fromUtf8( msg.latin1() ); + msg = TQString::fromUtf8( msg.latin1() ); if( t->service() == Yahoo::ServiceSysMessage ) emit systemMessage( sysmsg ); @@ -116,11 +116,11 @@ void MessageReceiverTask::parseNotify( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from = t->firstParam( 4 ); - //QString to = t->firstParam( 5 ); - QString type = t->firstParam( 49 ); - QString stat = t->firstParam( 13 ); - QString ind = t->firstParam( 14 ); + TQString from = t->firstParam( 4 ); + //TQString to = t->firstParam( 5 ); + TQString type = t->firstParam( 49 ); + TQString stat = t->firstParam( 13 ); + TQString ind = t->firstParam( 14 ); if( type.startsWith( "TYPING" ) ) emit gotTypingNotify( from, stat.toInt() ); diff --git a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h index 6ff26bca..89536443 100644 --- a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h +++ b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h @@ -39,11 +39,11 @@ protected: void parseMessage( YMSGTransfer *transfer ); void parseNotify( YMSGTransfer *transfer ); signals: - void gotIm(const QString&, const QString&, long, int); - void gotBuzz( const QString &who, long tm ); - void systemMessage(const QString&); - void gotTypingNotify(const QString &, int); - void gotWebcamInvite(const QString &); + void gotIm(const TQString&, const TQString&, long, int); + void gotBuzz( const TQString &who, long tm ); + void systemMessage(const TQString&); + void gotTypingNotify(const TQString &, int); + void gotWebcamInvite(const TQString &); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp index 018d0e84..e83b1e4b 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp @@ -139,22 +139,22 @@ void ModifyBuddyTask::moveBuddy() send( mov ); } -void ModifyBuddyTask::setTarget( const QString &target ) +void ModifyBuddyTask::setTarget( const TQString &target ) { m_target = target; } -void ModifyBuddyTask::setMessage( const QString &text ) +void ModifyBuddyTask::setMessage( const TQString &text ) { m_message = text; } -void ModifyBuddyTask::setGroup( const QString &group ) +void ModifyBuddyTask::setGroup( const TQString &group ) { m_group = group; } -void ModifyBuddyTask::setOldGroup( const QString &old ) +void ModifyBuddyTask::setOldGroup( const TQString &old ) { m_oldGroup = old; } diff --git a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h index 4b135f93..f3ceb73c 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h +++ b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h @@ -37,15 +37,15 @@ public: bool take(Transfer *transfer); void setType( Type type ); - void setMessage( const QString &text ); - void setTarget( const QString &target ); - void setGroup( const QString &group ); - void setOldGroup( const QString &group ); + void setMessage( const TQString &text ); + void setTarget( const TQString &target ); + void setGroup( const TQString &group ); + void setOldGroup( const TQString &group ); signals: - void buddyAddResult( const QString &, const QString &, bool ); - void buddyRemoveResult( const QString &, const QString &, bool ); - void buddyChangeGroupResult( const QString &, const QString &, bool ); + void buddyAddResult( const TQString &, const TQString &, bool ); + void buddyRemoveResult( const TQString &, const TQString &, bool ); + void buddyChangeGroupResult( const TQString &, const TQString &, bool ); protected: virtual bool forMe( const Transfer *transfer ) const; @@ -55,10 +55,10 @@ private: void removeBuddy(); void moveBuddy(); - QString m_message; - QString m_target; - QString m_group; - QString m_oldGroup; + TQString m_message; + TQString m_target; + TQString m_group; + TQString m_oldGroup; Type m_type; }; diff --git a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp index 825f958d..1264272a 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp @@ -21,9 +21,9 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -45,9 +45,9 @@ ModifyYABTask::~ModifyYABTask() void ModifyYABTask::onGo() { kdDebug(YAHOO_RAW_DEBUG) ; - m_socket = new KBufferedSocket( "address.yahoo.com", QString::number(80) ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); + m_socket = new KBufferedSocket( "address.yahoo.com", TQString::number(80) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); m_socket->connect(); } @@ -59,15 +59,15 @@ void ModifyYABTask::setAction( Action action ) void ModifyYABTask::setEntry( const YABEntry &entry ) { - QDomDocument doc(""); - QDomElement root = doc.createElement( "ab" ); - QDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\" "); + TQDomDocument doc(""); + TQDomElement root = doc.createElement( "ab" ); + TQDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\" "); doc.appendChild(instr); root.setAttribute( "k", client()->userId() ); root.setAttribute( "cc", "1" ); doc.appendChild( root ); - QDomElement contact = doc.createElement( "ct" ); + TQDomElement contact = doc.createElement( "ct" ); entry.fillQDomElement( contact ); switch( m_action ) { @@ -91,7 +91,7 @@ void ModifyYABTask::connectFailed( int i) { m_socket->close(); client()->notifyError( i18n( "An error occurred while saving the address book entry." ), - QString( "%1 - %2").arg(i).arg(static_cast( sender() )->errorString()), Client::Error ); + TQString( "%1 - %2").arg(i).arg(static_cast( sender() )->errorString()), Client::Error ); } void ModifyYABTask::connectSucceeded() @@ -99,7 +99,7 @@ void ModifyYABTask::connectSucceeded() kdDebug(YAHOO_RAW_DEBUG) ; KBufferedSocket* socket = const_cast( static_cast( sender() ) ); - QString header = QString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n" + TQString header = TQString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n" "Cookie: Y=%1; T=%2; C=%3 ;B=fckeert1kk1nl&b=2\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" "Host: address.yahoo.com\r\n" @@ -108,9 +108,9 @@ void ModifyYABTask::connectSucceeded() .arg(client()->yCookie()).arg(client()->tCookie()) .arg(client()->cCookie()).arg(m_postData.utf8().size()); - QByteArray buffer; - QByteArray paket; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQByteArray paket; + TQDataStream stream( buffer, IO_WriteOnly ); stream.writeRawBytes( header.local8Bit(), header.length() ); stream.writeRawBytes( m_postData.utf8(), m_postData.utf8().size() ); @@ -123,24 +123,24 @@ void ModifyYABTask::connectSucceeded() return; } - connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); } void ModifyYABTask::slotRead() { KBufferedSocket* socket = const_cast( static_cast( sender() ) ); - QByteArray ar( socket->bytesAvailable() ); + TQByteArray ar( socket->bytesAvailable() ); socket->readBlock( ar.data (), ar.size () ); - QString data( ar ); + TQString data( ar ); data = data.right( data.length() - data.find("") < 0 ) return; // Need more data m_socket->close(); - QDomDocument doc; - QDomNodeList list; - QDomElement e; + TQDomDocument doc; + TQDomNodeList list; + TQDomElement e; int it = 0; doc.setContent( m_data ); diff --git a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h index cb9acde8..543b582c 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h +++ b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h @@ -46,7 +46,7 @@ public: signals: void gotEntry( YABEntry * ); void gotRevision( long rev, bool merged ); - void error( YABEntry *, const QString &); + void error( YABEntry *, const TQString &); private slots: void connectSucceeded(); void connectFailed( int ); @@ -54,8 +54,8 @@ private slots: private: KIO::TransferJob *m_transferJob; KNetwork::KBufferedSocket *m_socket; - QString m_postData; - QString m_data; + TQString m_postData; + TQString m_data; Action m_action; }; diff --git a/kopete/protocols/yahoo/libkyahoo/oscartypes.h b/kopete/protocols/yahoo/libkyahoo/oscartypes.h index 74ee818e..70d19c9a 100644 --- a/kopete/protocols/yahoo/libkyahoo/oscartypes.h +++ b/kopete/protocols/yahoo/libkyahoo/oscartypes.h @@ -19,7 +19,7 @@ #ifndef OSCARTYPES_H #define OSCARTYPES_H -#include +#include namespace Yahoo { diff --git a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp index b88b99c6..d924b3a6 100644 --- a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp @@ -20,7 +20,7 @@ #include "yahootypes.h" #include "client.h" -#include +#include #include #include @@ -119,7 +119,7 @@ void PictureNotifierTask::parsePicture( YMSGTransfer *t ) QString nick; /* key = 4 */ int type; /* key = 13: 1 = request, 2 = notification, 0 = Just changed */ - QString url; /* key = 20 */ + TQString url; /* key = 20 */ int checksum; /* key = 192 */ nick = t->firstParam( 4 ); @@ -139,8 +139,8 @@ void PictureNotifierTask::parsePictureUploadResponse( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString url; - QString error; + TQString url; + TQString error; int expires; url = t->firstParam( 20 ); diff --git a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h index 1a6536af..851c8b9c 100644 --- a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h @@ -42,11 +42,11 @@ protected: void parsePicture( YMSGTransfer *transfer ); void parsePictureUploadResponse( YMSGTransfer *transfer ); signals: - void pictureStatusNotify( const QString &, int ); - void pictureChecksumNotify( const QString &, int ); - void pictureInfoNotify( const QString &, KURL, int ); - void pictureRequest( const QString & ); - void pictureUploaded( const QString &, int ); + void pictureStatusNotify( const TQString &, int ); + void pictureChecksumNotify( const TQString &, int ); + void pictureInfoNotify( const TQString &, KURL, int ); + void pictureRequest( const TQString & ); + void pictureUploaded( const TQString &, int ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/pingtask.cpp b/kopete/protocols/yahoo/libkyahoo/pingtask.cpp index c8a97cd7..c453ff9d 100644 --- a/kopete/protocols/yahoo/libkyahoo/pingtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/pingtask.cpp @@ -21,7 +21,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include PingTask::PingTask(Task* parent) : Task(parent) diff --git a/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp b/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp index 3bca2217..ec2e9f5f 100644 --- a/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp @@ -20,8 +20,8 @@ #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include #include #include @@ -49,7 +49,7 @@ void ReceiveFileTask::onGo() switch( m_type ) { case FileTransferAccept: - m_file = new QFile( m_localUrl.path() ); + m_file = new TQFile( m_localUrl.path() ); if( !m_file->open( IO_WriteOnly ) ) { emit error( m_transferId, KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Could not open file for writing.") ); @@ -58,8 +58,8 @@ void ReceiveFileTask::onGo() return; } m_transferJob = KIO::get( m_remoteUrl, false, false ); - QObject::connect( m_transferJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - QObject::connect( m_transferJob, SIGNAL( data( KIO::Job*, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); delete t; break; case FileTransfer7Accept: @@ -120,7 +120,7 @@ bool ReceiveFileTask::forMe( const Transfer *transfer ) const return false; } -void ReceiveFileTask::slotData( KIO::Job *job, const QByteArray& data ) +void ReceiveFileTask::slotData( KIO::Job *job, const TQByteArray& data ) { Q_UNUSED( job ); kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -168,7 +168,7 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer ) } else if( transfer->firstParam( 249 ).toInt() == 3 ) { - m_file = new QFile( m_localUrl.path() ); + m_file = new TQFile( m_localUrl.path() ); if( !m_file->open( IO_WriteOnly ) ) { emit error( m_transferId, KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Could not open file for writing.") ); @@ -187,19 +187,19 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer ) send( t ); // The server expects a HTTP HEAD command prior to the GET - m_mimetypeJob = KIO::mimetype(QString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") - .arg( QString(transfer->firstParam( 250 )) ).arg( QString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false); + m_mimetypeJob = KIO::mimetype(TQString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") + .arg( TQString(transfer->firstParam( 250 )) ).arg( TQString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false); m_mimetypeJob->addMetaData("cookies", "manual"); - m_mimetypeJob->addMetaData("setcookies", QString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; C=%3;") + m_mimetypeJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; C=%3;") .arg(client()->tCookie()).arg(client()->yCookie()).arg(client()->cCookie()) ); - m_transferJob = KIO::get( QString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") - .arg( QString(transfer->firstParam( 250 )) ).arg( QString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false, false ); - QObject::connect( m_transferJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - QObject::connect( m_transferJob, SIGNAL( data( KIO::Job*, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); + m_transferJob = KIO::get( TQString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") + .arg( TQString(transfer->firstParam( 250 )) ).arg( TQString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false, false ); + TQObject::connect( m_transferJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); m_transferJob->addMetaData("cookies", "manual"); - m_transferJob->addMetaData("setcookies", QString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; path=/; domain=.yahoo.com;") + m_transferJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; path=/; domain=.yahoo.com;") .arg(client()->tCookie()).arg(client()->yCookie()) ); } } @@ -224,7 +224,7 @@ void ReceiveFileTask::setType( Type type ) m_type = type; } -void ReceiveFileTask::setUserId( const QString &userId ) +void ReceiveFileTask::setUserId( const TQString &userId ) { m_userId = userId; } diff --git a/kopete/protocols/yahoo/libkyahoo/receivefiletask.h b/kopete/protocols/yahoo/libkyahoo/receivefiletask.h index 01644178..103f3230 100644 --- a/kopete/protocols/yahoo/libkyahoo/receivefiletask.h +++ b/kopete/protocols/yahoo/libkyahoo/receivefiletask.h @@ -45,10 +45,10 @@ public: void setRemoteUrl( KURL url ); void setLocalUrl( KURL url ); - void setFileName( const QString &filename ); + void setFileName( const TQString &filename ); void setTransferId( unsigned int transferId ); void setType( Type type ); - void setUserId( const QString & userId ); + void setUserId( const TQString & userId ); bool take(Transfer *transfer); @@ -58,10 +58,10 @@ protected: signals: void bytesProcessed( unsigned int, unsigned int ); void complete( unsigned int ); - void error( unsigned int, int, const QString & ); + void error( unsigned int, int, const TQString & ); private slots: - void slotData( KIO::Job *job, const QByteArray &data ); + void slotData( KIO::Job *job, const TQByteArray &data ); void slotComplete( KIO::Job *job ); void canceled( unsigned int ); @@ -70,9 +70,9 @@ private: KURL m_remoteUrl; KURL m_localUrl; - QString m_fileName; - QString m_userId; - QFile *m_file; + TQString m_fileName; + TQString m_userId; + TQFile *m_file; KIO::TransferJob *m_transferJob; KIO::MimetypeJob *m_mimetypeJob; unsigned int m_transferId; diff --git a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp index 27a35430..55fb046e 100644 --- a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp @@ -43,7 +43,7 @@ void RequestPictureTask::onGo() setSuccess(); } -void RequestPictureTask::setTarget( const QString &target ) +void RequestPictureTask::setTarget( const TQString &target ) { m_target = target; } diff --git a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h index 8a96f6e7..05c192cd 100644 --- a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h +++ b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h @@ -33,9 +33,9 @@ public: virtual void onGo(); - void setTarget( const QString &target ); + void setTarget( const TQString &target ); private: - QString m_target; + TQString m_target; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/safedelete.cpp b/kopete/protocols/yahoo/libkyahoo/safedelete.cpp index 2b6b09cf..0b12c370 100644 --- a/kopete/protocols/yahoo/libkyahoo/safedelete.cpp +++ b/kopete/protocols/yahoo/libkyahoo/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include +#include //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,17 +54,17 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -117,7 +117,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -126,7 +126,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/yahoo/libkyahoo/safedelete.h b/kopete/protocols/yahoo/libkyahoo/safedelete.h index fd2ef937..ded0cb31 100644 --- a/kopete/protocols/yahoo/libkyahoo/safedelete.h +++ b/kopete/protocols/yahoo/libkyahoo/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include -#include +#include +#include class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp index 28dfc664..34e94c69 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp @@ -20,7 +20,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include SendAuthRespTask::SendAuthRespTask(Task* parent) : Task(parent) @@ -59,12 +59,12 @@ void SendAuthRespTask::setGranted( bool granted ) m_granted = granted; } -void SendAuthRespTask::setTarget( const QString &to ) +void SendAuthRespTask::setTarget( const TQString &to ) { m_target = to; } -void SendAuthRespTask::setMessage( const QString &msg ) +void SendAuthRespTask::setMessage( const TQString &msg ) { m_msg = msg; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h index fed15168..953dabc3 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h @@ -35,12 +35,12 @@ public: virtual void onGo(); void setGranted( bool ); - void setTarget( const QString &to ); - void setMessage( const QString &msg ); + void setTarget( const TQString &to ); + void setMessage( const TQString &msg ); private: - QString m_target; + TQString m_target; bool m_granted; - QString m_msg; + TQString m_msg; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp b/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp index 5cdcf5c3..48af8684 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include // for random() #include #include @@ -35,7 +35,7 @@ SendFileTask::SendFileTask(Task* parent) : Task(parent) m_transmitted = 0; m_socket = 0; - QTime epoch(0, 0, 0); + TQTime epoch(0, 0, 0); } SendFileTask::~SendFileTask() @@ -132,7 +132,7 @@ void SendFileTask::sendFileTransferInfo() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - KResolverResults results = KResolver::resolve("filetransfer.msg.yahoo.com", QString::number(80)); + KResolverResults results = KResolver::resolve("filetransfer.msg.yahoo.com", TQString::number(80)); if(results.count() > 0) { m_relayHost = results.first().address().toString(); @@ -175,10 +175,10 @@ void SendFileTask::parseTransferAccept(const Transfer *transfer) m_token = KURL::encode_string(t->firstParam(251)); kdDebug(YAHOO_RAW_DEBUG) << "Token: " << m_token << endl; - m_socket = new KStreamSocket( m_relayHost, QString::number(80) ); + m_socket = new KStreamSocket( m_relayHost, TQString::number(80) ); m_socket->setBlocking( true ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); m_socket->connect(); @@ -186,7 +186,7 @@ void SendFileTask::parseTransferAccept(const Transfer *transfer) void SendFileTask::connectFailed( int i ) { - QString err = KSocketBase::errorString(m_socket->error()); + TQString err = KSocketBase::errorString(m_socket->error()); kdDebug(YAHOO_RAW_DEBUG) << i << ": " << err << endl; emit error( m_transferId, i, err ); setError(); @@ -196,8 +196,8 @@ void SendFileTask::connectSucceeded() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); if ( m_file.open(IO_ReadOnly ) ) { @@ -212,7 +212,7 @@ void SendFileTask::connectSucceeded() } kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Sizes: File (" << m_url << "): " << m_file.size() << endl; - QString header = + TQString header = "POST /relay?token=" + m_token + "&sender=" + client()->userId() + "&recver=" + m_target + " HTTP/1.1\r\n" @@ -220,7 +220,7 @@ void SendFileTask::connectSucceeded() "Cache-Control: no-cache\r\n" "Cookie: T=" + client()->tCookie() + "; Y=" + client()->yCookie() + "\r\n" "Host: " + m_relayHost + "\r\n" - "Content-Length: " + QString::number(m_file.size()) + "\r\n" + "Content-Length: " + TQString::number(m_file.size()) + "\r\n" "Connection: Close\r\n\r\n"; kdDebug() << header << endl; stream.writeRawBytes( header.local8Bit(), header.length() ); @@ -232,7 +232,7 @@ void SendFileTask::connectSucceeded() } else { - connect( m_socket, SIGNAL(readyWrite()), this, SLOT(transmitData()) ); + connect( m_socket, TQT_SIGNAL(readyWrite()), this, TQT_SLOT(transmitData()) ); m_socket->enableWrite( true ); } } @@ -271,12 +271,12 @@ void SendFileTask::transmitData() m_socket->enableWrite( true ); } } -void SendFileTask::setTarget( const QString &to ) +void SendFileTask::setTarget( const TQString &to ) { m_target = to; } -void SendFileTask::setMessage( const QString &msg ) +void SendFileTask::setMessage( const TQString &msg ) { m_msg = msg; } @@ -303,11 +303,11 @@ void SendFileTask::canceled( unsigned int id ) setError(); } -QString SendFileTask::newYahooTransferId() +TQString SendFileTask::newYahooTransferId() { // Adapted from libpurple/protocols/yahoo/yahoo_filexfer.c yahoo_xfer_new_xfer_id() - QString newId; + TQString newId; for(int i = 0; i < 22; i++) { diff --git a/kopete/protocols/yahoo/libkyahoo/sendfiletask.h b/kopete/protocols/yahoo/libkyahoo/sendfiletask.h index 83a205e2..1da3a7ae 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendfiletask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendfiletask.h @@ -19,7 +19,7 @@ #include "task.h" #include -#include +#include class QString; namespace KNetwork{ @@ -40,15 +40,15 @@ public: bool take(Transfer *transfer); - void setTarget( const QString &to ); - void setMessage( const QString &msg ); + void setTarget( const TQString &to ); + void setMessage( const TQString &msg ); void setFileUrl( KURL url ); void setTransferId( unsigned int transferId ); signals: void bytesProcessed( unsigned int, unsigned int ); void complete( unsigned int ); - void error( unsigned int, int, const QString & ); + void error( unsigned int, int, const TQString & ); void declined(); @@ -58,7 +58,7 @@ protected: void parseFileTransfer( const Transfer *transfer ); void parseTransferAccept(const Transfer *transfer); - QString newYahooTransferId(); + TQString newYahooTransferId(); private slots: void connectSucceeded(); @@ -67,17 +67,17 @@ private slots: void canceled( unsigned int ); private: - QString m_msg; - QString m_target; + TQString m_msg; + TQString m_target; KURL m_url; - QFile m_file; + TQFile m_file; unsigned int m_transferId; unsigned int m_transmitted; KNetwork::KStreamSocket *m_socket; - QString m_relayHost; - QString m_token; - QString m_yahooTransferId; + TQString m_relayHost; + TQString m_token; + TQString m_yahooTransferId; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp index bb6e4802..828c6832 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include #include @@ -64,12 +64,12 @@ void SendMessageTask::onGo() setSuccess(); } -void SendMessageTask::setTarget( const QString &to ) +void SendMessageTask::setTarget( const TQString &to ) { m_target = to; } -void SendMessageTask::setText( const QString &text ) +void SendMessageTask::setText( const TQString &text ) { m_text = text; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h index b4c31efe..eef62c13 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h @@ -32,12 +32,12 @@ public: virtual void onGo(); - void setText( const QString &text ); - void setTarget( const QString &to ); + void setText( const TQString &text ); + void setTarget( const TQString &to ); void setPicureFlag( int flag ); private: - QString m_text; - QString m_target; + TQString m_text; + TQString m_target; int m_pictureFlag; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp index ed424bd3..638a1811 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp @@ -72,7 +72,7 @@ void SendNotifyTask::setType( Type type ) m_type = type; } -void SendNotifyTask::setTarget( const QString &to ) +void SendNotifyTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h index 67c0547a..2fee8fc6 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h @@ -37,10 +37,10 @@ public: virtual void onGo(); void setType( Type type ); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setState( State ); private: - QString m_target; + TQString m_target; Type m_type; State m_state; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp index 84edecaa..ab10873a 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp @@ -19,9 +19,9 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -64,10 +64,10 @@ void SendPictureTask::onGo() void SendPictureTask::initiateUpload() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - m_socket = new KBufferedSocket( "filetransfer.msg.yahoo.com", QString::number(80) ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); - connect( m_socket, SIGNAL( readyRead() ), this, SLOT( readResult() ) ); + m_socket = new KBufferedSocket( "filetransfer.msg.yahoo.com", TQString::number(80) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); + connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( readResult() ) ); m_socket->connect(); } @@ -76,7 +76,7 @@ void SendPictureTask::connectFailed( int i) { kdDebug(YAHOO_RAW_DEBUG) << i << ": " << static_cast( sender() )->errorString() << endl; - client()->notifyError(i18n("The picture was not successfully uploaded"), QString("%1 - %2").arg(i).arg(static_cast( sender() )->errorString()), Client::Error ); + client()->notifyError(i18n("The picture was not successfully uploaded"), TQString("%1 - %2").arg(i).arg(static_cast( sender() )->errorString()), Client::Error ); setError(); } @@ -85,7 +85,7 @@ void SendPictureTask::connectSucceeded() kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; YMSGTransfer t(Yahoo::ServicePictureUpload); - QFile file( m_path ); + TQFile file( m_path ); t.setId( client()->sessionID() ); t.setParam( 1, client()->userId().local8Bit()); @@ -94,9 +94,9 @@ void SendPictureTask::connectSucceeded() t.setParam( 28, file.size() ); t.setParam( 27, m_fileName.local8Bit() ); t.setParam( 14, "" ); - QByteArray buffer; - QByteArray paket; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQByteArray paket; + TQDataStream stream( buffer, IO_WriteOnly ); if ( file.open( IO_ReadOnly ) ) { @@ -111,7 +111,7 @@ void SendPictureTask::connectSucceeded() paket = t.serialize(); kdDebug(YAHOO_RAW_DEBUG) << "Sizes: File (" << m_path << "): " << file.size() << " - paket: " << paket.size() << endl; - QString header = QString::fromLatin1("POST /notifyft HTTP/1.1\r\n" + TQString header = TQString::fromLatin1("POST /notifyft HTTP/1.1\r\n" "Cookie: Y=%1; T=%2; C=%3 ;\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" "Host: filetransfer.msg.yahoo.com\r\n" @@ -142,7 +142,7 @@ void SendPictureTask::readResult() // FIXME: to check // m_socket->enableRead( false ); -// QByteArray buf; +// TQByteArray buf; // buf.resize( m_socket->bytesAvailable() ); // m_socket->read( buf.data(), m_socket->bytesAvailable() ); // @@ -158,9 +158,9 @@ void SendPictureTask::readResult() // } // from original file - QByteArray ar( m_socket->bytesAvailable() ); + TQByteArray ar( m_socket->bytesAvailable() ); m_socket->readBlock ( ar.data (), ar.size () ); - QString buf( ar ); + TQString buf( ar ); m_socket->close(); if( buf.find( "error", 0, false ) >= 0 ) @@ -227,12 +227,12 @@ void SendPictureTask::setType( Type type ) m_type = type; } -void SendPictureTask::setTarget( const QString &to ) +void SendPictureTask::setTarget( const TQString &to ) { m_target = to; } -void SendPictureTask::setFilename( const QString &filename ) +void SendPictureTask::setFilename( const TQString &filename ) { m_fileName = filename; } @@ -242,7 +242,7 @@ void SendPictureTask::setFilesize( int filesize ) m_fileSize = filesize; } -void SendPictureTask::setPath( const QString &path ) +void SendPictureTask::setPath( const TQString &path ) { m_path = path; } @@ -257,7 +257,7 @@ void SendPictureTask::setStatus( int status ) m_status = status; } -void SendPictureTask::setUrl( const QString &url ) +void SendPictureTask::setUrl( const TQString &url ) { m_url = url; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h index b4d0d27e..3a3e1437 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h @@ -44,13 +44,13 @@ public: virtual void onGo(); void setType( Type type ); - void setTarget( const QString &to ); - void setFilename( const QString & ); + void setTarget( const TQString &to ); + void setFilename( const TQString & ); void setFilesize( int ); - void setPath( const QString & ); + void setPath( const TQString & ); void setChecksum( int ); void setStatus( int ); - void setUrl( const QString & ); + void setUrl( const TQString & ); private: void initiateUpload(); void sendChecksum(); @@ -62,15 +62,15 @@ private slots: void readResult(); private: Type m_type; - QString m_target; - QString m_fileName; + TQString m_target; + TQString m_fileName; int m_fileSize; - QString m_path; + TQString m_path; int m_checksum; int m_status; - QString m_url; + TQString m_url; int m_transmitted; - QFile *m_file; + TQFile *m_file; KNetwork::KBufferedSocket *m_socket; }; diff --git a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp index c7fcaeac..35796666 100644 --- a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include #include @@ -84,14 +84,14 @@ void StatusNotifierTask::parseStatus( YMSGTransfer* t ) if( t->status() == Yahoo::StatusDisconnected && t->service() == Yahoo::ServiceLogoff ) { - emit loginResponse( Yahoo::LoginDupl, QString() ); + emit loginResponse( Yahoo::LoginDupl, TQString() ); } QString myNick; /* key = 1 */ - QString customError; /* key = 16 */ - QString nick; /* key = 7 */ + TQString customError; /* key = 16 */ + TQString nick; /* key = 7 */ int state; /* key = 10 */ - QString message; /* key = 19 */ + TQString message; /* key = 19 */ int flags; /* key = 13 */ int away; /* key = 47 */ int idle; /* key = 137 */ @@ -114,12 +114,12 @@ void StatusNotifierTask::parseStatus( YMSGTransfer* t ) utf = t->nthParamSeparated( 97, i, 7 ).toInt() == 1; pictureChecksum = t->nthParamSeparated( 192, i, 7 ).toInt(); if( utf ) - message = QString::fromUtf8( t->nthParamSeparated( 19, i, 7 ) ); + message = TQString::fromUtf8( t->nthParamSeparated( 19, i, 7 ) ); else message = t->nthParamSeparated( 19, i, 7 ); if( t->service() == Yahoo::ServiceLogoff || ( state != 0 && flags == 0 ) ) - emit statusChanged( nick, Yahoo::StatusOffline, QString(), 0, 0, 0 ); + emit statusChanged( nick, Yahoo::StatusOffline, TQString(), 0, 0, 0 ); else emit statusChanged( nick, state, message, away, idle, pictureChecksum ); } @@ -129,15 +129,15 @@ void StatusNotifierTask::parseAuthorization( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick; /* key = 4 */ - QString msg; /* key = 14 */ + TQString nick; /* key = 4 */ + TQString msg; /* key = 14 */ int state; /* key = 13 */ bool utf; /* key = 97 */ utf = t->firstParam( 97 ).toInt() == 1; nick = t->firstParam( 4 ); if( utf ) - msg = QString::fromUtf8( t->firstParam( 14 ) ); + msg = TQString::fromUtf8( t->firstParam( 14 ) ); else msg = t->firstParam( 14 ); state = t->firstParam( 13 ).toInt(); @@ -152,11 +152,11 @@ void StatusNotifierTask::parseAuthorization( YMSGTransfer* t ) } else // This is a request { - QString fname = t->firstParam( 216 ); - QString lname = t->firstParam( 254 ); - QString name; + TQString fname = t->firstParam( 216 ); + TQString lname = t->firstParam( 254 ); + TQString name; if( !fname.isEmpty() || !lname.isEmpty() ) - name = QString("%1 %2").arg(fname).arg(lname); + name = TQString("%1 %2").arg(fname).arg(lname); kdDebug(YAHOO_RAW_DEBUG) << "Emitting gotAuthorizationRequest( " << nick<< ", " << msg << ", " << name << " )" << endl; emit gotAuthorizationRequest( nick, msg, name ); @@ -167,7 +167,7 @@ void StatusNotifierTask::parseStealthStatus( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick; /* key = 7 */ + TQString nick; /* key = 7 */ int state; /* key = 31 */ nick = t->firstParam( 7 ); diff --git a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h index 5cc63d8a..2400363b 100644 --- a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h @@ -41,12 +41,12 @@ protected: void parseStealthStatus( YMSGTransfer *transfer ); void parseAuthorization( YMSGTransfer *transfer ); signals: - void statusChanged( const QString &nick, int state, const QString &message, int away, int idle, int pictureChecksum ); - void stealthStatusChanged( const QString&, Yahoo::StealthStatus ); - void loginResponse( int, const QString& ); - void authorizationAccepted( const QString & ); - void authorizationRejected( const QString &, const QString & ); - void gotAuthorizationRequest( const QString &, const QString &, const QString & ); + void statusChanged( const TQString &nick, int state, const TQString &message, int away, int idle, int pictureChecksum ); + void stealthStatusChanged( const TQString&, Yahoo::StealthStatus ); + void loginResponse( int, const TQString& ); + void authorizationAccepted( const TQString & ); + void authorizationRejected( const TQString &, const TQString & ); + void gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp b/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp index 89474ab4..6eba854a 100644 --- a/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include StealthTask::StealthTask(Task* parent) : Task(parent) { @@ -65,7 +65,7 @@ void StealthTask::onGo() setSuccess(); } -void StealthTask::setTarget( const QString &to ) +void StealthTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/stealthtask.h b/kopete/protocols/yahoo/libkyahoo/stealthtask.h index 6c33da1e..5659e110 100644 --- a/kopete/protocols/yahoo/libkyahoo/stealthtask.h +++ b/kopete/protocols/yahoo/libkyahoo/stealthtask.h @@ -34,11 +34,11 @@ public: virtual void onGo(); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setState( Yahoo::StealthStatus state ); void setMode( Yahoo::StealthMode mode ); private: - QString m_target; + TQString m_target; Yahoo::StealthMode m_mode; Yahoo::StealthStatus m_state; }; diff --git a/kopete/protocols/yahoo/libkyahoo/stream.cpp b/kopete/protocols/yahoo/libkyahoo/stream.cpp index 8173281c..82d6fe52 100644 --- a/kopete/protocols/yahoo/libkyahoo/stream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/yahoo/libkyahoo/stream.h b/kopete/protocols/yahoo/libkyahoo/stream.h index 71bcae5c..c7f9eeae 100644 --- a/kopete/protocols/yahoo/libkyahoo/stream.h +++ b/kopete/protocols/yahoo/libkyahoo/stream.h @@ -18,7 +18,7 @@ ************************************************************************* */ -#include +#include #ifndef YAHOO_STREAM_H #define YAHOO_STREAM_H @@ -43,12 +43,12 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; + virtual TQString errorText() const=0; /** * Are there any messages waiting to be read diff --git a/kopete/protocols/yahoo/libkyahoo/task.cpp b/kopete/protocols/yahoo/libkyahoo/task.cpp index f3d1a98c..b604219b 100644 --- a/kopete/protocols/yahoo/libkyahoo/task.cpp +++ b/kopete/protocols/yahoo/libkyahoo/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include +#include #include "client.h" #include "transfer.h" @@ -30,10 +30,10 @@ class Task::TaskPrivate public: TaskPrivate() {} - QString id; + TQString id; bool success; int statusCode; - QString statusString; + TQString statusString; Client *client; bool insignificant, deleteme, autoDelete; bool done; @@ -41,22 +41,22 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->transfer = 0; d->client = parent->client(); //d->id = client()->genUniqueId(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Client *parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -77,7 +77,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Client *Task::client() const @@ -95,7 +95,7 @@ void Task::setTransfer( Transfer * transfer ) d->transfer = transfer; } -QString Task::id() const +TQString Task::id() const { return d->id; } @@ -110,7 +110,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -124,16 +124,16 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -172,7 +172,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -181,7 +181,7 @@ void Task::send( Transfer * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -191,7 +191,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -228,7 +228,7 @@ void Task::clientDisconnected() // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -240,7 +240,7 @@ void Task::clientDisconnected() // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -250,9 +250,9 @@ void Task::clientDisconnected() // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { - client()->debug(QString("%1: ").arg(className()) + str); + client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/yahoo/libkyahoo/task.h b/kopete/protocols/yahoo/libkyahoo/task.h index a1a64e45..00cdb18f 100644 --- a/kopete/protocols/yahoo/libkyahoo/task.h +++ b/kopete/protocols/yahoo/libkyahoo/task.h @@ -20,7 +20,7 @@ #ifndef YAHOO_TASK_H #define YAHOO_TASK_H -#include +#include class QString; @@ -40,11 +40,11 @@ public: Client *client() const; Transfer *transfer() const; - QString id() const; + TQString id() const; bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete=false ); /** @@ -61,10 +61,10 @@ protected: virtual void onGo(); virtual void onDisconnect(); void send( Transfer * request ); - void setSuccess( int code=0, const QString &str="" ); - void setError( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task * @return true if this Task should take the Transfer. Default impl always returns false. @@ -73,7 +73,7 @@ protected: /** * Creates a transfer with the given command and field list */ - //void createTransfer( const QString & command, const Field::FieldList fields ); + //void createTransfer( const TQString & command, const Field::FieldList fields ); /** * Direct setter for Tasks which don't have any fields */ diff --git a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp index a52b1f56..efcd63cf 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp +++ b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp @@ -5,7 +5,7 @@ #include "../ymsgtransfer.h" #include "../yahootypes.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -13,12 +13,12 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myConnector->setOptHostPort( "scs.msg.yahoo.com", 5050 ); myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // notify and start sending - //connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + //connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -30,7 +30,7 @@ ClientStreamTest::~ClientStreamTest() void ClientStreamTest::slotDoTest() { - QString server = QString::fromLatin1("scs.msg.yahoo.com"); + TQString server = TQString::fromLatin1("scs.msg.yahoo.com"); // connect to server kdDebug(14180) << k_funcinfo << " connecting to server" << endl; myTestObject->connectToServer( server, true ); // fine up to here... diff --git a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h index ef367cec..8842fcc2 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h +++ b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h @@ -10,9 +10,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include -#include -#include +#include +#include +#include #include "yahooclientstream.h" #include "yahooconnector.h" diff --git a/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp b/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp index 8778d9da..5e9b04a5 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp +++ b/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp @@ -23,7 +23,7 @@ #include "../ymsgtransfer.h" #include "../yahootypes.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -33,7 +33,7 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) // notify when the transport layer is connected myClient = new Client(); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -46,11 +46,11 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("scs.msg.yahoo.com"); + TQString server = TQString::fromLatin1("scs.msg.yahoo.com"); // connect to server kdDebug(14180) << k_funcinfo << " connecting to server" << endl; - connect( myClient, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myClient, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient->start( server, 5050, "duncanmacvicar", "**********" ); myClient->connectToServer( myClientStream, server, true ); } diff --git a/kopete/protocols/yahoo/libkyahoo/tests/logintest.h b/kopete/protocols/yahoo/libkyahoo/tests/logintest.h index 12274843..68a40b24 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/logintest.h +++ b/kopete/protocols/yahoo/libkyahoo/tests/logintest.h @@ -21,9 +21,9 @@ #ifndef logintest_h #define logintest_h -#include -#include -#include +#include +#include +#include #include "client.h" #include "coreprotocol.h" diff --git a/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp b/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp index fe3c6d7c..2ad978f2 100644 --- a/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp @@ -21,10 +21,10 @@ #include "yahootypes.h" #include "client.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -73,7 +73,7 @@ bool WebcamTask::forMe( const Transfer* transfer ) const return false; } -void WebcamTask::requestWebcam( const QString &who ) +void WebcamTask::requestWebcam( const TQString &who ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -108,12 +108,12 @@ void WebcamTask::parseWebcamInformation( YMSGTransfer *t ) kdDebug(YAHOO_RAW_DEBUG) << "Got WebcamInformation: Sender: " << info.sender << " Server: " << info.server << " Key: " << info.key << endl; - KStreamSocket *socket = new KStreamSocket( info.server, QString::number(5100) ); + KStreamSocket *socket = new KStreamSocket( info.server, TQString::number(5100) ); socketMap[socket] = info; socket->enableRead( true ); - connect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage1Established() ) ); - connect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); - connect( socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage1Established() ) ); + connect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); + connect( socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); socket->connect(); } @@ -124,23 +124,23 @@ void WebcamTask::slotConnectionStage1Established() if( !socket ) return; kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection Stage1 to the user " << socketMap[socket].sender << " established." << endl; - disconnect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage1Established() ) ); - disconnect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); + disconnect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage1Established() ) ); + disconnect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); socketMap[socket].status = ConnectedStage1; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); - QString s; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); + TQString s; if( socketMap[socket].direction == Incoming ) { - socket->writeBlock( QCString("").data(), 8 ); - s = QString("g=%1\r\n").arg(socketMap[socket].sender); + socket->writeBlock( TQCString("").data(), 8 ); + s = TQString("g=%1\r\n").arg(socketMap[socket].sender); } else { - socket->writeBlock( QCString("").data(), 8 ); - s = QString("f=1\r\n"); + socket->writeBlock( TQCString("").data(), 8 ); + s = TQString("f=1\r\n"); } // Header: 08 00 01 00 00 00 00 @@ -157,21 +157,21 @@ void WebcamTask::slotConnectionStage2Established() return; kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection Stage2 to the user " << socketMap[socket].sender << " established." << endl; - disconnect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage2Established() ) ); - disconnect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); + disconnect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage2Established() ) ); + disconnect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); socketMap[socket].status = ConnectedStage2; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); - QString s; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); + TQString s; if( socketMap[socket].direction == Incoming ) { // Send -Packet - socket->writeBlock( QCString("").data(), 8 ); + socket->writeBlock( TQCString("").data(), 8 ); // Send request information - s = QString("a=2\r\nc=us\r\ne=21\r\nu=%1\r\nt=%2\r\ni=\r\ng=%3\r\no=w-2-5-1\r\np=1") + s = TQString("a=2\r\nc=us\r\ne=21\r\nu=%1\r\nt=%2\r\ni=\r\ng=%3\r\no=w-2-5-1\r\np=1") .arg(client()->userId()).arg(socketMap[socket].key).arg(socketMap[socket].sender); // Header: 08 00 01 00 00 00 00 stream << (Q_INT8)0x08 << (Q_INT8)0x00 << (Q_INT8)0x01 << (Q_INT8)0x00 << (Q_INT32)s.length(); @@ -179,9 +179,9 @@ void WebcamTask::slotConnectionStage2Established() else { // Send -Packet - socket->writeBlock( QCString("").data(), 8 ); + socket->writeBlock( TQCString("").data(), 8 ); // Send request information - s = QString("a=2\r\nc=us\r\nu=%1\r\nt=%2\r\ni=%3\r\no=w-2-5-1\r\np=2\r\nb=KopeteWebcam\r\nd=\r\n") + s = TQString("a=2\r\nc=us\r\nu=%1\r\nt=%2\r\ni=%3\r\no=w-2-5-1\r\np=2\r\nb=KopeteWebcam\r\nd=\r\n") .arg(client()->userId()).arg(socketMap[socket].key).arg(socket->localAddress().nodeName()); // Header: 08 00 05 00 00 00 00 01 00 00 00 01 stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)s.length() @@ -197,7 +197,7 @@ void WebcamTask::slotConnectionFailed( int error ) KStreamSocket* socket = const_cast( dynamic_cast( sender() ) ); kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection to the user " << socketMap[socket].sender << " failed. Error " << error << " - " << socket->errorString() << endl; client()->notifyError( i18n("Webcam connection to the user %1 could not be established.\n\nPlease relogin and try again.") - .arg(socketMap[socket].sender), QString("%1 - %2").arg(error).arg( socket->errorString()), Client::Error ); + .arg(socketMap[socket].sender), TQString("%1 - %2").arg(error).arg( socket->errorString()), Client::Error ); socketMap.remove( socket ); socket->deleteLater(); } @@ -211,7 +211,7 @@ void WebcamTask::slotRead() switch( socketMap[socket].status ) { case ConnectedStage1: - disconnect( socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + disconnect( socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); connectStage2( socket ); break; case ConnectedStage2: @@ -226,13 +226,13 @@ void WebcamTask::slotRead() void WebcamTask::connectStage2( KStreamSocket *socket ) { kdDebug(YAHOO_RAW_DEBUG) ; - QByteArray data( socket->bytesAvailable() ); + TQByteArray data( socket->bytesAvailable() ); socket->readBlock ( data.data (), data.size () ); kdDebug(YAHOO_RAW_DEBUG) << "Magic Byte:" << data[2] << endl; socketMap[socket].status = ConnectedStage2; - QString server; + TQString server; int i = 4; KStreamSocket *newSocket; switch( (const char)data[2] ) @@ -252,16 +252,16 @@ void WebcamTask::connectStage2( KStreamSocket *socket ) } kdDebug(YAHOO_RAW_DEBUG) << "Connecting to " << server << endl; - newSocket = new KStreamSocket( server, QString::number(5100) ); + newSocket = new KStreamSocket( server, TQString::number(5100) ); socketMap[newSocket] = socketMap[socket]; newSocket->enableRead( true ); - connect( newSocket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage2Established() ) ); - connect( newSocket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); - connect( newSocket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( newSocket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage2Established() ) ); + connect( newSocket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); + connect( newSocket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); if( socketMap[newSocket].direction == Outgoing ) { newSocket->enableWrite( true ); - connect( newSocket, SIGNAL( readyWrite() ), this, SLOT( transmitWebcamImage() ) ); + connect( newSocket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( transmitWebcamImage() ) ); } newSocket->connect(); @@ -275,7 +275,7 @@ void WebcamTask::connectStage2( KStreamSocket *socket ) void WebcamTask::processData( KStreamSocket *socket ) { - QByteArray data( socket->bytesAvailable() ); + TQByteArray data( socket->bytesAvailable() ); socket->readBlock ( data.data (), data.size () ); @@ -288,7 +288,7 @@ void WebcamTask::processData( KStreamSocket *socket ) parseData( data, socket ); } -void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) +void WebcamTask::parseData( TQByteArray &data, KStreamSocket *socket ) { int headerLength = 0; int read = 0; @@ -310,7 +310,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) kdDebug() << data[8] << data[9] << data[10] << data[11] << data[12] << endl; info->timestamp = yahoo_get32(data.data() + 9); kdDebug(YAHOO_RAW_DEBUG) << "PacketType: " << data[8] << " reason: " << info->reason << " timestamp: " << info->timestamp << endl; - QStringList::iterator it; + TQStringList::iterator it; switch( data[8] ) { case 0x00: @@ -384,8 +384,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) { // More headers to read kdDebug(YAHOO_RAW_DEBUG) << "More data to read..." << endl; - QByteArray newData( data.size() - headerLength ); - QDataStream stream( newData, IO_WriteOnly ); + TQByteArray newData( data.size() - headerLength ); + TQDataStream stream( newData, IO_WriteOnly ); stream.writeRawBytes( data.data() + headerLength, data.size() - headerLength ); parseData( newData, socket ); return; @@ -408,7 +408,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) if( !info->buffer ) { kdDebug(YAHOO_RAW_DEBUG) << "Buffer created" << endl; - info->buffer = new QBuffer(); + info->buffer = new TQBuffer(); info->buffer->open( IO_WriteOnly ); } @@ -419,7 +419,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) if( info->buffer->size() >= static_cast(info->dataLength) ) { info->buffer->close(); - QString who; + TQString who; switch( info->type ) { case UserRequest: @@ -450,7 +450,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) break; case Image: { - QPixmap webcamImage; + TQPixmap webcamImage; //webcamImage.loadFromData( info->buffer->buffer() ); // FIXME (same) @@ -466,7 +466,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) KTempFile jpcTmpImageFile; KTempFile bmpTmpImageFile; - QFile *file = jpcTmpImageFile.file(); + TQFile *file = jpcTmpImageFile.file(); file->writeBlock((info->buffer->buffer()).data(), info->buffer->size()); file->close(); @@ -485,8 +485,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) /******* UPTO THIS POINT ******/ emit webcamImageReceived( info->sender, webcamImage ); } - QFile::remove(jpcTmpImageFile.name()); - QFile::remove(bmpTmpImageFile.name()); + TQFile::remove(jpcTmpImageFile.name()); + TQFile::remove(bmpTmpImageFile.name()); kdDebug(YAHOO_RAW_DEBUG) << "Image Received. Size: " << webcamImage.size() << endl; } @@ -503,8 +503,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) { // More headers to read kdDebug(YAHOO_RAW_DEBUG) << "More data to read..." << data.size() - read << endl; - QByteArray newData( data.size() - read ); - QDataStream stream( newData, IO_WriteOnly ); + TQByteArray newData( data.size() - read ); + TQDataStream stream( newData, IO_WriteOnly ); stream.writeRawBytes( data.data() + read, data.size() - read ); parseData( newData, socket ); } @@ -520,7 +520,7 @@ void WebcamTask::cleanUpConnection( KStreamSocket *socket ) delete socket; } -void WebcamTask::closeWebcam( const QString & who ) +void WebcamTask::closeWebcam( const TQString & who ) { kdDebug(YAHOO_RAW_DEBUG) ; SocketInfoMap::Iterator it; @@ -552,14 +552,14 @@ void WebcamTask::registerWebcam() send( t ); } -void WebcamTask::addPendingInvitation( const QString &userId ) +void WebcamTask::addPendingInvitation( const TQString &userId ) { kdDebug(YAHOO_RAW_DEBUG) << "Inviting " << userId << " to watch the webcam." << endl; pendingInvitations.append( userId ); accessGranted.append( userId ); } -void WebcamTask::grantAccess( const QString &userId ) +void WebcamTask::grantAccess( const TQString &userId ) { kdDebug(YAHOO_RAW_DEBUG) ; KStreamSocket *socket = 0L; @@ -577,9 +577,9 @@ void WebcamTask::grantAccess( const QString &userId ) kdDebug(YAHOO_RAW_DEBUG) << "Error. No outgoing socket found." << endl; return; } - QByteArray ar; - QDataStream stream( ar, IO_WriteOnly ); - QString user = QString("u=%1").arg(userId); + TQByteArray ar; + TQDataStream stream( ar, IO_WriteOnly ); + TQString user = TQString("u=%1").arg(userId); stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)user.length() << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x01; @@ -635,11 +635,11 @@ void WebcamTask::sendEmptyWebcamImage() pictureBuffer.resize( 0 ); transmissionPending = true; - QTimer::singleShot( 1000, this, SLOT(sendEmptyWebcamImage()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(sendEmptyWebcamImage()) ); } -void WebcamTask::sendWebcamImage( const QByteArray &image ) +void WebcamTask::sendWebcamImage( const TQByteArray &image ) { kdDebug(YAHOO_RAW_DEBUG) ; pictureBuffer = image; @@ -687,8 +687,8 @@ void WebcamTask::transmitWebcamImage() } socket->enableWrite( false ); - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)pictureBuffer.size() << (Q_INT8)0x02 << (Q_INT32)timestamp++; socket->writeBlock( buffer.data(), buffer.size() ); diff --git a/kopete/protocols/yahoo/libkyahoo/webcamtask.h b/kopete/protocols/yahoo/libkyahoo/webcamtask.h index 23639b8d..d84b6374 100644 --- a/kopete/protocols/yahoo/libkyahoo/webcamtask.h +++ b/kopete/protocols/yahoo/libkyahoo/webcamtask.h @@ -18,9 +18,9 @@ #define WEBCAMTASK_H #include "task.h" -#include -#include -#include +#include +#include +#include class QString; class YMSGTransfer; @@ -46,10 +46,10 @@ struct YahooWebcamInformation Q_INT32 dataLength; Q_INT32 timestamp; bool headerRead; - QBuffer *buffer; + TQBuffer *buffer; }; -typedef QMap< KStreamSocket *, YahooWebcamInformation > SocketInfoMap; +typedef TQMap< KStreamSocket *, YahooWebcamInformation > SocketInfoMap; /** @author André Duffeck @@ -65,24 +65,24 @@ public: bool transmitting() { return transmittingData; } - void requestWebcam( const QString &who ); - void closeWebcam( const QString &who ); + void requestWebcam( const TQString &who ); + void closeWebcam( const TQString &who ); void registerWebcam(); - void sendWebcamImage( const QByteArray &image ); - void addPendingInvitation( const QString &userId ); - void grantAccess( const QString &userId ); + void sendWebcamImage( const TQByteArray &image ); + void addPendingInvitation( const TQString &userId ); + void grantAccess( const TQString &userId ); void closeOutgoingWebcam(); signals: - void webcamNotAvailable( const QString & ); - void webcamClosed( const QString &, int ); - void webcamPaused( const QString& ); - void webcamImageReceived( const QString &, const QPixmap &); + void webcamNotAvailable( const TQString & ); + void webcamClosed( const TQString &, int ); + void webcamPaused( const TQString& ); + void webcamImageReceived( const TQString &, const TQPixmap &); void readyForTransmission(); void stopTransmission(); - void viewerJoined( const QString & ); - void viewerLeft( const QString & ); - void viewerRequest( const QString & ); + void viewerJoined( const TQString & ); + void viewerLeft( const TQString & ); + void viewerRequest( const TQString & ); private slots: void slotConnectionStage1Established(); void slotConnectionStage2Established(); @@ -94,19 +94,19 @@ protected: virtual bool forMe( const Transfer* transfer ) const; private: void parseWebcamInformation( YMSGTransfer *transfer ); - void parseData( QByteArray &data, KStreamSocket *socket ); + void parseData( TQByteArray &data, KStreamSocket *socket ); void connectStage2( KStreamSocket *socket ); void processData( KStreamSocket *socket ); void cleanUpConnection( KStreamSocket *socket ); - QString keyPending; // the buddy we have requested the webcam from + TQString keyPending; // the buddy we have requested the webcam from SocketInfoMap socketMap; bool transmittingData; - QStringList pendingInvitations; - QStringList accessGranted; + TQStringList pendingInvitations; + TQStringList accessGranted; int timestamp; - QByteArray pictureBuffer; + TQByteArray pictureBuffer; bool transmissionPending; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yabentry.cpp b/kopete/protocols/yahoo/libkyahoo/yabentry.cpp index d726d6d6..b9a4d72b 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabentry.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yabentry.cpp @@ -16,7 +16,7 @@ #include "yabentry.h" -void YABEntry::fromQDomElement( const QDomElement &e ) +void YABEntry::fromQDomElement( const TQDomElement &e ) { yahooId = e.attribute("yi"); YABId = e.attribute("id", "-1").toInt(); @@ -47,10 +47,10 @@ void YABEntry::fromQDomElement( const QDomElement &e ) privateState = e.attribute("hs"); privateZIP = e.attribute("hz"); privateCountry = e.attribute("hn"); - QString birtday = e.attribute("bi"); - birthday = QDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); - QString an = e.attribute("an"); - anniversary = QDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); + TQString birtday = e.attribute("bi"); + birthday = TQDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); + TQString an = e.attribute("an"); + anniversary = TQDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); additional1 = e.attribute("c1"); additional2 = e.attribute("c2"); additional3 = e.attribute("c3"); @@ -65,7 +65,7 @@ void YABEntry::fromQDomElement( const QDomElement &e ) imSkype = e.attribute("imk"); } -void YABEntry::fromQDomDocument( const QDomDocument &d ) +void YABEntry::fromQDomDocument( const TQDomDocument &d ) { kdDebug() << d.toString() << d.elementsByTagName("yi").item(0).toElement().text() << endl; @@ -97,10 +97,10 @@ void YABEntry::fromQDomDocument( const QDomDocument &d ) privateState = d.elementsByTagName("hs").item(0).toElement().text(); privateZIP = d.elementsByTagName("hz").item(0).toElement().text(); privateCountry = d.elementsByTagName("hn").item(0).toElement().text(); - QString birtday = d.elementsByTagName("bi").item(0).toElement().text(); - birthday = QDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); - QString an = d.elementsByTagName("an").item(0).toElement().text(); - anniversary = QDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); + TQString birtday = d.elementsByTagName("bi").item(0).toElement().text(); + birthday = TQDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); + TQString an = d.elementsByTagName("an").item(0).toElement().text(); + anniversary = TQDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); additional1 = d.elementsByTagName("c1").item(0).toElement().text(); additional2 = d.elementsByTagName("c2").item(0).toElement().text(); additional3 = d.elementsByTagName("c3").item(0).toElement().text(); @@ -115,7 +115,7 @@ void YABEntry::fromQDomDocument( const QDomDocument &d ) imSkype = d.elementsByTagName("imk").item(0).toElement().text(); } -void YABEntry::fillQDomElement( QDomElement &e ) const +void YABEntry::fillQDomElement( TQDomElement &e ) const { e.setAttribute( "yi", yahooId ); e.setAttribute( "id", YABId ); @@ -135,24 +135,24 @@ void YABEntry::fillQDomElement( QDomElement &e ) const e.setAttribute( "pu", privateURL ); e.setAttribute( "ti", title ); e.setAttribute( "co", corporation ); - e.setAttribute( "wa", QString( workAdress ).replace( '\n', " " ) ); + e.setAttribute( "wa", TQString( workAdress ).replace( '\n', " " ) ); e.setAttribute( "wc", workCity ); e.setAttribute( "ws", workState ); e.setAttribute( "wz", workZIP ); e.setAttribute( "wn", workCountry ); e.setAttribute( "wu", workURL ); - e.setAttribute( "ha", QString( privateAdress ).replace( '\n', " " ) ); + e.setAttribute( "ha", TQString( privateAdress ).replace( '\n', " " ) ); e.setAttribute( "hc", privateCity ); e.setAttribute( "hs", privateState ); e.setAttribute( "hz", privateZIP ); e.setAttribute( "hn", privateCountry ); - e.setAttribute( "bi", QString("%1/%2/%3").arg( birthday.day() ).arg( birthday.month() ).arg( birthday.year() ) ); - e.setAttribute( "an", QString("%1/%2/%3").arg( anniversary.day() ).arg( anniversary.month() ).arg( anniversary.year() ) ); + e.setAttribute( "bi", TQString("%1/%2/%3").arg( birthday.day() ).arg( birthday.month() ).arg( birthday.year() ) ); + e.setAttribute( "an", TQString("%1/%2/%3").arg( anniversary.day() ).arg( anniversary.month() ).arg( anniversary.year() ) ); e.setAttribute( "c1", additional1 ); e.setAttribute( "c2", additional2 ); e.setAttribute( "c3", additional3 ); e.setAttribute( "c4", additional4 ); - e.setAttribute( "cm", QString( notes ).replace( '\n', " " ) ); + e.setAttribute( "cm", TQString( notes ).replace( '\n', " " ) ); e.setAttribute( "ima", imAIM ); e.setAttribute( "img", imGoogleTalk ); e.setAttribute( "imq", imICQ ); diff --git a/kopete/protocols/yahoo/libkyahoo/yabentry.h b/kopete/protocols/yahoo/libkyahoo/yabentry.h index da042032..35620911 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabentry.h +++ b/kopete/protocols/yahoo/libkyahoo/yabentry.h @@ -17,8 +17,8 @@ #define YABEntry_H #include -#include -#include +#include +#include struct YABEntry { @@ -81,9 +81,9 @@ struct YABEntry QString additional4; - void fromQDomElement( const QDomElement &e ); - void fromQDomDocument( const QDomDocument &e ); - void fillQDomElement( QDomElement &e ) const; + void fromQDomElement( const TQDomElement &e ); + void fromQDomDocument( const TQDomDocument &e ); + void fillQDomElement( TQDomElement &e ) const; void dump() const; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yabtask.cpp b/kopete/protocols/yahoo/libkyahoo/yabtask.cpp index 3cc66dba..1066640e 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yabtask.cpp @@ -20,8 +20,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include #include #include @@ -66,7 +66,7 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 7 */ + TQString from; /* key = 7 */ int count; from = t->firstParam( 4 ); @@ -74,12 +74,12 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) for( int i = 0; i < count; i++ ) { - QString who = t->nthParam( 5, i ); - QString s = t->nthParamSeparated( 280, i, 5 ); + TQString who = t->nthParam( 5, i ); + TQString s = t->nthParamSeparated( 280, i, 5 ); if( s.isEmpty() ) continue; - QDomDocument doc; + TQDomDocument doc; doc.setContent( s ); YABEntry *entry = new YABEntry; entry->fromQDomDocument( doc ); @@ -93,19 +93,19 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) void YABTask::getAllEntries( long lastMerge, long lastRemoteRevision ) { kdDebug(YAHOO_RAW_DEBUG) << "LastMerge: " << lastMerge << " LastRemoteRevision: " << lastRemoteRevision << endl; - m_data = QString::null; - QString url = QString::fromLatin1("http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=%1&tags=short&rt=%2&prog-ver=%3") + m_data = TQString::null; + TQString url = TQString::fromLatin1("http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=%1&tags=short&rt=%2&prog-ver=%3") .arg( lastMerge ).arg( lastRemoteRevision ).arg( YMSG_PROGRAM_VERSION_STRING ); m_transferJob = KIO::get( url , false, false ); m_transferJob->addMetaData("cookies", "manual"); - m_transferJob->addMetaData("setcookies", QString::fromLatin1("Cookie: Y=%1; T=%2; C=%3;") + m_transferJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: Y=%1; T=%2; C=%3;") .arg(client()->yCookie()).arg(client()->tCookie()).arg(client()->cCookie()) ); - connect( m_transferJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); - connect( m_transferJob, SIGNAL( result( KIO::Job *) ), this, SLOT( slotResult( KIO::Job* ) ) ); + connect( m_transferJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); + connect( m_transferJob, TQT_SIGNAL( result( KIO::Job *) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) ); } -void YABTask::slotData( KIO::Job* /*job*/, const QByteArray &info ) +void YABTask::slotData( KIO::Job* /*job*/, const TQByteArray &info ) { kdDebug(YAHOO_RAW_DEBUG) ; m_data += info; @@ -121,9 +121,9 @@ void YABTask::slotResult( KIO::Job* job ) else { kdDebug(YAHOO_RAW_DEBUG) << "Server side addressbook retrieved." << endl; - QDomDocument doc; - QDomNodeList list; - QDomElement e; + TQDomDocument doc; + TQDomNodeList list; + TQDomElement e; int it = 0; kdDebug(YAHOO_RAW_DEBUG) << m_data << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yabtask.h b/kopete/protocols/yahoo/libkyahoo/yabtask.h index fe9cae3c..3086a01a 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabtask.h +++ b/kopete/protocols/yahoo/libkyahoo/yabtask.h @@ -49,11 +49,11 @@ protected: virtual bool forMe( const Transfer* transfer ) const; void parseContactDetails( YMSGTransfer* t ); private slots: - void slotData( KIO::Job*, const QByteArray & ); + void slotData( KIO::Job*, const TQByteArray & ); void slotResult( KIO::Job* ); private: KIO::TransferJob *m_transferJob; - QString m_data; + TQString m_data; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp index 5e704efa..025386f0 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp @@ -16,7 +16,7 @@ #include "yahoobuddyiconloader.h" // QT Includes -#include +#include // KDE Includes #include @@ -40,17 +40,17 @@ YahooBuddyIconLoader::~YahooBuddyIconLoader() { } -void YahooBuddyIconLoader::fetchBuddyIcon( const QString &who, KURL url, int checksum ) +void YahooBuddyIconLoader::fetchBuddyIcon( const TQString &who, KURL url, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << url << endl; KIO::TransferJob *transfer; - QString Url = url.url(); - QString ext = Url.left( Url.findRev( "?" ) ); + TQString Url = url.url(); + TQString ext = Url.left( Url.findRev( "?" ) ); ext = ext.right( ext.length() - ext.findRev( "." ) ); transfer = KIO::get( url, false, false ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); m_jobs[transfer].url = url; m_jobs[transfer].who = who; @@ -58,7 +58,7 @@ void YahooBuddyIconLoader::fetchBuddyIcon( const QString &who, KURL url, int che } -void YahooBuddyIconLoader::slotData( KIO::Job *job, const QByteArray& data ) +void YahooBuddyIconLoader::slotData( KIO::Job *job, const TQByteArray& data ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h index 76f70cdc..f200725d 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h @@ -17,9 +17,9 @@ #define YAHOOBUDDYICONLOADER_ // QT Includes -#include -#include -#include +#include +#include +#include // KDE Includes #include @@ -33,9 +33,9 @@ namespace KIO { struct IconLoadJob { KURL url; - QString who; + TQString who; int checksum; - QByteArray icon; + TQByteArray icon; }; /** @@ -55,21 +55,21 @@ public: /** * Add a BuddyIcon for download. */ - void fetchBuddyIcon( const QString &who, KURL url, int checksum ); + void fetchBuddyIcon( const TQString &who, KURL url, int checksum ); signals: /** * The account can connect to this signal and append the icon * stored in 'file' to the appropriate contact */ - void fetchedBuddyIcon( const QString &who, const QByteArray &icon, int checksum ); + void fetchedBuddyIcon( const TQString &who, const TQByteArray &icon, int checksum ); private slots: - void slotData( KIO::Job *job, const QByteArray &data ); + void slotData( KIO::Job *job, const TQByteArray &data ); void slotComplete( KIO::Job *job ); private: - typedef QMap< KIO::TransferJob *, IconLoadJob > TransferJobMap; + typedef TQMap< KIO::TransferJob *, IconLoadJob > TransferJobMap; TransferJobMap m_jobs; Client *m_client; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp index b0d1cbb9..028396c2 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp @@ -15,14 +15,14 @@ ************************************************************************* */ -#include +#include #include #include #include #include "yahoobytestream.h" -KNetworkByteStream::KNetworkByteStream( QObject *parent ) +KNetworkByteStream::KNetworkByteStream( TQObject *parent ) : ByteStream ( parent ) { kdDebug( 14181 ) << "Instantiating new KNetwork byte stream." << endl; @@ -36,14 +36,14 @@ KNetworkByteStream::KNetworkByteStream( QObject *parent ) mSocket->enableRead( true ); // connect signals and slots - QObject::connect( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool KNetworkByteStream::connect( QString host, QString service ) +bool KNetworkByteStream::connect( TQString host, TQString service ) { kdDebug( 14181 ) << "Connecting to " << host << ", service " << service << endl; @@ -68,7 +68,7 @@ void KNetworkByteStream::close () int KNetworkByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); kdDebug( 14181 ) << "[writeData.size() = " << writeData.size() << "]" << endl; socket()->writeBlock( writeData.data(), writeData.size () ); @@ -113,7 +113,7 @@ void KNetworkByteStream::slotReadyRead() { kdDebug( 14181 ); // stuff all available data into our buffers - QByteArray readBuffer; + TQByteArray readBuffer; readBuffer.resize( socket()->bytesAvailable () ); socket()->readBlock( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h index d48bcf36..5f7f0206 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h @@ -34,11 +34,11 @@ class KNetworkByteStream : public ByteStream Q_OBJECT public: - KNetworkByteStream ( QObject *parent = 0 ); + KNetworkByteStream ( TQObject *parent = 0 ); ~KNetworkByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp b/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp index 56834a83..1c9528ff 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include YahooChatTask::YahooChatTask(Task* parent) : Task(parent) { @@ -95,11 +95,11 @@ void YahooChatTask::getYahooChatCategories() transfer->addMetaData( "UserAgent", "Mozilla/4.0 (compatible; MSIE 5.5)"); transfer->addMetaData( "no-cache", "true" ); transfer->addMetaData( "cookies", "manual" ); - transfer->addMetaData("setcookies", QString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); + transfer->addMetaData("setcookies", TQString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotCategoriesComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotCategoriesComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); } void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category ) @@ -107,20 +107,20 @@ void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category ) kdDebug(YAHOO_RAW_DEBUG) << "Category Id: " << category.id << endl; KIO::TransferJob *transfer; - transfer = KIO::get( KURL(QString("http://insider.msg.yahoo.com/ycontent/?chatroom_%1=0").arg( category.id )), false, false ); + transfer = KIO::get( KURL(TQString("http://insider.msg.yahoo.com/ycontent/?chatroom_%1=0").arg( category.id )), false, false ); transfer->addMetaData( "UserAgent", "Mozilla/4.0 (compatible; MSIE 5.5)"); transfer->addMetaData( "no-cache", "true" ); transfer->addMetaData( "cookies", "manual" ); - transfer->addMetaData("setcookies", QString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); + transfer->addMetaData("setcookies", TQString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotChatRoomsComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotChatRoomsComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); m_jobs[ transfer ].category = category; } -void YahooChatTask::slotData( KIO::Job *job, const QByteArray& data) +void YahooChatTask::slotData( KIO::Job *job, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) ; // FIXME (same) @@ -139,7 +139,7 @@ void YahooChatTask::slotCategoriesComplete( KIO::Job *job ) } else { - QDomDocument doc; + TQDomDocument doc; doc.setContent( m_jobs[ transfer ].data ); emit gotYahooChatCategories( doc ); } @@ -159,7 +159,7 @@ void YahooChatTask::slotChatRoomsComplete( KIO::Job *job ) } else { - QDomDocument doc; + TQDomDocument doc; doc.setContent( m_jobs[ transfer ].data ); // kdDebug(YAHOO_RAW_DEBUG) << doc.toString(); emit gotYahooChatRooms( m_jobs[ transfer ].category, doc ); @@ -188,7 +188,7 @@ void YahooChatTask::joinRoom( const Yahoo::ChatRoom &room ) send( t ); } -void YahooChatTask::sendYahooChatMessage( const QString &msg, const QString &handle ) +void YahooChatTask::sendYahooChatMessage( const TQString &msg, const TQString &handle ) { kdDebug(YAHOO_RAW_DEBUG) ; if( !m_loggedIn ) @@ -214,7 +214,7 @@ void YahooChatTask::login() YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceChatOnline); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - t->setParam( 135, QString("ym%1").arg(YMSG_PROGRAM_VERSION_STRING).local8Bit() ); + t->setParam( 135, TQString("ym%1").arg(YMSG_PROGRAM_VERSION_STRING).local8Bit() ); send( t ); } @@ -232,11 +232,11 @@ void YahooChatTask::logout() void YahooChatTask::parseLoginResponse( YMSGTransfer *t ) { - if( !QString(t->firstParam( 1 )).startsWith( client()->userId().local8Bit() ) ) + if( !TQString(t->firstParam( 1 )).startsWith( client()->userId().local8Bit() ) ) return; m_loggedIn = true; - QValueList< Yahoo::ChatRoom >::iterator it; + TQValueList< Yahoo::ChatRoom >::iterator it; for ( it = m_pendingJoins.begin(); it != m_pendingJoins.end(); ++it ) //for( int i = 0; i < m_pendingJoins.size(); ++i ) { @@ -255,10 +255,10 @@ void YahooChatTask::parseJoin( YMSGTransfer *t ) { int room; int category; - QString handle; - QString comment; + TQString handle; + TQString comment; bool suppressJoinNotification = false; - QString error; + TQString error; room = t->firstParam( 129 ).toInt(); category = t->firstParam( 128 ).toInt(); @@ -296,7 +296,7 @@ void YahooChatTask::parseJoin( YMSGTransfer *t ) emit chatRoomJoined( room, category, comment, handle ); } - QString nick; + TQString nick; for( int i = 0; i < t->paramCount( 109 ); ++i ) { nick = t->nthParam( 109 , i ); @@ -308,9 +308,9 @@ void YahooChatTask::parseChatMessage( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString handle; - QString msg; - QString nick; + TQString handle; + TQString msg; + TQString nick; handle = t->firstParam( 104 ); for( int i = 0; i < t->paramCount( 109 ); ++i ) @@ -325,8 +325,8 @@ void YahooChatTask::parseChatExit( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString handle; - QString nick; + TQString handle; + TQString nick; handle = t->firstParam( 104 ); for( int i = 0; i < t->paramCount( 109 ); ++i ) @@ -340,7 +340,7 @@ void YahooChatTask::parseLogout( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick = t->firstParam( 1 ); + TQString nick = t->firstParam( 1 ); if( nick == client()->userId() ) m_loggedIn = false; } diff --git a/kopete/protocols/yahoo/libkyahoo/yahoochattask.h b/kopete/protocols/yahoo/libkyahoo/yahoochattask.h index 310b174d..3de4cbd4 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoochattask.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoochattask.h @@ -20,9 +20,9 @@ #include "task.h" #include "yahootypes.h" -#include -#include -#include +#include +#include +#include class QDomDocument; class YMSGTransfer; @@ -31,7 +31,7 @@ namespace KIO { } struct YahooChatJob { - QByteArray data; + TQByteArray data; Yahoo::ChatCategory category; }; @@ -54,18 +54,18 @@ public: void joinRoom( const Yahoo::ChatRoom &room ); - void sendYahooChatMessage( const QString &msg, const QString &handle ); + void sendYahooChatMessage( const TQString &msg, const TQString &handle ); void logout(); signals: - void gotYahooChatCategories( const QDomDocument & ); - void gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & ); + void gotYahooChatCategories( const TQDomDocument & ); + void gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & ); - void chatRoomJoined( int roomId, int categoryId, const QString &comment, const QString &handle ); - void chatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ); - void chatBuddyHasLeft( const QString &nick, const QString &handle ); - void chatMessageReceived( const QString &nick, const QString &message, const QString &handle ); + void chatRoomJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ); + void chatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ); + void chatBuddyHasLeft( const TQString &nick, const TQString &handle ); + void chatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ); private: void login(); void parseLoginResponse( YMSGTransfer *t ); @@ -75,12 +75,12 @@ private: void parseLogout( YMSGTransfer * ); private slots: - void slotData( KIO::Job *, const QByteArray & ); + void slotData( KIO::Job *, const TQByteArray & ); void slotCategoriesComplete( KIO::Job * ); void slotChatRoomsComplete( KIO::Job * ); private: - QMap< KIO::Job *, YahooChatJob > m_jobs; - QValueList< Yahoo::ChatRoom > m_pendingJoins; + TQMap< KIO::Job *, YahooChatJob > m_jobs; + TQValueList< Yahoo::ChatRoom > m_pendingJoins; bool m_loggedIn; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp index 3279bbd0..34eb649e 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp @@ -20,11 +20,11 @@ -#include // for qdebug -#include -#include -#include -#include +#include // for qdebug +#include +#include +#include +#include #include @@ -36,7 +36,7 @@ #include "yahooclientstream.h" #include "yahootypes.h" -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -58,9 +58,9 @@ public: conn = 0; bs = 0; - username = QString::null; - password = QString::null; - server = QString::null; + username = TQString::null; + password = TQString::null; + server = TQString::null; haveLocalAddr = false; doBinding = true; @@ -73,12 +73,12 @@ public: newTransfers = false; } - QString username; - QString password; - QString server; + TQString username; + TQString password; + TQString server; bool doAuth; //send the initial login sequences to get the cookie bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; bool doBinding; @@ -86,7 +86,7 @@ public: ByteStream *bs; CoreProtocol client; - QString defRealm; + TQString defRealm; int mode; int state; @@ -94,28 +94,28 @@ public: bool newTransfers; int errCond; - QString errText; + TQString errText; - QPtrQueue in; + TQPtrQueue in; - QTimer noopTimer; // used to send icq keepalive + TQTimer noopTimer; // used to send icq keepalive int noop_time; }; -ClientStream::ClientStream(Connector *conn, QObject *parent) +ClientStream::ClientStream(Connector *conn, TQObject *parent) :Stream(parent), d(new Private()) { kdDebug(YAHOO_RAW_DEBUG) ; d->mode = Client; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); } ClientStream::~ClientStream() @@ -148,7 +148,7 @@ void ClientStream::reset(bool all) d->in.clear(); } -void ClientStream::connectToServer(const QString& server, bool auth) +void ClientStream::connectToServer(const TQString& server, bool auth) { kdDebug(YAHOO_RAW_DEBUG) ; reset(true); @@ -203,7 +203,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start(d->noop_time); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -215,7 +215,7 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } @@ -253,7 +253,7 @@ void ClientStream::write( Transfer *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { #if 0 qDebug( "contains: %i bytes ", bytes.count() ); @@ -295,7 +295,7 @@ void cs_dump( const QByteArray &bytes ) Q_UNUSED( bytes ); } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { if ( !d->bs ) return; @@ -327,15 +327,15 @@ void ClientStream::cr_connected() kdDebug(YAHOO_RAW_DEBUG) ; d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); - QGuardedPtr self = this; + TQGuardedPtr self = this; emit connected(); if(!self) return; @@ -368,11 +368,11 @@ void ClientStream::bs_error(int) void ClientStream::bs_readyRead() { // kdDebug(YAHOO_RAW_DEBUG) ; - QByteArray a; + TQByteArray a; //qDebug( "size of storage for incoming data is %i bytes.", a.size() ); a = d->bs->read(); - //QCString cs(a.data(), a.size()+1); + //TQCString cs(a.data(), a.size()+1); //qDebug("ClientStream: recv: %d [%s]\n", a.size(), cs.data()); //kdDebug(YAHOO_RAW_DEBUG) << " recv: " << a.size() <<" bytes"; //cs_dump( a ); @@ -399,7 +399,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h index 01ca6a2a..6efc307f 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h +++ b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h @@ -71,19 +71,19 @@ public: BindConflict // resource in-use }; - explicit ClientStream(Connector *conn, QObject *parent=0); + explicit ClientStream(Connector *conn, TQObject *parent=0); ~ClientStream(); - void connectToServer(const QString& server, bool auth=true); + void connectToServer(const TQString& server, bool auth=true); void accept(); // server bool isActive() const; bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -103,10 +103,10 @@ public: void write( Transfer* request ); int errorCondition() const; - QString errorText() const; + TQString errorText() const; // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -124,7 +124,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp b/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp index fce630db..9b7c8d8a 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp @@ -25,7 +25,7 @@ #include "yahoobytestream.h" #include "yahootypes.h" -KNetworkConnector::KNetworkConnector( QObject *parent ) +KNetworkConnector::KNetworkConnector( TQObject *parent ) : Connector( parent ) { kdDebug( YAHOO_RAW_DEBUG ) << "New KNetwork connector." << endl; @@ -34,8 +34,8 @@ KNetworkConnector::KNetworkConnector( QObject *parent ) mByteStream = new KNetworkByteStream( this ); - connect( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); mPort = 5510; } @@ -44,7 +44,7 @@ KNetworkConnector::~KNetworkConnector() delete mByteStream; } -void KNetworkConnector::connectToServer( const QString &server ) +void KNetworkConnector::connectToServer( const TQString &server ) { Q_UNUSED( server ); kdDebug( YAHOO_RAW_DEBUG ) << "Initiating connection to " << mHost << endl; @@ -53,7 +53,7 @@ void KNetworkConnector::connectToServer( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect( mHost, QString::number (mPort) ) ) + if ( !mByteStream->connect( mHost, TQString::number (mPort) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error(); @@ -67,7 +67,7 @@ void KNetworkConnector::slotConnected() // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); } @@ -97,7 +97,7 @@ void KNetworkConnector::done() mByteStream->close (); } -void KNetworkConnector::setOptHostPort( const QString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) { kdDebug ( YAHOO_RAW_DEBUG ) << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yahooconnector.h b/kopete/protocols/yahoo/libkyahoo/yahooconnector.h index 10c86ce0..b4758e72 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooconnector.h +++ b/kopete/protocols/yahoo/libkyahoo/yahooconnector.h @@ -36,15 +36,15 @@ class KNetworkConnector : public Connector Q_OBJECT public: - KNetworkConnector( QObject *parent = 0 ); + KNetworkConnector( TQObject *parent = 0 ); virtual ~KNetworkConnector(); - virtual void connectToServer( const QString &server ); + virtual void connectToServer( const TQString &server ); virtual ByteStream *stream() const; virtual void done(); - void setOptHostPort( const QString &host, Q_UINT16 port ); + void setOptHostPort( const TQString &host, Q_UINT16 port ); int errorCode(); @@ -53,7 +53,7 @@ private slots: void slotError( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/yahoo/libkyahoo/yahootypes.h b/kopete/protocols/yahoo/libkyahoo/yahootypes.h index 244d4022..0e8858c5 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahootypes.h +++ b/kopete/protocols/yahoo/libkyahoo/yahootypes.h @@ -18,8 +18,8 @@ #ifndef YAHOOTYPESH #define YAHOOTYPESH -#include -#include +#include +#include const int YAHOO_RAW_DEBUG = 14181; const int YAHOO_GEN_DEBUG = 14180; @@ -172,13 +172,13 @@ namespace Yahoo typedef Q_UINT32 DWORD; struct ChatRoom { - QString name; - QString topic; + TQString name; + TQString topic; int id; }; struct ChatCategory { - QString name; + TQString name; int id; }; } diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp index ce2c65eb..b1e6e4e3 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp +++ b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp @@ -16,16 +16,16 @@ ************************************************************************* */ -//#include -//#include -//#include -//#include +//#include +//#include +//#include +//#include -//#include -#include -#include -#include -#include +//#include +#include +#include +#include +#include #include @@ -36,7 +36,7 @@ using namespace Yahoo; -YMSGProtocol::YMSGProtocol(QObject *parent, const char *name) +YMSGProtocol::YMSGProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -45,7 +45,7 @@ YMSGProtocol::~YMSGProtocol() { } -Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* YMSGProtocol::parse( const TQByteArray & packet, uint& bytes ) { /* <------- 4B -------><------- 4B -------><---2B---> @@ -71,7 +71,7 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) int servicenum; int version1, version2; - QMap params; + TQMap params; // Skip the YMSG header pos += 4; @@ -381,13 +381,13 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) t->setStatus(status); t->setPacketLength(len); - QString d = QString::fromAscii( packet.data() + pos, packet.size() - pos ); - QStringList list = QStringList::split( "\xc0\x80", d ); + TQString d = TQString::fromAscii( packet.data() + pos, packet.size() - pos ); + TQStringList list = TQStringList::split( "\xc0\x80", d ); for( int i = 0; i+1 < list.size() && pos+1 < len+20; i += 2 ) { - QString key = list[i]; - QString value = QString::fromUtf8( list[i+1].ascii() ); + TQString key = list[i]; + TQString value = TQString::fromUtf8( list[i+1].ascii() ); pos += key.utf8().length() + value.utf8().length() + 4; - t->setParam( QString(key).toInt(), value.utf8() ); + t->setParam( TQString(key).toInt(), value.utf8() ); kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Key: " << key << " Value: " << value << endl; } diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h index 230745ef..a3ac04a6 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h +++ b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h @@ -28,7 +28,7 @@ Q_OBJECT public: - YMSGProtocol( QObject *parent = 0, const char *name = 0 ); + YMSGProtocol( TQObject *parent = 0, const char *name = 0 ); ~YMSGProtocol(); /** @@ -38,7 +38,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successful, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp index 233b0c85..dcee98d9 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp +++ b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp @@ -24,10 +24,10 @@ #include "yahootypes.h" #include "kdebug.h" -#include -#include -#include -#include +#include +#include +#include +#include using namespace Yahoo; @@ -143,7 +143,7 @@ int YMSGTransfer::paramCount( int index ) const } -QCString YMSGTransfer::nthParam( int index, int occurrence ) const +TQCString YMSGTransfer::nthParam( int index, int occurrence ) const { int cnt = 0; for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) @@ -151,10 +151,10 @@ QCString YMSGTransfer::nthParam( int index, int occurrence ) const if( (*it).first == index && cnt++ == occurrence) return (*it).second; } - return QCString(); + return TQCString(); } -QCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separator ) const +TQCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separator ) const { int cnt = -1; @@ -165,27 +165,27 @@ QCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separat if( (*it).first == index && cnt == occurrence) return (*it).second; } - return QCString(); + return TQCString(); } -QCString YMSGTransfer::firstParam( int index ) const +TQCString YMSGTransfer::firstParam( int index ) const { for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { if( (*it).first == index ) return (*it).second; } - return QCString(); + return TQCString(); } -void YMSGTransfer::setParam(int index, const QCString &data) +void YMSGTransfer::setParam(int index, const TQCString &data) { d->data.append( Param( index, data ) ); } void YMSGTransfer::setParam( int index, int data ) { - d->data.append( Param( index, QString::number( data ).local8Bit() ) ); + d->data.append( Param( index, TQString::number( data ).local8Bit() ) ); } int YMSGTransfer::length() const @@ -193,7 +193,7 @@ int YMSGTransfer::length() const int len = 0; for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { - len += QString::number( (*it).first ).length(); + len += TQString::number( (*it).first ).length(); len += 2; len += (*it).second.length(); len += 2; @@ -202,7 +202,7 @@ int YMSGTransfer::length() const } -QByteArray YMSGTransfer::serialize() const +TQByteArray YMSGTransfer::serialize() const { /* <------- 4B -------><------- 4B -------><---2B---> @@ -218,9 +218,9 @@ QByteArray YMSGTransfer::serialize() const */ int pos = 0; - QStringList::ConstIterator listIt = 0; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQStringList::ConstIterator listIt = 0; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); stream << (Q_INT8)'Y' << (Q_INT8)'M' << (Q_INT8)'S' << (Q_INT8)'G'; if( d->service == Yahoo::ServicePictureUpload ) @@ -239,7 +239,7 @@ QByteArray YMSGTransfer::serialize() const for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { kdDebug(YAHOO_RAW_DEBUG) << " Serializing key " << (*it).first << " value " << (*it).second << endl; - stream.writeRawBytes ( QString::number( (*it).first ).local8Bit(), QString::number( (*it).first ).length() ); + stream.writeRawBytes ( TQString::number( (*it).first ).local8Bit(), TQString::number( (*it).first ).length() ); stream << (Q_INT8)0xc0 << (Q_INT8)0x80; stream.writeRawBytes( (*it).second, (*it).second.length() ); stream << (Q_INT8)0xc0 << (Q_INT8)0x80; diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h index 662ca4d2..0b157792 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h +++ b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h @@ -25,13 +25,13 @@ #include "yahootypes.h" -#include -#include +#include +#include class YMSGTransferPrivate; -typedef QPair< int, QCString > Param; -typedef QValueList< Param > ParamList; +typedef QPair< int, TQCString > Param; +typedef TQValueList< Param > ParamList; /** @author Duncan Mac-Vicar Prett @@ -60,15 +60,15 @@ public: ParamList paramList() const; - QCString firstParam( int index ) const; - QCString nthParam( int index, int occurrence ) const; - QCString nthParamSeparated( int index, int occurrence, int separator ) const; + TQCString firstParam( int index ) const; + TQCString nthParam( int index, int occurrence ) const; + TQCString nthParamSeparated( int index, int occurrence, int separator ) const; int paramCount( int index ) const; - void setParam(int index, const QCString &data); + void setParam(int index, const TQCString &data); void setParam(int index, int data); - QByteArray serialize() const; + TQByteArray serialize() const; int length() const; private: diff --git a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp index dcd6e184..594e7a01 100644 --- a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp +++ b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp @@ -19,27 +19,27 @@ #include -#include -#include +#include +#include -YahooInviteListImpl::YahooInviteListImpl(QWidget *parent, const char *name) : YahooInviteListBase(parent,name) +YahooInviteListImpl::YahooInviteListImpl(TQWidget *parent, const char *name) : YahooInviteListBase(parent,name) { - listFriends->setSelectionMode( QListBox::Extended ); - listInvited->setSelectionMode( QListBox::Extended ); + listFriends->setSelectionMode( TQListBox::Extended ); + listInvited->setSelectionMode( TQListBox::Extended ); } YahooInviteListImpl::~YahooInviteListImpl() { } -void YahooInviteListImpl::setRoom( const QString &room ) +void YahooInviteListImpl::setRoom( const TQString &room ) { kdDebug(14180) << k_funcinfo << "Setting roomname to: " << room << endl; m_room = room; } -void YahooInviteListImpl::fillFriendList( const QStringList &buddies ) +void YahooInviteListImpl::fillFriendList( const TQStringList &buddies ) { kdDebug(14180) << k_funcinfo << "Adding friends: " << buddies << endl; @@ -59,11 +59,11 @@ void YahooInviteListImpl::updateListBoxes() listInvited->sort(); } -void YahooInviteListImpl::addInvitees( const QStringList &invitees ) +void YahooInviteListImpl::addInvitees( const TQStringList &invitees ) { kdDebug(14180) << k_funcinfo << "Adding invitees: " << invitees << endl; - for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) + for( TQStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) { if( m_inviteeList.find( *it ) == m_inviteeList.end() ) m_inviteeList.push_back( *it ); @@ -74,11 +74,11 @@ void YahooInviteListImpl::addInvitees( const QStringList &invitees ) updateListBoxes(); } -void YahooInviteListImpl::removeInvitees( const QStringList &invitees ) +void YahooInviteListImpl::removeInvitees( const TQStringList &invitees ) { kdDebug(14180) << k_funcinfo << "Removing invitees: " << invitees << endl; - for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) + for( TQStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) { if( m_buddyList.find( *it ) == m_buddyList.end() ) m_buddyList.push_back( *it ); @@ -89,7 +89,7 @@ void YahooInviteListImpl::removeInvitees( const QStringList &invitees ) updateListBoxes(); } -void YahooInviteListImpl::addParticipant( const QString &p ) +void YahooInviteListImpl::addParticipant( const TQString &p ) { m_participants.push_back( p ); } @@ -100,7 +100,7 @@ void YahooInviteListImpl::btnInvite_clicked() if( m_inviteeList.count() ) emit readyToInvite( m_room, m_inviteeList,m_participants, editMessage->text() ); - QDialog::accept(); + TQDialog::accept(); } @@ -108,7 +108,7 @@ void YahooInviteListImpl::btnCancel_clicked() { kdDebug(14180) << k_funcinfo << endl; - QDialog::reject(); + TQDialog::reject(); } @@ -116,12 +116,12 @@ void YahooInviteListImpl::btnAddCustom_clicked() { kdDebug(14180) << k_funcinfo << endl; - QString userId; + TQString userId; userId = editBuddyAdd->text(); if( userId.isEmpty() ) return; - addInvitees( QStringList(userId) ); + addInvitees( TQStringList(userId) ); editBuddyAdd->clear(); } @@ -130,7 +130,7 @@ void YahooInviteListImpl::btnRemove_clicked() { kdDebug(14180) << k_funcinfo << endl; - QStringList buddies; + TQStringList buddies; for( uint i=0; icount(); i++ ) { if (listInvited->isSelected(i)) @@ -146,7 +146,7 @@ void YahooInviteListImpl::btnAdd_clicked() { kdDebug(14180) << k_funcinfo << endl; - QStringList buddies; + TQStringList buddies; for( uint i=0; icount(); i++ ) { if (listFriends->isSelected(i)) diff --git a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h index 76577f36..94fa6402 100644 --- a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h +++ b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h @@ -18,7 +18,7 @@ #ifndef YAHOO_INVITE_LIST_IMPL #define YAHOO_INVITE_LIST_IMPL -#include +#include #include "yahooinvitelistbase.h" @@ -26,18 +26,18 @@ class YahooInviteListImpl : public YahooInviteListBase { Q_OBJECT public: - YahooInviteListImpl(QWidget *parent=0, const char *name=0); + YahooInviteListImpl(TQWidget *parent=0, const char *name=0); ~YahooInviteListImpl(); - void fillFriendList( const QStringList &buddies ); - void addInvitees( const QStringList &buddies ); - void removeInvitees( const QStringList &buddies ); - void setRoom( const QString &room ); - void addParticipant( const QString &participant ); + void fillFriendList( const TQStringList &buddies ); + void addInvitees( const TQStringList &buddies ); + void removeInvitees( const TQStringList &buddies ); + void setRoom( const TQString &room ); + void addParticipant( const TQString &participant ); private: signals: - void readyToInvite( const QString &room, const QStringList &buddies, const QStringList &participants, const QString &msg ); + void readyToInvite( const TQString &room, const TQStringList &buddies, const TQStringList &participants, const TQString &msg ); protected slots: public slots: @@ -49,10 +49,10 @@ public slots: private: void updateListBoxes(); - QStringList m_buddyList; - QStringList m_inviteeList; - QStringList m_participants; - QString m_room; + TQStringList m_buddyList; + TQStringList m_inviteeList; + TQStringList m_participants; + TQString m_room; }; #endif diff --git a/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp b/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp index 28a8532d..700c91e5 100644 --- a/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp +++ b/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp @@ -19,13 +19,13 @@ #include "yahoouserinfodialog.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,34 +39,34 @@ #include "yahoootherinfowidget.h" #include "yahoocontact.h" -YahooUserInfoDialog::YahooUserInfoDialog( YahooContact *c, QWidget * parent, const char * name ) +YahooUserInfoDialog::YahooUserInfoDialog( YahooContact *c, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::IconList, 0, parent, name, false, i18n( "Yahoo User Information" ), User2|User1|Cancel, Cancel, false, i18n("Save and Close"), i18n("Merge with existing entry") ) { kdDebug(14180) << k_funcinfo << "Creating new yahoo user info widget" << endl; m_contact = c; showButton( User2, false ); - QFrame* genInfo = addPage( i18n( "General Info" ), + TQFrame* genInfo = addPage( i18n( "General Info" ), i18n( "General Yahoo Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "identity" ), KIcon::Desktop ) ); - QVBoxLayout* genLayout = new QVBoxLayout( genInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "identity" ), KIcon::Desktop ) ); + TQVBoxLayout* genLayout = new TQVBoxLayout( genInfo ); m_genInfoWidget = new YahooGeneralInfoWidget( genInfo, "Basic Information" ); genLayout->addWidget( m_genInfoWidget ); - QFrame* workInfo = addPage( i18n( "Work Info" ), + TQFrame* workInfo = addPage( i18n( "Work Info" ), i18n( "Work Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "attach" ), KIcon::Desktop ) ); - QVBoxLayout* workLayout = new QVBoxLayout( workInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "attach" ), KIcon::Desktop ) ); + TQVBoxLayout* workLayout = new TQVBoxLayout( workInfo ); m_workInfoWidget = new YahooWorkInfoWidget( workInfo, "Work Information" ); workLayout->addWidget( m_workInfoWidget ); - QFrame* otherInfo = addPage( i18n( "Other Info" ), + TQFrame* otherInfo = addPage( i18n( "Other Info" ), i18n( "Other Yahoo Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* otherLayout = new QVBoxLayout( otherInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* otherLayout = new TQVBoxLayout( otherInfo ); m_otherInfoWidget = new YahooOtherInfoWidget( otherInfo, "Other Information" ); otherLayout->addWidget( m_otherInfoWidget ); - QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotSaveAndCloseClicked())); + TQObject::connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotSaveAndCloseClicked())); } void YahooUserInfoDialog::setAccountConnected( bool isOnline ) @@ -107,10 +107,10 @@ void YahooUserInfoDialog::slotSaveAndCloseClicked() entry.privateState = m_genInfoWidget->stateEdit->text(); entry.privateZIP = m_genInfoWidget->zipEdit->text(); entry.privateCountry = m_genInfoWidget->countryEdit->text(); - QString bi = m_genInfoWidget->birthdayEdit->text(); - entry.birthday = QDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); - QString an = m_genInfoWidget->anniversaryEdit->text(); - entry.anniversary = QDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); + TQString bi = m_genInfoWidget->birthdayEdit->text(); + entry.birthday = TQDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); + TQString an = m_genInfoWidget->anniversaryEdit->text(); + entry.anniversary = TQDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); entry.additional1 = m_otherInfoWidget->note1Edit->text(); entry.additional2 = m_otherInfoWidget->note2Edit->text(); entry.additional3 = m_otherInfoWidget->note3Edit->text(); @@ -126,7 +126,7 @@ void YahooUserInfoDialog::slotSaveAndCloseClicked() emit saveYABEntry( entry ); - QDialog::accept(); + TQDialog::accept(); } void YahooUserInfoDialog::slotUser2() @@ -170,16 +170,16 @@ void YahooUserInfoDialog::slotUser2() entry.birthday = oldEntry->birthday; else { - QString bi = m_genInfoWidget->birthdayEdit->text(); - entry.birthday = QDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); + TQString bi = m_genInfoWidget->birthdayEdit->text(); + entry.birthday = TQDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); } if( m_genInfoWidget->anniversaryEdit->text().isEmpty() ) entry.anniversary = oldEntry->anniversary; else { - QString an = m_genInfoWidget->anniversaryEdit->text(); - entry.anniversary = QDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); + TQString an = m_genInfoWidget->anniversaryEdit->text(); + entry.anniversary = TQDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); } entry.additional1 = m_otherInfoWidget->note1Edit->text().isEmpty() ? oldEntry->additional1 : m_otherInfoWidget->note1Edit->text(); @@ -198,7 +198,7 @@ void YahooUserInfoDialog::slotUser2() emit saveYABEntry( entry ); } - QDialog::accept(); + TQDialog::accept(); } void YahooUserInfoDialog::setData( const YABEntry &yab ) @@ -219,9 +219,9 @@ void YahooUserInfoDialog::setData( const YABEntry &yab ) m_genInfoWidget->titleEdit->setText( yab.title ); if( yab.birthday.isValid() ) - m_genInfoWidget->birthdayEdit->setText( QString("%1/%2/%3").arg( yab.birthday.day() ).arg( yab.birthday.month() ).arg( yab.birthday.year() )); + m_genInfoWidget->birthdayEdit->setText( TQString("%1/%2/%3").arg( yab.birthday.day() ).arg( yab.birthday.month() ).arg( yab.birthday.year() )); if( yab.anniversary.isValid() ) - m_genInfoWidget->anniversaryEdit->setText( QString("%1/%2/%3").arg( yab.anniversary.day() ).arg( yab.anniversary.month() ).arg( yab.anniversary.year() )); + m_genInfoWidget->anniversaryEdit->setText( TQString("%1/%2/%3").arg( yab.anniversary.day() ).arg( yab.anniversary.month() ).arg( yab.anniversary.year() )); m_genInfoWidget->addressEdit->setText( yab.privateAdress ); m_genInfoWidget->cityEdit->setText( yab.privateCity ); diff --git a/kopete/protocols/yahoo/ui/yahoouserinfodialog.h b/kopete/protocols/yahoo/ui/yahoouserinfodialog.h index 6500d412..e8529033 100644 --- a/kopete/protocols/yahoo/ui/yahoouserinfodialog.h +++ b/kopete/protocols/yahoo/ui/yahoouserinfodialog.h @@ -33,7 +33,7 @@ class YahooUserInfoDialog : public KDialogBase { Q_OBJECT public: - YahooUserInfoDialog( YahooContact *c, QWidget* parent = 0, const char* name = 0 ); + YahooUserInfoDialog( YahooContact *c, TQWidget* parent = 0, const char* name = 0 ); void setAccountConnected( bool isOnline ); signals: void saveYABEntry( YABEntry & ); diff --git a/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp b/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp index 1c7d4ef7..caa3c75a 100644 --- a/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp +++ b/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp @@ -16,39 +16,39 @@ #include "yahoowebcamdialog.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -YahooWebcamDialog::YahooWebcamDialog( const QString &contactId, QWidget * parent, const char * name ) +YahooWebcamDialog::YahooWebcamDialog( const TQString &contactId, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::Plain, i18n( "Webcam for %1" ).arg( contactId ), KDialogBase::Close, KDialogBase::Close, parent, name, false, true /*seperator*/ ) { - setInitialSize( QSize(320,290), false ); + setInitialSize( TQSize(320,290), false ); setEscapeButton( KDialogBase::Close ); - QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) ); + TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) ); contactName = contactId; - QWidget *page = plainPage(); + TQWidget *page = plainPage(); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); m_imageContainer = new Kopete::WebcamWidget( page ); m_imageContainer->setText( i18n( "No webcam image received" ) ); m_imageContainer->setMinimumSize(320,240); - m_imageContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_imageContainer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); topLayout->add( m_imageContainer ); - m_Viewer = new QLabel( page ); - m_Viewer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_Viewer = new TQLabel( page ); + m_Viewer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_Viewer->hide(); topLayout->add( m_Viewer ); @@ -60,20 +60,20 @@ YahooWebcamDialog::~ YahooWebcamDialog( ) } -void YahooWebcamDialog::newImage( const QPixmap &image ) +void YahooWebcamDialog::newImage( const TQPixmap &image ) { m_imageContainer->updatePixmap( image ); } void YahooWebcamDialog::webcamPaused() { - m_imageContainer->setText( QString::fromLatin1("*** Webcam paused ***") ); + m_imageContainer->setText( TQString::fromLatin1("*** Webcam paused ***") ); } void YahooWebcamDialog::webcamClosed( int reason ) { kdDebug(14180) << k_funcinfo << "webcam closed with reason?? " << reason <setText( closeReason ); } -void YahooWebcamDialog::setViewer( const QStringList &viewer ) +void YahooWebcamDialog::setViewer( const TQStringList &viewer ) { - QString s = i18n( "%1 viewer(s)" ).arg( viewer.size() ); + TQString s = i18n( "%1 viewer(s)" ).arg( viewer.size() ); if( viewer.size() ) { s += ": "; - for ( QStringList::ConstIterator it = viewer.begin(); it != viewer.end(); ++it ) { + for ( TQStringList::ConstIterator it = viewer.begin(); it != viewer.end(); ++it ) { if( it != viewer.begin() ) s += ", "; s += *it; diff --git a/kopete/protocols/yahoo/ui/yahoowebcamdialog.h b/kopete/protocols/yahoo/ui/yahoowebcamdialog.h index 8400e53d..8f130e03 100644 --- a/kopete/protocols/yahoo/ui/yahoowebcamdialog.h +++ b/kopete/protocols/yahoo/ui/yahoowebcamdialog.h @@ -17,7 +17,7 @@ #ifndef YAHOOWEBCAMDIALOG_H_ #define YAHOOWEBCAMDIALOG_H_ -#include +#include #include @@ -34,12 +34,12 @@ class YahooWebcamDialog : public KDialogBase { Q_OBJECT public: - YahooWebcamDialog( const QString &, QWidget* parent = 0, const char* name = 0 ); + YahooWebcamDialog( const TQString &, TQWidget* parent = 0, const char* name = 0 ); ~YahooWebcamDialog(); - void setViewer( const QStringList & ); + void setViewer( const TQStringList & ); public slots: - void newImage( const QPixmap &image ); + void newImage( const TQPixmap &image ); void webcamClosed( int ); void webcamPaused(); signals: @@ -47,8 +47,8 @@ signals: private: Kopete::WebcamWidget *m_imageContainer; - QLabel *m_Viewer; - QString contactName; + TQLabel *m_Viewer; + TQString contactName; }; diff --git a/kopete/protocols/yahoo/yahooaccount.cpp b/kopete/protocols/yahoo/yahooaccount.cpp index 3a64d215..ae33f264 100644 --- a/kopete/protocols/yahoo/yahooaccount.cpp +++ b/kopete/protocols/yahoo/yahooaccount.cpp @@ -21,15 +21,15 @@ #include //QT -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE #include @@ -66,7 +66,7 @@ #include "yabentry.h" #include "yahoouserinfodialog.h" -YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, const char *name) +YahooAccount::YahooAccount(YahooProtocol *parent, const TQString& accountId, const char *name) : Kopete::PasswordedAccount(parent, accountId, 0, name) { @@ -83,21 +83,21 @@ YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, cons // FIXME //m_openInboxAction = new KAction( KIcon("mail-folder-inbox"), i18n( "Open Inbo&x..." ), this ); //, "m_openInboxAction" ); - //QObject::connect(m_openInboxAction, SIGNAL( triggered(bool) ), this, SLOT( slotOpenInbox() ) ); + //TQObject::connect(m_openInboxAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotOpenInbox() ) ); //m_openYABAction = new KAction( KIcon("x-office-address-book"), i18n( "Open &Address book..." ), this ); //, "m_openYABAction" ); - //QObject::connect(m_openYABAction, SIGNAL( triggered(bool) ), this, SLOT( slotOpenYAB() ) ); + //TQObject::connect(m_openYABAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotOpenYAB() ) ); //m_editOwnYABEntry = new KAction( KIcon("document-properties"), i18n( "&Edit my contact details..."), this ); //, "m_editOwnYABEntry" ); - //QObject::connect(m_editOwnYABEntry, SIGNAL( triggered(bool) ), this, SLOT( slotEditOwnYABEntry() ) ); + //TQObject::connect(m_editOwnYABEntry, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotEditOwnYABEntry() ) ); //m_joinChatAction = new KAction( KIcon("im-chat-room-join"), i18n( "&Join chat room..."), this ); //, "m_joinChatAction" ); - //QObject::connect(m_joinChatAction, SIGNAL( triggered(bool) ), this, SLOT( slotJoinChatRoom() ) ); + //TQObject::connect(m_joinChatAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotJoinChatRoom() ) ); - m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, SLOT( slotOpenInbox() ), this, "m_openInboxAction" ); - m_openYABAction = new KAction( i18n( "Open &Addressbook..." ), "contents", 0, this, SLOT( slotOpenYAB() ), this, "m_openYABAction" ); - m_editOwnYABEntry = new KAction( i18n( "&Edit my contact details..."), "contents", 0, this, SLOT( slotEditOwnYABEntry() ), this, "m_editOwnYABEntry" ); - m_joinChatAction = new KAction( i18n( "&Join chat room..."), "contents", 0, this, SLOT( slotJoinChatRoom() ), this, "m_joinChatAction"); + m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, TQT_SLOT( slotOpenInbox() ), this, "m_openInboxAction" ); + m_openYABAction = new KAction( i18n( "Open &Addressbook..." ), "contents", 0, this, TQT_SLOT( slotOpenYAB() ), this, "m_openYABAction" ); + m_editOwnYABEntry = new KAction( i18n( "&Edit my contact details..."), "contents", 0, this, TQT_SLOT( slotEditOwnYABEntry() ), this, "m_editOwnYABEntry" ); + m_joinChatAction = new KAction( i18n( "&Join chat room..."), "contents", 0, this, TQT_SLOT( slotJoinChatRoom() ), this, "m_joinChatAction"); YahooContact* _myself=new YahooContact( this, accountId.lower(), accountId, Kopete::ContactList::self()->myself() ); setMyself( _myself ); @@ -109,7 +109,7 @@ YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, cons // initConnectionSignals( MakeConnections ); - QString displayName = configGroup()->readEntry(QString::fromLatin1("displayName"), QString()); + TQString displayName = configGroup()->readEntry(TQString::fromLatin1("displayName"), TQString()); if(!displayName.isEmpty()) _myself->setNickName(displayName); @@ -128,17 +128,17 @@ YahooAccount::~YahooAccount() m_webcam->stopTransmission(); } -void YahooAccount::setServer( const QString &server ) +void YahooAccount::setServer( const TQString &server ) { - configGroup()->writeEntry( QString::fromLatin1( "Server" ), server ); + configGroup()->writeEntry( TQString::fromLatin1( "Server" ), server ); } void YahooAccount::setPort( int port ) { - configGroup()->writeEntry( QString::fromLatin1( "Port" ), port ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), port ); } -void YahooAccount::slotGoStatus( int status, const QString &awayMessage) +void YahooAccount::slotGoStatus( int status, const TQString &awayMessage) { kdDebug(YAHOO_GEN_DEBUG) << "GoStatus: " << status << " msg: " << awayMessage << endl; if( !isConnected() ) @@ -162,9 +162,9 @@ Client *YahooAccount::yahooSession() return m_session ? m_session : 0L; } -QString YahooAccount::stripMsgColorCodes(const QString& msg) +TQString YahooAccount::stripMsgColorCodes(const TQString& msg) { - QString filteredMsg = msg; + TQString filteredMsg = msg; //Handle bold, underline and italic messages filteredMsg.replace( "\033[1m", "" ); @@ -183,12 +183,12 @@ QString YahooAccount::stripMsgColorCodes(const QString& msg) filteredMsg.remove( "\033[xlm" ); //Remove color codes and other residual formatting - filteredMsg.remove( QRegExp("\033\\[[^m]*m") ); + filteredMsg.remove( TQRegExp("\033\\[[^m]*m") ); return filteredMsg; } -QColor YahooAccount::getMsgColor(const QString& msg) +TQColor YahooAccount::getMsgColor(const TQString& msg) { /* Yahoo sends a message either with color or without color * so we have to use this really hacky method to get colors @@ -209,13 +209,13 @@ QColor YahooAccount::getMsgColor(const QString& msg) if ( msg.find("\033[32m") != -1 ) return Qt::cyan; if ( msg.find("\033[37m") != -1 ) - return QColor("#FFAA39"); + return TQColor("#FFAA39"); if ( msg.find("\033[35m") != -1 ) - return QColor("#FFD8D8"); + return TQColor("#FFD8D8"); if ( msg.find("\033[#") != -1 ) { kdDebug(YAHOO_GEN_DEBUG) << "Custom color is " << msg.mid(msg.find("\033[#")+2,7) << endl; - return QColor(msg.mid(msg.find("\033[#")+2,7)); + return TQColor(msg.mid(msg.find("\033[#")+2,7)); } //return a default value just in case @@ -229,294 +229,294 @@ void YahooAccount::initConnectionSignals( enum SignalConnectionType sct ) if ( sct == MakeConnections ) { - QObject::connect(m_session, SIGNAL(loggedIn( int, const QString &)), - this, SLOT(slotLoginResponse(int, const QString &)) ); + TQObject::connect(m_session, TQT_SIGNAL(loggedIn( int, const TQString &)), + this, TQT_SLOT(slotLoginResponse(int, const TQString &)) ); - QObject::connect(m_session, SIGNAL(disconnected()), - this, SLOT(slotDisconnected()) ); + TQObject::connect(m_session, TQT_SIGNAL(disconnected()), + this, TQT_SLOT(slotDisconnected()) ); - QObject::connect(m_session, SIGNAL(loginFailed()), - this, SLOT(slotLoginFailed()) ); + TQObject::connect(m_session, TQT_SIGNAL(loginFailed()), + this, TQT_SLOT(slotLoginFailed()) ); - QObject::connect(m_session, SIGNAL(error(int)), - this, SLOT(slotError(int))); + TQObject::connect(m_session, TQT_SIGNAL(error(int)), + this, TQT_SLOT(slotError(int))); - QObject::connect(m_session, SIGNAL(gotBuddy(const QString &, const QString &, const QString &)), - this, SLOT(slotGotBuddy(const QString &, const QString &, const QString &))); + TQObject::connect(m_session, TQT_SIGNAL(gotBuddy(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotGotBuddy(const TQString &, const TQString &, const TQString &))); - QObject::connect(m_session, SIGNAL(buddyAddResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyAddResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyAddResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyAddResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(buddyRemoveResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyRemoveResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyRemoveResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyRemoveResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(buddyChangeGroupResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyChangeGroupResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyChangeGroupResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyChangeGroupResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(authorizationAccepted( const QString & )), - this, SLOT(slotAuthorizationAccepted( const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(authorizationAccepted( const TQString & )), + this, TQT_SLOT(slotAuthorizationAccepted( const TQString & )) ); - QObject::connect(m_session, SIGNAL(authorizationRejected( const QString &, const QString & )), - this, SLOT(slotAuthorizationRejected( const QString &, const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(authorizationRejected( const TQString &, const TQString & )), + this, TQT_SLOT(slotAuthorizationRejected( const TQString &, const TQString & )) ); - QObject::connect(m_session, SIGNAL(gotAuthorizationRequest( const QString &, const QString &, const QString & )), - this, SLOT(slotgotAuthorizationRequest( const QString &, const QString &, const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(gotAuthorizationRequest( const TQString &, const TQString &, const TQString & )), + this, TQT_SLOT(slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & )) ); - QObject::connect(m_session, SIGNAL(statusChanged(const QString&,int,const QString&,int,int,int)), - this, SLOT(slotStatusChanged(const QString&,int,const QString&,int,int,int))); + TQObject::connect(m_session, TQT_SIGNAL(statusChanged(const TQString&,int,const TQString&,int,int,int)), + this, TQT_SLOT(slotStatusChanged(const TQString&,int,const TQString&,int,int,int))); - QObject::connect(m_session, SIGNAL(stealthStatusChanged(const QString &, Yahoo::StealthStatus)), - this, SLOT(slotStealthStatusChanged( const QString &, Yahoo::StealthStatus)) ); + TQObject::connect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthStatus)), + this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthStatus)) ); - QObject::connect(m_session, SIGNAL(gotIm(const QString&, const QString&, long, int)), - this, SLOT(slotGotIm(const QString &, const QString&, long, int))); + TQObject::connect(m_session, TQT_SIGNAL(gotIm(const TQString&, const TQString&, long, int)), + this, TQT_SLOT(slotGotIm(const TQString &, const TQString&, long, int))); - QObject::connect(m_session, SIGNAL(gotBuzz(const QString&, long)), - this, SLOT(slotGotBuzz(const QString &, long))); + TQObject::connect(m_session, TQT_SIGNAL(gotBuzz(const TQString&, long)), + this, TQT_SLOT(slotGotBuzz(const TQString &, long))); - QObject::connect(m_session, SIGNAL( gotConferenceInvite( const QString&, const QString&, - const QString&, const QStringList&) ), + TQObject::connect(m_session, TQT_SIGNAL( gotConferenceInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ), this, - SLOT( slotGotConfInvite( const QString&, const QString&, - const QString&, const QStringList& ) ) ); + TQT_SLOT( slotGotConfInvite( const TQString&, const TQString&, + const TQString&, const TQStringList& ) ) ); - QObject::connect(m_session, SIGNAL(confUserDeclined(const QString&, const QString &, const QString &)), + TQObject::connect(m_session, TQT_SIGNAL(confUserDeclined(const TQString&, const TQString &, const TQString &)), this, - SLOT(slotConfUserDecline( const QString &, const QString &, const QString &)) ); + TQT_SLOT(slotConfUserDecline( const TQString &, const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(confUserJoined( const QString &, const QString &)), this, - SLOT(slotConfUserJoin( const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(confUserJoined( const TQString &, const TQString &)), this, + TQT_SLOT(slotConfUserJoin( const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(confUserLeft( const QString &, const QString &)), this, - SLOT(slotConfUserLeave( const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(confUserLeft( const TQString &, const TQString &)), this, + TQT_SLOT(slotConfUserLeave( const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(gotConferenceMessage( const QString &, const QString &, const QString &)), this, - SLOT(slotConfMessage( const QString &, const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(gotConferenceMessage( const TQString &, const TQString &, const TQString &)), this, + TQT_SLOT(slotConfMessage( const TQString &, const TQString &, const TQString &)) ); - QObject::connect(m_session, - SIGNAL(incomingFileTransfer(const QString &, const QString &, long, const QString &, const QString &, unsigned long, const QPixmap &)), + TQObject::connect(m_session, + TQT_SIGNAL(incomingFileTransfer(const TQString &, const TQString &, long, const TQString &, const TQString &, unsigned long, const TQPixmap &)), this, - SLOT(slotGotFile(const QString&, const QString&, long, const QString&, const QString&, unsigned long, const QPixmap &))); + TQT_SLOT(slotGotFile(const TQString&, const TQString&, long, const TQString&, const TQString&, unsigned long, const TQPixmap &))); - QObject::connect(m_session, SIGNAL(fileTransferComplete(unsigned int)), this, - SLOT(slotFileTransferComplete(unsigned int)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferComplete(unsigned int)), this, + TQT_SLOT(slotFileTransferComplete(unsigned int)) ); - QObject::connect(m_session, SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, - SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, + TQT_SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); - QObject::connect(m_session, SIGNAL(fileTransferError(unsigned int,int,const QString &)), this, - SLOT(slotFileTransferError(unsigned int,int,const QString &)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferError(unsigned int,int,const TQString &)), this, + TQT_SLOT(slotFileTransferError(unsigned int,int,const TQString &)) ); - QObject::connect(m_session, SIGNAL(typingNotify(const QString &, int)), this , - SLOT(slotTypingNotify(const QString &, int))); + TQObject::connect(m_session, TQT_SIGNAL(typingNotify(const TQString &, int)), this , + TQT_SLOT(slotTypingNotify(const TQString &, int))); -// QObject::connect(m_session, SIGNAL(gameNotify(const QString &, int)), this, -// SLOT(slotGameNotify( const QString &, int))); +// TQObject::connect(m_session, TQT_SIGNAL(gameNotify(const TQString &, int)), this, +// TQT_SLOT(slotGameNotify( const TQString &, int))); - QObject::connect(m_session, SIGNAL(mailNotify(const QString&, const QString&, int)), this, - SLOT(slotMailNotify(const QString &, const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(mailNotify(const TQString&, const TQString&, int)), this, + TQT_SLOT(slotMailNotify(const TQString &, const TQString&, int))); - QObject::connect(m_session, SIGNAL(systemMessage(const QString&)), this, - SLOT(slotSystemMessage(const QString &))); + TQObject::connect(m_session, TQT_SIGNAL(systemMessage(const TQString&)), this, + TQT_SLOT(slotSystemMessage(const TQString &))); -// QObject::connect(m_session, SIGNAL(gotIdentities(const QStringList &)), this, -// SLOT(slotGotIdentities( const QStringList&))); +// TQObject::connect(m_session, TQT_SIGNAL(gotIdentities(const TQStringList &)), this, +// TQT_SLOT(slotGotIdentities( const TQStringList&))); - QObject::connect(m_session, SIGNAL(gotWebcamInvite(const QString&)), this, SLOT(slotGotWebcamInvite(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(gotWebcamInvite(const TQString&)), this, TQT_SLOT(slotGotWebcamInvite(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamNotAvailable(const QString&)), this, SLOT(slotWebcamNotAvailable(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamNotAvailable(const TQString&)), this, TQT_SLOT(slotWebcamNotAvailable(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamImageReceived(const QString&, const QPixmap& )), this, SLOT(slotGotWebcamImage(const QString&, const QPixmap& ))); + TQObject::connect(m_session, TQT_SIGNAL(webcamImageReceived(const TQString&, const TQPixmap& )), this, TQT_SLOT(slotGotWebcamImage(const TQString&, const TQPixmap& ))); - QObject::connect(m_session, SIGNAL(webcamClosed(const QString&, int )), this, SLOT(slotWebcamClosed(const QString&, int ))); + TQObject::connect(m_session, TQT_SIGNAL(webcamClosed(const TQString&, int )), this, TQT_SLOT(slotWebcamClosed(const TQString&, int ))); - QObject::connect(m_session, SIGNAL(webcamPaused(const QString&)), this, SLOT(slotWebcamPaused(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamPaused(const TQString&)), this, TQT_SLOT(slotWebcamPaused(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamReadyForTransmission()), this, SLOT(slotWebcamReadyForTransmission())); + TQObject::connect(m_session, TQT_SIGNAL(webcamReadyForTransmission()), this, TQT_SLOT(slotWebcamReadyForTransmission())); - QObject::connect(m_session, SIGNAL(webcamStopTransmission()), this, SLOT(slotWebcamStopTransmission())); + TQObject::connect(m_session, TQT_SIGNAL(webcamStopTransmission()), this, TQT_SLOT(slotWebcamStopTransmission())); - QObject::connect(m_session, SIGNAL(webcamViewerJoined(const QString&)), this, SLOT(slotWebcamViewerJoined(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerJoined(const TQString&)), this, TQT_SLOT(slotWebcamViewerJoined(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamViewerLeft(const QString&)), this, SLOT(slotWebcamViewerLeft(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerLeft(const TQString&)), this, TQT_SLOT(slotWebcamViewerLeft(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamViewerRequest(const QString&)), this, SLOT(slotWebcamViewerRequest( const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerRequest(const TQString&)), this, TQT_SLOT(slotWebcamViewerRequest( const TQString&))); - QObject::connect(m_session, SIGNAL(pictureStatusNotify( const QString&, int )), SLOT(slotPictureStatusNotify( const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(pictureStatusNotify( const TQString&, int )), TQT_SLOT(slotPictureStatusNotify( const TQString&, int))); - QObject::connect(m_session, SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int)), this, SLOT(slotGotBuddyIcon(const QString&, const QByteArray &, int)) ); + TQObject::connect(m_session, TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int)), this, TQT_SLOT(slotGotBuddyIcon(const TQString&, const TQByteArray &, int)) ); - QObject::connect(m_session, SIGNAL(pictureInfoNotify(const QString&, KURL, int)), this, SLOT(slotGotBuddyIconInfo(const QString&, KURL, int ))); + TQObject::connect(m_session, TQT_SIGNAL(pictureInfoNotify(const TQString&, KURL, int)), this, TQT_SLOT(slotGotBuddyIconInfo(const TQString&, KURL, int ))); - QObject::connect(m_session, SIGNAL(pictureChecksumNotify(const QString&, int)), this, SLOT(slotGotBuddyIconChecksum(const QString&, int ))); + TQObject::connect(m_session, TQT_SIGNAL(pictureChecksumNotify(const TQString&, int)), this, TQT_SLOT(slotGotBuddyIconChecksum(const TQString&, int ))); - QObject::connect(m_session, SIGNAL(pictureRequest(const QString&)), this, SLOT(slotGotBuddyIconRequest(const QString&)) ); + TQObject::connect(m_session, TQT_SIGNAL(pictureRequest(const TQString&)), this, TQT_SLOT(slotGotBuddyIconRequest(const TQString&)) ); - QObject::connect(m_session, SIGNAL(pictureUploaded( const QString &, int)), this, SLOT(slotBuddyIconChanged(const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(pictureUploaded( const TQString &, int)), this, TQT_SLOT(slotBuddyIconChanged(const TQString&, int))); - QObject::connect(m_session, SIGNAL(gotYABEntry( YABEntry * )), this, SLOT(slotGotYABEntry( YABEntry * ))); + TQObject::connect(m_session, TQT_SIGNAL(gotYABEntry( YABEntry * )), this, TQT_SLOT(slotGotYABEntry( YABEntry * ))); - QObject::connect(m_session, SIGNAL(modifyYABEntryError( YABEntry *, const QString & )), this, SLOT(slotModifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect(m_session, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & )), this, TQT_SLOT(slotModifyYABEntryError( YABEntry *, const TQString & ))); - QObject::connect(m_session, SIGNAL(gotYABRevision( long, bool )), this, SLOT(slotGotYABRevision( long , bool )) ); + TQObject::connect(m_session, TQT_SIGNAL(gotYABRevision( long, bool )), this, TQT_SLOT(slotGotYABRevision( long , bool )) ); - QObject::connect(m_session, SIGNAL(chatRoomJoined(int,int,QString,QString)), this, SLOT(slotChatJoined(int,int,QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatRoomJoined(int,int,TQString,TQString)), this, TQT_SLOT(slotChatJoined(int,int,TQString,TQString))); - QObject::connect(m_session, SIGNAL(chatBuddyHasJoined(QString,QString,bool)), this, SLOT(slotChatBuddyHasJoined(QString,QString,bool))); + TQObject::connect(m_session, TQT_SIGNAL(chatBuddyHasJoined(TQString,TQString,bool)), this, TQT_SLOT(slotChatBuddyHasJoined(TQString,TQString,bool))); - QObject::connect(m_session, SIGNAL(chatBuddyHasLeft(QString,QString)), this, SLOT(slotChatBuddyHasLeft(QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString)), this, TQT_SLOT(slotChatBuddyHasLeft(TQString,TQString))); - QObject::connect(m_session, SIGNAL(chatMessageReceived(QString,QString,QString)), this, SLOT(slotChatMessageReceived(QString,QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatMessageReceived(TQString,TQString,TQString)), this, TQT_SLOT(slotChatMessageReceived(TQString,TQString,TQString))); } if ( sct == DeleteConnections ) { - QObject::disconnect(m_session, SIGNAL(loggedIn(int, const QString &)), - this, SLOT(slotLoginResponse(int, const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(loggedIn(int, const TQString &)), + this, TQT_SLOT(slotLoginResponse(int, const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(disconnected()), - this, SLOT(slotDisconnected()) ); + TQObject::disconnect(m_session, TQT_SIGNAL(disconnected()), + this, TQT_SLOT(slotDisconnected()) ); - QObject::disconnect(m_session, SIGNAL(loginFailed()), - this, SLOT(slotLoginFailed()) ); + TQObject::disconnect(m_session, TQT_SIGNAL(loginFailed()), + this, TQT_SLOT(slotLoginFailed()) ); - QObject::disconnect(m_session, SIGNAL(error(int)), - this, SLOT(slotError(int))); + TQObject::disconnect(m_session, TQT_SIGNAL(error(int)), + this, TQT_SLOT(slotError(int))); - QObject::disconnect(m_session, SIGNAL(gotBuddy(const QString &, const QString &, const QString &)), - this, SLOT(slotGotBuddy(const QString &, const QString &, const QString &))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotBuddy(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotGotBuddy(const TQString &, const TQString &, const TQString &))); - QObject::disconnect(m_session, SIGNAL(buddyAddResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyAddResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyAddResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyAddResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(buddyRemoveResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyRemoveResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyRemoveResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyRemoveResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(buddyChangeGroupResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyChangeGroupResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyChangeGroupResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyChangeGroupResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(authorizationAccepted( const QString &)), - this, SLOT(slotAuthorizationAccepted( const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(authorizationAccepted( const TQString &)), + this, TQT_SLOT(slotAuthorizationAccepted( const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(authorizationRejected( const QString &, const QString &)), - this, SLOT(slotAuthorizationRejected( const QString &, const QString & )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(authorizationRejected( const TQString &, const TQString &)), + this, TQT_SLOT(slotAuthorizationRejected( const TQString &, const TQString & )) ); - QObject::disconnect(m_session, SIGNAL(gotAuthorizationRequest( const QString &, const QString &, const QString & )), - this, SLOT(slotgotAuthorizationRequest( const QString &, const QString &, const QString & )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(gotAuthorizationRequest( const TQString &, const TQString &, const TQString & )), + this, TQT_SLOT(slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & )) ); - QObject::disconnect(m_session, SIGNAL(statusChanged(const QString&,int,const QString&,int,int,int)), - this, SLOT(slotStatusChanged(const QString&,int,const QString&,int,int,int))); + TQObject::disconnect(m_session, TQT_SIGNAL(statusChanged(const TQString&,int,const TQString&,int,int,int)), + this, TQT_SLOT(slotStatusChanged(const TQString&,int,const TQString&,int,int,int))); - QObject::disconnect(m_session, SIGNAL(stealthStatusChanged(const QString &, Yahoo::StealthStatus)), - this, SLOT(slotStealthStatusChanged( const QString &, Yahoo::StealthStatus)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthStatus)), + this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthStatus)) ); - QObject::disconnect(m_session, SIGNAL(gotIm(const QString&, const QString&, long, int)), - this, SLOT(slotGotIm(const QString &, const QString&, long, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotIm(const TQString&, const TQString&, long, int)), + this, TQT_SLOT(slotGotIm(const TQString &, const TQString&, long, int))); - QObject::disconnect(m_session, SIGNAL(gotBuzz(const QString&, long)), - this, SLOT(slotGotBuzz(const QString &, long))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotBuzz(const TQString&, long)), + this, TQT_SLOT(slotGotBuzz(const TQString &, long))); - QObject::disconnect(m_session, - SIGNAL( gotConferenceInvite( const QString&, const QString&, - const QString&, const QStringList&) ), + TQObject::disconnect(m_session, + TQT_SIGNAL( gotConferenceInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ), this, - SLOT( slotGotConfInvite( const QString&, const QString&, - const QString&, const QStringList&) ) ); + TQT_SLOT( slotGotConfInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ) ); - QObject::disconnect(m_session, - SIGNAL(confUserDeclined(const QString&, const QString &, const QString &)), + TQObject::disconnect(m_session, + TQT_SIGNAL(confUserDeclined(const TQString&, const TQString &, const TQString &)), this, - SLOT(slotConfUserDecline( const QString &, const QString &, const QString& ) ) ); + TQT_SLOT(slotConfUserDecline( const TQString &, const TQString &, const TQString& ) ) ); - QObject::disconnect(m_session , SIGNAL(confUserJoined( const QString &, const QString &)), - this, SLOT(slotConfUserJoin( const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(confUserJoined( const TQString &, const TQString &)), + this, TQT_SLOT(slotConfUserJoin( const TQString &, const TQString &)) ); - QObject::disconnect(m_session , SIGNAL(confUserLeft( const QString &, const QString &)), - this, SLOT(slotConfUserLeave( const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(confUserLeft( const TQString &, const TQString &)), + this, TQT_SLOT(slotConfUserLeave( const TQString &, const TQString &)) ); - QObject::disconnect(m_session , SIGNAL(gotConferenceMessage( const QString &, const QString &, const QString &)), this, - SLOT(slotConfMessage( const QString &, const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(gotConferenceMessage( const TQString &, const TQString &, const TQString &)), this, + TQT_SLOT(slotConfMessage( const TQString &, const TQString &, const TQString &)) ); - QObject::disconnect(m_session, - SIGNAL(incomingFileTransfer(const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap &)), + TQObject::disconnect(m_session, + TQT_SIGNAL(incomingFileTransfer(const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap &)), this, - SLOT(slotGotFile(const QString&, const QString&, - long, const QString&, const QString&, unsigned long, const QPixmap &))); + TQT_SLOT(slotGotFile(const TQString&, const TQString&, + long, const TQString&, const TQString&, unsigned long, const TQPixmap &))); - QObject::disconnect(m_session, SIGNAL(fileTransferComplete(unsigned int)), this, - SLOT(slotFileTransferComplete(unsigned int)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferComplete(unsigned int)), this, + TQT_SLOT(slotFileTransferComplete(unsigned int)) ); - QObject::disconnect(m_session, SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, - SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, + TQT_SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); - QObject::disconnect(m_session, SIGNAL(fileTransferError(unsigned int,int,const QString &)), this, - SLOT(slotFileTransferError(unsigned int,int,const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferError(unsigned int,int,const TQString &)), this, + TQT_SLOT(slotFileTransferError(unsigned int,int,const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(typingNotify(const QString &, int)), this , - SLOT(slotTypingNotify(const QString &, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(typingNotify(const TQString &, int)), this , + TQT_SLOT(slotTypingNotify(const TQString &, int))); -// QObject::disconnect(m_session, SIGNAL(gameNotify(const QString &, int)), this, -// SLOT(slotGameNotify( const QString &, int))); +// TQObject::disconnect(m_session, TQT_SIGNAL(gameNotify(const TQString &, int)), this, +// TQT_SLOT(slotGameNotify( const TQString &, int))); - QObject::disconnect(m_session, SIGNAL(mailNotify(const QString&, const QString&, int)), this, - SLOT(slotMailNotify(const QString &, const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(mailNotify(const TQString&, const TQString&, int)), this, + TQT_SLOT(slotMailNotify(const TQString &, const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(systemMessage(const QString&)), this, - SLOT(slotSystemMessage(const QString &))); + TQObject::disconnect(m_session, TQT_SIGNAL(systemMessage(const TQString&)), this, + TQT_SLOT(slotSystemMessage(const TQString &))); -// QObject::disconnect(m_session, SIGNAL(gotIdentities(const QStringList &)), this, -// SLOT(slotGotIdentities( const QStringList&))); +// TQObject::disconnect(m_session, TQT_SIGNAL(gotIdentities(const TQStringList &)), this, +// TQT_SLOT(slotGotIdentities( const TQStringList&))); - QObject::disconnect(m_session, SIGNAL(gotWebcamInvite(const QString&)), this, SLOT(slotGotWebcamInvite(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotWebcamInvite(const TQString&)), this, TQT_SLOT(slotGotWebcamInvite(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamNotAvailable(const QString&)), this, SLOT(slotWebcamNotAvailable(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamNotAvailable(const TQString&)), this, TQT_SLOT(slotWebcamNotAvailable(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamImageReceived(const QString&, const QPixmap& )), this, SLOT(slotGotWebcamImage(const QString&, const QPixmap& ))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamImageReceived(const TQString&, const TQPixmap& )), this, TQT_SLOT(slotGotWebcamImage(const TQString&, const TQPixmap& ))); - QObject::disconnect(m_session, SIGNAL(webcamClosed(const QString&, int )), this, SLOT(slotWebcamClosed(const QString&, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamClosed(const TQString&, int )), this, TQT_SLOT(slotWebcamClosed(const TQString&, int ))); - QObject::disconnect(m_session, SIGNAL(webcamPaused(const QString&)), this, SLOT(slotWebcamPaused(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamPaused(const TQString&)), this, TQT_SLOT(slotWebcamPaused(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamReadyForTransmission()), this, SLOT(slotWebcamReadyForTransmission())); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamReadyForTransmission()), this, TQT_SLOT(slotWebcamReadyForTransmission())); - QObject::disconnect(m_session, SIGNAL(webcamStopTransmission()), this, SLOT(slotWebcamStopTransmission())); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamStopTransmission()), this, TQT_SLOT(slotWebcamStopTransmission())); - QObject::disconnect(m_session, SIGNAL(webcamViewerJoined(const QString&)), this, SLOT(slotWebcamViewerJoined(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerJoined(const TQString&)), this, TQT_SLOT(slotWebcamViewerJoined(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamViewerLeft(const QString&)), this, SLOT(slotWebcamViewerLeft(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerLeft(const TQString&)), this, TQT_SLOT(slotWebcamViewerLeft(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamViewerRequest(const QString&)), this, SLOT(slotWebcamViewerRequest( const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerRequest(const TQString&)), this, TQT_SLOT(slotWebcamViewerRequest( const TQString&))); - QObject::disconnect(m_session, SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int )), this, SLOT(slotGotBuddyIcon(const QString&, const QByteArray &,int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int )), this, TQT_SLOT(slotGotBuddyIcon(const TQString&, const TQByteArray &,int ))); - QObject::disconnect(m_session, SIGNAL(pictureInfoNotify(const QString&, KURL, int)), this, SLOT(slotGotBuddyIconInfo(const QString&, KURL, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureInfoNotify(const TQString&, KURL, int)), this, TQT_SLOT(slotGotBuddyIconInfo(const TQString&, KURL, int ))); - QObject::disconnect(m_session, SIGNAL(pictureRequest(const QString&)), this, SLOT(slotGotBuddyIconRequest(const QString&)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureRequest(const TQString&)), this, TQT_SLOT(slotGotBuddyIconRequest(const TQString&)) ); - QObject::disconnect(m_session, SIGNAL(pictureUploaded( const QString &, int )), this, SLOT(slotBuddyIconChanged(const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureUploaded( const TQString &, int )), this, TQT_SLOT(slotBuddyIconChanged(const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(pictureStatusNotify( const QString&, int )), this, SLOT(slotPictureStatusNotify( const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureStatusNotify( const TQString&, int )), this, TQT_SLOT(slotPictureStatusNotify( const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(pictureChecksumNotify(const QString&, int)), this, SLOT(slotGotBuddyIconChecksum(const QString&, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureChecksumNotify(const TQString&, int)), this, TQT_SLOT(slotGotBuddyIconChecksum(const TQString&, int ))); - QObject::disconnect(m_session, SIGNAL(gotYABEntry( YABEntry * )), this, SLOT(slotGotYABEntry( YABEntry * ))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotYABEntry( YABEntry * )), this, TQT_SLOT(slotGotYABEntry( YABEntry * ))); - QObject::disconnect(m_session, SIGNAL(modifyYABEntryError( YABEntry *, const QString & )), this, SLOT(slotModifyYABEntryError( YABEntry *, const QString & ))); + TQObject::disconnect(m_session, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & )), this, TQT_SLOT(slotModifyYABEntryError( YABEntry *, const TQString & ))); - QObject::disconnect(m_session, SIGNAL(gotYABRevision( long, bool )), this, SLOT(slotGotYABRevision( long , bool )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(gotYABRevision( long, bool )), this, TQT_SLOT(slotGotYABRevision( long , bool )) ); - QObject::disconnect(m_session, SIGNAL(chatRoomJoined(int,int,const QString&,const QString&)), this, SLOT(slotChatJoined(int,int,const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatRoomJoined(int,int,const TQString&,const TQString&)), this, TQT_SLOT(slotChatJoined(int,int,const TQString&,const TQString&))); - QObject::disconnect(m_session, SIGNAL(chatBuddyHasJoined(const QString&,const QString&,bool)), this, SLOT(slotChatBuddyHasJoined(const QString&,const QString&,bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatBuddyHasJoined(const TQString&,const TQString&,bool)), this, TQT_SLOT(slotChatBuddyHasJoined(const TQString&,const TQString&,bool))); - QObject::disconnect(m_session, SIGNAL(chatBuddyHasLeft(const QString&,const QString&)), this, SLOT(slotChatBuddyHasLeft(const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatBuddyHasLeft(const TQString&,const TQString&)), this, TQT_SLOT(slotChatBuddyHasLeft(const TQString&,const TQString&))); - QObject::disconnect(m_session, SIGNAL(chatMessageReceived(const QString&,const QString&,const QString&)), this, SLOT(slotChatMessageReceived(const QString&,const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatMessageReceived(const TQString&,const TQString&,const TQString&)), this, TQT_SLOT(slotChatMessageReceived(const TQString&,const TQString&,const TQString&))); } } -void YahooAccount::connectWithPassword( const QString &passwd ) +void YahooAccount::connectWithPassword( const TQString &passwd ) { kdDebug(YAHOO_GEN_DEBUG) ; if ( isAway() ) @@ -539,7 +539,7 @@ void YahooAccount::connectWithPassword( const QString &passwd ) return; } - QString server = configGroup()->readEntry( "Server", "scsa.msg.yahoo.com" ); + TQString server = configGroup()->readEntry( "Server", "scsa.msg.yahoo.com" ); int port = configGroup()->readNumEntry( "Port", 5050 ); initConnectionSignals( MakeConnections ); @@ -567,10 +567,10 @@ void YahooAccount::disconnect() static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); // FIXME: to check - //QHash::ConstIterator it, itEnd = contacts().constEnd(); + //QHash::ConstIterator it, itEnd = contacts().constEnd(); //for ( it = contacts().constBegin(); it != itEnd; ++it ) // static_cast( it.value() )->setOnlineStatus( m_protocol->Offline ); - for ( QDictIterator i( contacts() ); i.current(); ++i ) + for ( TQDictIterator i( contacts() ); i.current(); ++i ) static_cast( i.current() )->setOnlineStatus( m_protocol->Offline ); static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); @@ -581,10 +581,10 @@ void YahooAccount::disconnect() m_session->cancelConnect(); // FIXME: to check - //QHash::ConstIterator it, itEnd = contacts().constEnd(); + //QHash::ConstIterator it, itEnd = contacts().constEnd(); //for ( it = contacts().constBegin(); it != itEnd; ++it ) // static_cast( it.value() )->setOnlineStatus( m_protocol->Offline ); - for ( QDictIterator i(contacts()); i.current(); ++i ) + for ( TQDictIterator i(contacts()); i.current(); ++i ) static_cast( i.current() )->setOnlineStatus( m_protocol->Offline ); static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); @@ -595,14 +595,14 @@ void YahooAccount::disconnect() theHaveContactList = false; } -void YahooAccount::verifyAccount( const QString &word ) +void YahooAccount::verifyAccount( const TQString &word ) { kdDebug(YAHOO_GEN_DEBUG) << "Word: s" << word << endl; m_session->setVerificationWord( word ); disconnected( BadPassword ); } -void YahooAccount::setAway(bool status, const QString &awayMessage) +void YahooAccount::setAway(bool status, const TQString &awayMessage) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -658,12 +658,12 @@ KActionMenu* YahooAccount::actionMenu() return theActionMenu; } -YahooContact *YahooAccount::contact( const QString &id ) +YahooContact *YahooAccount::contact( const TQString &id ) { return static_cast(contacts()[id]); } -bool YahooAccount::createContact(const QString &contactId, Kopete::MetaContact *parentContact ) +bool YahooAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact ) { // kdDebug(YAHOO_GEN_DEBUG) << " contactId: " << contactId; @@ -683,7 +683,7 @@ bool YahooAccount::createContact(const QString &contactId, Kopete::MetaContact * return false; } -bool YahooAccount::createChatContact(const QString &nick) +bool YahooAccount::createChatContact(const TQString &nick) { Kopete::MetaContact *m = new Kopete::MetaContact; m->setTemporary( true ); @@ -692,13 +692,13 @@ bool YahooAccount::createChatContact(const QString &nick) void YahooAccount::sendFile( YahooContact *to, const KURL &url ) { - QFile file( url.path() ); + TQFile file( url.path() ); Kopete::Transfer *transfer = Kopete::TransferManager::transferManager()->addTransfer ( to, url.fileName(), file.size(), to->userId(), Kopete::FileTransferInfo::Outgoing ); - m_session->sendFile( transfer->info().transferId(), to->userId(), QString(), url ); + m_session->sendFile( transfer->info().transferId(), to->userId(), TQString(), url ); - QObject::connect( transfer, SIGNAL(result( KIO::Job * )), this, SLOT(slotFileTransferResult( KIO::Job * )) ); + TQObject::connect( transfer, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotFileTransferResult( KIO::Job * )) ); m_fileTransfers.insert( transfer->info().transferId(), transfer ); } @@ -715,10 +715,10 @@ void YahooAccount::setupActions( bool connected ) * * ***************************************************************************/ -void YahooAccount::slotLoginResponse( int succ , const QString &url ) +void YahooAccount::slotLoginResponse( int succ , const TQString &url ) { kdDebug(YAHOO_GEN_DEBUG) << succ << ", " << url << ")]" << endl; - QString errorMsg; + TQString errorMsg; setupActions( succ == Yahoo::LoginOk ); if ( succ == Yahoo::LoginOk || (succ == Yahoo::LoginDupl && m_lastDisconnectCode == 2) ) { @@ -799,7 +799,7 @@ void YahooAccount::slotDisconnected() static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); disconnected( ConnectionReset ); // may reconnect - QString message; + TQString message; message = i18n( "%1 has been disconnected.\nError message:\n%2 - %3" ) .arg( accountId() ).arg( m_session->error() ).arg( m_session->errorString() ); KNotification::event( "connection_lost", message, myself()->onlineStatus().protocolIcon() ); @@ -812,7 +812,7 @@ void YahooAccount::slotLoginFailed() static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); disconnected( Manual ); // don't reconnect - QString message; + TQString message; message = i18n( "There was an error while connecting %1 to the Yahoo server.\nError message:\n%2 - %3" ) .arg( accountId()).arg( m_session->error() ).arg( m_session->errorString() ); KNotification::event( "cannot_connect", message, myself()->onlineStatus().protocolIcon() ); @@ -832,10 +832,10 @@ void YahooAccount::slotError( int level ) .arg( m_session->errorInformation() ).arg( m_session->errorString() ), i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotBuddy( const QString &userid, const QString &alias, const QString &group ) +void YahooAccount::slotGotBuddy( const TQString &userid, const TQString &alias, const TQString &group ) { kdDebug(YAHOO_GEN_DEBUG) ; - IDs[userid] = QPair(group, alias); + IDs[userid] = QPair(group, alias); // Serverside -> local if ( !contact( userid ) ) @@ -849,18 +849,18 @@ void YahooAccount::slotGotBuddy( const QString &userid, const QString &alias, co //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyAddResult( const QString &userid, const QString &group, bool success ) +void YahooAccount::slotBuddyAddResult( const TQString &userid, const TQString &group, bool success ) { kdDebug(YAHOO_GEN_DEBUG) << success << endl; if(success) - IDs[userid] = QPair(group, QString()); + IDs[userid] = QPair(group, TQString()); // FIXME (same) //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyRemoveResult( const QString &userid, const QString &group, bool success ) +void YahooAccount::slotBuddyRemoveResult( const TQString &userid, const TQString &group, bool success ) { kdDebug(YAHOO_GEN_DEBUG); @@ -873,38 +873,38 @@ void YahooAccount::slotBuddyRemoveResult( const QString &userid, const QString & // kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyChangeGroupResult(const QString &userid, const QString &group, bool success) +void YahooAccount::slotBuddyChangeGroupResult(const TQString &userid, const TQString &group, bool success) { kdDebug(YAHOO_GEN_DEBUG); if(success) - IDs[userid] = QPair(group, QString()); + IDs[userid] = QPair(group, TQString()); // FIXME //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotAuthorizationAccepted( const QString &who ) +void YahooAccount::slotAuthorizationAccepted( const TQString &who ) { kdDebug(YAHOO_GEN_DEBUG) ; - QString message; + TQString message; message = i18n( "User %1 has granted your authorization request." ).arg( who ); - KNotification::event( QString::fromLatin1("kopete_authorization"), message ); + KNotification::event( TQString::fromLatin1("kopete_authorization"), message ); if( contact( who ) ) contact( who )->setOnlineStatus( m_protocol->Online ); } -void YahooAccount::slotAuthorizationRejected( const QString &who, const QString &msg ) +void YahooAccount::slotAuthorizationRejected( const TQString &who, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) ; - QString message; + TQString message; message = i18n( "User %1 has rejected your authorization request.\n%2" ) .arg( who ).arg( msg ); - KNotification::event( QString::fromLatin1("kopete_authorization"), message ); + KNotification::event( TQString::fromLatin1("kopete_authorization"), message ); } -void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QString &msg, const QString &name ) +void YahooAccount::slotgotAuthorizationRequest( const TQString &user, const TQString &msg, const TQString &name ) { kdDebug(YAHOO_GEN_DEBUG) ; Q_UNUSED( msg ); @@ -921,8 +921,8 @@ void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QStri // actions |= Kopete::AddedInfoEvent::AddAction; //Kopete::AddedInfoEvent* event = new Kopete::AddedInfoEvent( user, this ); - //QObject::connect( event, SIGNAL(actionActivated(uint)), - // this, SLOT(slotAddedInfoEventActionActivated(uint)) ); + //TQObject::connect( event, TQT_SIGNAL(actionActivated(uint)), + // this, TQT_SLOT(slotAddedInfoEventActionActivated(uint)) ); //event->showActions( actions ); //event->sendEvent(); @@ -932,21 +932,21 @@ void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QStri hideFlags |= Kopete::UI::ContactAddedNotifyDialog::AddCheckBox | Kopete::UI::ContactAddedNotifyDialog::AddGroupBox ; Kopete::UI::ContactAddedNotifyDialog *dialog= - new Kopete::UI::ContactAddedNotifyDialog( user,QString::null,this, hideFlags ); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)), - this,SLOT(slotContactAddedNotifyDialogClosed(const QString& ))); + new Kopete::UI::ContactAddedNotifyDialog( user,TQString::null,this, hideFlags ); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)), + this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& ))); dialog->show(); } -void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) +void YahooAccount::slotContactAddedNotifyDialogClosed( const TQString &user ) { const Kopete::UI::ContactAddedNotifyDialog *dialog = dynamic_cast(sender()); if(!dialog || !isConnected()) return; - m_session->sendAuthReply( user, dialog->authorized(), QString::null ); + m_session->sendAuthReply( user, dialog->authorized(), TQString::null ); if(dialog->added()) { @@ -964,10 +964,10 @@ void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) switch ( actionId ) { case Kopete::AddedInfoEvent::AuthorizeAction: - m_session->sendAuthReply( event->contactId(), true, QString() ); + m_session->sendAuthReply( event->contactId(), true, TQString() ); break; case Kopete::AddedInfoEvent::BlockAction: - m_session->sendAuthReply( event->contactId(), false, QString() ); + m_session->sendAuthReply( event->contactId(), false, TQString() ); break; case Kopete::AddedInfoEvent::AddContactAction: event->addContact(); @@ -975,17 +975,17 @@ void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) } }*/ -void YahooAccount::slotGotIgnore( const QStringList & /* igns */ ) +void YahooAccount::slotGotIgnore( const TQStringList & /* igns */ ) { //kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotGotIdentities( const QStringList & /* ids */ ) +void YahooAccount::slotGotIdentities( const TQStringList & /* ids */ ) { //kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotStatusChanged( const QString &who, int stat, const QString &msg, int away, int idle, int pictureChecksum ) +void YahooAccount::slotStatusChanged( const TQString &who, int stat, const TQString &msg, int away, int idle, int pictureChecksum ) { kdDebug(YAHOO_GEN_DEBUG) << who << " status: " << stat << " msg: " << msg << " away: " << away << " idle: " << idle << endl; YahooContact *kc = contact( who ); @@ -1032,7 +1032,7 @@ void YahooAccount::slotStatusChanged( const QString &who, int stat, const QStrin } } -void YahooAccount::slotStealthStatusChanged( const QString &who, Yahoo::StealthStatus state ) +void YahooAccount::slotStealthStatusChanged( const TQString &who, Yahoo::StealthStatus state ) { //kdDebug(YAHOO_GEN_DEBUG) << "Stealth Status of " << who << "changed to " << state; @@ -1044,16 +1044,16 @@ void YahooAccount::slotStealthStatusChanged( const QString &who, Yahoo::StealthS kc->setStealthed( state == Yahoo::StealthActive ); } -QString YahooAccount::prepareIncomingMessage( const QString &messageText ) +TQString YahooAccount::prepareIncomingMessage( const TQString &messageText ) { - QString newMsgText( messageText ); - QRegExp regExp; + TQString newMsgText( messageText ); + TQRegExp regExp; int pos = 0; newMsgText = stripMsgColorCodes( newMsgText ); kdDebug(YAHOO_GEN_DEBUG) << "Message after stripping color codes '" << newMsgText << "'" << endl; - newMsgText.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); + newMsgText.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); // Replace Font tags regExp.setMinimal( true ); @@ -1063,7 +1063,7 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("" ) ); } } @@ -1095,7 +1095,7 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("<" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("<" ) ); } } regExp.setPattern( "([^\"bui])>" ); @@ -1104,30 +1104,30 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("\\1>" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1>" ) ); } } // add closing tags when needed regExp.setMinimal( false ); regExp.setPattern( "(.*)(?!)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1" ) ); regExp.setPattern( "(.*)(?!)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1" ) ); regExp.setPattern( "(.*)(?!)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1" ) ); regExp.setPattern( "()" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1
" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1
" ) ); - newMsgText.replace( QString::fromLatin1( "\r" ), QString::fromLatin1( "
" ) ); + newMsgText.replace( TQString::fromLatin1( "\r" ), TQString::fromLatin1( "
" ) ); return newMsgText; } -void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, int /*stat*/) +void YahooAccount::slotGotIm( const TQString &who, const TQString &msg, long tm, int /*stat*/) { - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1139,17 +1139,17 @@ void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, i //Parse the message for it's properties kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << msg << "'" << endl; //kdDebug(YAHOO_GEN_DEBUG) << "Message color is " << getMsgColor(msg); - QColor fgColor = getMsgColor( msg ); + TQColor fgColor = getMsgColor( msg ); // FIXME to check if (tm == 0) - //msgDT = QDateTime( QDate::currentDate(), QTime::currentTime(), Qt::LocalTime ); + //msgDT = TQDateTime( TQDate::currentDate(), TQTime::currentTime(), Qt::LocalTime ); msgDT.setTime_t(time(0L)); else - //msgDT = QDateTime::fromTime_t(tm); + //msgDT = TQDateTime::fromTime_t(tm); msgDT.setTime_t(tm, Qt::LocalTime); - QString newMsgText = prepareIncomingMessage( msg ); + TQString newMsgText = prepareIncomingMessage( msg ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; @@ -1167,10 +1167,10 @@ void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, i mm->appendMessage(kmsg); } -void YahooAccount::slotGotBuzz( const QString &who, long tm ) +void YahooAccount::slotGotBuzz( const TQString &who, long tm ) { - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1181,20 +1181,20 @@ void YahooAccount::slotGotBuzz( const QString &who, long tm ) // FIXME: to check if (tm == 0) - //msgDT = QDateTime( QDate::currentDate(), QTime::currentTime(), Qt::LocalTime ); + //msgDT = TQDateTime( TQDate::currentDate(), TQTime::currentTime(), Qt::LocalTime ); msgDT.setTime_t(time(0L)); else - //msgDT = QDateTime::fromTime_t(tm); + //msgDT = TQDateTime::fromTime_t(tm); msgDT.setTime_t(tm, Qt::LocalTime); justMe.append(myself()); - QString buzzMsgText = i18n("This string is shown when the user is buzzed by a contact", "Buzz"); + TQString buzzMsgText = i18n("This string is shown when the user is buzzed by a contact", "Buzz"); Kopete::Message kmsg(msgDT, contact(who), justMe, buzzMsgText, Kopete::Message::Inbound, - Kopete::Message::PlainText, QString::null, Kopete::Message::TypeAction); + Kopete::Message::PlainText, TQString::null, Kopete::Message::TypeAction); - QColor fgColor( "gold" ); + TQColor fgColor( "gold" ); kmsg.setFg( fgColor ); Kopete::ChatSession *mm = contact(who)->manager(Kopete::Contact::CanCreate); @@ -1203,7 +1203,7 @@ void YahooAccount::slotGotBuzz( const QString &who, long tm ) mm->emitNudgeNotification(); } -void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, const QString &msg, const QStringList &members ) +void YahooAccount::slotGotConfInvite( const TQString & who, const TQString & room, const TQString &msg, const TQStringList &members ) { kdDebug(YAHOO_GEN_DEBUG) << who << " has invited you to join the conference \"" << room << "\" : " << msg << endl; kdDebug(YAHOO_GEN_DEBUG) << "Members: " << members << endl; @@ -1215,20 +1215,20 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, return; } - QString m = who; - QStringList myMembers; + TQString m = who; + TQStringList myMembers; myMembers.push_back( who ); - for( QStringList::const_iterator it = ++members.constBegin(); it != members.constEnd(); ++it ) + for( TQStringList::const_iterator it = ++members.constBegin(); it != members.constEnd(); ++it ) { if( *it != m_session->userId() ) { - m.append( QString(", %1").arg( *it ) ); + m.append( TQString(", %1").arg( *it ) ); myMembers.push_back( *it ); } } if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 has invited you to join a conference with %2.\n\nHis/her message: %3\n\nAccept?") - .arg(who).arg(m).arg(msg), QString(), i18n("Accept"), i18n("Ignore") ) ) + .arg(who).arg(m).arg(msg), TQString(), i18n("Accept"), i18n("Ignore") ) ) { m_session->joinConference( room, myMembers ); if( !m_conferences[room] ) @@ -1237,9 +1237,9 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, YahooConferenceChatSession *session = new YahooConferenceChatSession( room, protocol(), myself(), others ); m_conferences[room] = session; - QObject::connect( session, SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); + TQObject::connect( session, TQT_SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, TQT_SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); - for ( QStringList::ConstIterator it = myMembers.constBegin(); it != myMembers.constEnd(); ++it ) + for ( TQStringList::ConstIterator it = myMembers.constBegin(); it != myMembers.constEnd(); ++it ) { YahooContact * c = contact( *it ); if ( !c ) @@ -1254,32 +1254,32 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, } } else - m_session->declineConference( room, myMembers, QString() ); + m_session->declineConference( room, myMembers, TQString() ); m_pendingConfInvites.remove( room ); } -void YahooAccount::prepareConference( const QString &who ) +void YahooAccount::prepareConference( const TQString &who ) { - QString room; + TQString room; for( int i = 0; i < 22; i++ ) { char c = rand()%52; room += (c > 25) ? c + 71 : c + 65; } - room = QString("%1-%2--").arg(accountId()).arg(room); + room = TQString("%1-%2--").arg(accountId()).arg(room); kdDebug(YAHOO_GEN_DEBUG) << "The generated roomname is: " << room << endl; - QStringList buddies; + TQStringList buddies; // FIXME: to check - //QHash::ConstIterator it, itEnd = contacts().constEnd(); + //QHash::ConstIterator it, itEnd = contacts().constEnd(); //for( it = contacts().constBegin(); it != itEnd; ++it ) //{ // buddies.push_back( it.value()->contactId() ); //} - QDictIterator it( contacts() ); + TQDictIterator it( contacts() ); for( ; it.current(); ++it ) { if( (*it) != myself() ) @@ -1287,15 +1287,15 @@ void YahooAccount::prepareConference( const QString &who ) } YahooInviteListImpl *dlg = new YahooInviteListImpl( Kopete::UI::Global::mainWidget() ); - QObject::connect( dlg, SIGNAL( readyToInvite( const QString &, const QStringList &, const QStringList &, const QString & ) ), - this, SLOT( slotInviteConference( const QString &, const QStringList &, const QStringList &, const QString & ) ) ); + TQObject::connect( dlg, TQT_SIGNAL( readyToInvite( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ), + this, TQT_SLOT( slotInviteConference( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ) ); dlg->setRoom( room ); dlg->fillFriendList( buddies ); - dlg->addInvitees( QStringList( who ) ); + dlg->addInvitees( TQStringList( who ) ); dlg->show(); } -void YahooAccount::slotInviteConference( const QString &room, const QStringList &members, const QStringList &participants, const QString &msg ) +void YahooAccount::slotInviteConference( const TQString &room, const TQStringList &members, const TQStringList &participants, const TQString &msg ) { Q_UNUSED( participants ); kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << members << " to the conference " << room << ". Message: " << msg << endl; @@ -1305,19 +1305,19 @@ kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << members << " to the conference " << r YahooConferenceChatSession *session = new YahooConferenceChatSession( room, protocol(), myself(), others ); m_conferences[room] = session; - QObject::connect( session, SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); + TQObject::connect( session, TQT_SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, TQT_SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); session->joined( static_cast< YahooContact *>(myself()) ); session->view( true )->raise( false ); } -void YahooAccount::slotAddInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void YahooAccount::slotAddInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << who << " to the conference " << room << ". Message: " << msg << endl; m_session->addInviteConference( room, who, members, msg ); } -void YahooAccount::slotConfUserDecline( const QString &who, const QString &room, const QString &msg) +void YahooAccount::slotConfUserDecline( const TQString &who, const TQString &room, const TQString &msg) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -1329,13 +1329,13 @@ void YahooAccount::slotConfUserDecline( const QString &who, const QString &room, YahooConferenceChatSession *session = m_conferences[room]; - QString body = i18n( "%1 has declined to join the conference: \"%2\"").arg( who ).arg( msg ); + TQString body = i18n( "%1 has declined to join the conference: \"%2\"").arg( who ).arg( msg ); Kopete::Message message = Kopete::Message( contact( who ), myself(), body, Kopete::Message::Internal, Kopete::Message::PlainText ); session->appendMessage( message ); } -void YahooAccount::slotConfUserJoin( const QString &who, const QString &room ) +void YahooAccount::slotConfUserJoin( const TQString &who, const TQString &room ) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_conferences.contains( room ) ) @@ -1352,7 +1352,7 @@ void YahooAccount::slotConfUserJoin( const QString &who, const QString &room ) session->joined( contact( who ) ); } -void YahooAccount::slotConfUserLeave( const QString & who, const QString &room ) +void YahooAccount::slotConfUserLeave( const TQString & who, const TQString &room ) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_conferences.contains( room ) ) @@ -1374,7 +1374,7 @@ void YahooAccount::slotConfLeave( YahooConferenceChatSession *s ) kdDebug(YAHOO_GEN_DEBUG) ; if( !s ) return; - QStringList members; + TQStringList members; for( Kopete::ContactPtrList::ConstIterator it = s->members().constBegin(); it != s->members().constEnd(); ++it ) { if( (*it) == myself() ) @@ -1386,7 +1386,7 @@ void YahooAccount::slotConfLeave( YahooConferenceChatSession *s ) m_conferences.remove( s->room() ); } -void YahooAccount::slotConfMessage( const QString &who, const QString &room, const QString &msg ) +void YahooAccount::slotConfMessage( const TQString &who, const TQString &room, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -1398,8 +1398,8 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con YahooConferenceChatSession *session = m_conferences[room]; - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1409,10 +1409,10 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con } kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << msg << "'" << endl; - QColor fgColor = getMsgColor( msg ); + TQColor fgColor = getMsgColor( msg ); msgDT.setTime_t(time(0L)); - QString newMsgText = prepareIncomingMessage( msg ); + TQString newMsgText = prepareIncomingMessage( msg ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; session->receivedTypingMsg(contact(who), false); @@ -1429,7 +1429,7 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con void YahooAccount::sendConfMessage( YahooConferenceChatSession *s, const Kopete::Message &message ) { kdDebug(YAHOO_GEN_DEBUG) ; - QStringList members; + TQStringList members; for( Kopete::ContactPtrList::ConstIterator it = s->members().constBegin(); it != s->members().constEnd(); ++it ) { if( (*it) == myself() ) @@ -1478,7 +1478,7 @@ void YahooAccount::slotGotYABEntry( YABEntry *entry ) dlg->setData( *entry ); dlg->setAccountConnected( isConnected() ); dlg->show(); - QObject::connect( dlg, SIGNAL(saveYABEntry( YABEntry & )), this, SLOT(slotSaveYABEntry( YABEntry & ))); + TQObject::connect( dlg, TQT_SIGNAL(saveYABEntry( YABEntry & )), this, TQT_SLOT(slotSaveYABEntry( YABEntry & ))); delete entry; } } @@ -1493,7 +1493,7 @@ void YahooAccount::slotSaveYABEntry( YABEntry &entry ) m_session->addYABEntry( entry ); } -void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const QString &msg ) +void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const TQString &msg ) { YahooContact* kc = contact( entry->yahooId ); if( kc ) @@ -1501,7 +1501,7 @@ void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const QString &msg KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotFile( const QString & who, const QString & url , long /* expires */, const QString & msg , const QString & fname, unsigned long fesize, const QPixmap &preview ) +void YahooAccount::slotGotFile( const TQString & who, const TQString & url , long /* expires */, const TQString & msg , const TQString & fname, unsigned long fesize, const TQPixmap &preview ) { kdDebug(YAHOO_GEN_DEBUG) << "Received File from " << who << ": " << msg << endl; kdDebug(YAHOO_GEN_DEBUG) << "Filename :" << fname << " size:" << fesize << endl; @@ -1511,15 +1511,15 @@ void YahooAccount::slotGotFile( const QString & who, const QString & url , lon if( m_pendingFileTransfers.empty() ) { - QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } m_pendingFileTransfers.append( url ); } -void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QString& fileName) +void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const TQString& fileName) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_pendingFileTransfers.contains( transfer->info().internalId() ) ) @@ -1529,8 +1529,8 @@ void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QSt // FIXME to check //Create directory if it doesn't already exist - QDir dir; - QString path = QFileInfo( fileName ).dirPath(); + TQDir dir; + TQString path = TQFileInfo( fileName ).dirPath(); for( int i = 1; i <= path.contains('/'); ++i ) { if( !dir.exists( path.section( '/', 0, i ) ) ) @@ -1541,14 +1541,14 @@ void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QSt m_session->receiveFile( transfer->info().transferId(), transfer->info().contact()->contactId(), transfer->info().internalId(), fileName ); m_fileTransfers.insert( transfer->info().transferId(), transfer ); - QObject::connect( transfer, SIGNAL(result( KIO::Job * )), this, SLOT(slotFileTransferResult( KIO::Job * )) ); + TQObject::connect( transfer, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotFileTransferResult( KIO::Job * )) ); if( m_pendingFileTransfers.empty() ) { - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } } @@ -1562,10 +1562,10 @@ void YahooAccount::slotReceiveFileRefused( const Kopete::FileTransferInfo& info if( m_pendingFileTransfers.empty() ) { - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } } @@ -1590,7 +1590,7 @@ void YahooAccount::slotFileTransferComplete( unsigned int transferId ) m_fileTransfers.remove( transferId ); } -void YahooAccount::slotFileTransferError( unsigned int transferId, int error, const QString &desc ) +void YahooAccount::slotFileTransferError( unsigned int transferId, int error, const TQString &desc ) { kdDebug(YAHOO_GEN_DEBUG) ; Kopete::Transfer *t = m_fileTransfers[transferId]; @@ -1616,49 +1616,49 @@ void YahooAccount::slotFileTransferResult( KIO::Job *job ) } } -void YahooAccount::slotContactAdded( const QString & /* myid */, const QString & /* who */, const QString & /* msg */ ) +void YahooAccount::slotContactAdded( const TQString & /* myid */, const TQString & /* who */, const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) << myid << " " << who << " " << msg; } -void YahooAccount::slotRejected( const QString & /* who */, const QString & /* msg */ ) +void YahooAccount::slotRejected( const TQString & /* who */, const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotTypingNotify( const QString &who, int what ) +void YahooAccount::slotTypingNotify( const TQString &who, int what ) { emit receivedTypingMsg(who, what); } -void YahooAccount::slotGameNotify( const QString & /* who */, int /* stat */ ) +void YahooAccount::slotGameNotify( const TQString & /* who */, int /* stat */ ) { // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotMailNotify( const QString& from, const QString& subject , int cnt ) +void YahooAccount::slotMailNotify( const TQString& from, const TQString& subject , int cnt ) { kdDebug(YAHOO_GEN_DEBUG) << "Mail count: " << cnt << endl; if ( cnt > 0 && from.isEmpty() ) { - QObject::connect(KNotification::event( QString::fromLatin1("yahoo_mail"), i18n( "You have one unread message in your Yahoo inbox.", - "You have %n unread messages in your Yahoo inbox.", cnt ), QPixmap() , 0 ), - SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) ); + TQObject::connect(KNotification::event( TQString::fromLatin1("yahoo_mail"), i18n( "You have one unread message in your Yahoo inbox.", + "You have %n unread messages in your Yahoo inbox.", cnt ), TQPixmap() , 0 ), + TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) ); m_currentMailCount = cnt; } else if ( cnt > 0 ) { kdDebug(YAHOO_GEN_DEBUG) << "attempting to trigger event" << endl; - QObject::connect(KNotification::event( QString::fromLatin1("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox.

Subject: %2").arg( from ).arg( subject ), - QPixmap() , 0 ), SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) ); + TQObject::connect(KNotification::event( TQString::fromLatin1("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox.

Subject: %2").arg( from ).arg( subject ), + TQPixmap() , 0 ), TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) ); m_currentMailCount = cnt; } } -void YahooAccount::slotSystemMessage( const QString & /* msg */ ) +void YahooAccount::slotSystemMessage( const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) << msg; } @@ -1668,7 +1668,7 @@ void YahooAccount::slotRemoveHandler( int /* fd */ ) // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotGotWebcamInvite( const QString& who ) +void YahooAccount::slotGotWebcamInvite( const TQString& who ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1682,18 +1682,18 @@ void YahooAccount::slotGotWebcamInvite( const QString& who ) m_pendingWebcamInvites.append( who ); if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 has invited you to view his/her webcam. Accept?").arg( who ), - QString(), i18n("Accept"), i18n("Ignore") ) ) + TQString(), i18n("Accept"), i18n("Ignore") ) ) { m_pendingWebcamInvites.remove( who ); m_session->requestWebcam( who ); } } -void YahooAccount::slotWebcamNotAvailable( const QString &who ) +void YahooAccount::slotWebcamNotAvailable( const TQString &who ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, i18n("Webcam for %1 is not available.").arg(who), i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotWebcamImage( const QString& who, const QPixmap& image ) +void YahooAccount::slotGotWebcamImage( const TQString& who, const TQPixmap& image ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1703,7 +1703,7 @@ void YahooAccount::slotGotWebcamImage( const QString& who, const QPixmap& image kc->receivedWebcamImage( image ); } -void YahooAccount::slotPictureStatusNotify( const QString &who, int status) +void YahooAccount::slotPictureStatusNotify( const TQString &who, int status) { YahooContact *kc = contact( who ); if ( kc == NULL ) { @@ -1714,7 +1714,7 @@ void YahooAccount::slotPictureStatusNotify( const QString &who, int status) kdDebug(YAHOO_GEN_DEBUG) << "contact " << who << " changed picture status to" << status << endl; } -void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) +void YahooAccount::slotGotBuddyIconChecksum(const TQString &who, int checksum) { YahooContact *kc = contact( who ); if ( kc == NULL ) { @@ -1723,7 +1723,7 @@ void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) } if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() && - QFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(QRegExp("[./~]"),"-") +".png" ) ) ) + TQFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(TQRegExp("[./~]"),"-") +".png" ) ) ) { kdDebug(YAHOO_GEN_DEBUG) << "Icon already exists. I will not request it again." << endl; return; @@ -1731,7 +1731,7 @@ void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) m_session->requestPicture( who ); } -void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checksum) +void YahooAccount::slotGotBuddyIconInfo(const TQString &who, KURL url, int checksum) { kdDebug(YAHOO_GEN_DEBUG) ; YahooContact *kc = contact( who ); @@ -1741,7 +1741,7 @@ void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checks } if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() && - QFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(QRegExp("[./~]"),"-") +".png" ) )) + TQFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(TQRegExp("[./~]"),"-") +".png" ) )) { kdDebug(YAHOO_GEN_DEBUG) << "Icon already exists. I will not download it again." << endl; return; @@ -1749,7 +1749,7 @@ void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checks m_session->downloadPicture( who, url, checksum ); } -void YahooAccount::slotGotBuddyIcon( const QString &who, const QByteArray &data, int checksum ) +void YahooAccount::slotGotBuddyIcon( const TQString &who, const TQByteArray &data, int checksum ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; YahooContact *kc = contact( who ); @@ -1759,7 +1759,7 @@ void YahooAccount::slotGotBuddyIcon( const QString &who, const QByteArray &data, } kc->setDisplayPicture( data, checksum ); } -void YahooAccount::slotGotBuddyIconRequest( const QString & who ) +void YahooAccount::slotGotBuddyIconRequest( const TQString & who ) { kdDebug(YAHOO_GEN_DEBUG) ; m_session->sendPictureInformation( who, myself()->property( YahooProtocol::protocol()->iconRemoteUrl ).value().toString(), @@ -1769,7 +1769,7 @@ void YahooAccount::slotGotBuddyIconRequest( const QString & who ) void YahooAccount::setBuddyIcon( const KURL &url ) { kdDebug(YAHOO_GEN_DEBUG) << "Url: " << url.path() << endl; - QString s = url.path(); + TQString s = url.path(); if ( url.path().isEmpty() ) { myself()->removeProperty( Kopete::Global::Properties::self()->photo() ); @@ -1781,17 +1781,17 @@ void YahooAccount::setBuddyIcon( const KURL &url ) } else { - QImage image( url.path() ); - QString newlocation( locateLocal( "appdata", "yahoopictures/"+ url.fileName().lower() ) ) ; - QFile iconFile( newlocation ); - QByteArray data; + TQImage image( url.path() ); + TQString newlocation( locateLocal( "appdata", "yahoopictures/"+ url.fileName().lower() ) ) ; + TQFile iconFile( newlocation ); + TQByteArray data; uint expire = myself()->property( YahooProtocol::protocol()->iconExpire ).value().toInt(); if ( image.isNull() ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, i18n( "The selected buddy icon could not be opened.
Please set a new buddy icon.
" ), i18n( "Yahoo Plugin" ) ); return; } - image = image.smoothScale( 96, 96, QImage::ScaleMin ); + image = image.smoothScale( 96, 96, TQImage::ScaleMin ); if(image.width() < image.height()) { image = image.copy((image.width()-image.height())/2, 0, 96, 96); @@ -1827,7 +1827,7 @@ void YahooAccount::setBuddyIcon( const KURL &url ) configGroup()->writeEntry( "iconLocalUrl", newlocation ); if ( checksum != static_cast(myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt()) || - QDateTime::currentDateTime().toTime_t() > expire ) + TQDateTime::currentDateTime().toTime_t() > expire ) { myself()->setProperty( YahooProtocol::protocol()->iconCheckSum, checksum ); configGroup()->writeEntry( "iconCheckSum", checksum ); @@ -1837,7 +1837,7 @@ void YahooAccount::setBuddyIcon( const KURL &url ) } } -void YahooAccount::slotBuddyIconChanged( const QString &url, int expires ) +void YahooAccount::slotBuddyIconChanged( const TQString &url, int expires ) { kdDebug(YAHOO_GEN_DEBUG) ; int checksum = myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt(); @@ -1849,7 +1849,7 @@ void YahooAccount::slotBuddyIconChanged( const QString &url, int expires ) configGroup()->writeEntry( "iconRemoteUrl", url ); configGroup()->writeEntry( "iconExpire", expires ); m_session->setPictureStatus( Yahoo::Picture ); - m_session->sendPictureChecksum( QString(), checksum ); + m_session->sendPictureChecksum( TQString(), checksum ); } } @@ -1859,7 +1859,7 @@ void YahooAccount::slotWebcamReadyForTransmission() if( !m_webcam ) { m_webcam = new YahooWebcam( this ); - QObject::connect( m_webcam, SIGNAL(webcamClosing()), this, SLOT(slotOutgoingWebcamClosing()) ); + TQObject::connect( m_webcam, TQT_SIGNAL(webcamClosing()), this, TQT_SLOT(slotOutgoingWebcamClosing()) ); } m_webcam->startTransmission(); @@ -1882,7 +1882,7 @@ void YahooAccount::slotOutgoingWebcamClosing() m_webcam = 0L; } -void YahooAccount::slotWebcamViewerJoined( const QString &viewer ) +void YahooAccount::slotWebcamViewerJoined( const TQString &viewer ) { if( m_webcam ) { @@ -1890,14 +1890,14 @@ void YahooAccount::slotWebcamViewerJoined( const QString &viewer ) } } -void YahooAccount::slotWebcamViewerRequest( const QString &viewer ) +void YahooAccount::slotWebcamViewerRequest( const TQString &viewer ) { if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 wants to view your webcam. Grant access?") - .arg(viewer), QString::null, i18n("Accept"), i18n("Ignore") ) ) + .arg(viewer), TQString::null, i18n("Accept"), i18n("Ignore") ) ) m_session->grantWebcamAccess( viewer ); } -void YahooAccount::slotWebcamViewerLeft( const QString &viewer ) +void YahooAccount::slotWebcamViewerLeft( const TQString &viewer ) { if( m_webcam ) { @@ -1905,7 +1905,7 @@ void YahooAccount::slotWebcamViewerLeft( const QString &viewer ) } } -void YahooAccount::slotWebcamClosed( const QString& who, int reason ) +void YahooAccount::slotWebcamClosed( const TQString& who, int reason ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1915,7 +1915,7 @@ void YahooAccount::slotWebcamClosed( const QString& who, int reason ) kc->webcamClosed( reason ); } -void YahooAccount::slotWebcamPaused( const QString &who ) +void YahooAccount::slotWebcamPaused( const TQString &who ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1925,7 +1925,7 @@ void YahooAccount::slotWebcamPaused( const QString &who ) kc->webcamPaused(); } -void YahooAccount::setOnlineStatus( const Kopete::OnlineStatus &status, const QString &reason) +void YahooAccount::setOnlineStatus( const Kopete::OnlineStatus &status, const TQString &reason) { kdDebug(YAHOO_GEN_DEBUG) ; if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && @@ -1968,12 +1968,12 @@ void YahooAccount::setStatusMessage(const Kopete::StatusMessage &statusMessage) void YahooAccount::slotOpenInbox() { - KRun::runURL( KURL( QString::fromLatin1("http://mail.yahoo.com/") ) , "text/html" ); + KRun::runURL( KURL( TQString::fromLatin1("http://mail.yahoo.com/") ) , "text/html" ); } void YahooAccount::slotOpenYAB() { - KRun::runURL( KURL( QString::fromLatin1("http://address.yahoo.com/") ) , "text/html" ); + KRun::runURL( KURL( TQString::fromLatin1("http://address.yahoo.com/") ) , "text/html" ); } void YahooAccount::slotEditOwnYABEntry() @@ -1988,15 +1988,15 @@ void YahooAccount::slotJoinChatRoom() /* YahooChatSelectorDialog *chatDialog = new YahooChatSelectorDialog( Kopete::UI::Global::mainWidget() ); - QObject::connect( m_session, SIGNAL(gotYahooChatCategories( const QDomDocument & )), chatDialog, - SLOT(slotSetChatCategories( const QDomDocument & )) ); - QObject::connect( m_session, SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )), - chatDialog, SLOT(slotSetChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )) ); - QObject::connect( chatDialog, SIGNAL(chatCategorySelected( const Yahoo::ChatCategory & )), - this, SLOT(slotChatCategorySelected( const Yahoo::ChatCategory & ) ) ); + TQObject::connect( m_session, TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )), chatDialog, + TQT_SLOT(slotSetChatCategories( const TQDomDocument & )) ); + TQObject::connect( m_session, TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )), + chatDialog, TQT_SLOT(slotSetChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )) ); + TQObject::connect( chatDialog, TQT_SIGNAL(chatCategorySelected( const Yahoo::ChatCategory & )), + this, TQT_SLOT(slotChatCategorySelected( const Yahoo::ChatCategory & ) ) ); m_session->getYahooChatCategories(); - if( chatDialog->exec() == QDialog::Accepted ) + if( chatDialog->exec() == TQDialog::Accepted ) { kdDebug() << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().id << endl; m_session->joinYahooChatRoom( chatDialog->selectedRoom() ); @@ -2018,7 +2018,7 @@ void YahooAccount::slotChatCategorySelected( const Yahoo::ChatCategory &category } // FIXME: not ported yet -void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &comment, const QString &handle ) +void YahooAccount::slotChatJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ) { } /* @@ -2028,8 +2028,8 @@ void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &co if( !m_chatChatSession ) { m_chatChatSession = new YahooChatChatSession( protocol(), myself(), others ); - QObject::connect( m_chatChatSession, SIGNAL(closing(Kopete::ChatSession *)), this, - SLOT(slotLeavChat()) ); + TQObject::connect( m_chatChatSession, TQT_SIGNAL(closing(Kopete::ChatSession *)), this, + TQT_SLOT(slotLeavChat()) ); } m_chatChatSession->removeAllContacts(); m_chatChatSession->setHandle( handle ); @@ -2046,7 +2046,7 @@ void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &co */ // FIXME: not ported yet -void YahooAccount::slotChatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ) +void YahooAccount::slotChatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ) { } /* @@ -2071,7 +2071,7 @@ void YahooAccount::slotChatBuddyHasJoined( const QString &nick, const QString &h */ // FIXME: not ported yet -void YahooAccount::slotChatBuddyHasLeft( const QString &nick, const QString &handle ) +void YahooAccount::slotChatBuddyHasLeft( const TQString &nick, const TQString &handle ) { } /* @@ -2091,7 +2091,7 @@ void YahooAccount::slotChatBuddyHasLeft( const QString &nick, const QString &han */ // FIXME: not ported yet -void YahooAccount::slotChatMessageReceived( const QString &nick, const QString &message, const QString &handle ) +void YahooAccount::slotChatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ) { } /* @@ -2101,8 +2101,8 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & if( !m_chatChatSession->handle().startsWith( handle ) ) return; - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( nick ) ) @@ -2114,10 +2114,10 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & } kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << message << "'" << endl; - QColor fgColor = getMsgColor( message ); + TQColor fgColor = getMsgColor( message ); msgDT.setTime_t(time(0L)); - QString newMsgText = prepareIncomingMessage( message ); + TQString newMsgText = prepareIncomingMessage( message ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; @@ -2133,7 +2133,7 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & } */ -void YahooAccount::sendChatMessage( const Kopete::Message &msg, const QString &handle ) +void YahooAccount::sendChatMessage( const Kopete::Message &msg, const TQString &handle ) { m_session->sendYahooChatMessage( YahooContact::prepareMessage( msg.escapedBody() ), handle ); } diff --git a/kopete/protocols/yahoo/yahooaccount.h b/kopete/protocols/yahoo/yahooaccount.h index 0c636731..e2660edc 100644 --- a/kopete/protocols/yahoo/yahooaccount.h +++ b/kopete/protocols/yahoo/yahooaccount.h @@ -22,10 +22,10 @@ #define YAHOOACCOUNT_H // Qt -#include -#include -#include -#include +#include +#include +#include +#include // KDE #include @@ -69,20 +69,20 @@ public: enum SignalConnectionType { MakeConnections, DeleteConnections }; - YahooAccount(YahooProtocol *parent,const QString& accountID, const char *name = 0); + YahooAccount(YahooProtocol *parent,const TQString& accountID, const char *name = 0); ~YahooAccount(); /* * Returns a contact of name @p id */ - YahooContact *contact(const QString &id); + YahooContact *contact(const TQString &id); virtual KActionMenu* actionMenu(); /** * Sets the yahoo away status */ - virtual void setAway(bool, const QString &); + virtual void setAway(bool, const TQString &); /** * The session @@ -92,7 +92,7 @@ public: /** * Returns true if contact @p id is on the server-side contact list */ - bool isOnServer(const QString &id) { return IDs.contains(id); } + bool isOnServer(const TQString &id) { return IDs.contains(id); } /** * Returns true if we have the server-side contact list @@ -106,7 +106,7 @@ public: /** * Set the pager server */ - void setServer( const QString &server ); + void setServer( const TQString &server ); /** * Set the port of the pager server @@ -118,30 +118,30 @@ public: */ void setBuddyIcon( const KURL &url ); - void verifyAccount( const QString &word ); + void verifyAccount( const TQString &word ); void sendConfMessage( YahooConferenceChatSession *s, const Kopete::Message &message ); - void sendChatMessage( const Kopete::Message &msg, const QString &handle ); - void prepareConference( const QString &who ); + void sendChatMessage( const Kopete::Message &msg, const TQString &handle ); + void prepareConference( const TQString &who ); void sendFile( YahooContact *to, const KURL &url ); public slots: /** * Connect to the Yahoo service */ - virtual void connectWithPassword( const QString & ); + virtual void connectWithPassword( const TQString & ); /** * Disconnect from the Yahoo service */ virtual void disconnect(); /** Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus&, const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus&, const TQString &reason = TQString::null); signals: /** * Emitted when we receive notification that the person we're talking to is typing */ - void receivedTypingMsg(const QString &contactId, bool isTyping); + void receivedTypingMsg(const TQString &contactId, bool isTyping); /** * Emitted when our Buddy Icon has changed @@ -152,18 +152,18 @@ protected: /** * Adds our Yahoo contact to a metacontact */ - virtual bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); - virtual bool createChatContact( const QString &nick ); + virtual bool createChatContact( const TQString &nick ); /** * Gets the just-received message color */ - QColor getMsgColor(const QString& msg); + TQColor getMsgColor(const TQString& msg); /** * Remove color codes from a message */ - QString stripMsgColorCodes(const QString& msg); + TQString stripMsgColorCodes(const TQString& msg); protected slots: void slotConnected(); @@ -175,73 +175,73 @@ protected slots: void slotJoinChatRoom(); void slotChatCategorySelected( const Yahoo::ChatCategory &category ); - void slotGoStatus(int status, const QString &awayMessage = QString()); - void slotLoginResponse(int succ, const QString &url); + void slotGoStatus(int status, const TQString &awayMessage = TQString()); + void slotLoginResponse(int succ, const TQString &url); void slotDisconnected(); void slotLoginFailed(); - void slotGotBuddy(const QString &userid, const QString &alias, const QString &group); - void slotBuddyAddResult(const QString &userid, const QString &group, bool success); - void slotBuddyRemoveResult(const QString &userid, const QString &group, bool success); - void slotBuddyChangeGroupResult(const QString &userid, const QString &group, bool success); - void slotAuthorizationAccepted( const QString &who ); - void slotAuthorizationRejected( const QString &who, const QString &msg ); - void slotgotAuthorizationRequest( const QString &, const QString &, const QString & ); - void slotContactAddedNotifyDialogClosed( const QString &user ); + void slotGotBuddy(const TQString &userid, const TQString &alias, const TQString &group); + void slotBuddyAddResult(const TQString &userid, const TQString &group, bool success); + void slotBuddyRemoveResult(const TQString &userid, const TQString &group, bool success); + void slotBuddyChangeGroupResult(const TQString &userid, const TQString &group, bool success); + void slotAuthorizationAccepted( const TQString &who ); + void slotAuthorizationRejected( const TQString &who, const TQString &msg ); + void slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); + void slotContactAddedNotifyDialogClosed( const TQString &user ); //void slotAddedInfoEventActionActivated( uint actionId ); - void slotGotIgnore(const QStringList &); - void slotGotIdentities(const QStringList &); - void slotStatusChanged(const QString &who, int stat, const QString &msg, int away, int idle, int pictureChecksum); - void slotStealthStatusChanged(const QString &who, Yahoo::StealthStatus state); - void slotGotIm(const QString &who, const QString &msg, long tm, int stat); - void slotGotBuzz(const QString &who, long tm); - void slotGotConfInvite(const QString &who, const QString &room, const QString &msg, const QStringList &members); - void slotConfUserDecline(const QString &who, const QString &room, const QString &msg); - void slotConfUserJoin(const QString &who, const QString &room); - void slotConfUserLeave(const QString &who, const QString &room); - void slotConfMessage(const QString &who, const QString &room, const QString &msg); + void slotGotIgnore(const TQStringList &); + void slotGotIdentities(const TQStringList &); + void slotStatusChanged(const TQString &who, int stat, const TQString &msg, int away, int idle, int pictureChecksum); + void slotStealthStatusChanged(const TQString &who, Yahoo::StealthStatus state); + void slotGotIm(const TQString &who, const TQString &msg, long tm, int stat); + void slotGotBuzz(const TQString &who, long tm); + void slotGotConfInvite(const TQString &who, const TQString &room, const TQString &msg, const TQStringList &members); + void slotConfUserDecline(const TQString &who, const TQString &room, const TQString &msg); + void slotConfUserJoin(const TQString &who, const TQString &room); + void slotConfUserLeave(const TQString &who, const TQString &room); + void slotConfMessage(const TQString &who, const TQString &room, const TQString &msg); void slotConfLeave( YahooConferenceChatSession *s ); - void slotInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); - void slotAddInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); - void slotGotFile(const QString &who, const QString &url, long expires, const QString &msg, const QString &fname, unsigned long fesize, const QPixmap &); - void slotContactAdded(const QString &myid, const QString &who, const QString &msg); - void slotRejected(const QString &, const QString &); - void slotTypingNotify(const QString &, int ); - void slotGameNotify(const QString &, int); - void slotMailNotify(const QString &, const QString &, int); - void slotSystemMessage(const QString &); + void slotInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); + void slotAddInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); + void slotGotFile(const TQString &who, const TQString &url, long expires, const TQString &msg, const TQString &fname, unsigned long fesize, const TQPixmap &); + void slotContactAdded(const TQString &myid, const TQString &who, const TQString &msg); + void slotRejected(const TQString &, const TQString &); + void slotTypingNotify(const TQString &, int ); + void slotGameNotify(const TQString &, int); + void slotMailNotify(const TQString &, const TQString &, int); + void slotSystemMessage(const TQString &); void slotRemoveHandler(int fd); - //void slotHostConnect(const QString &host, int port); - void slotGotWebcamInvite(const QString &); - void slotWebcamNotAvailable( const QString &who ); - void slotGotWebcamImage(const QString&, const QPixmap&); + //void slotHostConnect(const TQString &host, int port); + void slotGotWebcamInvite(const TQString &); + void slotWebcamNotAvailable( const TQString &who ); + void slotGotWebcamImage(const TQString&, const TQPixmap&); void slotWebcamReadyForTransmission(); void slotWebcamStopTransmission(); void slotOutgoingWebcamClosing(); - void slotWebcamClosed(const QString&, int); - void slotWebcamPaused(const QString&); - void slotWebcamViewerJoined( const QString & ); - void slotWebcamViewerLeft( const QString & ); - void slotWebcamViewerRequest( const QString & ); - void slotPictureStatusNotify( const QString&, int); - void slotGotBuddyIcon(const QString&, const QByteArray&, int); - void slotGotBuddyIconInfo(const QString&, KURL, int); - void slotGotBuddyIconChecksum(const QString&, int); - void slotGotBuddyIconRequest(const QString &); - void slotBuddyIconChanged(const QString&, int); + void slotWebcamClosed(const TQString&, int); + void slotWebcamPaused(const TQString&); + void slotWebcamViewerJoined( const TQString & ); + void slotWebcamViewerLeft( const TQString & ); + void slotWebcamViewerRequest( const TQString & ); + void slotPictureStatusNotify( const TQString&, int); + void slotGotBuddyIcon(const TQString&, const TQByteArray&, int); + void slotGotBuddyIconInfo(const TQString&, KURL, int); + void slotGotBuddyIconChecksum(const TQString&, int); + void slotGotBuddyIconRequest(const TQString &); + void slotBuddyIconChanged(const TQString&, int); void slotGotYABEntry( YABEntry *entry ); void slotGotYABRevision( long revision, bool merged ); void slotSaveYABEntry( YABEntry &entry ); - void slotModifyYABEntryError( YABEntry *entry, const QString & ); - void slotChatJoined( int roomId, int categoryId, const QString &comment, const QString &handle ); - void slotChatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ); - void slotChatBuddyHasLeft( const QString &nick, const QString &handle ); - void slotChatMessageReceived( const QString &nick, const QString &message, const QString &handle ); + void slotModifyYABEntryError( YABEntry *entry, const TQString & ); + void slotChatJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ); + void slotChatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ); + void slotChatBuddyHasLeft( const TQString &nick, const TQString &handle ); + void slotChatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ); void slotLeavChat(); - void slotReceiveFileAccepted( Kopete::Transfer *trans, const QString& fileName ); + void slotReceiveFileAccepted( Kopete::Transfer *trans, const TQString& fileName ); void slotReceiveFileRefused( const Kopete::FileTransferInfo& info ); void slotFileTransferComplete( unsigned int id ); - void slotFileTransferError( unsigned int id, int error, const QString &desc ); + void slotFileTransferError( unsigned int id, int error, const TQString &desc ); void slotFileTransferBytesProcessed( unsigned int id, unsigned int bytes ); void slotFileTransferResult( KIO::Job * ); void slotError( int level ); @@ -255,24 +255,24 @@ private: void setupActions( bool connected ); - QString prepareIncomingMessage( const QString &msg ); + TQString prepareIncomingMessage( const TQString &msg ); /** * internal (to the plugin) controls/flags * This should be kept in sync with server - if a buddy is removed, this should be changed accordingly. */ - QMap > IDs; + TQMap > IDs; /** * Conferences list, maped by room name (id) */ - QMap m_conferences; + TQMap m_conferences; YahooChatChatSession * m_chatChatSession; - QStringList m_pendingConfInvites; - QStringList m_pendingWebcamInvites; - QStringList m_pendingFileTransfers; + TQStringList m_pendingConfInvites; + TQStringList m_pendingWebcamInvites; + TQStringList m_pendingFileTransfers; - QMap m_fileTransfers; + TQMap m_fileTransfers; bool theHaveContactList; // Do we have the full server-side contact list yet? int stateOnConnection; // The state to change to on connection diff --git a/kopete/protocols/yahoo/yahooaddcontact.cpp b/kopete/protocols/yahoo/yahooaddcontact.cpp index 909c4379..af3e1bc5 100644 --- a/kopete/protocols/yahoo/yahooaddcontact.cpp +++ b/kopete/protocols/yahoo/yahooaddcontact.cpp @@ -17,7 +17,7 @@ */ // QT Includes -#include +#include // KDE Includes #include @@ -33,11 +33,11 @@ #include "yahooaccount.h" // Yahoo Add Contact page -YahooAddContact::YahooAddContact(YahooProtocol *owner, QWidget *parent, const char *name): AddContactPage(parent, name) +YahooAddContact::YahooAddContact(YahooProtocol *owner, TQWidget *parent, const char *name): AddContactPage(parent, name) { kdDebug(YAHOO_GEN_DEBUG) << "YahooAddContact::YahooAddContact(, , " << name << ")" << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); theDialog = new YahooAddContactBase(this); theDialog->show(); theProtocol = owner; @@ -60,7 +60,7 @@ bool YahooAddContact::apply(Kopete::Account *theAccount, Kopete::MetaContact *th { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString displayName = theDialog->contactID->text(); + TQString displayName = theDialog->contactID->text(); YahooAccount* myAccount = static_cast(theAccount); myAccount->addContact(theDialog->contactID->text().lower(), theMetaContact, Kopete::Account::ChangeKABC ); return true; diff --git a/kopete/protocols/yahoo/yahooaddcontact.h b/kopete/protocols/yahoo/yahooaddcontact.h index 947a7dcd..796c82ce 100644 --- a/kopete/protocols/yahoo/yahooaddcontact.h +++ b/kopete/protocols/yahoo/yahooaddcontact.h @@ -40,7 +40,7 @@ private: YahooAddContactBase *theDialog; public: - YahooAddContact(YahooProtocol *owner, QWidget *parent = 0, const char *name = 0); + YahooAddContact(YahooProtocol *owner, TQWidget *parent = 0, const char *name = 0); ~YahooAddContact(); virtual bool validateData(); diff --git a/kopete/protocols/yahoo/yahoochatsession.cpp b/kopete/protocols/yahoo/yahoochatsession.cpp index 0402c400..5402919c 100644 --- a/kopete/protocols/yahoo/yahoochatsession.cpp +++ b/kopete/protocols/yahoo/yahoochatsession.cpp @@ -15,11 +15,11 @@ #include "yahoochatsession.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -53,19 +53,19 @@ YahooChatSession::YahooChatSession( Kopete::Protocol *protocol, const Kopete::Co setInstance(protocol->instance()); // Add Actions - new KAction( i18n( "Buzz Contact" ), QIconSet(BarIcon("bell")), "Ctrl+G", this, SLOT( slotBuzzContact() ), actionCollection(), "yahooBuzz" ) ; - new KAction( i18n( "Show User Info" ), QIconSet(BarIcon("idea")), 0, this, SLOT( slotUserInfo() ), actionCollection(), "yahooShowInfo" ) ; - new KAction( i18n( "Request Webcam" ), QIconSet(BarIcon("webcamreceive")), 0, this, SLOT( slotRequestWebcam() ), actionCollection(), "yahooRequestWebcam" ) ; - new KAction( i18n( "Invite to view your Webcam" ), QIconSet(BarIcon("webcamsend")), 0, this, SLOT( slotInviteWebcam() ), actionCollection(), "yahooSendWebcam" ) ; - new KAction( i18n( "Send File" ), QIconSet(BarIcon("attach")), 0, this, SLOT( slotSendFile() ), actionCollection(), "yahooSendFile" ); + new KAction( i18n( "Buzz Contact" ), TQIconSet(BarIcon("bell")), "Ctrl+G", this, TQT_SLOT( slotBuzzContact() ), actionCollection(), "yahooBuzz" ) ; + new KAction( i18n( "Show User Info" ), TQIconSet(BarIcon("idea")), 0, this, TQT_SLOT( slotUserInfo() ), actionCollection(), "yahooShowInfo" ) ; + new KAction( i18n( "Request Webcam" ), TQIconSet(BarIcon("webcamreceive")), 0, this, TQT_SLOT( slotRequestWebcam() ), actionCollection(), "yahooRequestWebcam" ) ; + new KAction( i18n( "Invite to view your Webcam" ), TQIconSet(BarIcon("webcamsend")), 0, this, TQT_SLOT( slotInviteWebcam() ), actionCollection(), "yahooSendWebcam" ) ; + new KAction( i18n( "Send File" ), TQIconSet(BarIcon("attach")), 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "yahooSendFile" ); YahooContact *c = static_cast( others.first() ); - connect( c, SIGNAL( displayPictureChanged() ), this, SLOT( slotDisplayPictureChanged() ) ); - m_image = new QLabel( 0L, "kde toolbar widget" ); - new KWidgetAction( m_image, i18n( "Yahoo Display Picture" ), 0, this, SLOT( slotDisplayPictureChanged() ), actionCollection(), "yahooDisplayPicture" ); + connect( c, TQT_SIGNAL( displayPictureChanged() ), this, TQT_SLOT( slotDisplayPictureChanged() ) ); + m_image = new TQLabel( 0L, "kde toolbar widget" ); + new KWidgetAction( m_image, i18n( "Yahoo Display Picture" ), 0, this, TQT_SLOT( slotDisplayPictureChanged() ), actionCollection(), "yahooDisplayPicture" ); if(c->hasProperty(Kopete::Global::Properties::self()->photo().key()) ) { - connect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) ); } else { @@ -83,42 +83,42 @@ YahooChatSession::~YahooChatSession() void YahooChatSession::slotBuzzContact() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->buzzContact(); } void YahooChatSession::slotUserInfo() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->slotUserInfo(); } void YahooChatSession::slotRequestWebcam() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->requestWebcam(); } void YahooChatSession::slotInviteWebcam() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->inviteWebcam(); } void YahooChatSession::slotSendFile() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->sendFile(); } void YahooChatSession::slotDisplayPictureChanged() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrList mb=members(); + TQPtrList mb=members(); YahooContact *c = static_cast( mb.first() ); if ( c && m_image ) { @@ -131,9 +131,9 @@ void YahooChatSession::slotDisplayPictureChanged() if(w) { //We connected that in the constructor. we don't need to keep this slot active. - disconnect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) ); + disconnect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) ); - QPtrListIterator it=w->toolBarIterator() ; + TQPtrListIterator it=w->toolBarIterator() ; KAction *imgAction=actionCollection()->action("yahooDisplayPicture"); if(imgAction) while(it) { @@ -142,15 +142,15 @@ void YahooChatSession::slotDisplayPictureChanged() { sz=tb->iconSize(); //ipdate if the size of the toolbar change. - disconnect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged())); - connect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged())); + disconnect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged())); + connect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged())); break; } ++it; } } - QString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString(); - QImage scaledImg = QPixmap( imgURL ).convertToImage().smoothScale( sz, sz ); + TQString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString(); + TQImage scaledImg = TQPixmap( imgURL ).convertToImage().smoothScale( sz, sz ); if(!scaledImg.isNull()) m_image->setPixmap( scaledImg ); else @@ -158,7 +158,7 @@ void YahooChatSession::slotDisplayPictureChanged() c->removeProperty(Kopete::Global::Properties::self()->photo()); //slotDisplayPictureChanged(); //don't do that or we might end in a infinite loop } - QToolTip::add( m_image, "" ); + TQToolTip::add( m_image, "" ); } } } diff --git a/kopete/protocols/yahoo/yahoochatsession.h b/kopete/protocols/yahoo/yahoochatsession.h index 1e440e95..57fc970f 100644 --- a/kopete/protocols/yahoo/yahoochatsession.h +++ b/kopete/protocols/yahoo/yahoochatsession.h @@ -45,7 +45,7 @@ private slots: void slotSendFile(); private: - QLabel *m_image; + TQLabel *m_image; }; #endif diff --git a/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp b/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp index cc173d96..8d34689b 100644 --- a/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp +++ b/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp @@ -34,7 +34,7 @@ #include "yahooaccount.h" #include "yahooinvitelistimpl.h" -YahooConferenceChatSession::YahooConferenceChatSession( const QString & yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, +YahooConferenceChatSession::YahooConferenceChatSession( const TQString & yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name ) : Kopete::ChatSession( user, others, protocol, name ) { @@ -42,12 +42,12 @@ YahooConferenceChatSession::YahooConferenceChatSession( const QString & yahooRoo Kopete::ChatSessionManager::self()->registerChatSession( this ); setInstance(protocol->instance()); - connect ( this, SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), - SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); + connect ( this, TQT_SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); m_yahooRoom = yahooRoom; - m_actionInvite = new KAction( i18n( "&Invite others" ), "kontact_contacts", this, SLOT( slotInviteOthers() ), actionCollection(), "yahooInvite"); + m_actionInvite = new KAction( i18n( "&Invite others" ), "kontact_contacts", this, TQT_SLOT( slotInviteOthers() ), actionCollection(), "yahooInvite"); setXMLFile("yahooconferenceui.rc"); } @@ -62,7 +62,7 @@ YahooAccount *YahooConferenceChatSession::account() return static_cast< YahooAccount *>( Kopete::ChatSession::account() ); } -const QString &YahooConferenceChatSession::room() +const TQString &YahooConferenceChatSession::room() { return m_yahooRoom; } @@ -90,8 +90,8 @@ void YahooConferenceChatSession::slotMessageSent( Kopete::Message & message, Kop void YahooConferenceChatSession::slotInviteOthers() { - QStringList buddies; - QDictIterator it( account()->contacts() ); + TQStringList buddies; + TQDictIterator it( account()->contacts() ); Kopete::Contact *myself = account()->myself(); for( ; it.current(); ++it ) { @@ -100,11 +100,11 @@ void YahooConferenceChatSession::slotInviteOthers() } YahooInviteListImpl *dlg = new YahooInviteListImpl( Kopete::UI::Global::mainWidget() ); - QObject::connect( dlg, SIGNAL( readyToInvite( const QString &, const QStringList &, const QStringList &, const QString & ) ), - account(), SLOT( slotAddInviteConference( const QString &, const QStringList &, const QStringList &, const QString & ) ) ); + TQObject::connect( dlg, TQT_SIGNAL( readyToInvite( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ), + account(), TQT_SLOT( slotAddInviteConference( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ) ); dlg->setRoom( m_yahooRoom ); dlg->fillFriendList( buddies ); - for( QPtrList::ConstIterator it = members().begin(); it != members().end(); it++ ) + for( TQPtrList::ConstIterator it = members().begin(); it != members().end(); it++ ) dlg->addParticipant( (*it)->contactId() ); dlg->show(); } diff --git a/kopete/protocols/yahoo/yahooconferencemessagemanager.h b/kopete/protocols/yahoo/yahooconferencemessagemanager.h index 60771fab..086d229a 100644 --- a/kopete/protocols/yahoo/yahooconferencemessagemanager.h +++ b/kopete/protocols/yahoo/yahooconferencemessagemanager.h @@ -34,12 +34,12 @@ class YahooConferenceChatSession : public Kopete::ChatSession Q_OBJECT public: - YahooConferenceChatSession( const QString &m_yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 ); + YahooConferenceChatSession( const TQString &m_yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 ); ~YahooConferenceChatSession(); void joined( YahooContact *c ); void left( YahooContact *c ); - const QString &room(); + const TQString &room(); YahooAccount *account(); signals: void leavingConference( YahooConferenceChatSession *s ); @@ -47,7 +47,7 @@ protected slots: void slotMessageSent( Kopete::Message &message, Kopete::ChatSession * ); void slotInviteOthers(); private: - QString m_yahooRoom; + TQString m_yahooRoom; KAction *m_actionInvite; }; diff --git a/kopete/protocols/yahoo/yahoocontact.cpp b/kopete/protocols/yahoo/yahoocontact.cpp index d5f79250..d26eb739 100644 --- a/kopete/protocols/yahoo/yahoocontact.cpp +++ b/kopete/protocols/yahoo/yahoocontact.cpp @@ -39,9 +39,9 @@ #include "sendfiletask.h" // QT Includes -#include -#include -#include +#include +#include +#include // KDE Includes #include @@ -60,7 +60,7 @@ #include #include -YahooContact::YahooContact( YahooAccount *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact ) +YahooContact::YahooContact( YahooAccount *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact ) : Kopete::Contact( account, userId, metaContact ) { //kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -99,7 +99,7 @@ YahooContact::~YahooContact() m_YABEntry = 0L; } -QString YahooContact::userId() const +TQString YahooContact::userId() const { return m_userId; } @@ -113,7 +113,7 @@ void YahooContact::setOnlineStatus(const Kopete::OnlineStatus &status) (status.weight()==0) ? 0 : (status.weight() -1) , protocol() , status.internalStatus()+1000 , - status.overlayIcons() + QStringList("yahoo_stealthed") , + status.overlayIcons() + TQStringList("yahoo_stealthed") , i18n("%1|Stealthed").arg( status.description() ) ) ); } else if( !m_stealthed && status.internalStatus() > 999 )// Stealthed -> Not Stealthed @@ -136,7 +136,7 @@ bool YahooContact::stealthed() return m_stealthed; } -void YahooContact::serialize(QMap &serializedData, QMap &addressBookData) +void YahooContact::serialize(TQMap &serializedData, TQMap &addressBookData) { //kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -173,7 +173,7 @@ void YahooContact::sync(unsigned int flags) } else { - QString newGroup = metaContact()->groups().first()->displayName(); + TQString newGroup = metaContact()->groups().first()->displayName(); if ( flags & Kopete::Contact::MovedBetweenGroup ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << "contact changed groups. moving on server" << endl; @@ -206,22 +206,22 @@ Kopete::ChatSession *YahooContact::manager( Kopete::Contact::CanCreateFlags canC Kopete::ContactPtrList m_them; m_them.append( this ); m_manager = new YahooChatSession( protocol(), account()->myself(), m_them ); - connect( m_manager, SIGNAL( destroyed() ), this, SLOT( slotChatSessionDestroyed() ) ); - connect( m_manager, SIGNAL( messageSent ( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( slotSendMessage( Kopete::Message& ) ) ); - connect( m_manager, SIGNAL( myselfTyping( bool) ), this, SLOT( slotTyping( bool ) ) ); - connect( m_account, SIGNAL( receivedTypingMsg( const QString &, bool ) ), m_manager, SLOT( receivedTypingMsg( const QString&, bool ) ) ); - connect( this, SIGNAL(displayPictureChanged()), m_manager, SLOT(slotDisplayPictureChanged())); + connect( m_manager, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotChatSessionDestroyed() ) ); + connect( m_manager, TQT_SIGNAL( messageSent ( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( slotSendMessage( Kopete::Message& ) ) ); + connect( m_manager, TQT_SIGNAL( myselfTyping( bool) ), this, TQT_SLOT( slotTyping( bool ) ) ); + connect( m_account, TQT_SIGNAL( receivedTypingMsg( const TQString &, bool ) ), m_manager, TQT_SLOT( receivedTypingMsg( const TQString&, bool ) ) ); + connect( this, TQT_SIGNAL(displayPictureChanged()), m_manager, TQT_SLOT(slotDisplayPictureChanged())); } return m_manager; } -QString YahooContact::prepareMessage( const QString &messageText ) +TQString YahooContact::prepareMessage( const TQString &messageText ) { // Yahoo does not understand XML/HTML message data, so send plain text // instead. (Yahoo has its own format for "rich text".) - QString newMsg( messageText ); - QRegExp regExp; + TQString newMsg( messageText ); + TQRegExp regExp; int pos = 0; regExp.setMinimal( true ); @@ -232,7 +232,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\033[1m\\3\033[x1m" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\033[1m\\3\033[x1m" ) ); } } @@ -243,7 +243,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\033[4m\\3\033[x4m" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\033[4m\\3\033[x4m" ) ); } } @@ -254,7 +254,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\033[2m\\3\033[x2m" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\033[2m\\3\033[x2m" ) ); } } @@ -265,7 +265,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\033[#\\2m\\4\033[#000000m" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\033[#\\2m\\4\033[#000000m" ) ); } } @@ -276,7 +276,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\\4" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\\4" ) ); } } @@ -287,7 +287,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\\4" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\\4" ) ); } } @@ -298,18 +298,18 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\\2") ); + newMsg.replace( regExp, TQString::fromLatin1("\\2") ); } } // convert escaped chars - newMsg.replace( QString::fromLatin1( ">" ), QString::fromLatin1( ">" ) ); - newMsg.replace( QString::fromLatin1( "<" ), QString::fromLatin1( "<" ) ); - newMsg.replace( QString::fromLatin1( """ ), QString::fromLatin1( "\"" ) ); - newMsg.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); - newMsg.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); - newMsg.replace( QString::fromLatin1( "
" ), QString::fromLatin1( "\r" ) ); - newMsg.replace( QString::fromLatin1( "
" ), QString::fromLatin1( "\r" ) ); + newMsg.replace( TQString::fromLatin1( ">" ), TQString::fromLatin1( ">" ) ); + newMsg.replace( TQString::fromLatin1( "<" ), TQString::fromLatin1( "<" ) ); + newMsg.replace( TQString::fromLatin1( """ ), TQString::fromLatin1( "\"" ) ); + newMsg.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); + newMsg.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); + newMsg.replace( TQString::fromLatin1( "
" ), TQString::fromLatin1( "\r" ) ); + newMsg.replace( TQString::fromLatin1( "
" ), TQString::fromLatin1( "\r" ) ); return newMsg; } @@ -318,7 +318,7 @@ void YahooContact::slotSendMessage( Kopete::Message &message ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString messageText = message.escapedBody(); + TQString messageText = message.escapedBody(); kdDebug(YAHOO_GEN_DEBUG) << "Original message: " << messageText << endl; messageText = prepareMessage( messageText ); kdDebug(YAHOO_GEN_DEBUG) << "Converted message: " << messageText << endl; @@ -339,10 +339,10 @@ void YahooContact::slotSendMessage( Kopete::Message &message ) manager(Kopete::Contact::CanCreate)->messageSucceeded(); } -void YahooContact::sendFile( const KURL &sourceURL, const QString &fileName, uint fileSize ) +void YahooContact::sendFile( const KURL &sourceURL, const TQString &fileName, uint fileSize ) { Kopete::TransferManager::transferManager()->sendFile( sourceURL, fileName, fileSize, - false, this, SLOT(slotSendFile( const KURL & )) ); + false, this, TQT_SLOT(slotSendFile( const KURL & )) ); } void YahooContact::slotTyping(bool isTyping_ ) @@ -361,13 +361,13 @@ void YahooContact::slotChatSessionDestroyed() m_sessionActive = false; } -QPtrList *YahooContact::customContextMenuActions() +TQPtrList *YahooContact::customContextMenuActions() { - QPtrList *actionCollection = new QPtrList(); + TQPtrList *actionCollection = new TQPtrList(); if ( !m_webcamAction ) { m_webcamAction = new KAction( i18n( "View &Webcam" ), "webcamreceive", KShortcut(), - this, SLOT( requestWebcam() ), this, "view_webcam" ); + this, TQT_SLOT( requestWebcam() ), this, "view_webcam" ); } if ( isReachable() ) m_webcamAction->setEnabled( true ); @@ -378,7 +378,7 @@ QPtrList *YahooContact::customContextMenuActions() if( !m_inviteWebcamAction ) { m_inviteWebcamAction = new KAction( i18n( "Invite to view your Webcam" ), "webcamsend", KShortcut(), - this, SLOT( inviteWebcam() ), this, "invite_webcam" ); + this, TQT_SLOT( inviteWebcam() ), this, "invite_webcam" ); } if ( isReachable() ) m_inviteWebcamAction->setEnabled( true ); @@ -388,7 +388,7 @@ QPtrList *YahooContact::customContextMenuActions() if ( !m_buzzAction ) { - m_buzzAction = new KAction( i18n( "&Buzz Contact" ), "bell", KShortcut(), this, SLOT( buzzContact() ), this, "buzz_contact"); + m_buzzAction = new KAction( i18n( "&Buzz Contact" ), "bell", KShortcut(), this, TQT_SLOT( buzzContact() ), this, "buzz_contact"); } if ( isReachable() ) m_buzzAction->setEnabled( true ); @@ -398,7 +398,7 @@ QPtrList *YahooContact::customContextMenuActions() if ( !m_stealthAction ) { - m_stealthAction = new KAction( i18n( "&Stealth Setting" ), "yahoo_stealthed", KShortcut(), this, SLOT( stealthContact() ), this, "stealth_contact"); + m_stealthAction = new KAction( i18n( "&Stealth Setting" ), "yahoo_stealthed", KShortcut(), this, TQT_SLOT( stealthContact() ), this, "stealth_contact"); } if ( isReachable() ) m_stealthAction->setEnabled( true ); @@ -408,7 +408,7 @@ QPtrList *YahooContact::customContextMenuActions() if ( !m_inviteConferenceAction ) { - m_inviteConferenceAction = new KAction( i18n( "&Invite to Conference" ), "kontact_contacts", KShortcut(), this, SLOT( inviteConference() ), this, "invite_conference"); + m_inviteConferenceAction = new KAction( i18n( "&Invite to Conference" ), "kontact_contacts", KShortcut(), this, TQT_SLOT( inviteConference() ), this, "invite_conference"); } if ( isReachable() ) m_inviteConferenceAction->setEnabled( true ); @@ -418,7 +418,7 @@ QPtrList *YahooContact::customContextMenuActions() if ( !m_profileAction ) { - m_profileAction = new KAction( i18n( "&View Yahoo Profile" ), "kontact_notes", KShortcut(), this, SLOT( slotUserProfile() ), this, "profile_contact"); + m_profileAction = new KAction( i18n( "&View Yahoo Profile" ), "kontact_notes", KShortcut(), this, TQT_SLOT( slotUserProfile() ), this, "profile_contact"); } m_profileAction->setEnabled( true ); actionCollection->append( m_profileAction ); @@ -440,14 +440,14 @@ void YahooContact::slotUserInfo() dlg->setData( *m_YABEntry ); dlg->setAccountConnected( m_account->isConnected() ); dlg->show(); - QObject::connect( dlg, SIGNAL(saveYABEntry( YABEntry & )), m_account, SLOT(slotSaveYABEntry( YABEntry & ))); + TQObject::connect( dlg, TQT_SIGNAL(saveYABEntry( YABEntry & )), m_account, TQT_SLOT(slotSaveYABEntry( YABEntry & ))); } void YahooContact::slotUserProfile() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString profileSiteString = QString::fromLatin1("http://profiles.yahoo.com/") + userId(); + TQString profileSiteString = TQString::fromLatin1("http://profiles.yahoo.com/") + userId(); KRun::runURL( KURL( profileSiteString ) , "text/html" ); } @@ -477,7 +477,7 @@ void YahooContact::stealthContact() // Show dialog - if ( stealthSettingDialog->exec() == QDialog::Rejected ) + if ( stealthSettingDialog->exec() == TQDialog::Rejected ) { stealthSettingDialog->delayedDestruct(); return; @@ -518,7 +518,7 @@ void YahooContact::buzzContact() Kopete::Message msg = Kopete::Message( manager(Kopete::Contact::CannotCreate)->myself() , manager(Kopete::Contact::CannotCreate)->members(), i18n("Buzzz!!!"), Kopete::Message::Outbound, Kopete::Message::PlainText, - QString::null , Kopete::Message::TypeAction); + TQString::null , Kopete::Message::TypeAction); view->appendMessage( msg ); } } @@ -530,7 +530,7 @@ void YahooContact::sendBuddyIconChecksum( int checksum ) } -void YahooContact::sendBuddyIconInfo( const QString &url, int checksum ) +void YahooContact::sendBuddyIconInfo( const TQString &url, int checksum ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; m_account->yahooSession()->sendPictureInformation( m_userId, url, checksum ); @@ -545,14 +545,14 @@ void YahooContact::sendBuddyIconUpdate( int type ) } // new version -void YahooContact::setDisplayPicture(const QByteArray &data, int checksum) +void YahooContact::setDisplayPicture(const TQByteArray &data, int checksum) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << data.size() << endl; - QString newlocation = locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; + TQString newlocation = locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; setProperty( YahooProtocol::protocol()->iconCheckSum, checksum ); - QFile f( newlocation ); + TQFile f( newlocation ); if (!f.open( IO_WriteOnly )) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << "Saving of " << newlocation << " failed!" << endl; @@ -561,7 +561,7 @@ void YahooContact::setDisplayPicture(const QByteArray &data, int checksum) f.writeBlock(data.data(), data.size()); f.close(); - setProperty( Kopete::Global::Properties::self()->photo(), QString() ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString() ); setProperty( Kopete::Global::Properties::self()->photo() , newlocation ); emit displayPictureChanged(); @@ -590,8 +590,8 @@ const YABEntry *YahooContact::yabEntry() void YahooContact::slotEmitDisplayPictureChanged() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString newlocation=locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + TQString newlocation=locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo() , newlocation ); emit displayPictureChanged(); } @@ -613,7 +613,7 @@ void YahooContact::inviteWebcam() m_account->yahooSession()->sendWebcamInvite( m_userId ); } -void YahooContact::receivedWebcamImage( const QPixmap& image ) +void YahooContact::receivedWebcamImage( const TQPixmap& image ) { if( !m_webcamDialog ) initWebcamViewer(); @@ -639,19 +639,19 @@ void YahooContact::initWebcamViewer() if ( !m_webcamDialog ) { m_webcamDialog = new YahooWebcamDialog( userId(), Kopete::UI::Global::mainWidget() ); -// QObject::connect( m_webcamDialog, SIGNAL( closeClicked() ), this, SLOT( closeWebcamDialog() ) ); +// TQObject::connect( m_webcamDialog, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( closeWebcamDialog() ) ); - QObject::connect( this, SIGNAL( signalWebcamClosed( int ) ), - m_webcamDialog, SLOT( webcamClosed( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( signalWebcamClosed( int ) ), + m_webcamDialog, TQT_SLOT( webcamClosed( int ) ) ); - QObject::connect( this, SIGNAL( signalWebcamPaused() ), - m_webcamDialog, SLOT( webcamPaused() ) ); + TQObject::connect( this, TQT_SIGNAL( signalWebcamPaused() ), + m_webcamDialog, TQT_SLOT( webcamPaused() ) ); - QObject::connect( this, SIGNAL ( signalReceivedWebcamImage( const QPixmap& ) ), - m_webcamDialog, SLOT( newImage( const QPixmap& ) ) ); + TQObject::connect( this, TQT_SIGNAL ( signalReceivedWebcamImage( const TQPixmap& ) ), + m_webcamDialog, TQT_SLOT( newImage( const TQPixmap& ) ) ); - QObject::connect( m_webcamDialog, SIGNAL ( closingWebcamDialog ( ) ), - this, SLOT ( closeWebcamDialog ( ) ) ); + TQObject::connect( m_webcamDialog, TQT_SIGNAL ( closingWebcamDialog ( ) ), + this, TQT_SLOT ( closeWebcamDialog ( ) ) ); } m_webcamDialog->show(); } @@ -673,17 +673,17 @@ void YahooContact::requestWebcam() void YahooContact::closeWebcamDialog() { - QObject::disconnect( this, SIGNAL( signalWebcamClosed( int ) ), - m_webcamDialog, SLOT( webcamClosed( int ) ) ); + TQObject::disconnect( this, TQT_SIGNAL( signalWebcamClosed( int ) ), + m_webcamDialog, TQT_SLOT( webcamClosed( int ) ) ); - QObject::disconnect( this, SIGNAL( signalWebcamPaused() ), - m_webcamDialog, SLOT( webcamPaused( ) ) ); + TQObject::disconnect( this, TQT_SIGNAL( signalWebcamPaused() ), + m_webcamDialog, TQT_SLOT( webcamPaused( ) ) ); - QObject::disconnect( this, SIGNAL ( signalReceivedWebcamImage( const QPixmap& ) ), - m_webcamDialog, SLOT( newImage( const QPixmap& ) ) ); + TQObject::disconnect( this, TQT_SIGNAL ( signalReceivedWebcamImage( const TQPixmap& ) ), + m_webcamDialog, TQT_SLOT( newImage( const TQPixmap& ) ) ); - QObject::disconnect( m_webcamDialog, SIGNAL ( closingWebcamDialog ( ) ), - this, SLOT ( closeWebcamDialog ( ) ) ); + TQObject::disconnect( m_webcamDialog, TQT_SIGNAL ( closingWebcamDialog ( ) ), + this, TQT_SLOT ( closeWebcamDialog ( ) ) ); if( m_receivingWebcam ) m_account->yahooSession()->closeWebcam( contactId() ); m_webcamDialog->delayedDestruct(); @@ -826,8 +826,8 @@ void YahooContact::readYABEntry() m_YABEntry->workURL = property( YahooProtocol::protocol()->propWorkURL ).value().toString(); // Miscellanous - m_YABEntry->birthday = QDate::fromString( property( YahooProtocol::protocol()->propBirthday ).value().toString(), Qt::ISODate ); - m_YABEntry->anniversary = QDate::fromString( property( YahooProtocol::protocol()->propAnniversary ).value().toString(), Qt::ISODate ); + m_YABEntry->birthday = TQDate::fromString( property( YahooProtocol::protocol()->propBirthday ).value().toString(), Qt::ISODate ); + m_YABEntry->anniversary = TQDate::fromString( property( YahooProtocol::protocol()->propAnniversary ).value().toString(), Qt::ISODate ); m_YABEntry->notes = property( YahooProtocol::protocol()->propNotes ).value().toString(); m_YABEntry->additional1 = property( YahooProtocol::protocol()->propAdditional1 ).value().toString(); m_YABEntry->additional2 = property( YahooProtocol::protocol()->propAdditional2 ).value().toString(); diff --git a/kopete/protocols/yahoo/yahoocontact.h b/kopete/protocols/yahoo/yahoocontact.h index 53759252..092a2c93 100644 --- a/kopete/protocols/yahoo/yahoocontact.h +++ b/kopete/protocols/yahoo/yahoocontact.h @@ -42,15 +42,15 @@ class YahooContact : public Kopete::Contact { Q_OBJECT public: - YahooContact( YahooAccount *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact ); + YahooContact( YahooAccount *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact ); ~YahooContact(); /** Base Class Reimplementations **/ virtual bool isOnline() const; virtual bool isReachable(); - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); virtual Kopete::ChatSession *manager( Kopete::Contact::CanCreateFlags canCreate= Kopete::Contact::CanCreate ); - virtual void serialize( QMap &serializedData, QMap &addressBookData ); + virtual void serialize( TQMap &serializedData, TQMap &addressBookData ); void setOnlineStatus(const Kopete::OnlineStatus &status); void setYahooStatus( const Kopete::OnlineStatus& ); @@ -59,32 +59,32 @@ public: /** The group name getter and setter methods**/ - QString group() const; - void setGroup( const QString& ); + TQString group() const; + void setGroup( const TQString& ); /** The userId getter method**/ - QString userId() const; + TQString userId() const; - void receivedWebcamImage( const QPixmap& ); + void receivedWebcamImage( const TQPixmap& ); void webcamClosed( int ); void webcamPaused(); const YABEntry *yabEntry(); - static QString prepareMessage( const QString &messageText ); + static TQString prepareMessage( const TQString &messageText ); public slots: virtual void slotUserInfo(); virtual void slotSendFile( const KURL &file ); virtual void deleteContact(); - virtual void sendFile( const KURL &sourceURL = KURL(), const QString &fileName = QString::null, uint fileSize = 0L ); + virtual void sendFile( const KURL &sourceURL = KURL(), const TQString &fileName = TQString::null, uint fileSize = 0L ); void slotUserProfile(); void stealthContact(); void requestWebcam(); void inviteWebcam(); void buzzContact(); - void setDisplayPicture(const QByteArray &data, int checksum); - void sendBuddyIconInfo( const QString &url, int checksum ); + void setDisplayPicture(const TQByteArray &data, int checksum); + void sendBuddyIconInfo( const TQString &url, int checksum ); void sendBuddyIconUpdate( int type ); void sendBuddyIconChecksum( int checksum ); void setYABEntry( YABEntry *, bool show = false ); @@ -98,7 +98,7 @@ public slots: void sync(unsigned int flags); signals: - void signalReceivedWebcamImage( const QPixmap &pic ); + void signalReceivedWebcamImage( const TQPixmap &pic ); void signalWebcamClosed( int reason ); void signalWebcamPaused(); void displayPictureChanged(); @@ -117,8 +117,8 @@ private slots: void readYABEntry(); private: - QString m_userId; - QString m_groupName; + TQString m_userId; + TQString m_groupName; YABEntry *m_YABEntry; YahooChatSession *m_manager; YahooWebcamDialog* m_webcamDialog; diff --git a/kopete/protocols/yahoo/yahooeditaccount.cpp b/kopete/protocols/yahoo/yahooeditaccount.cpp index c83905ed..c2508a58 100644 --- a/kopete/protocols/yahoo/yahooeditaccount.cpp +++ b/kopete/protocols/yahoo/yahooeditaccount.cpp @@ -17,14 +17,14 @@ */ // QT Includes -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE Includes #include @@ -47,7 +47,7 @@ #include "yahooeditaccount.h" // Yahoo Add Contact page -YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, QWidget *parent, const char* /*name*/): YahooEditAccountBase(parent), KopeteEditAccountWidget(theAccount) +YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent, const char* /*name*/): YahooEditAccountBase(parent), KopeteEditAccountWidget(theAccount) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -63,7 +63,7 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the mAutoConnect->setChecked(acct->excludeConnect()); mPasswordWidget->load( &acct->password() ); - QString pagerServer = account()->configGroup()->readEntry("Server", "scs.msg.yahoo.com"); + TQString pagerServer = account()->configGroup()->readEntry("Server", "scs.msg.yahoo.com"); int pagerPort = account()->configGroup()->readNumEntry("Port", 5050); if( pagerServer != "scs.msg.yahoo.com" || pagerPort != 5050 ) optionOverrideServer->setChecked( true ); @@ -72,11 +72,11 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the editServerAddress->setText( pagerServer ); sbxServerPort->setValue( pagerPort ); - QString iconUrl = account()->configGroup()->readEntry("pictureUrl", ""); + TQString iconUrl = account()->configGroup()->readEntry("pictureUrl", ""); bool sendPicture = account()->configGroup()->readBoolEntry("sendPicture", false); optionSendBuddyIcon->setChecked( sendPicture ); buttonSelectPicture->setEnabled( sendPicture ); - connect( optionSendBuddyIcon, SIGNAL( toggled( bool ) ), buttonSelectPicture, SLOT( setEnabled( bool ) ) ); + connect( optionSendBuddyIcon, TQT_SIGNAL( toggled( bool ) ), buttonSelectPicture, TQT_SLOT( setEnabled( bool ) ) ); editPictureUrl->setText( iconUrl ); if( !iconUrl.isEmpty() ) m_Picture->setPixmap( KURL( iconUrl ).path() ); @@ -86,15 +86,15 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the mGlobalIdentity->setChecked( account()->configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ); } - QObject::connect(buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); - QObject::connect(buttonSelectPicture, SIGNAL(clicked()), this, SLOT(slotSelectPicture())); + TQObject::connect(buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister())); + TQObject::connect(buttonSelectPicture, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectPicture())); optionSendBuddyIcon->setEnabled( account() ); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mAutoConnect, mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mPasswordWidget->mRemembered, mPasswordWidget->mPassword ); - QWidget::setTabOrder( mPasswordWidget->mPassword, buttonRegister ); + TQWidget::setTabOrder( mAutoConnect, mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mPasswordWidget->mRemembered, mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mPasswordWidget->mPassword, buttonRegister ); show(); } @@ -148,7 +148,7 @@ Kopete::Account *YahooEditAccount::apply() } else { - yahooAccount->setBuddyIcon( KURL( QString::null ) ); + yahooAccount->setBuddyIcon( KURL( TQString::null ) ); } // Global Identity @@ -164,16 +164,16 @@ void YahooEditAccount::slotOpenRegister() void YahooEditAccount::slotSelectPicture() { - KURL file = KFileDialog::getImageOpenURL( QString::null, this, i18n( "Yahoo Buddy Icon" ) ); + KURL file = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "Yahoo Buddy Icon" ) ); if ( file.isEmpty() ) return; - QImage picture(file.path()); + TQImage picture(file.path()); if( !picture.isNull() ) { - picture = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(picture), 96, 96, this ); - QString newlocation( locateLocal( "appdata", "yahoopictures/"+ file.fileName().lower() ) ) ; + picture = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(picture), 96, 96, this ); + TQString newlocation( locateLocal( "appdata", "yahoopictures/"+ file.fileName().lower() ) ) ; file = KURL(newlocation); if( !picture.save( newlocation, "PNG" )) { diff --git a/kopete/protocols/yahoo/yahooeditaccount.h b/kopete/protocols/yahoo/yahooeditaccount.h index 17a93752..a64d88f7 100644 --- a/kopete/protocols/yahoo/yahooeditaccount.h +++ b/kopete/protocols/yahoo/yahooeditaccount.h @@ -41,7 +41,7 @@ private: Kopete::UI::PasswordWidget *mPasswordWidget; public: - YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, QWidget *parent = 0, const char *name = 0); + YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent = 0, const char *name = 0); virtual bool validateData(); diff --git a/kopete/protocols/yahoo/yahooprotocol.cpp b/kopete/protocols/yahoo/yahooprotocol.cpp index 32c3c55c..dc2e3cdc 100644 --- a/kopete/protocols/yahoo/yahooprotocol.cpp +++ b/kopete/protocols/yahoo/yahooprotocol.cpp @@ -37,10 +37,10 @@ typedef KGenericFactory YahooProtocolFactory; K_EXPORT_COMPONENT_FACTORY( kopete_yahoo, YahooProtocolFactory( "kopete_yahoo" ) ) -YahooProtocol::YahooProtocol( QObject *parent, const char *name, const QStringList & ) +YahooProtocol::YahooProtocol( TQObject *parent, const char *name, const TQStringList & ) : Kopete::Protocol( YahooProtocolFactory::instance(), parent, name ), - Offline( Kopete::OnlineStatus::Offline, 0, this, 0x5a55aa56, QString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ), - Online( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ), + Offline( Kopete::OnlineStatus::Offline, 0, this, 0x5a55aa56, TQString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ), + Online( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ), BeRightBack( Kopete::OnlineStatus::Away, 22, this, 1, "contact_away_overlay", i18n( "Be right back" ), i18n( "Be right back" ) ), Busy( Kopete::OnlineStatus::Away, 20, this, 2, "contact_busy_overlay", i18n( "Busy" ), i18n( "Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ), NotAtHome( Kopete::OnlineStatus::Away, 17, this, 3, "contact_xa_overlay", i18n( "Not at home" ), i18n( "Not at home" ), Kopete::OnlineStatusManager::ExtendedAway ), @@ -55,51 +55,51 @@ YahooProtocol::YahooProtocol( QObject *parent, const char *name, const QStringLi Idle( Kopete::OnlineStatus::Away, 15, this, 999, "yahoo_idle", i18n( "Idle" ), i18n( "Idle" ), Kopete::OnlineStatusManager::Idle ), Connecting( Kopete::OnlineStatus::Connecting,2, this, 555, "yahoo_connecting", i18n( "Connecting" ) ), awayMessage(Kopete::Global::Properties::self()->awayMessage()), - iconCheckSum("iconCheckSum", i18n("Buddy Icon Checksum"), QString::null, true, false, true), - iconExpire("iconExpire", i18n("Buddy Icon Expire"), QString::null, true, false, true), - iconRemoteUrl("iconRemoteUrl", i18n("Buddy Icon Remote Url"), QString::null, true, false, true), + iconCheckSum("iconCheckSum", i18n("Buddy Icon Checksum"), TQString::null, true, false, true), + iconExpire("iconExpire", i18n("Buddy Icon Expire"), TQString::null, true, false, true), + iconRemoteUrl("iconRemoteUrl", i18n("Buddy Icon Remote Url"), TQString::null, true, false, true), propfirstName(Kopete::Global::Properties::self()->firstName()), propSecondName(), propLastName(Kopete::Global::Properties::self()->lastName()), propNickName(Kopete::Global::Properties::self()->nickName()), - propTitle("YABTitle", i18n("Title"), QString::null, true, false), + propTitle("YABTitle", i18n("Title"), TQString::null, true, false), propPhoneMobile(Kopete::Global::Properties::self()->privateMobilePhone()), propEmail(Kopete::Global::Properties::self()->emailAddress()), - propYABId("YABId", i18n("YAB Id"), QString::null, true, false, true), - propPager("YABPager", i18n("Pager number"), QString::null, true, false), - propFax("YABFax", i18n("Fax number"), QString::null, true, false), - propAdditionalNumber("YABAdditionalNumber", i18n("Additional number"), QString::null, true, false), - propAltEmail1("YABAlternativeEmail1", i18n("Alternative email 1"), QString::null, true, false), - propAltEmail2("YABAlternativeEmail2", i18n("Alternative email 1"), QString::null, true, false), - propImAIM("YABIMAIM", i18n("AIM"), QString::null, true, false), - propImICQ("YABIMICQ", i18n("ICQ"), QString::null, true, false), - propImMSN("YABIMMSN", i18n("MSN"), QString::null, true, false), - propImGoogleTalk("YABIMGoogleTalk", i18n("GoogleTalk"), QString::null, true, false), - propImSkype("YABIMSkype", i18n("Skype"), QString::null, true, false), - propImIRC("YABIMIRC", i18n("IRC"), QString::null, true, false), - propImQQ("YABIMQQ", i18n("QQ"), QString::null, true, false), - propPrivateAddress("YABPrivateAddress", i18n("Private Address"), QString::null, true, false), - propPrivateCity("YABPrivateCity", i18n("Private City"), QString::null, true, false), - propPrivateState("YABPrivateState", i18n("Private State"), QString::null, true, false), - propPrivateZIP("YABPrivateZIP", i18n("Private ZIP"), QString::null, true, false), - propPrivateCountry("YABPrivateCountry", i18n("Private Country"), QString::null, true, false), + propYABId("YABId", i18n("YAB Id"), TQString::null, true, false, true), + propPager("YABPager", i18n("Pager number"), TQString::null, true, false), + propFax("YABFax", i18n("Fax number"), TQString::null, true, false), + propAdditionalNumber("YABAdditionalNumber", i18n("Additional number"), TQString::null, true, false), + propAltEmail1("YABAlternativeEmail1", i18n("Alternative email 1"), TQString::null, true, false), + propAltEmail2("YABAlternativeEmail2", i18n("Alternative email 1"), TQString::null, true, false), + propImAIM("YABIMAIM", i18n("AIM"), TQString::null, true, false), + propImICQ("YABIMICQ", i18n("ICQ"), TQString::null, true, false), + propImMSN("YABIMMSN", i18n("MSN"), TQString::null, true, false), + propImGoogleTalk("YABIMGoogleTalk", i18n("GoogleTalk"), TQString::null, true, false), + propImSkype("YABIMSkype", i18n("Skype"), TQString::null, true, false), + propImIRC("YABIMIRC", i18n("IRC"), TQString::null, true, false), + propImQQ("YABIMQQ", i18n("QQ"), TQString::null, true, false), + propPrivateAddress("YABPrivateAddress", i18n("Private Address"), TQString::null, true, false), + propPrivateCity("YABPrivateCity", i18n("Private City"), TQString::null, true, false), + propPrivateState("YABPrivateState", i18n("Private State"), TQString::null, true, false), + propPrivateZIP("YABPrivateZIP", i18n("Private ZIP"), TQString::null, true, false), + propPrivateCountry("YABPrivateCountry", i18n("Private Country"), TQString::null, true, false), propPrivatePhone(Kopete::Global::Properties::self()->privatePhone()), - propPrivateURL("YABPrivateURL", i18n("Private URL"), QString::null, true, false), - propCorporation("YABCorporation", i18n("Corporation"), QString::null, true, false), - propWorkAddress("YABWorkAddress", i18n("Work Address"), QString::null, true, false), - propWorkCity("YABWorkCity", i18n("Work City"), QString::null, true, false), - propWorkState("YABWorkState", i18n("Work State"), QString::null, true, false), - propWorkZIP("YABWorkZIP", i18n("Work ZIP"), QString::null, true, false), - propWorkCountry("YABWorkCountry", i18n("Work Country"), QString::null, true, false), + propPrivateURL("YABPrivateURL", i18n("Private URL"), TQString::null, true, false), + propCorporation("YABCorporation", i18n("Corporation"), TQString::null, true, false), + propWorkAddress("YABWorkAddress", i18n("Work Address"), TQString::null, true, false), + propWorkCity("YABWorkCity", i18n("Work City"), TQString::null, true, false), + propWorkState("YABWorkState", i18n("Work State"), TQString::null, true, false), + propWorkZIP("YABWorkZIP", i18n("Work ZIP"), TQString::null, true, false), + propWorkCountry("YABWorkCountry", i18n("Work Country"), TQString::null, true, false), propWorkPhone(Kopete::Global::Properties::self()->workPhone()), - propWorkURL("YABWorkURL", i18n("Work URL"), QString::null, true, false), - propBirthday("YABBirthday", i18n("Birthday"), QString::null, true, false), - propAnniversary("YABAnniversary", i18n("Anniversary"), QString::null, true, false), - propNotes("YABNotes", i18n("Notes"), QString::null, true, false), - propAdditional1("YABAdditional1", i18n("Additional 1"), QString::null, true, false), - propAdditional2("YABAdditional2", i18n("Additional 2"), QString::null, true, false), - propAdditional3("YABAdditional3", i18n("Additional 3"), QString::null, true, false), - propAdditional4("YABAdditional4", i18n("Additional 4"), QString::null, true, false) + propWorkURL("YABWorkURL", i18n("Work URL"), TQString::null, true, false), + propBirthday("YABBirthday", i18n("Birthday"), TQString::null, true, false), + propAnniversary("YABAnniversary", i18n("Anniversary"), TQString::null, true, false), + propNotes("YABNotes", i18n("Notes"), TQString::null, true, false), + propAdditional1("YABAdditional1", i18n("Additional 1"), TQString::null, true, false), + propAdditional2("YABAdditional2", i18n("Additional 2"), TQString::null, true, false), + propAdditional3("YABAdditional3", i18n("Additional 3"), TQString::null, true, false), + propAdditional4("YABAdditional4", i18n("Additional 4"), TQString::null, true, false) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -166,10 +166,10 @@ YahooProtocol *YahooProtocol::protocol() } Kopete::Contact *YahooProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, const QMap & /* addressBookData */ ) + const TQMap &serializedData, const TQMap & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; YahooAccount *theAccount = static_cast(Kopete::AccountManager::self()->findAccount(protocol()->pluginId(), accountId)); @@ -187,18 +187,18 @@ Kopete::Contact *YahooProtocol::deserializeContact( Kopete::MetaContact *metaCon return theAccount->contacts()[contactId]; } -AddContactPage *YahooProtocol::createAddContactWidget( QWidget * parent , Kopete::Account* ) +AddContactPage *YahooProtocol::createAddContactWidget( TQWidget * parent , Kopete::Account* ) { kdDebug(YAHOO_GEN_DEBUG) << "YahooProtocol::createAddContactWidget()" << endl; return new YahooAddContact(this, parent); } -KopeteEditAccountWidget *YahooProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *YahooProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new YahooEditAccount(this, account, parent); } -Kopete::Account *YahooProtocol::createNewAccount(const QString &accountId) +Kopete::Account *YahooProtocol::createNewAccount(const TQString &accountId) { return new YahooAccount(this, accountId); } diff --git a/kopete/protocols/yahoo/yahooprotocol.h b/kopete/protocols/yahoo/yahooprotocol.h index 6f399ada..4b597243 100644 --- a/kopete/protocols/yahoo/yahooprotocol.h +++ b/kopete/protocols/yahoo/yahooprotocol.h @@ -23,8 +23,8 @@ #include "kopeteonlinestatus.h" // QT Includes -#include -#include +#include +#include // KDE Includes #include "kopeteprotocol.h" @@ -43,7 +43,7 @@ class YahooProtocol : public Kopete::Protocol { Q_OBJECT public: - YahooProtocol( QObject *parent, const char *name, const QStringList &args ); + YahooProtocol( TQObject *parent, const char *name, const TQStringList &args ); ~YahooProtocol(); //Online Statuses @@ -126,15 +126,15 @@ public: static YahooProtocol *protocol(); virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &addressBookData ); + const TQMap &serializedData, + const TQMap &addressBookData ); Kopete::OnlineStatus statusFromYahoo( int status ); public slots: - virtual AddContactPage *createAddContactWidget(QWidget * parent, Kopete::Account* a); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget * parent, Kopete::Account* a); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); private: diff --git a/kopete/protocols/yahoo/yahooverifyaccount.cpp b/kopete/protocols/yahoo/yahooverifyaccount.cpp index cfb3ede6..7d50e900 100644 --- a/kopete/protocols/yahoo/yahooverifyaccount.cpp +++ b/kopete/protocols/yahoo/yahooverifyaccount.cpp @@ -14,9 +14,9 @@ */ // QT Includes -#include -#include -#include +#include +#include +#include // KDE Includes #include @@ -37,7 +37,7 @@ #include "yahooverifyaccount.h" #include "yahooaccount.h" -YahooVerifyAccount::YahooVerifyAccount(Kopete::Account *account, QWidget *parent, const char *name) +YahooVerifyAccount::YahooVerifyAccount(Kopete::Account *account, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Account Verification - Yahoo"), Cancel|Apply, Apply, true ) { @@ -59,11 +59,11 @@ void YahooVerifyAccount::setUrl( KURL url ) mFile = new KTempFile( locateLocal( "tmp", url.fileName() ) ); mFile->setAutoDelete( true ); KIO::TransferJob *transfer = KIO::get( url, false, false ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); } -void YahooVerifyAccount::slotData( KIO::Job */*job*/, const QByteArray& data ) +void YahooVerifyAccount::slotData( KIO::Job */*job*/, const TQByteArray& data ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -89,7 +89,7 @@ bool YahooVerifyAccount::validateData() void YahooVerifyAccount::slotClose() { - QDialog::done(0); + TQDialog::done(0); } void YahooVerifyAccount::slotApply() @@ -98,7 +98,7 @@ void YahooVerifyAccount::slotApply() YahooAccount* myAccount = static_cast(mTheAccount); myAccount->verifyAccount( mTheDialog->mWord->text() ); - QDialog::done(0); + TQDialog::done(0); } #include "yahooverifyaccount.moc" diff --git a/kopete/protocols/yahoo/yahooverifyaccount.h b/kopete/protocols/yahoo/yahooverifyaccount.h index 237a45a4..c179a4c6 100644 --- a/kopete/protocols/yahoo/yahooverifyaccount.h +++ b/kopete/protocols/yahoo/yahooverifyaccount.h @@ -36,7 +36,7 @@ private: KTempFile *mFile; YahooVerifyAccountBase *mTheDialog; public: - YahooVerifyAccount(Kopete::Account *account, QWidget *parent = 0, const char *name = 0); + YahooVerifyAccount(Kopete::Account *account, TQWidget *parent = 0, const char *name = 0); ~YahooVerifyAccount(); virtual bool validateData(); @@ -47,7 +47,7 @@ protected slots: virtual void slotClose(); virtual void slotApply(); public slots: - void slotData( KIO::Job *job, const QByteArray& data ); + void slotData( KIO::Job *job, const TQByteArray& data ); void slotComplete( KIO::Job *job ); }; diff --git a/kopete/protocols/yahoo/yahoowebcam.cpp b/kopete/protocols/yahoo/yahoowebcam.cpp index 71ff921a..1e22b89c 100644 --- a/kopete/protocols/yahoo/yahoowebcam.cpp +++ b/kopete/protocols/yahoo/yahoowebcam.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include "client.h" #include "yahoowebcam.h" @@ -25,23 +25,23 @@ #include "avdevice/videodevicepool.h" -YahooWebcam::YahooWebcam( YahooAccount *account ) : QObject( 0, "yahoo_webcam" ) +YahooWebcam::YahooWebcam( YahooAccount *account ) : TQObject( 0, "yahoo_webcam" ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; theAccount = account; theDialog = 0L; origImg = new KTempFile(); convertedImg = new KTempFile(); - m_img = new QImage(); + m_img = new TQImage(); - m_sendTimer = new QTimer( this ); - connect( m_sendTimer, SIGNAL(timeout()), this, SLOT(sendImage()) ); + m_sendTimer = new TQTimer( this ); + connect( m_sendTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sendImage()) ); - m_updateTimer = new QTimer( this ); - connect( m_updateTimer, SIGNAL(timeout()), this, SLOT(updateImage()) ); + m_updateTimer = new TQTimer( this ); + connect( m_updateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateImage()) ); theDialog = new YahooWebcamDialog( "YahooWebcam" ); - connect( theDialog, SIGNAL(closingWebcamDialog()), this, SLOT(webcamDialogClosing()) ); + connect( theDialog, TQT_SIGNAL(closingWebcamDialog()), this, TQT_SLOT(webcamDialogClosing()) ); m_devicePool = Kopete::AV::VideoDevicePool::self(); m_devicePool->open(); @@ -52,8 +52,8 @@ YahooWebcam::YahooWebcam( YahooAccount *account ) : QObject( 0, "yahoo_webcam" ) YahooWebcam::~YahooWebcam() { - QFile::remove( origImg->name() ); - QFile::remove( convertedImg->name() ); + TQFile::remove( origImg->name() ); + TQFile::remove( convertedImg->name() ); delete origImg; delete convertedImg; delete m_img; @@ -109,10 +109,10 @@ void YahooWebcam::sendImage() } else { - QFile file( convertedImg->name() ); + TQFile file( convertedImg->name() ); if( file.open( IO_ReadOnly ) ) { - QByteArray ar = file.readAll(); + TQByteArray ar = file.readAll(); theAccount->yahooSession()->sendWebcamImage( ar ); } else @@ -120,14 +120,14 @@ void YahooWebcam::sendImage() } } -void YahooWebcam::addViewer( const QString &viewer ) +void YahooWebcam::addViewer( const TQString &viewer ) { m_viewer.push_back( viewer ); if( theDialog ) theDialog->setViewer( m_viewer ); } -void YahooWebcam::removeViewer( const QString &viewer ) +void YahooWebcam::removeViewer( const TQString &viewer ) { m_viewer.remove( viewer ); if( theDialog ) diff --git a/kopete/protocols/yahoo/yahoowebcam.h b/kopete/protocols/yahoo/yahoowebcam.h index 46032059..065ccb61 100644 --- a/kopete/protocols/yahoo/yahoowebcam.h +++ b/kopete/protocols/yahoo/yahoowebcam.h @@ -16,8 +16,8 @@ #ifndef YAHOOWEBCAM_H #define YAHOOWEBCAM_H -#include -#include +#include +#include class YahooAccount; class YahooWebcamDialog; @@ -43,17 +43,17 @@ public slots: void sendImage(); void updateImage(); void webcamDialogClosing(); - void addViewer( const QString & ); - void removeViewer( const QString & ); + void addViewer( const TQString & ); + void removeViewer( const TQString & ); signals: void webcamClosing(); private: YahooAccount *theAccount; YahooWebcamDialog *theDialog; - QTimer *m_sendTimer; - QTimer *m_updateTimer; - QStringList m_viewer; - QImage *m_img; + TQTimer *m_sendTimer; + TQTimer *m_updateTimer; + TQStringList m_viewer; + TQImage *m_img; KTempFile *origImg; KTempFile *convertedImg; Kopete::AV::VideoDevicePool *m_devicePool; -- cgit v1.2.1